From 22f59f59a8cc897d6f073b1f405bab41e51b5a50 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 8 Jul 2026 06:30:47 +0000 Subject: [PATCH 1/2] Configurations: 'specification/providerhub/ProviderHub.Management/tspconfig.yaml', API Version: 2024-09-01, SDK Release Type: beta, and CommitSHA: 'ea850a065dc8679f82dc3fdbba9ceff53eeba116' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6533367 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-mgmt-providerhub/CHANGELOG.md | 7 + .../azure-mgmt-providerhub/LICENSE | 21 + .../azure-mgmt-providerhub/MANIFEST.in | 7 + .../azure-mgmt-providerhub/README.md | 61 + .../azure-mgmt-providerhub/_metadata.json | 11 + sdk/providerhub/azure-mgmt-providerhub/api.md | 9278 ++++++++++++++ .../azure-mgmt-providerhub/api.metadata.yml | 3 + .../apiview-properties.json | 425 + .../azure-mgmt-providerhub/azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/providerhub/__init__.py | 32 + .../azure/mgmt/providerhub/_client.py | 204 + .../azure/mgmt/providerhub/_configuration.py | 80 + .../azure/mgmt/providerhub/_patch.py | 21 + .../azure/mgmt/providerhub/_utils/__init__.py | 6 + .../mgmt/providerhub/_utils/model_base.py | 1770 +++ .../mgmt/providerhub/_utils/serialization.py | 2175 ++++ .../azure/mgmt/providerhub/_utils/utils.py | 25 + .../azure/mgmt/providerhub/_version.py | 9 + .../azure/mgmt/providerhub/aio/__init__.py | 29 + .../azure/mgmt/providerhub/aio/_client.py | 208 + .../mgmt/providerhub/aio/_configuration.py | 80 + .../azure/mgmt/providerhub/aio/_patch.py | 21 + .../providerhub/aio/operations/__init__.py | 46 + .../providerhub/aio/operations/_operations.py | 7059 +++++++++++ .../mgmt/providerhub/aio/operations/_patch.py | 21 + .../azure/mgmt/providerhub/models/__init__.py | 626 + .../azure/mgmt/providerhub/models/_enums.py | 1011 ++ .../azure/mgmt/providerhub/models/_models.py | 10292 ++++++++++++++++ .../azure/mgmt/providerhub/models/_patch.py | 21 + .../mgmt/providerhub/operations/__init__.py | 46 + .../providerhub/operations/_operations.py | 8717 +++++++++++++ .../mgmt/providerhub/operations/_patch.py | 21 + .../azure/mgmt/providerhub/py.typed | 1 + .../azure/mgmt/providerhub/types.py | 4435 +++++++ .../dev_requirements.txt | 5 + ...uthorized_applications_create_or_update.py | 51 + .../authorized_applications_delete.py | 41 + .../authorized_applications_get.py | 42 + .../authorized_applications_list.py | 42 + .../generated_samples/checkin_manifest.py | 42 + .../custom_rollouts_create_or_update.py | 51 + .../custom_rollouts_delete.py | 41 + .../generated_samples/custom_rollouts_get.py | 42 + ..._rollouts_list_by_provider_registration.py | 42 + .../generated_samples/custom_rollouts_stop.py | 41 + .../default_rollouts_create_or_update.py | 51 + .../default_rollouts_delete.py | 41 + .../generated_samples/default_rollouts_get.py | 42 + ..._rollouts_list_by_provider_registration.py | 42 + .../default_rollouts_stop.py | 41 + ...provider_registrations_create_or_update.py | 111 + ...rce_type_registrations_create_or_update.py | 134 + .../generated_samples/generate_manifest.py | 41 + ...gion_frontload_release_create_or_update.py | 80 + ...ion_frontload_release_generate_manifest.py | 79 + .../new_region_frontload_release_get.py | 42 + .../new_region_frontload_release_stop.py | 41 + ...fication_registrations_create_or_update.py | 60 + .../notification_registrations_delete.py | 41 + .../notification_registrations_get.py | 42 + ...strations_list_by_provider_registration.py | 42 + .../operations_create_or_update.py | 80 + .../generated_samples/operations_delete.py | 40 + .../generated_samples/operations_list.py | 40 + ...perations_list_by_provider_registration.py | 41 + .../provider_monitor_settings_create.py | 43 + .../provider_monitor_settings_delete.py | 41 + .../provider_monitor_settings_get.py | 42 + ...monitor_settings_list_by_resource_group.py | 42 + ...r_monitor_settings_list_by_subscription.py | 40 + .../provider_monitor_settings_update.py | 42 + ...provider_registrations_create_or_update.py | 72 + .../provider_registrations_delete.py | 40 + ...vider_registrations_generate_operations.py | 41 + .../provider_registrations_get.py | 41 + .../provider_registrations_list.py | 40 + .../resource_actions_delete_resources.py | 51 + ...rce_type_registrations_create_or_update.py | 88 + .../resource_type_registrations_delete.py | 41 + .../resource_type_registrations_get.py | 42 + ...strations_list_by_provider_registration.py | 42 + .../skus_create_or_update.py | 51 + ...te_or_update_nested_resource_type_first.py | 52 + ...e_or_update_nested_resource_type_second.py | 53 + ...te_or_update_nested_resource_type_third.py | 54 + .../generated_samples/skus_delete.py | 42 + .../skus_delete_nested_resource_type_first.py | 43 + ...skus_delete_nested_resource_type_second.py | 44 + .../skus_delete_nested_resource_type_third.py | 45 + .../generated_samples/skus_get.py | 43 + .../skus_get_nested_resource_type_first.py | 44 + .../skus_get_nested_resource_type_second.py | 45 + .../skus_get_nested_resource_type_third.py | 46 + ...kus_list_by_resource_type_registrations.py | 43 + ...egistrations_nested_resource_type_first.py | 44 + ...gistrations_nested_resource_type_second.py | 45 + ...egistrations_nested_resource_type_third.py | 46 + .../generated_tests/conftest.py | 35 + .../generated_tests/test_provider_hub_mgmt.py | 40 + .../test_provider_hub_mgmt_async.py | 41 + ...mgmt_authorized_applications_operations.py | 80 + ...uthorized_applications_operations_async.py | 83 + ...der_hub_mgmt_custom_rollouts_operations.py | 537 + ...b_mgmt_custom_rollouts_operations_async.py | 554 + ...er_hub_mgmt_default_rollouts_operations.py | 543 + ..._mgmt_default_rollouts_operations_async.py | 560 + ...new_region_frontload_release_operations.py | 136 + ...gion_frontload_release_operations_async.py | 137 + ...t_notification_registrations_operations.py | 82 + ...fication_registrations_operations_async.py | 83 + .../test_provider_hub_mgmt_operations.py | 125 + ...test_provider_hub_mgmt_operations_async.py | 126 + ...mt_provider_monitor_settings_operations.py | 97 + ...vider_monitor_settings_operations_async.py | 100 + ..._mgmt_provider_registrations_operations.py | 247 + ...provider_registrations_operations_async.py | 252 + ...er_hub_mgmt_resource_actions_operations.py | 33 + ..._mgmt_resource_actions_operations_async.py | 36 + ..._resource_type_registrations_operations.py | 264 + ...rce_type_registrations_operations_async.py | 272 + .../test_provider_hub_mgmt_skus_operations.py | 399 + ...provider_hub_mgmt_skus_operations_async.py | 400 + .../azure-mgmt-providerhub/pyproject.toml | 86 + .../azure-mgmt-providerhub/tsp-location.yaml | 4 + sdk/providerhub/ci.yml | 34 + 126 files changed, 55216 insertions(+) create mode 100644 sdk/providerhub/azure-mgmt-providerhub/CHANGELOG.md create mode 100644 sdk/providerhub/azure-mgmt-providerhub/LICENSE create mode 100644 sdk/providerhub/azure-mgmt-providerhub/MANIFEST.in create mode 100644 sdk/providerhub/azure-mgmt-providerhub/README.md create mode 100644 sdk/providerhub/azure-mgmt-providerhub/_metadata.json create mode 100644 sdk/providerhub/azure-mgmt-providerhub/api.md create mode 100644 sdk/providerhub/azure-mgmt-providerhub/api.metadata.yml create mode 100644 sdk/providerhub/azure-mgmt-providerhub/apiview-properties.json create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/__init__.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/__init__.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/__init__.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_client.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_configuration.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_patch.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/__init__.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/model_base.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/serialization.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/utils.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_version.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/__init__.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_client.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_configuration.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_patch.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/__init__.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/_patch.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/__init__.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_enums.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_models.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_patch.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/__init__.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/_patch.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/py.typed create mode 100644 sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/types.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/dev_requirements.txt create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_delete.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_get.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_list.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/checkin_manifest.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_delete.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_get.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_list_by_provider_registration.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_stop.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_delete.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_get.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_list_by_provider_registration.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_stop.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/direct_provider_registrations_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/direct_resource_type_registrations_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/generate_manifest.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_generate_manifest.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_get.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_stop.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_delete.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_get.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_list_by_provider_registration.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_delete.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_list.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_list_by_provider_registration.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_create.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_delete.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_get.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_list_by_resource_group.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_list_by_subscription.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_delete.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_generate_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_get.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_list.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_actions_delete_resources.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_delete.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_get.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_list_by_provider_registration.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_first.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_second.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_third.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_first.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_second.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_third.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_first.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_second.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_third.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_first.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_second.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_third.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/conftest.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_authorized_applications_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_authorized_applications_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_custom_rollouts_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_custom_rollouts_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_default_rollouts_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_default_rollouts_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_new_region_frontload_release_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_new_region_frontload_release_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_notification_registrations_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_notification_registrations_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_monitor_settings_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_monitor_settings_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_registrations_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_registrations_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_actions_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_actions_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_type_registrations_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_type_registrations_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_skus_operations.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_skus_operations_async.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/pyproject.toml create mode 100644 sdk/providerhub/azure-mgmt-providerhub/tsp-location.yaml create mode 100644 sdk/providerhub/ci.yml diff --git a/sdk/providerhub/azure-mgmt-providerhub/CHANGELOG.md b/sdk/providerhub/azure-mgmt-providerhub/CHANGELOG.md new file mode 100644 index 000000000000..c33718033339 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release History + +## 1.0.0b1 (2026-07-08) + +### Other Changes + + - Initial version \ No newline at end of file diff --git a/sdk/providerhub/azure-mgmt-providerhub/LICENSE b/sdk/providerhub/azure-mgmt-providerhub/LICENSE new file mode 100644 index 000000000000..63447fd8bbbf --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) Microsoft Corporation. + +MIT License + +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. \ No newline at end of file diff --git a/sdk/providerhub/azure-mgmt-providerhub/MANIFEST.in b/sdk/providerhub/azure-mgmt-providerhub/MANIFEST.in new file mode 100644 index 000000000000..656c36ddbd2a --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/MANIFEST.in @@ -0,0 +1,7 @@ +include *.md +include LICENSE +include azure/mgmt/providerhub/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/providerhub/azure-mgmt-providerhub/README.md b/sdk/providerhub/azure-mgmt-providerhub/README.md new file mode 100644 index 000000000000..67b3620b2eb3 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/README.md @@ -0,0 +1,61 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Providerhub Management Client Library. +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_ + +_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ + +## Getting started + +### Prerequisites + +- Python 3.10+ is required to use this package. +- [Azure subscription](https://azure.microsoft.com/free/) + +### Install the package + +```bash +pip install azure-mgmt-providerhub +pip install azure-identity +``` + +### Authentication + +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. +- `AZURE_CLIENT_SECRET` for Azure client secret. + +In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. + +With above configuration, client can be authenticated by following code: + +```python +from azure.identity import DefaultAzureCredential +from azure.mgmt.providerhub import ProviderHubMgmtClient +import os + +sub_id = os.getenv("AZURE_SUBSCRIPTION_ID") +client = ProviderHubMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id) +``` + +## Examples + +Code samples for this package can be found at: +- [Search Providerhub Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com +- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) + + +## Troubleshooting + +## Next steps + +## Provide Feedback + +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/providerhub/azure-mgmt-providerhub/_metadata.json b/sdk/providerhub/azure-mgmt-providerhub/_metadata.json new file mode 100644 index 000000000000..3f1dfd08d051 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/_metadata.json @@ -0,0 +1,11 @@ +{ + "apiVersion": "2024-09-01", + "apiVersions": { + "Microsoft.ProviderHub": "2024-09-01" + }, + "commit": "ea850a065dc8679f82dc3fdbba9ceff53eeba116", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "typespec_src": "specification/providerhub/ProviderHub.Management", + "emitterVersion": "0.63.2", + "httpClientPythonVersion": "^0.34.1" +} \ No newline at end of file diff --git a/sdk/providerhub/azure-mgmt-providerhub/api.md b/sdk/providerhub/azure-mgmt-providerhub/api.md new file mode 100644 index 000000000000..40cb39a12b32 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/api.md @@ -0,0 +1,9278 @@ +```py +namespace azure.mgmt.providerhub + + class azure.mgmt.providerhub.ProviderHubMgmtClient(_ProviderHubMgmtClientOperationsMixin): implements ContextManager + authorized_applications: AuthorizedApplicationsOperations + custom_rollouts: CustomRolloutsOperations + default_rollouts: DefaultRolloutsOperations + new_region_frontload_release: NewRegionFrontloadReleaseOperations + notification_registrations: NotificationRegistrationsOperations + operations: Operations + provider_monitor_settings: ProviderMonitorSettingsOperations + provider_registrations: ProviderRegistrationsOperations + resource_actions: ResourceActionsOperations + resource_type_registrations: ResourceTypeRegistrationsOperations + skus: SkusOperations + + def __init__( + self, + credential: TokenCredential, + subscription_id: str, + base_url: Optional[str] = None, + *, + api_version: str = ..., + cloud_setting: Optional[AzureClouds] = ..., + polling_interval: Optional[int] = ..., + **kwargs: Any + ) -> None: ... + + @overload + def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: CheckinManifestParams, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckinManifestInfo: ... + + @overload + def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: CheckinManifestParams, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckinManifestInfo: ... + + @overload + def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckinManifestInfo: ... + + def close(self) -> None: ... + + @distributed_trace + def generate_manifest( + self, + provider_namespace: str, + **kwargs: Any + ) -> ResourceProviderManifest: ... + + def send_request( + self, + request: HttpRequest, + *, + stream: bool = False, + **kwargs: Any + ) -> HttpResponse: ... + + +namespace azure.mgmt.providerhub.aio + + class azure.mgmt.providerhub.aio.ProviderHubMgmtClient(_ProviderHubMgmtClientOperationsMixin): implements AsyncContextManager + authorized_applications: AuthorizedApplicationsOperations + custom_rollouts: CustomRolloutsOperations + default_rollouts: DefaultRolloutsOperations + new_region_frontload_release: NewRegionFrontloadReleaseOperations + notification_registrations: NotificationRegistrationsOperations + operations: Operations + provider_monitor_settings: ProviderMonitorSettingsOperations + provider_registrations: ProviderRegistrationsOperations + resource_actions: ResourceActionsOperations + resource_type_registrations: ResourceTypeRegistrationsOperations + skus: SkusOperations + + def __init__( + self, + credential: AsyncTokenCredential, + subscription_id: str, + base_url: Optional[str] = None, + *, + api_version: str = ..., + cloud_setting: Optional[AzureClouds] = ..., + polling_interval: Optional[int] = ..., + **kwargs: Any + ) -> None: ... + + @overload + async def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: CheckinManifestParams, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckinManifestInfo: ... + + @overload + async def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: CheckinManifestParams, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckinManifestInfo: ... + + @overload + async def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> CheckinManifestInfo: ... + + async def close(self) -> None: ... + + @distributed_trace_async + async def generate_manifest( + self, + provider_namespace: str, + **kwargs: Any + ) -> ResourceProviderManifest: ... + + def send_request( + self, + request: HttpRequest, + *, + stream: bool = False, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: ... + + +namespace azure.mgmt.providerhub.aio.operations + + class azure.mgmt.providerhub.aio.operations.AuthorizedApplicationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: AuthorizedApplication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[AuthorizedApplication]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: AuthorizedApplication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[AuthorizedApplication]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[AuthorizedApplication]: ... + + @distributed_trace_async + async def delete( + self, + provider_namespace: str, + application_id: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def get( + self, + provider_namespace: str, + application_id: str, + **kwargs: Any + ) -> AuthorizedApplication: ... + + @distributed_trace + def list( + self, + provider_namespace: str, + **kwargs: Any + ) -> AsyncItemPaged[AuthorizedApplication]: ... + + + class azure.mgmt.providerhub.aio.operations.CustomRolloutsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: CustomRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[CustomRollout]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: CustomRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[CustomRollout]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[CustomRollout]: ... + + @distributed_trace_async + async def delete( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def get( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> CustomRollout: ... + + @distributed_trace + def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> AsyncItemPaged[CustomRollout]: ... + + @distributed_trace_async + async def stop( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> None: ... + + + class azure.mgmt.providerhub.aio.operations.DefaultRolloutsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: DefaultRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[DefaultRollout]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: DefaultRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[DefaultRollout]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[DefaultRollout]: ... + + @distributed_trace_async + async def delete( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def get( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> DefaultRollout: ... + + @distributed_trace + def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> AsyncItemPaged[DefaultRollout]: ... + + @distributed_trace_async + async def stop( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> None: ... + + + class azure.mgmt.providerhub.aio.operations.NewRegionFrontloadReleaseOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DefaultRollout: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DefaultRollout: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DefaultRollout: ... + + @overload + async def generate_manifest( + self, + provider_namespace: str, + properties: FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceProviderManifest: ... + + @overload + async def generate_manifest( + self, + provider_namespace: str, + properties: FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceProviderManifest: ... + + @overload + async def generate_manifest( + self, + provider_namespace: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceProviderManifest: ... + + @distributed_trace_async + async def get( + self, + provider_namespace: str, + release_name: str, + **kwargs: Any + ) -> DefaultRollout: ... + + @distributed_trace_async + async def stop( + self, + provider_namespace: str, + release_name: str, + **kwargs: Any + ) -> None: ... + + + class azure.mgmt.providerhub.aio.operations.NotificationRegistrationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: NotificationRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> NotificationRegistration: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: NotificationRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> NotificationRegistration: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> NotificationRegistration: ... + + @distributed_trace_async + async def delete( + self, + provider_namespace: str, + notification_registration_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def get( + self, + provider_namespace: str, + notification_registration_name: str, + **kwargs: Any + ) -> NotificationRegistration: ... + + @distributed_trace + def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> AsyncItemPaged[NotificationRegistration]: ... + + + class azure.mgmt.providerhub.aio.operations.Operations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + operations_put_content: OperationsPutContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> OperationsPutContent: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + operations_put_content: OperationsPutContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> OperationsPutContent: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + operations_put_content: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> OperationsPutContent: ... + + @distributed_trace_async + async def delete( + self, + provider_namespace: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged[OperationsDefinition]: ... + + @distributed_trace_async + async def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> List[OperationsDefinition]: ... + + + class azure.mgmt.providerhub.aio.operations.ProviderMonitorSettingsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: ProviderMonitorSetting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ProviderMonitorSetting]: ... + + @overload + async def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: ProviderMonitorSetting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ProviderMonitorSetting]: ... + + @overload + async def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ProviderMonitorSetting]: ... + + @distributed_trace_async + async def delete( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + **kwargs: Any + ) -> ProviderMonitorSetting: ... + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncItemPaged[ProviderMonitorSetting]: ... + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged[ProviderMonitorSetting]: ... + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + **kwargs: Any + ) -> ProviderMonitorSetting: ... + + + class azure.mgmt.providerhub.aio.operations.ProviderRegistrationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + properties: ProviderRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ProviderRegistration]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + properties: ProviderRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ProviderRegistration]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ProviderRegistration]: ... + + @distributed_trace_async + async def delete( + self, + provider_namespace: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def generate_operations( + self, + provider_namespace: str, + **kwargs: Any + ) -> List[OperationsDefinition]: ... + + @distributed_trace_async + async def get( + self, + provider_namespace: str, + **kwargs: Any + ) -> ProviderRegistration: ... + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged[ProviderRegistration]: ... + + + class azure.mgmt.providerhub.aio.operations.ResourceActionsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: ResourceManagementAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @overload + async def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: ResourceManagementAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @overload + async def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + + class azure.mgmt.providerhub.aio.operations.ResourceTypeRegistrationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: ResourceTypeRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceTypeRegistration]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: ResourceTypeRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceTypeRegistration]: ... + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[ResourceTypeRegistration]: ... + + @distributed_trace_async + async def begin_delete( + self, + provider_namespace: str, + resource_type: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: ... + + @distributed_trace_async + async def get( + self, + provider_namespace: str, + resource_type: str, + **kwargs: Any + ) -> ResourceTypeRegistration: ... + + @distributed_trace + def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> AsyncItemPaged[ResourceTypeRegistration]: ... + + + class azure.mgmt.providerhub.aio.operations.SkusOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + async def create_or_update_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace_async + async def delete( + self, + provider_namespace: str, + resource_type: str, + sku: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def delete_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def delete_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def delete_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace_async + async def get( + self, + provider_namespace: str, + resource_type: str, + sku: str, + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace_async + async def get_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace_async + async def get_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace_async + async def get_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace + def list_by_resource_type_registrations( + self, + provider_namespace: str, + resource_type: str, + **kwargs: Any + ) -> AsyncItemPaged[SkuResource]: ... + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + **kwargs: Any + ) -> AsyncItemPaged[SkuResource]: ... + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + **kwargs: Any + ) -> AsyncItemPaged[SkuResource]: ... + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + **kwargs: Any + ) -> AsyncItemPaged[SkuResource]: ... + + +namespace azure.mgmt.providerhub.models + + class azure.mgmt.providerhub.models.AdditionalAuthorization(_Model): + application_id: Optional[str] + role_definition_id: Optional[str] + + @overload + def __init__( + self, + *, + application_id: Optional[str] = ..., + role_definition_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.AdditionalOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PROTECTED_ASYNC_OPERATION_POLLING = "ProtectedAsyncOperationPolling" + PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY = "ProtectedAsyncOperationPollingAuditOnly" + + + class azure.mgmt.providerhub.models.AdditionalOptionsAsyncOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PROTECTED_ASYNC_OPERATION_POLLING = "ProtectedAsyncOperationPolling" + PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY = "ProtectedAsyncOperationPollingAuditOnly" + + + class azure.mgmt.providerhub.models.AdditionalOptionsResourceTypeRegistration(str, Enum, metaclass=CaseInsensitiveEnumMeta): + PROTECTED_ASYNC_OPERATION_POLLING = "ProtectedAsyncOperationPolling" + PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY = "ProtectedAsyncOperationPollingAuditOnly" + + + class azure.mgmt.providerhub.models.AllowedResourceName(_Model): + get_action_verb: Optional[str] + name: Optional[str] + + @overload + def __init__( + self, + *, + get_action_verb: Optional[str] = ..., + name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.AllowedUnauthorizedActionsExtension(_Model): + action: Optional[str] + intent: Optional[Union[str, Intent]] + + @overload + def __init__( + self, + *, + action: Optional[str] = ..., + intent: Optional[Union[str, Intent]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ApiProfile(_Model): + api_version: Optional[str] + profile_version: Optional[str] + + @overload + def __init__( + self, + *, + api_version: Optional[str] = ..., + profile_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ApplicationDataAuthorization(_Model): + resource_types: Optional[list[str]] + role: Union[str, Role] + + @overload + def __init__( + self, + *, + resource_types: Optional[list[str]] = ..., + role: Union[str, Role] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ApplicationProviderAuthorization(_Model): + managed_by_role_definition_id: Optional[str] + role_definition_id: Optional[str] + + @overload + def __init__( + self, + *, + managed_by_role_definition_id: Optional[str] = ..., + role_definition_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.AsyncOperationPollingRules(_Model): + additional_options: Optional[Union[str, AdditionalOptionsAsyncOperation]] + authorization_actions: Optional[list[str]] + + @overload + def __init__( + self, + *, + additional_options: Optional[Union[str, AdditionalOptionsAsyncOperation]] = ..., + authorization_actions: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.AsyncTimeoutRule(_Model): + action_name: Optional[str] + timeout: Optional[str] + + @overload + def __init__( + self, + *, + action_name: Optional[str] = ..., + timeout: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.AuthenticationScheme(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BEARER = "Bearer" + PO_P = "PoP" + + + class azure.mgmt.providerhub.models.AuthorizationActionMapping(_Model): + desired: Optional[str] + original: Optional[str] + + @overload + def __init__( + self, + *, + desired: Optional[str] = ..., + original: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.AuthorizedApplication(ProxyResource): + id: str + name: str + properties: Optional[AuthorizedApplicationProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[AuthorizedApplicationProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.AuthorizedApplicationProperties(_Model): + data_authorizations: Optional[list[ApplicationDataAuthorization]] + provider_authorization: Optional[ApplicationProviderAuthorization] + provisioning_state: Optional[Union[str, ProvisioningState]] + + @overload + def __init__( + self, + *, + data_authorizations: Optional[list[ApplicationDataAuthorization]] = ..., + provider_authorization: Optional[ApplicationProviderAuthorization] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.AvailabilityZonePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MULTI_ZONED = "MultiZoned" + NOT_SPECIFIED = "NotSpecified" + SINGLE_ZONED = "SingleZoned" + + + class azure.mgmt.providerhub.models.AvailableCheckInManifestEnvironment(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALL = "All" + CANARY = "Canary" + FAIRFAX = "Fairfax" + MOONCAKE = "Mooncake" + NOT_SPECIFIED = "NotSpecified" + PROD = "Prod" + + + class azure.mgmt.providerhub.models.BlockActionVerb(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTION = "Action" + DELETE = "Delete" + NOT_SPECIFIED = "NotSpecified" + READ = "Read" + UNRECOGNIZED = "Unrecognized" + WRITE = "Write" + + + class azure.mgmt.providerhub.models.CanaryTrafficRegionRolloutConfiguration(_Model): + regions: Optional[list[str]] + skip_regions: Optional[list[str]] + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ..., + skip_regions: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CapacityPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEFAULT = "Default" + RESTRICTED = "Restricted" + + + class azure.mgmt.providerhub.models.CheckNameAvailabilitySpecifications(_Model): + enable_default_validation: Optional[bool] + resource_types_with_custom_validation: Optional[list[str]] + + @overload + def __init__( + self, + *, + enable_default_validation: Optional[bool] = ..., + resource_types_with_custom_validation: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CheckinManifestInfo(_Model): + commit_id: Optional[str] + is_checked_in: bool + pull_request: Optional[str] + status_message: str + + @overload + def __init__( + self, + *, + commit_id: Optional[str] = ..., + is_checked_in: bool, + pull_request: Optional[str] = ..., + status_message: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CheckinManifestParams(_Model): + baseline_arm_manifest_location: str + environment: str + + @overload + def __init__( + self, + *, + baseline_arm_manifest_location: str, + environment: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CommonApiVersionsMergeMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + MERGE = "Merge" + OVERWRITE = "Overwrite" + + + class azure.mgmt.providerhub.models.CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + APPLICATION = "Application" + KEY = "Key" + MANAGED_IDENTITY = "ManagedIdentity" + USER = "User" + + + class azure.mgmt.providerhub.models.CrossTenantTokenValidation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ENSURE_SECURE_VALIDATION = "EnsureSecureValidation" + PASSTHROUGH_INSECURE_TOKEN = "PassthroughInsecureToken" + + + class azure.mgmt.providerhub.models.CustomRollout(ProxyResource): + id: str + name: str + properties: CustomRolloutProperties + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: CustomRolloutProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CustomRolloutProperties(_Model): + provisioning_state: Optional[Union[str, ProvisioningState]] + specification: CustomRolloutPropertiesSpecification + status: Optional[CustomRolloutPropertiesStatus] + + @overload + def __init__( + self, + *, + specification: CustomRolloutPropertiesSpecification, + status: Optional[CustomRolloutPropertiesStatus] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CustomRolloutPropertiesSpecification(CustomRolloutSpecification): + auto_provision_config: CustomRolloutSpecificationAutoProvisionConfig + canary: CustomRolloutSpecificationCanary + provider_registration: CustomRolloutSpecificationProviderRegistration + refresh_subscription_registration: bool + release_scopes: list[str] + resource_type_registrations: list[ResourceTypeRegistration] + skip_release_scope_validation: bool + + @overload + def __init__( + self, + *, + auto_provision_config: Optional[CustomRolloutSpecificationAutoProvisionConfig] = ..., + canary: Optional[CustomRolloutSpecificationCanary] = ..., + provider_registration: Optional[CustomRolloutSpecificationProviderRegistration] = ..., + refresh_subscription_registration: Optional[bool] = ..., + release_scopes: Optional[list[str]] = ..., + resource_type_registrations: Optional[list[ResourceTypeRegistration]] = ..., + skip_release_scope_validation: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CustomRolloutPropertiesStatus(CustomRolloutStatus): + completed_regions: list[str] + failed_or_skipped_regions: dict[str, ExtendedErrorInfo] + manifest_checkin_status: CustomRolloutStatusManifestCheckinStatus + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = ..., + failed_or_skipped_regions: Optional[dict[str, ExtendedErrorInfo]] = ..., + manifest_checkin_status: Optional[CustomRolloutStatusManifestCheckinStatus] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CustomRolloutSpecification(_Model): + auto_provision_config: Optional[CustomRolloutSpecificationAutoProvisionConfig] + canary: Optional[CustomRolloutSpecificationCanary] + provider_registration: Optional[CustomRolloutSpecificationProviderRegistration] + refresh_subscription_registration: Optional[bool] + release_scopes: Optional[list[str]] + resource_type_registrations: Optional[list[ResourceTypeRegistration]] + skip_release_scope_validation: Optional[bool] + + @overload + def __init__( + self, + *, + auto_provision_config: Optional[CustomRolloutSpecificationAutoProvisionConfig] = ..., + canary: Optional[CustomRolloutSpecificationCanary] = ..., + provider_registration: Optional[CustomRolloutSpecificationProviderRegistration] = ..., + refresh_subscription_registration: Optional[bool] = ..., + release_scopes: Optional[list[str]] = ..., + resource_type_registrations: Optional[list[ResourceTypeRegistration]] = ..., + skip_release_scope_validation: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CustomRolloutSpecificationAutoProvisionConfig(_Model): + resource_graph: Optional[bool] + storage: Optional[bool] + + @overload + def __init__( + self, + *, + resource_graph: Optional[bool] = ..., + storage: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CustomRolloutSpecificationCanary(TrafficRegions): + regions: list[str] + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CustomRolloutSpecificationProviderRegistration(ProviderRegistration): + id: str + kind: Union[str, ProviderRegistrationKind] + name: str + properties: ProviderRegistrationProperties + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + kind: Optional[Union[str, ProviderRegistrationKind]] = ..., + properties: Optional[ProviderRegistrationProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CustomRolloutStatus(_Model): + completed_regions: Optional[list[str]] + failed_or_skipped_regions: Optional[dict[str, ExtendedErrorInfo]] + manifest_checkin_status: Optional[CustomRolloutStatusManifestCheckinStatus] + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = ..., + failed_or_skipped_regions: Optional[dict[str, ExtendedErrorInfo]] = ..., + manifest_checkin_status: Optional[CustomRolloutStatusManifestCheckinStatus] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.CustomRolloutStatusManifestCheckinStatus(CheckinManifestInfo): + commit_id: str + is_checked_in: bool + pull_request: str + status_message: str + + @overload + def __init__( + self, + *, + commit_id: Optional[str] = ..., + is_checked_in: bool, + pull_request: Optional[str] = ..., + status_message: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DataBoundary(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EU = "EU" + GLOBAL = "Global" + NOT_DEFINED = "NotDefined" + US = "US" + + + class azure.mgmt.providerhub.models.DefaultRollout(ProxyResource): + id: str + name: str + properties: Optional[DefaultRolloutProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[DefaultRolloutProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutProperties(_Model): + provisioning_state: Optional[Union[str, ProvisioningState]] + specification: Optional[DefaultRolloutPropertiesSpecification] + status: Optional[DefaultRolloutPropertiesStatus] + + @overload + def __init__( + self, + *, + specification: Optional[DefaultRolloutPropertiesSpecification] = ..., + status: Optional[DefaultRolloutPropertiesStatus] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutPropertiesSpecification(DefaultRolloutSpecification): + auto_provision_config: DefaultRolloutSpecificationAutoProvisionConfig + canary: DefaultRolloutSpecificationCanary + expedited_rollout: DefaultRolloutSpecificationExpeditedRollout + high_traffic: DefaultRolloutSpecificationHighTraffic + low_traffic: DefaultRolloutSpecificationLowTraffic + medium_traffic: DefaultRolloutSpecificationMediumTraffic + provider_registration: DefaultRolloutSpecificationProviderRegistration + resource_type_registrations: list[ResourceTypeRegistration] + rest_of_the_world_group_one: DefaultRolloutSpecificationRestOfTheWorldGroupOne + rest_of_the_world_group_two: DefaultRolloutSpecificationRestOfTheWorldGroupTwo + + @overload + def __init__( + self, + *, + auto_provision_config: Optional[DefaultRolloutSpecificationAutoProvisionConfig] = ..., + canary: Optional[DefaultRolloutSpecificationCanary] = ..., + expedited_rollout: Optional[DefaultRolloutSpecificationExpeditedRollout] = ..., + high_traffic: Optional[DefaultRolloutSpecificationHighTraffic] = ..., + low_traffic: Optional[DefaultRolloutSpecificationLowTraffic] = ..., + medium_traffic: Optional[DefaultRolloutSpecificationMediumTraffic] = ..., + provider_registration: Optional[DefaultRolloutSpecificationProviderRegistration] = ..., + resource_type_registrations: Optional[list[ResourceTypeRegistration]] = ..., + rest_of_the_world_group_one: Optional[DefaultRolloutSpecificationRestOfTheWorldGroupOne] = ..., + rest_of_the_world_group_two: Optional[DefaultRolloutSpecificationRestOfTheWorldGroupTwo] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutPropertiesStatus(DefaultRolloutStatus): + completed_regions: list[str] + failed_or_skipped_regions: dict[str, ExtendedErrorInfo] + manifest_checkin_status: DefaultRolloutStatusManifestCheckinStatus + next_traffic_region: Union[str, TrafficRegionCategory] + next_traffic_region_scheduled_time: datetime + subscription_reregistration_result: Union[str, SubscriptionReregistrationResult] + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = ..., + failed_or_skipped_regions: Optional[dict[str, ExtendedErrorInfo]] = ..., + manifest_checkin_status: Optional[DefaultRolloutStatusManifestCheckinStatus] = ..., + next_traffic_region: Optional[Union[str, TrafficRegionCategory]] = ..., + next_traffic_region_scheduled_time: Optional[datetime] = ..., + subscription_reregistration_result: Optional[Union[str, SubscriptionReregistrationResult]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecification(_Model): + auto_provision_config: Optional[DefaultRolloutSpecificationAutoProvisionConfig] + canary: Optional[DefaultRolloutSpecificationCanary] + expedited_rollout: Optional[DefaultRolloutSpecificationExpeditedRollout] + high_traffic: Optional[DefaultRolloutSpecificationHighTraffic] + low_traffic: Optional[DefaultRolloutSpecificationLowTraffic] + medium_traffic: Optional[DefaultRolloutSpecificationMediumTraffic] + provider_registration: Optional[DefaultRolloutSpecificationProviderRegistration] + resource_type_registrations: Optional[list[ResourceTypeRegistration]] + rest_of_the_world_group_one: Optional[DefaultRolloutSpecificationRestOfTheWorldGroupOne] + rest_of_the_world_group_two: Optional[DefaultRolloutSpecificationRestOfTheWorldGroupTwo] + + @overload + def __init__( + self, + *, + auto_provision_config: Optional[DefaultRolloutSpecificationAutoProvisionConfig] = ..., + canary: Optional[DefaultRolloutSpecificationCanary] = ..., + expedited_rollout: Optional[DefaultRolloutSpecificationExpeditedRollout] = ..., + high_traffic: Optional[DefaultRolloutSpecificationHighTraffic] = ..., + low_traffic: Optional[DefaultRolloutSpecificationLowTraffic] = ..., + medium_traffic: Optional[DefaultRolloutSpecificationMediumTraffic] = ..., + provider_registration: Optional[DefaultRolloutSpecificationProviderRegistration] = ..., + resource_type_registrations: Optional[list[ResourceTypeRegistration]] = ..., + rest_of_the_world_group_one: Optional[DefaultRolloutSpecificationRestOfTheWorldGroupOne] = ..., + rest_of_the_world_group_two: Optional[DefaultRolloutSpecificationRestOfTheWorldGroupTwo] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecificationAutoProvisionConfig(_Model): + resource_graph: Optional[bool] + storage: Optional[bool] + + @overload + def __init__( + self, + *, + resource_graph: Optional[bool] = ..., + storage: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecificationCanary(CanaryTrafficRegionRolloutConfiguration): + regions: list[str] + skip_regions: list[str] + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ..., + skip_regions: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecificationExpeditedRollout(ExpeditedRolloutDefinition): + enabled: bool + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecificationHighTraffic(TrafficRegionRolloutConfiguration): + regions: list[str] + wait_duration: timedelta + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ..., + wait_duration: Optional[timedelta] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecificationLowTraffic(TrafficRegionRolloutConfiguration): + regions: list[str] + wait_duration: timedelta + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ..., + wait_duration: Optional[timedelta] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecificationMediumTraffic(TrafficRegionRolloutConfiguration): + regions: list[str] + wait_duration: timedelta + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ..., + wait_duration: Optional[timedelta] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecificationProviderRegistration(ProviderRegistration): + id: str + kind: Union[str, ProviderRegistrationKind] + name: str + properties: ProviderRegistrationProperties + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + kind: Optional[Union[str, ProviderRegistrationKind]] = ..., + properties: Optional[ProviderRegistrationProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupOne(TrafficRegionRolloutConfiguration): + regions: list[str] + wait_duration: timedelta + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ..., + wait_duration: Optional[timedelta] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo(TrafficRegionRolloutConfiguration): + regions: list[str] + wait_duration: timedelta + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ..., + wait_duration: Optional[timedelta] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutStatus(RolloutStatusBase): + completed_regions: list[str] + failed_or_skipped_regions: dict[str, ExtendedErrorInfo] + manifest_checkin_status: Optional[DefaultRolloutStatusManifestCheckinStatus] + next_traffic_region: Optional[Union[str, TrafficRegionCategory]] + next_traffic_region_scheduled_time: Optional[datetime] + subscription_reregistration_result: Optional[Union[str, SubscriptionReregistrationResult]] + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = ..., + failed_or_skipped_regions: Optional[dict[str, ExtendedErrorInfo]] = ..., + manifest_checkin_status: Optional[DefaultRolloutStatusManifestCheckinStatus] = ..., + next_traffic_region: Optional[Union[str, TrafficRegionCategory]] = ..., + next_traffic_region_scheduled_time: Optional[datetime] = ..., + subscription_reregistration_result: Optional[Union[str, SubscriptionReregistrationResult]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DefaultRolloutStatusManifestCheckinStatus(CheckinManifestInfo): + commit_id: str + is_checked_in: bool + pull_request: str + status_message: str + + @overload + def __init__( + self, + *, + commit_id: Optional[str] = ..., + is_checked_in: bool, + pull_request: Optional[str] = ..., + status_message: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DeleteDependency(_Model): + linked_property: Optional[str] + linked_type: Optional[str] + required_features: Optional[list[str]] + + @overload + def __init__( + self, + *, + linked_property: Optional[str] = ..., + linked_type: Optional[str] = ..., + required_features: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.DstsConfiguration(_Model): + service_dns_name: Optional[str] + service_name: str + + @overload + def __init__( + self, + *, + service_dns_name: Optional[str] = ..., + service_name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.EndpointInformation(_Model): + endpoint: Optional[str] + endpoint_type: Optional[Union[str, NotificationEndpointType]] + schema_version: Optional[str] + + @overload + def __init__( + self, + *, + endpoint: Optional[str] = ..., + endpoint_type: Optional[Union[str, NotificationEndpointType]] = ..., + schema_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.EndpointType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANARY = "Canary" + NOT_SPECIFIED = "NotSpecified" + PRODUCTION = "Production" + TEST_IN_PRODUCTION = "TestInProduction" + + + class azure.mgmt.providerhub.models.EndpointTypeResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANARY = "Canary" + NOT_SPECIFIED = "NotSpecified" + PRODUCTION = "Production" + TEST_IN_PRODUCTION = "TestInProduction" + + + class azure.mgmt.providerhub.models.ErrorAdditionalInfo(_Model): + info: Optional[Any] + type: Optional[str] + + + class azure.mgmt.providerhub.models.ErrorDetail(_Model): + additional_info: Optional[list[ErrorAdditionalInfo]] + code: Optional[str] + details: Optional[list[ErrorDetail]] + message: Optional[str] + target: Optional[str] + + + class azure.mgmt.providerhub.models.ErrorResponse(_Model): + error: Optional[ErrorDetail] + + @overload + def __init__( + self, + *, + error: Optional[ErrorDetail] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ExpeditedRolloutDefinition(_Model): + enabled: Optional[bool] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ExpeditedRolloutIntent(str, Enum, metaclass=CaseInsensitiveEnumMeta): + HOTFIX = "Hotfix" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.ExtendedErrorInfo(_Model): + additional_info: Optional[list[TypedErrorInfo]] + code: Optional[str] + details: Optional[list[ExtendedErrorInfo]] + message: Optional[str] + target: Optional[str] + + @overload + def __init__( + self, + *, + additional_info: Optional[list[TypedErrorInfo]] = ..., + code: Optional[str] = ..., + details: Optional[list[ExtendedErrorInfo]] = ..., + message: Optional[str] = ..., + target: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ExtendedLocationOptions(_Model): + supported_policy: Optional[Union[str, ResourceTypeExtendedLocationPolicy]] + type: Optional[Union[str, ExtendedLocationType]] + + @overload + def __init__( + self, + *, + supported_policy: Optional[Union[str, ResourceTypeExtendedLocationPolicy]] = ..., + type: Optional[Union[str, ExtendedLocationType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ExtendedLocationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ARC_ZONE = "ArcZone" + CUSTOM_LOCATION = "CustomLocation" + EDGE_ZONE = "EdgeZone" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.ExtensionCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BEST_MATCH_OPERATION_BEGIN = "BestMatchOperationBegin" + NOT_SPECIFIED = "NotSpecified" + RESOURCE_CREATION_BEGIN = "ResourceCreationBegin" + RESOURCE_CREATION_COMPLETED = "ResourceCreationCompleted" + RESOURCE_CREATION_VALIDATE = "ResourceCreationValidate" + RESOURCE_DELETION_BEGIN = "ResourceDeletionBegin" + RESOURCE_DELETION_COMPLETED = "ResourceDeletionCompleted" + RESOURCE_DELETION_VALIDATE = "ResourceDeletionValidate" + RESOURCE_MOVE_BEGIN = "ResourceMoveBegin" + RESOURCE_MOVE_COMPLETED = "ResourceMoveCompleted" + RESOURCE_PATCH_BEGIN = "ResourcePatchBegin" + RESOURCE_PATCH_COMPLETED = "ResourcePatchCompleted" + RESOURCE_PATCH_VALIDATE = "ResourcePatchValidate" + RESOURCE_POST_ACTION = "ResourcePostAction" + RESOURCE_READ_BEGIN = "ResourceReadBegin" + RESOURCE_READ_VALIDATE = "ResourceReadValidate" + SUBSCRIPTION_LIFECYCLE_NOTIFICATION = "SubscriptionLifecycleNotification" + SUBSCRIPTION_LIFECYCLE_NOTIFICATION_DELETION = "SubscriptionLifecycleNotificationDeletion" + + + class azure.mgmt.providerhub.models.ExtensionOptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES = "DoNotMergeExistingReadOnlyAndSecretProperties" + INCLUDE_INTERNAL_METADATA = "IncludeInternalMetadata" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.ExtensionOptions(_Model): + request: Optional[list[Union[str, ExtensionOptionType]]] + response: Optional[list[Union[str, ExtensionOptionType]]] + + @overload + def __init__( + self, + *, + request: Optional[list[Union[str, ExtensionOptionType]]] = ..., + response: Optional[list[Union[str, ExtensionOptionType]]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.FanoutLinkedNotificationRule(_Model): + actions: Optional[list[str]] + dsts_configuration: Optional[FanoutLinkedNotificationRuleDstsConfiguration] + endpoints: Optional[list[ResourceProviderEndpoint]] + token_auth_configuration: Optional[TokenAuthConfiguration] + + @overload + def __init__( + self, + *, + actions: Optional[list[str]] = ..., + dsts_configuration: Optional[FanoutLinkedNotificationRuleDstsConfiguration] = ..., + endpoints: Optional[list[ResourceProviderEndpoint]] = ..., + token_auth_configuration: Optional[TokenAuthConfiguration] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.FanoutLinkedNotificationRuleDstsConfiguration(DstsConfiguration): + service_dns_name: str + service_name: str + + @overload + def __init__( + self, + *, + service_dns_name: Optional[str] = ..., + service_name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.FeaturesPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALL = "All" + ANY = "Any" + + + class azure.mgmt.providerhub.models.FeaturesRule(_Model): + required_features_policy: Union[str, FeaturesPolicy] + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, FeaturesPolicy] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.FilterOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ENABLE_SUBSCRIPTION_FILTER_ON_TENANT = "EnableSubscriptionFilterOnTenant" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.FilterRule(_Model): + endpoint_information: Optional[list[EndpointInformation]] + filter_query: Optional[str] + + @overload + def __init__( + self, + *, + endpoint_information: Optional[list[EndpointInformation]] = ..., + filter_query: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.FrontdoorRequestMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOT_SPECIFIED = "NotSpecified" + USE_MANIFEST = "UseManifest" + + + class azure.mgmt.providerhub.models.FrontloadPayload(_Model): + properties: FrontloadPayloadProperties + + @overload + def __init__( + self, + *, + properties: FrontloadPayloadProperties + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.FrontloadPayloadProperties(_Model): + copy_from_location: str + environment_type: Union[str, AvailableCheckInManifestEnvironment] + exclude_resource_types: list[str] + frontload_location: str + ignore_fields: list[str] + include_resource_types: list[str] + operation_type: str + override_endpoint_level_fields: FrontloadPayloadPropertiesOverrideEndpointLevelFields + override_manifest_level_fields: FrontloadPayloadPropertiesOverrideManifestLevelFields + provider_namespace: str + service_feature_flag: Union[str, ServiceFeatureFlagAction] + + @overload + def __init__( + self, + *, + copy_from_location: str, + environment_type: Union[str, AvailableCheckInManifestEnvironment], + exclude_resource_types: list[str], + frontload_location: str, + ignore_fields: list[str], + include_resource_types: list[str], + operation_type: str, + override_endpoint_level_fields: FrontloadPayloadPropertiesOverrideEndpointLevelFields, + override_manifest_level_fields: FrontloadPayloadPropertiesOverrideManifestLevelFields, + provider_namespace: str, + service_feature_flag: Union[str, ServiceFeatureFlagAction] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.FrontloadPayloadPropertiesOverrideEndpointLevelFields(ResourceTypeEndpointBase): + api_version: str + api_versions: list[str] + dsts_configuration: ResourceTypeEndpointBaseDstsConfiguration + enabled: bool + endpoint_type: Union[str, EndpointType] + endpoint_uri: str + features_rule: ResourceTypeEndpointBaseFeaturesRule + locations: list[str] + required_features: list[str] + sku_link: str + timeout: timedelta + zones: list[str] + + @overload + def __init__( + self, + *, + api_version: str, + api_versions: list[str], + dsts_configuration: ResourceTypeEndpointBaseDstsConfiguration, + enabled: bool, + endpoint_type: Union[str, EndpointType], + endpoint_uri: str, + features_rule: ResourceTypeEndpointBaseFeaturesRule, + locations: list[str], + required_features: list[str], + sku_link: str, + timeout: timedelta, + zones: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.FrontloadPayloadPropertiesOverrideManifestLevelFields(ManifestLevelPropertyBag): + resource_hydration_accounts: list[ResourceHydrationAccount] + + @overload + def __init__( + self, + *, + resource_hydration_accounts: Optional[list[ResourceHydrationAccount]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.IdentityManagement(_Model): + type: Optional[Union[str, IdentityManagementTypes]] + + @overload + def __init__( + self, + *, + type: Optional[Union[str, IdentityManagementTypes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.IdentityManagementProperties(_Model): + application_id: Optional[str] + application_ids: Optional[list[str]] + delegation_app_ids: Optional[list[str]] + type: Optional[Union[str, IdentityManagementTypes]] + + @overload + def __init__( + self, + *, + application_id: Optional[str] = ..., + application_ids: Optional[list[str]] = ..., + delegation_app_ids: Optional[list[str]] = ..., + type: Optional[Union[str, IdentityManagementTypes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.IdentityManagementTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTOR = "Actor" + DELEGATED_RESOURCE_IDENTITY = "DelegatedResourceIdentity" + NOT_SPECIFIED = "NotSpecified" + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + + + class azure.mgmt.providerhub.models.Intent(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEFERRED_ACCESS_CHECK = "DEFERRED_ACCESS_CHECK" + LOW_PRIVILEGE = "LOW_PRIVILEGE" + NOT_SPECIFIED = "NOT_SPECIFIED" + RP_CONTRACT = "RP_CONTRACT" + + + class azure.mgmt.providerhub.models.LegacyDisallowedCondition(_Model): + disallowed_legacy_operations: Optional[list[Union[str, LegacyOperation]]] + feature: Optional[str] + + @overload + def __init__( + self, + *, + disallowed_legacy_operations: Optional[list[Union[str, LegacyOperation]]] = ..., + feature: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LegacyOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTION = "Action" + AZURE_ASYNC_OPERATION_WAITING = "AzureAsyncOperationWaiting" + CREATE = "Create" + DELETE = "Delete" + DEPLOYMENT_CLEANUP = "DeploymentCleanup" + EVALUATE_DEPLOYMENT_OUTPUT = "EvaluateDeploymentOutput" + NOT_SPECIFIED = "NotSpecified" + READ = "Read" + RESOURCE_CACHE_WAITING = "ResourceCacheWaiting" + WAITING = "Waiting" + + + class azure.mgmt.providerhub.models.LightHouseAuthorization(_Model): + principal_id: str + role_definition_id: str + + @overload + def __init__( + self, + *, + principal_id: str, + role_definition_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LinkedAccessCheck(_Model): + action_name: Optional[str] + linked_action: Optional[str] + linked_action_verb: Optional[str] + linked_property: Optional[str] + linked_type: Optional[str] + + @overload + def __init__( + self, + *, + action_name: Optional[str] = ..., + linked_action: Optional[str] = ..., + linked_action_verb: Optional[str] = ..., + linked_property: Optional[str] = ..., + linked_type: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LinkedAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BLOCKED = "Blocked" + ENABLED = "Enabled" + NOT_SPECIFIED = "NotSpecified" + VALIDATE = "Validate" + + + class azure.mgmt.providerhub.models.LinkedNotificationRule(_Model): + actions: Optional[list[str]] + actions_on_failed_operation: Optional[list[str]] + fast_path_actions: Optional[list[str]] + fast_path_actions_on_failed_operation: Optional[list[str]] + linked_notification_timeout: Optional[timedelta] + + @overload + def __init__( + self, + *, + actions: Optional[list[str]] = ..., + actions_on_failed_operation: Optional[list[str]] = ..., + fast_path_actions: Optional[list[str]] = ..., + fast_path_actions_on_failed_operation: Optional[list[str]] = ..., + linked_notification_timeout: Optional[timedelta] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LinkedOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CROSS_RESOURCE_GROUP_RESOURCE_MOVE = "CrossResourceGroupResourceMove" + CROSS_SUBSCRIPTION_RESOURCE_MOVE = "CrossSubscriptionResourceMove" + NONE = "None" + + + class azure.mgmt.providerhub.models.LinkedOperationRule(_Model): + depends_on_types: Optional[list[str]] + linked_action: Union[str, LinkedAction] + linked_operation: Union[str, LinkedOperation] + + @overload + def __init__( + self, + *, + depends_on_types: Optional[list[str]] = ..., + linked_action: Union[str, LinkedAction], + linked_operation: Union[str, LinkedOperation] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDefinition(_Model): + action_type: Optional[Union[str, OperationActionType]] + display: LocalizedOperationDefinitionDisplay + is_data_action: Optional[bool] + name: str + origin: Optional[Union[str, OperationOrigins]] + + @overload + def __init__( + self, + *, + action_type: Optional[Union[str, OperationActionType]] = ..., + display: LocalizedOperationDefinitionDisplay, + is_data_action: Optional[bool] = ..., + name: str, + origin: Optional[Union[str, OperationOrigins]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDefinitionDisplay(LocalizedOperationDisplayDefinition): + cs: LocalizedOperationDisplayDefinitionCs + de: LocalizedOperationDisplayDefinitionDe + default: LocalizedOperationDisplayDefinitionDefault + en: LocalizedOperationDisplayDefinitionEn + es: LocalizedOperationDisplayDefinitionEs + fr: LocalizedOperationDisplayDefinitionFr + hu: LocalizedOperationDisplayDefinitionHu + it: LocalizedOperationDisplayDefinitionIt + ja: LocalizedOperationDisplayDefinitionJa + ko: LocalizedOperationDisplayDefinitionKo + nl: LocalizedOperationDisplayDefinitionNl + pl: LocalizedOperationDisplayDefinitionPl + pt_br: LocalizedOperationDisplayDefinitionPtBR + pt_pt: LocalizedOperationDisplayDefinitionPtPT + ru: LocalizedOperationDisplayDefinitionRu + sv: LocalizedOperationDisplayDefinitionSv + zh_hans: LocalizedOperationDisplayDefinitionZhHans + zh_hant: LocalizedOperationDisplayDefinitionZhHant + + @overload + def __init__( + self, + *, + cs: Optional[LocalizedOperationDisplayDefinitionCs] = ..., + de: Optional[LocalizedOperationDisplayDefinitionDe] = ..., + default: LocalizedOperationDisplayDefinitionDefault, + en: Optional[LocalizedOperationDisplayDefinitionEn] = ..., + es: Optional[LocalizedOperationDisplayDefinitionEs] = ..., + fr: Optional[LocalizedOperationDisplayDefinitionFr] = ..., + hu: Optional[LocalizedOperationDisplayDefinitionHu] = ..., + it: Optional[LocalizedOperationDisplayDefinitionIt] = ..., + ja: Optional[LocalizedOperationDisplayDefinitionJa] = ..., + ko: Optional[LocalizedOperationDisplayDefinitionKo] = ..., + nl: Optional[LocalizedOperationDisplayDefinitionNl] = ..., + pl: Optional[LocalizedOperationDisplayDefinitionPl] = ..., + pt_br: Optional[LocalizedOperationDisplayDefinitionPtBR] = ..., + pt_pt: Optional[LocalizedOperationDisplayDefinitionPtPT] = ..., + ru: Optional[LocalizedOperationDisplayDefinitionRu] = ..., + sv: Optional[LocalizedOperationDisplayDefinitionSv] = ..., + zh_hans: Optional[LocalizedOperationDisplayDefinitionZhHans] = ..., + zh_hant: Optional[LocalizedOperationDisplayDefinitionZhHant] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinition(_Model): + cs: Optional[LocalizedOperationDisplayDefinitionCs] + de: Optional[LocalizedOperationDisplayDefinitionDe] + default: LocalizedOperationDisplayDefinitionDefault + en: Optional[LocalizedOperationDisplayDefinitionEn] + es: Optional[LocalizedOperationDisplayDefinitionEs] + fr: Optional[LocalizedOperationDisplayDefinitionFr] + hu: Optional[LocalizedOperationDisplayDefinitionHu] + it: Optional[LocalizedOperationDisplayDefinitionIt] + ja: Optional[LocalizedOperationDisplayDefinitionJa] + ko: Optional[LocalizedOperationDisplayDefinitionKo] + nl: Optional[LocalizedOperationDisplayDefinitionNl] + pl: Optional[LocalizedOperationDisplayDefinitionPl] + pt_br: Optional[LocalizedOperationDisplayDefinitionPtBR] + pt_pt: Optional[LocalizedOperationDisplayDefinitionPtPT] + ru: Optional[LocalizedOperationDisplayDefinitionRu] + sv: Optional[LocalizedOperationDisplayDefinitionSv] + zh_hans: Optional[LocalizedOperationDisplayDefinitionZhHans] + zh_hant: Optional[LocalizedOperationDisplayDefinitionZhHant] + + @overload + def __init__( + self, + *, + cs: Optional[LocalizedOperationDisplayDefinitionCs] = ..., + de: Optional[LocalizedOperationDisplayDefinitionDe] = ..., + default: LocalizedOperationDisplayDefinitionDefault, + en: Optional[LocalizedOperationDisplayDefinitionEn] = ..., + es: Optional[LocalizedOperationDisplayDefinitionEs] = ..., + fr: Optional[LocalizedOperationDisplayDefinitionFr] = ..., + hu: Optional[LocalizedOperationDisplayDefinitionHu] = ..., + it: Optional[LocalizedOperationDisplayDefinitionIt] = ..., + ja: Optional[LocalizedOperationDisplayDefinitionJa] = ..., + ko: Optional[LocalizedOperationDisplayDefinitionKo] = ..., + nl: Optional[LocalizedOperationDisplayDefinitionNl] = ..., + pl: Optional[LocalizedOperationDisplayDefinitionPl] = ..., + pt_br: Optional[LocalizedOperationDisplayDefinitionPtBR] = ..., + pt_pt: Optional[LocalizedOperationDisplayDefinitionPtPT] = ..., + ru: Optional[LocalizedOperationDisplayDefinitionRu] = ..., + sv: Optional[LocalizedOperationDisplayDefinitionSv] = ..., + zh_hans: Optional[LocalizedOperationDisplayDefinitionZhHans] = ..., + zh_hant: Optional[LocalizedOperationDisplayDefinitionZhHant] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionCs(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionDe(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionDefault(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionEn(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionEs(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionFr(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionHu(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionIt(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionJa(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionKo(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionNl(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPl(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPtBR(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPtPT(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionRu(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionSv(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionZhHans(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionZhHant(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LocationQuotaRule(_Model): + location: Optional[str] + policy: Optional[Union[str, QuotaPolicy]] + quota_id: Optional[str] + + @overload + def __init__( + self, + *, + location: Optional[str] = ..., + policy: Optional[Union[str, QuotaPolicy]] = ..., + quota_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LoggingDetails(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BODY = "Body" + NONE = "None" + + + class azure.mgmt.providerhub.models.LoggingDirections(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + REQUEST = "Request" + RESPONSE = "Response" + + + class azure.mgmt.providerhub.models.LoggingHiddenPropertyPath(_Model): + hidden_paths_on_request: Optional[list[str]] + hidden_paths_on_response: Optional[list[str]] + + @overload + def __init__( + self, + *, + hidden_paths_on_request: Optional[list[str]] = ..., + hidden_paths_on_response: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LoggingRule(_Model): + action: str + detail_level: Union[str, LoggingDetails] + direction: Union[str, LoggingDirections] + hidden_property_paths: Optional[LoggingRuleHiddenPropertyPaths] + + @overload + def __init__( + self, + *, + action: str, + detail_level: Union[str, LoggingDetails], + direction: Union[str, LoggingDirections], + hidden_property_paths: Optional[LoggingRuleHiddenPropertyPaths] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.LoggingRuleHiddenPropertyPaths(LoggingHiddenPropertyPath): + hidden_paths_on_request: list[str] + hidden_paths_on_response: list[str] + + @overload + def __init__( + self, + *, + hidden_paths_on_request: Optional[list[str]] = ..., + hidden_paths_on_response: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ManifestLevelPropertyBag(_Model): + resource_hydration_accounts: Optional[list[ResourceHydrationAccount]] + + @overload + def __init__( + self, + *, + resource_hydration_accounts: Optional[list[ResourceHydrationAccount]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ManifestResourceDeletionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CASCADE = "Cascade" + FORCE = "Force" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.MarketplaceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ADD_ON = "AddOn" + BYPASS = "Bypass" + NOT_SPECIFIED = "NotSpecified" + STORE = "Store" + + + class azure.mgmt.providerhub.models.MessageScope(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOT_SPECIFIED = "NotSpecified" + REGISTERED_SUBSCRIPTIONS = "RegisteredSubscriptions" + + + class azure.mgmt.providerhub.models.Notification(_Model): + notification_type: Optional[Union[str, NotificationType]] + skip_notifications: Optional[Union[str, SkipNotifications]] + + @overload + def __init__( + self, + *, + notification_type: Optional[Union[str, NotificationType]] = ..., + skip_notifications: Optional[Union[str, SkipNotifications]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.NotificationEndpoint(_Model): + locations: Optional[list[str]] + notification_destination: Optional[str] + + @overload + def __init__( + self, + *, + locations: Optional[list[str]] = ..., + notification_destination: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.NotificationEndpointType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EVENTHUB = "Eventhub" + WEBHOOK = "Webhook" + + + class azure.mgmt.providerhub.models.NotificationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EVENT_HUB = "EventHub" + NOT_SPECIFIED = "NotSpecified" + WEB_HOOK = "WebHook" + + + class azure.mgmt.providerhub.models.NotificationOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + EMIT_SPENDING_LIMIT = "EmitSpendingLimit" + NONE = "None" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.NotificationRegistration(ProxyResource): + id: str + name: str + properties: Optional[NotificationRegistrationProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[NotificationRegistrationProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.NotificationRegistrationProperties(_Model): + included_events: Optional[list[str]] + message_scope: Optional[Union[str, MessageScope]] + notification_endpoints: Optional[list[NotificationEndpoint]] + notification_mode: Optional[Union[str, NotificationMode]] + provisioning_state: Optional[Union[str, ProvisioningState]] + + @overload + def __init__( + self, + *, + included_events: Optional[list[str]] = ..., + message_scope: Optional[Union[str, MessageScope]] = ..., + notification_endpoints: Optional[list[NotificationEndpoint]] = ..., + notification_mode: Optional[Union[str, NotificationMode]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.NotificationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + SUBSCRIPTION_NOTIFICATION = "SubscriptionNotification" + UNSPECIFIED = "Unspecified" + + + class azure.mgmt.providerhub.models.OpenApiConfiguration(_Model): + validation: Optional[OpenApiValidation] + + @overload + def __init__( + self, + *, + validation: Optional[OpenApiValidation] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.OpenApiValidation(_Model): + allow_noncompliant_collection_response: Optional[bool] + + @overload + def __init__( + self, + *, + allow_noncompliant_collection_response: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.OperationActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + INTERNAL = "Internal" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.OperationOrigins(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOT_SPECIFIED = "NotSpecified" + SYSTEM = "System" + USER = "User" + + + class azure.mgmt.providerhub.models.OperationsContentProperties(_Model): + contents: Optional[list[LocalizedOperationDefinition]] + + @overload + def __init__( + self, + *, + contents: Optional[list[LocalizedOperationDefinition]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.OperationsDefinition(_Model): + action_type: Optional[Union[str, OperationActionType]] + display: OperationsDefinitionDisplay + is_data_action: Optional[bool] + name: str + origin: Optional[Union[str, OperationOrigins]] + properties: Optional[Any] + + @overload + def __init__( + self, + *, + action_type: Optional[Union[str, OperationActionType]] = ..., + display: OperationsDefinitionDisplay, + is_data_action: Optional[bool] = ..., + name: str, + origin: Optional[Union[str, OperationOrigins]] = ..., + properties: Optional[Any] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.OperationsDefinitionDisplay(OperationsDisplayDefinition): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.OperationsDisplayDefinition(_Model): + description: str + operation: str + provider: str + resource: str + + @overload + def __init__( + self, + *, + description: str, + operation: str, + provider: str, + resource: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.OperationsPutContent(ProxyResource): + id: str + name: str + properties: Optional[OperationsPutContentProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[OperationsPutContentProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.OperationsPutContentProperties(OperationsContentProperties): + contents: list[LocalizedOperationDefinition] + + @overload + def __init__( + self, + *, + contents: Optional[list[LocalizedOperationDefinition]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.OptInHeaderType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CLIENT_GROUP_MEMBERSHIP = "ClientGroupMembership" + CLIENT_PRINCIPAL_NAME_ENCODED = "ClientPrincipalNameEncoded" + MANAGEMENT_GROUP_ANCESTORS_ENCODED = "ManagementGroupAncestorsEncoded" + MSI_RESOURCE_ID_ENCODED = "MSIResourceIdEncoded" + NOT_SPECIFIED = "NotSpecified" + PRIVATE_LINK_ID = "PrivateLinkId" + PRIVATE_LINK_RESOURCE_ID = "PrivateLinkResourceId" + PRIVATE_LINK_VNET_TRAFFIC_TAG = "PrivateLinkVnetTrafficTag" + RESOURCE_GROUP_LOCATION = "ResourceGroupLocation" + SIGNED_AUXILIARY_TOKENS = "SignedAuxiliaryTokens" + SIGNED_USER_TOKEN = "SignedUserToken" + UNBOUNDED_CLIENT_GROUP_MEMBERSHIP = "UnboundedClientGroupMembership" + + + class azure.mgmt.providerhub.models.OptOutHeaderType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOT_SPECIFIED = "NotSpecified" + SYSTEM_DATA_CREATED_BY_LAST_MODIFIED_BY = "SystemDataCreatedByLastModifiedBy" + + + class azure.mgmt.providerhub.models.Policy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOT_SPECIFIED = "NotSpecified" + SYNCHRONIZE_BEGIN_EXTENSION = "SynchronizeBeginExtension" + + + class azure.mgmt.providerhub.models.PolicyExecutionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BYPASS_POLICIES = "BypassPolicies" + EXECUTE_POLICIES = "ExecutePolicies" + EXPECT_PARTIAL_PUT_REQUESTS = "ExpectPartialPutRequests" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.PreflightOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CONTINUE_DEPLOYMENT_ON_FAILURE = "ContinueDeploymentOnFailure" + DEFAULT_VALIDATION_ONLY = "DefaultValidationOnly" + NONE = "None" + + + class azure.mgmt.providerhub.models.PrivateResourceProviderConfiguration(_Model): + allowed_subscriptions: Optional[list[str]] + + @overload + def __init__( + self, + *, + allowed_subscriptions: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProviderHubMetadata(_Model): + direct_rp_role_definition_id: Optional[str] + global_async_operation_resource_type_name: Optional[str] + provider_authentication: Optional[ProviderHubMetadataProviderAuthentication] + provider_authorizations: Optional[list[ResourceProviderAuthorization]] + regional_async_operation_resource_type_name: Optional[str] + third_party_provider_authorization: Optional[ProviderHubMetadataThirdPartyProviderAuthorization] + + @overload + def __init__( + self, + *, + direct_rp_role_definition_id: Optional[str] = ..., + global_async_operation_resource_type_name: Optional[str] = ..., + provider_authentication: Optional[ProviderHubMetadataProviderAuthentication] = ..., + provider_authorizations: Optional[list[ResourceProviderAuthorization]] = ..., + regional_async_operation_resource_type_name: Optional[str] = ..., + third_party_provider_authorization: Optional[ProviderHubMetadataThirdPartyProviderAuthorization] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProviderHubMetadataProviderAuthentication(ResourceProviderAuthentication): + allowed_audiences: list[str] + + @overload + def __init__( + self, + *, + allowed_audiences: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProviderHubMetadataThirdPartyProviderAuthorization(ThirdPartyProviderAuthorization): + authorizations: list[LightHouseAuthorization] + managed_by_tenant_id: str + + @overload + def __init__( + self, + *, + authorizations: Optional[list[LightHouseAuthorization]] = ..., + managed_by_tenant_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProviderMonitorSetting(TrackedResource): + id: str + location: str + name: str + properties: Optional[ProviderMonitorSettingProperties] + system_data: SystemData + tags: dict[str, str] + type: str + + @overload + def __init__( + self, + *, + location: str, + properties: Optional[ProviderMonitorSettingProperties] = ..., + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProviderMonitorSettingProperties(_Model): + provisioning_state: Optional[Union[str, ProvisioningState]] + + + class azure.mgmt.providerhub.models.ProviderRegistration(ProxyResource): + id: str + kind: Optional[Union[str, ProviderRegistrationKind]] + name: str + properties: Optional[ProviderRegistrationProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + kind: Optional[Union[str, ProviderRegistrationKind]] = ..., + properties: Optional[ProviderRegistrationProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProviderRegistrationKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DIRECT = "Direct" + HYBRID = "Hybrid" + MANAGED = "Managed" + + + class azure.mgmt.providerhub.models.ProviderRegistrationProperties(ResourceProviderManifestProperties): + capabilities: list[ResourceProviderCapabilities] + cross_tenant_token_validation: Union[str, CrossTenantTokenValidation] + custom_manifest_version: str + dsts_configuration: ResourceProviderManifestPropertiesDstsConfiguration + enable_tenant_linked_notification: bool + features_rule: ResourceProviderManifestPropertiesFeaturesRule + global_notification_endpoints: list[ResourceProviderEndpoint] + legacy_namespace: str + legacy_registrations: list[str] + linked_notification_rules: list[FanoutLinkedNotificationRule] + management: ResourceProviderManifestPropertiesManagement + management_group_global_notification_endpoints: list[ResourceProviderEndpoint] + metadata: any + namespace: str + notification_options: Union[str, NotificationOptions] + notification_settings: ResourceProviderManifestPropertiesNotificationSettings + notifications: list[Notification] + optional_features: list[str] + private_resource_provider_configuration: Optional[ProviderRegistrationPropertiesPrivateResourceProviderConfiguration] + provider_authentication: ResourceProviderManifestPropertiesProviderAuthentication + provider_authorizations: list[ResourceProviderAuthorization] + provider_hub_metadata: Optional[ProviderRegistrationPropertiesProviderHubMetadata] + provider_type: Union[str, ResourceProviderType] + provider_version: str + provisioning_state: Optional[Union[str, ProvisioningState]] + request_header_options: ResourceProviderManifestPropertiesRequestHeaderOptions + required_features: list[str] + resource_group_lock_option_during_move: ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove + resource_hydration_accounts: list[ResourceHydrationAccount] + resource_provider_authorization_rules: ResourceProviderAuthorizationRules + response_options: ResourceProviderManifestPropertiesResponseOptions + service_name: str + services: list[ResourceProviderService] + subscription_lifecycle_notification_specifications: Optional[ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications] + template_deployment_options: ResourceProviderManifestPropertiesTemplateDeploymentOptions + token_auth_configuration: Optional[TokenAuthConfiguration] + + @overload + def __init__( + self, + *, + capabilities: Optional[list[ResourceProviderCapabilities]] = ..., + cross_tenant_token_validation: Optional[Union[str, CrossTenantTokenValidation]] = ..., + custom_manifest_version: Optional[str] = ..., + dsts_configuration: Optional[ResourceProviderManifestPropertiesDstsConfiguration] = ..., + enable_tenant_linked_notification: Optional[bool] = ..., + features_rule: Optional[ResourceProviderManifestPropertiesFeaturesRule] = ..., + global_notification_endpoints: Optional[list[ResourceProviderEndpoint]] = ..., + legacy_namespace: Optional[str] = ..., + legacy_registrations: Optional[list[str]] = ..., + linked_notification_rules: Optional[list[FanoutLinkedNotificationRule]] = ..., + management: Optional[ResourceProviderManifestPropertiesManagement] = ..., + management_group_global_notification_endpoints: Optional[list[ResourceProviderEndpoint]] = ..., + metadata: Optional[Any] = ..., + namespace: Optional[str] = ..., + notification_options: Optional[Union[str, NotificationOptions]] = ..., + notification_settings: Optional[ResourceProviderManifestPropertiesNotificationSettings] = ..., + notifications: Optional[list[Notification]] = ..., + optional_features: Optional[list[str]] = ..., + private_resource_provider_configuration: Optional[ProviderRegistrationPropertiesPrivateResourceProviderConfiguration] = ..., + provider_authentication: Optional[ResourceProviderManifestPropertiesProviderAuthentication] = ..., + provider_authorizations: Optional[list[ResourceProviderAuthorization]] = ..., + provider_hub_metadata: Optional[ProviderRegistrationPropertiesProviderHubMetadata] = ..., + provider_type: Optional[Union[str, ResourceProviderType]] = ..., + provider_version: Optional[str] = ..., + request_header_options: Optional[ResourceProviderManifestPropertiesRequestHeaderOptions] = ..., + required_features: Optional[list[str]] = ..., + resource_group_lock_option_during_move: Optional[ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove] = ..., + resource_hydration_accounts: Optional[list[ResourceHydrationAccount]] = ..., + resource_provider_authorization_rules: Optional[ResourceProviderAuthorizationRules] = ..., + response_options: Optional[ResourceProviderManifestPropertiesResponseOptions] = ..., + service_name: Optional[str] = ..., + services: Optional[list[ResourceProviderService]] = ..., + subscription_lifecycle_notification_specifications: Optional[ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications] = ..., + template_deployment_options: Optional[ResourceProviderManifestPropertiesTemplateDeploymentOptions] = ..., + token_auth_configuration: Optional[TokenAuthConfiguration] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProviderRegistrationPropertiesPrivateResourceProviderConfiguration(PrivateResourceProviderConfiguration): + allowed_subscriptions: list[str] + + @overload + def __init__( + self, + *, + allowed_subscriptions: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProviderRegistrationPropertiesProviderHubMetadata(ProviderHubMetadata): + direct_rp_role_definition_id: str + global_async_operation_resource_type_name: str + provider_authentication: ProviderHubMetadataProviderAuthentication + provider_authorizations: list[ResourceProviderAuthorization] + regional_async_operation_resource_type_name: str + third_party_provider_authorization: ProviderHubMetadataThirdPartyProviderAuthorization + + @overload + def __init__( + self, + *, + direct_rp_role_definition_id: Optional[str] = ..., + global_async_operation_resource_type_name: Optional[str] = ..., + provider_authentication: Optional[ProviderHubMetadataProviderAuthentication] = ..., + provider_authorizations: Optional[list[ResourceProviderAuthorization]] = ..., + regional_async_operation_resource_type_name: Optional[str] = ..., + third_party_provider_authorization: Optional[ProviderHubMetadataThirdPartyProviderAuthorization] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications(SubscriptionLifecycleNotificationSpecifications): + soft_delete_ttl: timedelta + subscription_state_override_actions: list[SubscriptionStateOverrideAction] + + @overload + def __init__( + self, + *, + soft_delete_ttl: Optional[timedelta] = ..., + subscription_state_override_actions: Optional[list[SubscriptionStateOverrideAction]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACCEPTED = "Accepted" + CANCELED = "Canceled" + CREATED = "Created" + CREATING = "Creating" + DELETED = "Deleted" + DELETING = "Deleting" + FAILED = "Failed" + MOVING_RESOURCES = "MovingResources" + NOT_SPECIFIED = "NotSpecified" + ROLLOUT_IN_PROGRESS = "RolloutInProgress" + RUNNING = "Running" + SUCCEEDED = "Succeeded" + TRANSIENT_FAILURE = "TransientFailure" + + + class azure.mgmt.providerhub.models.ProxyResource(Resource): + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.models.QuotaPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEFAULT = "Default" + NONE = "None" + RESTRICTED = "Restricted" + + + class azure.mgmt.providerhub.models.QuotaRule(_Model): + location_rules: Optional[list[LocationQuotaRule]] + quota_policy: Optional[Union[str, QuotaPolicy]] + required_features: Optional[list[str]] + + @overload + def __init__( + self, + *, + location_rules: Optional[list[LocationQuotaRule]] = ..., + quota_policy: Optional[Union[str, QuotaPolicy]] = ..., + required_features: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ReRegisterSubscriptionMetadata(_Model): + concurrency_limit: Optional[int] + enabled: bool + + @overload + def __init__( + self, + *, + concurrency_limit: Optional[int] = ..., + enabled: bool + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.Readiness(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CLOSING_DOWN = "ClosingDown" + DEPRECATED = "Deprecated" + GA = "GA" + INTERNAL_ONLY = "InternalOnly" + IN_DEVELOPMENT = "InDevelopment" + PRIVATE_PREVIEW = "PrivatePreview" + PUBLIC_PREVIEW = "PublicPreview" + REMOVED_FROM_ARM = "RemovedFromARM" + RETIRED = "Retired" + + + class azure.mgmt.providerhub.models.Regionality(str, Enum, metaclass=CaseInsensitiveEnumMeta): + GLOBAL = "Global" + NOT_SPECIFIED = "NotSpecified" + REGIONAL = "Regional" + + + class azure.mgmt.providerhub.models.RequestHeaderOptions(_Model): + opt_in_headers: Optional[Union[str, OptInHeaderType]] + opt_out_headers: Optional[Union[str, OptOutHeaderType]] + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, OptInHeaderType]] = ..., + opt_out_headers: Optional[Union[str, OptOutHeaderType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.Resource(_Model): + id: Optional[str] + name: Optional[str] + system_data: Optional[SystemData] + type: Optional[str] + + + class azure.mgmt.providerhub.models.ResourceAccessPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACIS_ACTION_ALLOWED = "AcisActionAllowed" + ACIS_READ_ALLOWED = "AcisReadAllowed" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.ResourceAccessRole(_Model): + actions: Optional[list[str]] + allowed_group_claims: Optional[list[str]] + + @overload + def __init__( + self, + *, + actions: Optional[list[str]] = ..., + allowed_group_claims: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceConcurrencyControlOption(_Model): + policy: Optional[Union[str, Policy]] + + @overload + def __init__( + self, + *, + policy: Optional[Union[str, Policy]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceDeletionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CASCADE_DELETE_ALL = "CascadeDeleteAll" + CASCADE_DELETE_PROXY_ONLY_CHILDREN = "CascadeDeleteProxyOnlyChildren" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.ResourceGraphConfiguration(_Model): + api_version: Optional[str] + enabled: Optional[bool] + + @overload + def __init__( + self, + *, + api_version: Optional[str] = ..., + enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceHydrationAccount(_Model): + account_name: Optional[str] + encrypted_key: Optional[str] + max_child_resource_consistency_job_limit: Optional[int] + subscription_id: Optional[str] + + @overload + def __init__( + self, + *, + account_name: Optional[str] = ..., + encrypted_key: Optional[str] = ..., + max_child_resource_consistency_job_limit: Optional[int] = ..., + subscription_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceManagementAction(_Model): + resources: Optional[list[ResourceManagementEntity]] + + @overload + def __init__( + self, + *, + resources: Optional[list[ResourceManagementEntity]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceManagementEntity(_Model): + home_tenant_id: Optional[str] + location: Optional[str] + resource_id: str + status: Optional[str] + + @overload + def __init__( + self, + *, + home_tenant_id: Optional[str] = ..., + location: Optional[str] = ..., + resource_id: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceMovePolicy(_Model): + cross_resource_group_move_enabled: Optional[bool] + cross_subscription_move_enabled: Optional[bool] + validation_required: Optional[bool] + + @overload + def __init__( + self, + *, + cross_resource_group_move_enabled: Optional[bool] = ..., + cross_subscription_move_enabled: Optional[bool] = ..., + validation_required: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderAuthentication(_Model): + allowed_audiences: list[str] + + @overload + def __init__( + self, + *, + allowed_audiences: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderAuthorization(_Model): + allowed_third_party_extensions: Optional[list[ThirdPartyExtension]] + application_id: Optional[str] + grouping_tag: Optional[str] + managed_by_authorization: Optional[ResourceProviderAuthorizationManagedByAuthorization] + managed_by_role_definition_id: Optional[str] + role_definition_id: Optional[str] + + @overload + def __init__( + self, + *, + allowed_third_party_extensions: Optional[list[ThirdPartyExtension]] = ..., + application_id: Optional[str] = ..., + grouping_tag: Optional[str] = ..., + managed_by_authorization: Optional[ResourceProviderAuthorizationManagedByAuthorization] = ..., + managed_by_role_definition_id: Optional[str] = ..., + role_definition_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderAuthorizationManagedByAuthorization(_Model): + additional_authorizations: Optional[list[AdditionalAuthorization]] + allow_managed_by_inheritance: Optional[bool] + managed_by_resource_role_definition_id: Optional[str] + + @overload + def __init__( + self, + *, + additional_authorizations: Optional[list[AdditionalAuthorization]] = ..., + allow_managed_by_inheritance: Optional[bool] = ..., + managed_by_resource_role_definition_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderAuthorizationRules(_Model): + async_operation_polling_rules: Optional[AsyncOperationPollingRules] + + @overload + def __init__( + self, + *, + async_operation_polling_rules: Optional[AsyncOperationPollingRules] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderCapabilities(_Model): + effect: Union[str, ResourceProviderCapabilitiesEffect] + quota_id: str + required_features: Optional[list[str]] + + @overload + def __init__( + self, + *, + effect: Union[str, ResourceProviderCapabilitiesEffect], + quota_id: str, + required_features: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderCapabilitiesEffect(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALLOW = "Allow" + DISALLOW = "Disallow" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.ResourceProviderEndpoint(_Model): + api_versions: Optional[list[str]] + enabled: Optional[bool] + endpoint_type: Optional[Union[str, EndpointType]] + endpoint_uri: Optional[str] + features_rule: Optional[ResourceProviderEndpointFeaturesRule] + locations: Optional[list[str]] + required_features: Optional[list[str]] + sku_link: Optional[str] + timeout: Optional[timedelta] + + @overload + def __init__( + self, + *, + api_versions: Optional[list[str]] = ..., + enabled: Optional[bool] = ..., + endpoint_type: Optional[Union[str, EndpointType]] = ..., + endpoint_uri: Optional[str] = ..., + features_rule: Optional[ResourceProviderEndpointFeaturesRule] = ..., + locations: Optional[list[str]] = ..., + required_features: Optional[list[str]] = ..., + sku_link: Optional[str] = ..., + timeout: Optional[timedelta] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderEndpointFeaturesRule(FeaturesRule): + required_features_policy: Union[str, FeaturesPolicy] + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, FeaturesPolicy] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManagement(_Model): + authorization_owners: Optional[list[str]] + canary_manifest_owners: Optional[list[str]] + error_response_message_options: Optional[ResourceProviderManagementErrorResponseMessageOptions] + expedited_rollout_metadata: Optional[ResourceProviderManagementExpeditedRolloutMetadata] + expedited_rollout_submitters: Optional[list[str]] + incident_contact_email: Optional[str] + incident_routing_service: Optional[str] + incident_routing_team: Optional[str] + manifest_owners: Optional[list[str]] + pc_code: Optional[str] + profit_center_program_id: Optional[str] + resource_access_policy: Optional[Union[str, ResourceAccessPolicy]] + resource_access_roles: Optional[list[ResourceAccessRole]] + schema_owners: Optional[list[str]] + service_tree_infos: Optional[list[ServiceTreeInfo]] + + @overload + def __init__( + self, + *, + authorization_owners: Optional[list[str]] = ..., + canary_manifest_owners: Optional[list[str]] = ..., + error_response_message_options: Optional[ResourceProviderManagementErrorResponseMessageOptions] = ..., + expedited_rollout_metadata: Optional[ResourceProviderManagementExpeditedRolloutMetadata] = ..., + expedited_rollout_submitters: Optional[list[str]] = ..., + incident_contact_email: Optional[str] = ..., + incident_routing_service: Optional[str] = ..., + incident_routing_team: Optional[str] = ..., + manifest_owners: Optional[list[str]] = ..., + pc_code: Optional[str] = ..., + profit_center_program_id: Optional[str] = ..., + resource_access_policy: Optional[Union[str, ResourceAccessPolicy]] = ..., + resource_access_roles: Optional[list[ResourceAccessRole]] = ..., + schema_owners: Optional[list[str]] = ..., + service_tree_infos: Optional[list[ServiceTreeInfo]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManagementErrorResponseMessageOptions(_Model): + server_failure_response_message_type: Optional[Union[str, ServerFailureResponseMessageType]] + + @overload + def __init__( + self, + *, + server_failure_response_message_type: Optional[Union[str, ServerFailureResponseMessageType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManagementExpeditedRolloutMetadata(_Model): + enabled: Optional[bool] + expedited_rollout_intent: Optional[Union[str, ExpeditedRolloutIntent]] + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = ..., + expedited_rollout_intent: Optional[Union[str, ExpeditedRolloutIntent]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifest(_Model): + capabilities: Optional[list[ResourceProviderCapabilities]] + cross_tenant_token_validation: Optional[Union[str, CrossTenantTokenValidation]] + enable_tenant_linked_notification: Optional[bool] + features_rule: Optional[ResourceProviderManifestFeaturesRule] + global_notification_endpoints: Optional[list[ResourceProviderEndpoint]] + linked_notification_rules: Optional[list[FanoutLinkedNotificationRule]] + management: Optional[ResourceProviderManifestManagement] + metadata: Optional[Any] + namespace: Optional[str] + notifications: Optional[list[Notification]] + provider_authentication: Optional[ResourceProviderManifestProviderAuthentication] + provider_authorizations: Optional[list[ResourceProviderAuthorization]] + provider_type: Optional[Union[str, ResourceProviderType]] + provider_version: Optional[str] + re_register_subscription_metadata: Optional[ResourceProviderManifestReRegisterSubscriptionMetadata] + request_header_options: Optional[ResourceProviderManifestRequestHeaderOptions] + required_features: Optional[list[str]] + resource_provider_authorization_rules: Optional[ResourceProviderAuthorizationRules] + resource_types: Optional[list[ResourceType]] + service_name: Optional[str] + services: Optional[list[ResourceProviderService]] + + @overload + def __init__( + self, + *, + capabilities: Optional[list[ResourceProviderCapabilities]] = ..., + cross_tenant_token_validation: Optional[Union[str, CrossTenantTokenValidation]] = ..., + enable_tenant_linked_notification: Optional[bool] = ..., + features_rule: Optional[ResourceProviderManifestFeaturesRule] = ..., + global_notification_endpoints: Optional[list[ResourceProviderEndpoint]] = ..., + linked_notification_rules: Optional[list[FanoutLinkedNotificationRule]] = ..., + management: Optional[ResourceProviderManifestManagement] = ..., + metadata: Optional[Any] = ..., + namespace: Optional[str] = ..., + notifications: Optional[list[Notification]] = ..., + provider_authentication: Optional[ResourceProviderManifestProviderAuthentication] = ..., + provider_authorizations: Optional[list[ResourceProviderAuthorization]] = ..., + provider_type: Optional[Union[str, ResourceProviderType]] = ..., + provider_version: Optional[str] = ..., + re_register_subscription_metadata: Optional[ResourceProviderManifestReRegisterSubscriptionMetadata] = ..., + request_header_options: Optional[ResourceProviderManifestRequestHeaderOptions] = ..., + required_features: Optional[list[str]] = ..., + resource_provider_authorization_rules: Optional[ResourceProviderAuthorizationRules] = ..., + resource_types: Optional[list[ResourceType]] = ..., + service_name: Optional[str] = ..., + services: Optional[list[ResourceProviderService]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestFeaturesRule(FeaturesRule): + required_features_policy: Union[str, FeaturesPolicy] + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, FeaturesPolicy] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestManagement(ResourceProviderManagement): + authorization_owners: list[str] + canary_manifest_owners: list[str] + error_response_message_options: ResourceProviderManagementErrorResponseMessageOptions + expedited_rollout_metadata: ResourceProviderManagementExpeditedRolloutMetadata + expedited_rollout_submitters: list[str] + incident_contact_email: str + incident_routing_service: str + incident_routing_team: str + manifest_owners: list[str] + pc_code: str + profit_center_program_id: str + resource_access_policy: Union[str, ResourceAccessPolicy] + resource_access_roles: list[ResourceAccessRole] + schema_owners: list[str] + service_tree_infos: list[ServiceTreeInfo] + + @overload + def __init__( + self, + *, + authorization_owners: Optional[list[str]] = ..., + canary_manifest_owners: Optional[list[str]] = ..., + error_response_message_options: Optional[ResourceProviderManagementErrorResponseMessageOptions] = ..., + expedited_rollout_metadata: Optional[ResourceProviderManagementExpeditedRolloutMetadata] = ..., + expedited_rollout_submitters: Optional[list[str]] = ..., + incident_contact_email: Optional[str] = ..., + incident_routing_service: Optional[str] = ..., + incident_routing_team: Optional[str] = ..., + manifest_owners: Optional[list[str]] = ..., + pc_code: Optional[str] = ..., + profit_center_program_id: Optional[str] = ..., + resource_access_policy: Optional[Union[str, ResourceAccessPolicy]] = ..., + resource_access_roles: Optional[list[ResourceAccessRole]] = ..., + schema_owners: Optional[list[str]] = ..., + service_tree_infos: Optional[list[ServiceTreeInfo]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestProperties(_Model): + capabilities: Optional[list[ResourceProviderCapabilities]] + cross_tenant_token_validation: Optional[Union[str, CrossTenantTokenValidation]] + custom_manifest_version: Optional[str] + dsts_configuration: Optional[ResourceProviderManifestPropertiesDstsConfiguration] + enable_tenant_linked_notification: Optional[bool] + features_rule: Optional[ResourceProviderManifestPropertiesFeaturesRule] + global_notification_endpoints: Optional[list[ResourceProviderEndpoint]] + legacy_namespace: Optional[str] + legacy_registrations: Optional[list[str]] + linked_notification_rules: Optional[list[FanoutLinkedNotificationRule]] + management: Optional[ResourceProviderManifestPropertiesManagement] + management_group_global_notification_endpoints: Optional[list[ResourceProviderEndpoint]] + metadata: Optional[Any] + namespace: Optional[str] + notification_options: Optional[Union[str, NotificationOptions]] + notification_settings: Optional[ResourceProviderManifestPropertiesNotificationSettings] + notifications: Optional[list[Notification]] + optional_features: Optional[list[str]] + provider_authentication: Optional[ResourceProviderManifestPropertiesProviderAuthentication] + provider_authorizations: Optional[list[ResourceProviderAuthorization]] + provider_type: Optional[Union[str, ResourceProviderType]] + provider_version: Optional[str] + request_header_options: Optional[ResourceProviderManifestPropertiesRequestHeaderOptions] + required_features: Optional[list[str]] + resource_group_lock_option_during_move: Optional[ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove] + resource_hydration_accounts: Optional[list[ResourceHydrationAccount]] + resource_provider_authorization_rules: Optional[ResourceProviderAuthorizationRules] + response_options: Optional[ResourceProviderManifestPropertiesResponseOptions] + service_name: Optional[str] + services: Optional[list[ResourceProviderService]] + template_deployment_options: Optional[ResourceProviderManifestPropertiesTemplateDeploymentOptions] + + @overload + def __init__( + self, + *, + capabilities: Optional[list[ResourceProviderCapabilities]] = ..., + cross_tenant_token_validation: Optional[Union[str, CrossTenantTokenValidation]] = ..., + custom_manifest_version: Optional[str] = ..., + dsts_configuration: Optional[ResourceProviderManifestPropertiesDstsConfiguration] = ..., + enable_tenant_linked_notification: Optional[bool] = ..., + features_rule: Optional[ResourceProviderManifestPropertiesFeaturesRule] = ..., + global_notification_endpoints: Optional[list[ResourceProviderEndpoint]] = ..., + legacy_namespace: Optional[str] = ..., + legacy_registrations: Optional[list[str]] = ..., + linked_notification_rules: Optional[list[FanoutLinkedNotificationRule]] = ..., + management: Optional[ResourceProviderManifestPropertiesManagement] = ..., + management_group_global_notification_endpoints: Optional[list[ResourceProviderEndpoint]] = ..., + metadata: Optional[Any] = ..., + namespace: Optional[str] = ..., + notification_options: Optional[Union[str, NotificationOptions]] = ..., + notification_settings: Optional[ResourceProviderManifestPropertiesNotificationSettings] = ..., + notifications: Optional[list[Notification]] = ..., + optional_features: Optional[list[str]] = ..., + provider_authentication: Optional[ResourceProviderManifestPropertiesProviderAuthentication] = ..., + provider_authorizations: Optional[list[ResourceProviderAuthorization]] = ..., + provider_type: Optional[Union[str, ResourceProviderType]] = ..., + provider_version: Optional[str] = ..., + request_header_options: Optional[ResourceProviderManifestPropertiesRequestHeaderOptions] = ..., + required_features: Optional[list[str]] = ..., + resource_group_lock_option_during_move: Optional[ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove] = ..., + resource_hydration_accounts: Optional[list[ResourceHydrationAccount]] = ..., + resource_provider_authorization_rules: Optional[ResourceProviderAuthorizationRules] = ..., + response_options: Optional[ResourceProviderManifestPropertiesResponseOptions] = ..., + service_name: Optional[str] = ..., + services: Optional[list[ResourceProviderService]] = ..., + template_deployment_options: Optional[ResourceProviderManifestPropertiesTemplateDeploymentOptions] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesDstsConfiguration(DstsConfiguration): + service_dns_name: str + service_name: str + + @overload + def __init__( + self, + *, + service_dns_name: Optional[str] = ..., + service_name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesFeaturesRule(FeaturesRule): + required_features_policy: Union[str, FeaturesPolicy] + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, FeaturesPolicy] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesManagement(ResourceProviderManagement): + authorization_owners: list[str] + canary_manifest_owners: list[str] + error_response_message_options: ResourceProviderManagementErrorResponseMessageOptions + expedited_rollout_metadata: ResourceProviderManagementExpeditedRolloutMetadata + expedited_rollout_submitters: list[str] + incident_contact_email: str + incident_routing_service: str + incident_routing_team: str + manifest_owners: list[str] + pc_code: str + profit_center_program_id: str + resource_access_policy: Union[str, ResourceAccessPolicy] + resource_access_roles: list[ResourceAccessRole] + schema_owners: list[str] + service_tree_infos: list[ServiceTreeInfo] + + @overload + def __init__( + self, + *, + authorization_owners: Optional[list[str]] = ..., + canary_manifest_owners: Optional[list[str]] = ..., + error_response_message_options: Optional[ResourceProviderManagementErrorResponseMessageOptions] = ..., + expedited_rollout_metadata: Optional[ResourceProviderManagementExpeditedRolloutMetadata] = ..., + expedited_rollout_submitters: Optional[list[str]] = ..., + incident_contact_email: Optional[str] = ..., + incident_routing_service: Optional[str] = ..., + incident_routing_team: Optional[str] = ..., + manifest_owners: Optional[list[str]] = ..., + pc_code: Optional[str] = ..., + profit_center_program_id: Optional[str] = ..., + resource_access_policy: Optional[Union[str, ResourceAccessPolicy]] = ..., + resource_access_roles: Optional[list[ResourceAccessRole]] = ..., + schema_owners: Optional[list[str]] = ..., + service_tree_infos: Optional[list[ServiceTreeInfo]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesNotificationSettings(_Model): + subscriber_settings: Optional[list[SubscriberSetting]] + + @overload + def __init__( + self, + *, + subscriber_settings: Optional[list[SubscriberSetting]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesProviderAuthentication(ResourceProviderAuthentication): + allowed_audiences: list[str] + + @overload + def __init__( + self, + *, + allowed_audiences: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesRequestHeaderOptions(RequestHeaderOptions): + opt_in_headers: Union[str, OptInHeaderType] + opt_out_headers: Union[str, OptOutHeaderType] + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, OptInHeaderType]] = ..., + opt_out_headers: Optional[Union[str, OptOutHeaderType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove(_Model): + block_action_verb: Optional[Union[str, BlockActionVerb]] + + @overload + def __init__( + self, + *, + block_action_verb: Optional[Union[str, BlockActionVerb]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesResponseOptions(_Model): + service_client_options_type: Optional[Union[str, ServiceClientOptionsType]] + + @overload + def __init__( + self, + *, + service_client_options_type: Optional[Union[str, ServiceClientOptionsType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesTemplateDeploymentOptions(TemplateDeploymentOptions): + preflight_options: Union[list[str, PreflightOption]] + preflight_supported: bool + + @overload + def __init__( + self, + *, + preflight_options: Optional[list[Union[str, PreflightOption]]] = ..., + preflight_supported: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestProviderAuthentication(ResourceProviderAuthentication): + allowed_audiences: list[str] + + @overload + def __init__( + self, + *, + allowed_audiences: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestReRegisterSubscriptionMetadata(ReRegisterSubscriptionMetadata): + concurrency_limit: int + enabled: bool + + @overload + def __init__( + self, + *, + concurrency_limit: Optional[int] = ..., + enabled: bool + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderManifestRequestHeaderOptions(RequestHeaderOptions): + opt_in_headers: Union[str, OptInHeaderType] + opt_out_headers: Union[str, OptOutHeaderType] + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, OptInHeaderType]] = ..., + opt_out_headers: Optional[Union[str, OptOutHeaderType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderService(_Model): + service_name: Optional[str] + status: Optional[Union[str, ServiceStatus]] + + @overload + def __init__( + self, + *, + service_name: Optional[str] = ..., + status: Optional[Union[str, ServiceStatus]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceProviderType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTHORIZATION_FREE = "AuthorizationFree" + EXTERNAL = "External" + HIDDEN = "Hidden" + INTERNAL = "Internal" + LEGACY_REGISTRATION_REQUIRED = "LegacyRegistrationRequired" + NOT_SPECIFIED = "NotSpecified" + REGISTRATION_FREE = "RegistrationFree" + TENANT_ONLY = "TenantOnly" + + + class azure.mgmt.providerhub.models.ResourceSubType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ASYNC_OPERATION = "AsyncOperation" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.ResourceType(_Model): + additional_options: Optional[Union[str, AdditionalOptions]] + allowed_unauthorized_actions: Optional[list[str]] + allowed_unauthorized_actions_extensions: Optional[list[AllowedUnauthorizedActionsExtension]] + authorization_action_mappings: Optional[list[AuthorizationActionMapping]] + cross_tenant_token_validation: Optional[Union[str, CrossTenantTokenValidation]] + default_api_version: Optional[str] + disallowed_action_verbs: Optional[list[str]] + endpoints: Optional[list[ResourceProviderEndpoint]] + extended_locations: Optional[list[ExtendedLocationOptions]] + features_rule: Optional[ResourceTypeFeaturesRule] + identity_management: Optional[ResourceTypeIdentityManagement] + linked_access_checks: Optional[list[LinkedAccessCheck]] + linked_notification_rules: Optional[list[LinkedNotificationRule]] + linked_operation_rules: Optional[list[LinkedOperationRule]] + logging_rules: Optional[list[LoggingRule]] + marketplace_type: Optional[Union[str, MarketplaceType]] + metadata: Optional[Any] + name: Optional[str] + notifications: Optional[list[Notification]] + quota_rule: Optional[QuotaRule] + request_header_options: Optional[ResourceTypeRequestHeaderOptions] + required_features: Optional[list[str]] + resource_deletion_policy: Optional[Union[str, ManifestResourceDeletionPolicy]] + resource_provider_authorization_rules: Optional[ResourceProviderAuthorizationRules] + resource_validation: Optional[Union[str, ResourceValidation]] + routing_type: Optional[Union[str, RoutingType]] + service_tree_infos: Optional[list[ServiceTreeInfo]] + sku_link: Optional[str] + subscription_state_rules: Optional[list[SubscriptionStateRule]] + template_deployment_policy: Optional[ResourceTypeTemplateDeploymentPolicy] + throttling_rules: Optional[list[ThrottlingRule]] + + @overload + def __init__( + self, + *, + additional_options: Optional[Union[str, AdditionalOptions]] = ..., + allowed_unauthorized_actions: Optional[list[str]] = ..., + allowed_unauthorized_actions_extensions: Optional[list[AllowedUnauthorizedActionsExtension]] = ..., + authorization_action_mappings: Optional[list[AuthorizationActionMapping]] = ..., + cross_tenant_token_validation: Optional[Union[str, CrossTenantTokenValidation]] = ..., + default_api_version: Optional[str] = ..., + disallowed_action_verbs: Optional[list[str]] = ..., + endpoints: Optional[list[ResourceProviderEndpoint]] = ..., + extended_locations: Optional[list[ExtendedLocationOptions]] = ..., + features_rule: Optional[ResourceTypeFeaturesRule] = ..., + identity_management: Optional[ResourceTypeIdentityManagement] = ..., + linked_access_checks: Optional[list[LinkedAccessCheck]] = ..., + linked_notification_rules: Optional[list[LinkedNotificationRule]] = ..., + linked_operation_rules: Optional[list[LinkedOperationRule]] = ..., + logging_rules: Optional[list[LoggingRule]] = ..., + marketplace_type: Optional[Union[str, MarketplaceType]] = ..., + metadata: Optional[Any] = ..., + name: Optional[str] = ..., + notifications: Optional[list[Notification]] = ..., + quota_rule: Optional[QuotaRule] = ..., + request_header_options: Optional[ResourceTypeRequestHeaderOptions] = ..., + required_features: Optional[list[str]] = ..., + resource_deletion_policy: Optional[Union[str, ManifestResourceDeletionPolicy]] = ..., + resource_provider_authorization_rules: Optional[ResourceProviderAuthorizationRules] = ..., + resource_validation: Optional[Union[str, ResourceValidation]] = ..., + routing_type: Optional[Union[str, RoutingType]] = ..., + service_tree_infos: Optional[list[ServiceTreeInfo]] = ..., + sku_link: Optional[str] = ..., + subscription_state_rules: Optional[list[SubscriptionStateRule]] = ..., + template_deployment_policy: Optional[ResourceTypeTemplateDeploymentPolicy] = ..., + throttling_rules: Optional[list[ThrottlingRule]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + FREE_FORM = "FreeForm" + INTERNAL = "Internal" + NONE = "None" + PURE_PROXY = "PureProxy" + + + class azure.mgmt.providerhub.models.ResourceTypeEndpoint(_Model): + api_version: Optional[str] + api_versions: Optional[list[str]] + data_boundary: Optional[Union[str, DataBoundary]] + dsts_configuration: Optional[ResourceTypeEndpointDstsConfiguration] + enabled: Optional[bool] + endpoint_type: Optional[Union[str, EndpointTypeResourceType]] + endpoint_uri: Optional[str] + extensions: Optional[list[ResourceTypeExtension]] + features_rule: Optional[ResourceTypeEndpointFeaturesRule] + kind: Optional[Union[str, ResourceTypeEndpointKind]] + locations: Optional[list[str]] + required_features: Optional[list[str]] + sku_link: Optional[str] + timeout: Optional[timedelta] + token_auth_configuration: Optional[TokenAuthConfiguration] + zones: Optional[list[str]] + + @overload + def __init__( + self, + *, + api_version: Optional[str] = ..., + api_versions: Optional[list[str]] = ..., + data_boundary: Optional[Union[str, DataBoundary]] = ..., + dsts_configuration: Optional[ResourceTypeEndpointDstsConfiguration] = ..., + enabled: Optional[bool] = ..., + endpoint_type: Optional[Union[str, EndpointTypeResourceType]] = ..., + endpoint_uri: Optional[str] = ..., + extensions: Optional[list[ResourceTypeExtension]] = ..., + features_rule: Optional[ResourceTypeEndpointFeaturesRule] = ..., + kind: Optional[Union[str, ResourceTypeEndpointKind]] = ..., + locations: Optional[list[str]] = ..., + required_features: Optional[list[str]] = ..., + sku_link: Optional[str] = ..., + timeout: Optional[timedelta] = ..., + token_auth_configuration: Optional[TokenAuthConfiguration] = ..., + zones: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeEndpointBase(_Model): + api_version: str + api_versions: list[str] + dsts_configuration: ResourceTypeEndpointBaseDstsConfiguration + enabled: bool + endpoint_type: Union[str, EndpointType] + endpoint_uri: str + features_rule: ResourceTypeEndpointBaseFeaturesRule + locations: list[str] + required_features: list[str] + sku_link: str + timeout: timedelta + zones: list[str] + + @overload + def __init__( + self, + *, + api_version: str, + api_versions: list[str], + dsts_configuration: ResourceTypeEndpointBaseDstsConfiguration, + enabled: bool, + endpoint_type: Union[str, EndpointType], + endpoint_uri: str, + features_rule: ResourceTypeEndpointBaseFeaturesRule, + locations: list[str], + required_features: list[str], + sku_link: str, + timeout: timedelta, + zones: list[str] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeEndpointBaseDstsConfiguration(DstsConfiguration): + service_dns_name: str + service_name: str + + @overload + def __init__( + self, + *, + service_dns_name: Optional[str] = ..., + service_name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeEndpointBaseFeaturesRule(FeaturesRule): + required_features_policy: Union[str, FeaturesPolicy] + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, FeaturesPolicy] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeEndpointDstsConfiguration(DstsConfiguration): + service_dns_name: str + service_name: str + + @overload + def __init__( + self, + *, + service_dns_name: Optional[str] = ..., + service_name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeEndpointFeaturesRule(FeaturesRule): + required_features_policy: Union[str, FeaturesPolicy] + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, FeaturesPolicy] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeEndpointKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DIRECT = "Direct" + MANAGED = "Managed" + + + class azure.mgmt.providerhub.models.ResourceTypeExtendedLocationPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ALL = "All" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.ResourceTypeExtension(_Model): + endpoint_uri: Optional[str] + extension_categories: Optional[list[Union[str, ExtensionCategory]]] + timeout: Optional[timedelta] + + @overload + def __init__( + self, + *, + endpoint_uri: Optional[str] = ..., + extension_categories: Optional[list[Union[str, ExtensionCategory]]] = ..., + timeout: Optional[timedelta] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeExtensionOptions(_Model): + resource_creation_begin: Optional[ResourceTypeExtensionOptionsResourceCreationBegin] + + @overload + def __init__( + self, + *, + resource_creation_begin: Optional[ResourceTypeExtensionOptionsResourceCreationBegin] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeExtensionOptionsResourceCreationBegin(ExtensionOptions): + request: Union[list[str, ExtensionOptionType]] + response: Union[list[str, ExtensionOptionType]] + + @overload + def __init__( + self, + *, + request: Optional[list[Union[str, ExtensionOptionType]]] = ..., + response: Optional[list[Union[str, ExtensionOptionType]]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeFeaturesRule(FeaturesRule): + required_features_policy: Union[str, FeaturesPolicy] + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, FeaturesPolicy] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeIdentityManagement(IdentityManagement): + type: Union[str, IdentityManagementTypes] + + @overload + def __init__( + self, + *, + type: Optional[Union[str, IdentityManagementTypes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeOnBehalfOfToken(_Model): + action_name: Optional[str] + life_time: Optional[str] + + @overload + def __init__( + self, + *, + action_name: Optional[str] = ..., + life_time: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistration(ProxyResource): + id: str + kind: Optional[Union[str, ResourceTypeRegistrationKind]] + name: str + properties: Optional[ResourceTypeRegistrationProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + kind: Optional[Union[str, ResourceTypeRegistrationKind]] = ..., + properties: Optional[ResourceTypeRegistrationProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DIRECT = "Direct" + HYBRID = "Hybrid" + MANAGED = "Managed" + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationProperties(_Model): + add_resource_list_target_locations: Optional[bool] + additional_options: Optional[Union[str, AdditionalOptionsResourceTypeRegistration]] + allow_empty_role_assignments: Optional[bool] + allowed_resource_names: Optional[list[AllowedResourceName]] + allowed_template_deployment_reference_actions: Optional[list[str]] + allowed_unauthorized_actions: Optional[list[str]] + allowed_unauthorized_actions_extensions: Optional[list[AllowedUnauthorizedActionsExtension]] + api_profiles: Optional[list[ApiProfile]] + async_operation_resource_type_name: Optional[str] + async_timeout_rules: Optional[list[AsyncTimeoutRule]] + authorization_action_mappings: Optional[list[AuthorizationActionMapping]] + availability_zone_rule: Optional[ResourceTypeRegistrationPropertiesAvailabilityZoneRule] + capacity_rule: Optional[ResourceTypeRegistrationPropertiesCapacityRule] + category: Optional[Union[str, ResourceTypeCategory]] + check_name_availability_specifications: Optional[ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications] + common_api_versions: Optional[list[str]] + cross_tenant_token_validation: Optional[Union[str, CrossTenantTokenValidation]] + default_api_version: Optional[str] + disallowed_action_verbs: Optional[list[str]] + disallowed_end_user_operations: Optional[list[str]] + dsts_configuration: Optional[ResourceTypeRegistrationPropertiesDstsConfiguration] + enable_async_operation: Optional[bool] + enable_third_party_s2_s: Optional[bool] + endpoints: Optional[list[ResourceTypeEndpoint]] + extended_locations: Optional[list[ExtendedLocationOptions]] + extension_options: Optional[ResourceTypeRegistrationPropertiesExtensionOptions] + features_rule: Optional[ResourceTypeRegistrationPropertiesFeaturesRule] + frontdoor_request_mode: Optional[Union[str, FrontdoorRequestMode]] + grouping_tag: Optional[str] + identity_management: Optional[ResourceTypeRegistrationPropertiesIdentityManagement] + is_pure_proxy: Optional[bool] + legacy_name: Optional[str] + legacy_names: Optional[list[str]] + legacy_policy: Optional[ResourceTypeRegistrationPropertiesLegacyPolicy] + linked_access_checks: Optional[list[LinkedAccessCheck]] + linked_notification_rules: Optional[list[LinkedNotificationRule]] + linked_operation_rules: Optional[list[LinkedOperationRule]] + logging_rules: Optional[list[LoggingRule]] + management: Optional[ResourceTypeRegistrationPropertiesManagement] + manifest_link: Optional[str] + marketplace_options: Optional[ResourceTypeRegistrationPropertiesMarketplaceOptions] + marketplace_type: Optional[Union[str, MarketplaceType]] + metadata: Optional[dict[str, Any]] + notifications: Optional[list[Notification]] + on_behalf_of_tokens: Optional[ResourceTypeOnBehalfOfToken] + open_api_configuration: Optional[OpenApiConfiguration] + policy_execution_type: Optional[Union[str, PolicyExecutionType]] + provisioning_state: Optional[Union[str, ProvisioningState]] + quota_rule: Optional[QuotaRule] + regionality: Optional[Union[str, Regionality]] + request_header_options: Optional[ResourceTypeRegistrationPropertiesRequestHeaderOptions] + required_features: Optional[list[str]] + resource_cache: Optional[ResourceTypeRegistrationPropertiesResourceCache] + resource_concurrency_control_options: Optional[dict[str, ResourceConcurrencyControlOption]] + resource_deletion_policy: Optional[Union[str, ResourceDeletionPolicy]] + resource_graph_configuration: Optional[ResourceTypeRegistrationPropertiesResourceGraphConfiguration] + resource_management_options: Optional[ResourceTypeRegistrationPropertiesResourceManagementOptions] + resource_move_policy: Optional[ResourceTypeRegistrationPropertiesResourceMovePolicy] + resource_provider_authorization_rules: Optional[ResourceProviderAuthorizationRules] + resource_query_management: Optional[ResourceTypeRegistrationPropertiesResourceQueryManagement] + resource_sub_type: Optional[Union[str, ResourceSubType]] + resource_type_common_attribute_management: Optional[ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement] + resource_validation: Optional[Union[str, ResourceValidation]] + routing_rule: Optional[ResourceTypeRegistrationPropertiesRoutingRule] + routing_type: Optional[Union[str, RoutingType]] + service_tree_infos: Optional[list[ServiceTreeInfo]] + sku_link: Optional[str] + subscription_lifecycle_notification_specifications: Optional[ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications] + subscription_state_rules: Optional[list[SubscriptionStateRule]] + supports_tags: Optional[bool] + swagger_specifications: Optional[list[SwaggerSpecification]] + template_deployment_options: Optional[ResourceTypeRegistrationPropertiesTemplateDeploymentOptions] + template_deployment_policy: Optional[ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy] + throttling_rules: Optional[list[ThrottlingRule]] + token_auth_configuration: Optional[TokenAuthConfiguration] + + @overload + def __init__( + self, + *, + add_resource_list_target_locations: Optional[bool] = ..., + additional_options: Optional[Union[str, AdditionalOptionsResourceTypeRegistration]] = ..., + allow_empty_role_assignments: Optional[bool] = ..., + allowed_resource_names: Optional[list[AllowedResourceName]] = ..., + allowed_template_deployment_reference_actions: Optional[list[str]] = ..., + allowed_unauthorized_actions: Optional[list[str]] = ..., + allowed_unauthorized_actions_extensions: Optional[list[AllowedUnauthorizedActionsExtension]] = ..., + api_profiles: Optional[list[ApiProfile]] = ..., + async_operation_resource_type_name: Optional[str] = ..., + async_timeout_rules: Optional[list[AsyncTimeoutRule]] = ..., + authorization_action_mappings: Optional[list[AuthorizationActionMapping]] = ..., + availability_zone_rule: Optional[ResourceTypeRegistrationPropertiesAvailabilityZoneRule] = ..., + capacity_rule: Optional[ResourceTypeRegistrationPropertiesCapacityRule] = ..., + category: Optional[Union[str, ResourceTypeCategory]] = ..., + check_name_availability_specifications: Optional[ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications] = ..., + common_api_versions: Optional[list[str]] = ..., + cross_tenant_token_validation: Optional[Union[str, CrossTenantTokenValidation]] = ..., + default_api_version: Optional[str] = ..., + disallowed_action_verbs: Optional[list[str]] = ..., + disallowed_end_user_operations: Optional[list[str]] = ..., + dsts_configuration: Optional[ResourceTypeRegistrationPropertiesDstsConfiguration] = ..., + enable_async_operation: Optional[bool] = ..., + enable_third_party_s2_s: Optional[bool] = ..., + endpoints: Optional[list[ResourceTypeEndpoint]] = ..., + extended_locations: Optional[list[ExtendedLocationOptions]] = ..., + extension_options: Optional[ResourceTypeRegistrationPropertiesExtensionOptions] = ..., + features_rule: Optional[ResourceTypeRegistrationPropertiesFeaturesRule] = ..., + frontdoor_request_mode: Optional[Union[str, FrontdoorRequestMode]] = ..., + grouping_tag: Optional[str] = ..., + identity_management: Optional[ResourceTypeRegistrationPropertiesIdentityManagement] = ..., + is_pure_proxy: Optional[bool] = ..., + legacy_name: Optional[str] = ..., + legacy_names: Optional[list[str]] = ..., + legacy_policy: Optional[ResourceTypeRegistrationPropertiesLegacyPolicy] = ..., + linked_access_checks: Optional[list[LinkedAccessCheck]] = ..., + linked_notification_rules: Optional[list[LinkedNotificationRule]] = ..., + linked_operation_rules: Optional[list[LinkedOperationRule]] = ..., + logging_rules: Optional[list[LoggingRule]] = ..., + management: Optional[ResourceTypeRegistrationPropertiesManagement] = ..., + manifest_link: Optional[str] = ..., + marketplace_options: Optional[ResourceTypeRegistrationPropertiesMarketplaceOptions] = ..., + marketplace_type: Optional[Union[str, MarketplaceType]] = ..., + metadata: Optional[dict[str, Any]] = ..., + notifications: Optional[list[Notification]] = ..., + on_behalf_of_tokens: Optional[ResourceTypeOnBehalfOfToken] = ..., + open_api_configuration: Optional[OpenApiConfiguration] = ..., + policy_execution_type: Optional[Union[str, PolicyExecutionType]] = ..., + quota_rule: Optional[QuotaRule] = ..., + regionality: Optional[Union[str, Regionality]] = ..., + request_header_options: Optional[ResourceTypeRegistrationPropertiesRequestHeaderOptions] = ..., + required_features: Optional[list[str]] = ..., + resource_cache: Optional[ResourceTypeRegistrationPropertiesResourceCache] = ..., + resource_concurrency_control_options: Optional[dict[str, ResourceConcurrencyControlOption]] = ..., + resource_deletion_policy: Optional[Union[str, ResourceDeletionPolicy]] = ..., + resource_graph_configuration: Optional[ResourceTypeRegistrationPropertiesResourceGraphConfiguration] = ..., + resource_management_options: Optional[ResourceTypeRegistrationPropertiesResourceManagementOptions] = ..., + resource_move_policy: Optional[ResourceTypeRegistrationPropertiesResourceMovePolicy] = ..., + resource_provider_authorization_rules: Optional[ResourceProviderAuthorizationRules] = ..., + resource_query_management: Optional[ResourceTypeRegistrationPropertiesResourceQueryManagement] = ..., + resource_sub_type: Optional[Union[str, ResourceSubType]] = ..., + resource_type_common_attribute_management: Optional[ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement] = ..., + resource_validation: Optional[Union[str, ResourceValidation]] = ..., + routing_rule: Optional[ResourceTypeRegistrationPropertiesRoutingRule] = ..., + routing_type: Optional[Union[str, RoutingType]] = ..., + service_tree_infos: Optional[list[ServiceTreeInfo]] = ..., + sku_link: Optional[str] = ..., + subscription_lifecycle_notification_specifications: Optional[ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications] = ..., + subscription_state_rules: Optional[list[SubscriptionStateRule]] = ..., + supports_tags: Optional[bool] = ..., + swagger_specifications: Optional[list[SwaggerSpecification]] = ..., + template_deployment_options: Optional[ResourceTypeRegistrationPropertiesTemplateDeploymentOptions] = ..., + template_deployment_policy: Optional[ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy] = ..., + throttling_rules: Optional[list[ThrottlingRule]] = ..., + token_auth_configuration: Optional[TokenAuthConfiguration] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesAvailabilityZoneRule(_Model): + availability_zone_policy: Optional[Union[str, AvailabilityZonePolicy]] + + @overload + def __init__( + self, + *, + availability_zone_policy: Optional[Union[str, AvailabilityZonePolicy]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesCapacityRule(_Model): + capacity_policy: Optional[Union[str, CapacityPolicy]] + sku_alias: Optional[str] + + @overload + def __init__( + self, + *, + capacity_policy: Optional[Union[str, CapacityPolicy]] = ..., + sku_alias: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications(CheckNameAvailabilitySpecifications): + enable_default_validation: bool + resource_types_with_custom_validation: list[str] + + @overload + def __init__( + self, + *, + enable_default_validation: Optional[bool] = ..., + resource_types_with_custom_validation: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesDstsConfiguration(DstsConfiguration): + service_dns_name: str + service_name: str + + @overload + def __init__( + self, + *, + service_dns_name: Optional[str] = ..., + service_name: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesExtensionOptions(ResourceTypeExtensionOptions): + resource_creation_begin: ResourceTypeExtensionOptionsResourceCreationBegin + + @overload + def __init__( + self, + *, + resource_creation_begin: Optional[ResourceTypeExtensionOptionsResourceCreationBegin] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesFeaturesRule(FeaturesRule): + required_features_policy: Union[str, FeaturesPolicy] + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, FeaturesPolicy] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesIdentityManagement(IdentityManagementProperties): + application_id: str + application_ids: list[str] + delegation_app_ids: list[str] + type: Union[str, IdentityManagementTypes] + + @overload + def __init__( + self, + *, + application_id: Optional[str] = ..., + application_ids: Optional[list[str]] = ..., + delegation_app_ids: Optional[list[str]] = ..., + type: Optional[Union[str, IdentityManagementTypes]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesLegacyPolicy(_Model): + disallowed_conditions: Optional[list[LegacyDisallowedCondition]] + disallowed_legacy_operations: Optional[list[Union[str, LegacyOperation]]] + + @overload + def __init__( + self, + *, + disallowed_conditions: Optional[list[LegacyDisallowedCondition]] = ..., + disallowed_legacy_operations: Optional[list[Union[str, LegacyOperation]]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesManagement(ResourceProviderManagement): + authorization_owners: list[str] + canary_manifest_owners: list[str] + error_response_message_options: ResourceProviderManagementErrorResponseMessageOptions + expedited_rollout_metadata: ResourceProviderManagementExpeditedRolloutMetadata + expedited_rollout_submitters: list[str] + incident_contact_email: str + incident_routing_service: str + incident_routing_team: str + manifest_owners: list[str] + pc_code: str + profit_center_program_id: str + resource_access_policy: Union[str, ResourceAccessPolicy] + resource_access_roles: list[ResourceAccessRole] + schema_owners: list[str] + service_tree_infos: list[ServiceTreeInfo] + + @overload + def __init__( + self, + *, + authorization_owners: Optional[list[str]] = ..., + canary_manifest_owners: Optional[list[str]] = ..., + error_response_message_options: Optional[ResourceProviderManagementErrorResponseMessageOptions] = ..., + expedited_rollout_metadata: Optional[ResourceProviderManagementExpeditedRolloutMetadata] = ..., + expedited_rollout_submitters: Optional[list[str]] = ..., + incident_contact_email: Optional[str] = ..., + incident_routing_service: Optional[str] = ..., + incident_routing_team: Optional[str] = ..., + manifest_owners: Optional[list[str]] = ..., + pc_code: Optional[str] = ..., + profit_center_program_id: Optional[str] = ..., + resource_access_policy: Optional[Union[str, ResourceAccessPolicy]] = ..., + resource_access_roles: Optional[list[ResourceAccessRole]] = ..., + schema_owners: Optional[list[str]] = ..., + service_tree_infos: Optional[list[ServiceTreeInfo]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesMarketplaceOptions(_Model): + add_on_plan_conversion_allowed: Optional[bool] + + @overload + def __init__( + self, + *, + add_on_plan_conversion_allowed: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesRequestHeaderOptions(RequestHeaderOptions): + opt_in_headers: Union[str, OptInHeaderType] + opt_out_headers: Union[str, OptOutHeaderType] + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, OptInHeaderType]] = ..., + opt_out_headers: Optional[Union[str, OptOutHeaderType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceCache(_Model): + enable_resource_cache: Optional[bool] + resource_cache_expiration_timespan: Optional[str] + + @overload + def __init__( + self, + *, + enable_resource_cache: Optional[bool] = ..., + resource_cache_expiration_timespan: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceGraphConfiguration(ResourceGraphConfiguration): + api_version: str + enabled: bool + + @overload + def __init__( + self, + *, + api_version: Optional[str] = ..., + enabled: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptions(_Model): + batch_provisioning_support: Optional[ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport] + delete_dependencies: Optional[list[DeleteDependency]] + nested_provisioning_support: Optional[ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport] + + @overload + def __init__( + self, + *, + batch_provisioning_support: Optional[ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport] = ..., + delete_dependencies: Optional[list[DeleteDependency]] = ..., + nested_provisioning_support: Optional[ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport(_Model): + supported_operations: Optional[Union[str, SupportedOperations]] + + @overload + def __init__( + self, + *, + supported_operations: Optional[Union[str, SupportedOperations]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport(_Model): + minimum_api_version: Optional[str] + + @overload + def __init__( + self, + *, + minimum_api_version: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceMovePolicy(ResourceMovePolicy): + cross_resource_group_move_enabled: bool + cross_subscription_move_enabled: bool + validation_required: bool + + @overload + def __init__( + self, + *, + cross_resource_group_move_enabled: Optional[bool] = ..., + cross_subscription_move_enabled: Optional[bool] = ..., + validation_required: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceQueryManagement(_Model): + filter_option: Optional[Union[str, FilterOption]] + + @overload + def __init__( + self, + *, + filter_option: Optional[Union[str, FilterOption]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement(_Model): + common_api_versions_merge_mode: Optional[Union[str, CommonApiVersionsMergeMode]] + + @overload + def __init__( + self, + *, + common_api_versions_merge_mode: Optional[Union[str, CommonApiVersionsMergeMode]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesRoutingRule(_Model): + host_resource_type: Optional[str] + + @overload + def __init__( + self, + *, + host_resource_type: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications(SubscriptionLifecycleNotificationSpecifications): + soft_delete_ttl: timedelta + subscription_state_override_actions: list[SubscriptionStateOverrideAction] + + @overload + def __init__( + self, + *, + soft_delete_ttl: Optional[timedelta] = ..., + subscription_state_override_actions: Optional[list[SubscriptionStateOverrideAction]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesTemplateDeploymentOptions(TemplateDeploymentOptions): + preflight_options: Union[list[str, PreflightOption]] + preflight_supported: bool + + @overload + def __init__( + self, + *, + preflight_options: Optional[list[Union[str, PreflightOption]]] = ..., + preflight_supported: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy(TemplateDeploymentPolicy): + capabilities: Union[str, TemplateDeploymentCapabilities] + preflight_notifications: Union[str, TemplateDeploymentPreflightNotifications] + preflight_options: Union[str, TemplateDeploymentPreflightOptions] + + @overload + def __init__( + self, + *, + capabilities: Union[str, TemplateDeploymentCapabilities], + preflight_notifications: Optional[Union[str, TemplateDeploymentPreflightNotifications]] = ..., + preflight_options: Union[str, TemplateDeploymentPreflightOptions] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeRequestHeaderOptions(RequestHeaderOptions): + opt_in_headers: Union[str, OptInHeaderType] + opt_out_headers: Union[str, OptOutHeaderType] + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, OptInHeaderType]] = ..., + opt_out_headers: Optional[Union[str, OptOutHeaderType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeSku(_Model): + provisioning_state: Optional[Union[str, ProvisioningState]] + sku_settings: list[SkuSetting] + + @overload + def __init__( + self, + *, + sku_settings: list[SkuSetting] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceTypeTemplateDeploymentPolicy(TemplateDeploymentPolicy): + capabilities: Union[str, TemplateDeploymentCapabilities] + preflight_notifications: Union[str, TemplateDeploymentPreflightNotifications] + preflight_options: Union[str, TemplateDeploymentPreflightOptions] + + @overload + def __init__( + self, + *, + capabilities: Union[str, TemplateDeploymentCapabilities], + preflight_notifications: Optional[Union[str, TemplateDeploymentPreflightNotifications]] = ..., + preflight_options: Union[str, TemplateDeploymentPreflightOptions] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ResourceValidation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOT_SPECIFIED = "NotSpecified" + PROFANE_WORDS = "ProfaneWords" + RESERVED_WORDS = "ReservedWords" + + + class azure.mgmt.providerhub.models.Role(str, Enum, metaclass=CaseInsensitiveEnumMeta): + LIMITED_OWNER = "LimitedOwner" + SERVICE_OWNER = "ServiceOwner" + + + class azure.mgmt.providerhub.models.RolloutStatusBase(_Model): + completed_regions: Optional[list[str]] + failed_or_skipped_regions: Optional[dict[str, ExtendedErrorInfo]] + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = ..., + failed_or_skipped_regions: Optional[dict[str, ExtendedErrorInfo]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.RoutingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BYPASS_ENDPOINT_SELECTION_OPTIMIZATION = "BypassEndpointSelectionOptimization" + CASCADE_AUTHORIZED_EXTENSION = "CascadeAuthorizedExtension" + CASCADE_EXTENSION = "CascadeExtension" + CHILD_FANOUT = "ChildFanout" + DEFAULT = "Default" + EXTENSION = "Extension" + FAILOVER = "Failover" + FANOUT = "Fanout" + HOST_BASED = "HostBased" + LOCATION_BASED = "LocationBased" + LOCATION_MAPPING = "LocationMapping" + PROXY_ONLY = "ProxyOnly" + SERVICE_FANOUT = "ServiceFanout" + TENANT = "Tenant" + + + class azure.mgmt.providerhub.models.ServerFailureResponseMessageType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOT_SPECIFIED = "NotSpecified" + OUTAGE_REPORTING = "OutageReporting" + + + class azure.mgmt.providerhub.models.ServiceClientOptionsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLE_AUTOMATIC_DECOMPRESSION = "DisableAutomaticDecompression" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.ServiceFeatureFlagAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CREATE = "Create" + DO_NOT_CREATE = "DoNotCreate" + + + class azure.mgmt.providerhub.models.ServiceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ACTIVE = "Active" + INACTIVE = "Inactive" + + + class azure.mgmt.providerhub.models.ServiceTreeInfo(_Model): + component_id: Optional[str] + readiness: Optional[Union[str, Readiness]] + service_id: Optional[str] + + @overload + def __init__( + self, + *, + component_id: Optional[str] = ..., + readiness: Optional[Union[str, Readiness]] = ..., + service_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SignedRequestScope(str, Enum, metaclass=CaseInsensitiveEnumMeta): + ENDPOINT = "Endpoint" + RESOURCE_URI = "ResourceUri" + + + class azure.mgmt.providerhub.models.SkipNotifications(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DISABLED = "Disabled" + ENABLED = "Enabled" + UNSPECIFIED = "Unspecified" + + + class azure.mgmt.providerhub.models.SkuCapability(_Model): + name: str + value: str + + @overload + def __init__( + self, + *, + name: str, + value: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SkuCapacity(_Model): + default: Optional[int] + maximum: Optional[int] + minimum: int + scale_type: Optional[Union[str, SkuScaleType]] + + @overload + def __init__( + self, + *, + default: Optional[int] = ..., + maximum: Optional[int] = ..., + minimum: int, + scale_type: Optional[Union[str, SkuScaleType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SkuCost(_Model): + extended_unit: Optional[str] + meter_id: str + quantity: Optional[int] + + @overload + def __init__( + self, + *, + extended_unit: Optional[str] = ..., + meter_id: str, + quantity: Optional[int] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SkuLocationInfo(_Model): + extended_locations: Optional[list[str]] + location: str + type: Optional[Union[str, ExtendedLocationType]] + zone_details: Optional[list[SkuZoneDetail]] + zones: Optional[list[str]] + + @overload + def __init__( + self, + *, + extended_locations: Optional[list[str]] = ..., + location: str, + type: Optional[Union[str, ExtendedLocationType]] = ..., + zone_details: Optional[list[SkuZoneDetail]] = ..., + zones: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SkuResource(ProxyResource): + id: str + name: str + properties: Optional[SkuResourceProperties] + system_data: SystemData + type: str + + @overload + def __init__( + self, + *, + properties: Optional[SkuResourceProperties] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SkuResourceProperties(ResourceTypeSku): + provisioning_state: Union[str, ProvisioningState] + sku_settings: list[SkuSetting] + + @overload + def __init__( + self, + *, + sku_settings: list[SkuSetting] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SkuScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + AUTOMATIC = "Automatic" + MANUAL = "Manual" + NONE = "None" + + + class azure.mgmt.providerhub.models.SkuSetting(_Model): + capabilities: Optional[list[SkuCapability]] + capacity: Optional[SkuSettingCapacity] + costs: Optional[list[SkuCost]] + family: Optional[str] + kind: Optional[str] + location_info: Optional[list[SkuLocationInfo]] + locations: Optional[list[str]] + name: str + required_features: Optional[list[str]] + required_quota_ids: Optional[list[str]] + size: Optional[str] + tier: Optional[str] + + @overload + def __init__( + self, + *, + capabilities: Optional[list[SkuCapability]] = ..., + capacity: Optional[SkuSettingCapacity] = ..., + costs: Optional[list[SkuCost]] = ..., + family: Optional[str] = ..., + kind: Optional[str] = ..., + location_info: Optional[list[SkuLocationInfo]] = ..., + locations: Optional[list[str]] = ..., + name: str, + required_features: Optional[list[str]] = ..., + required_quota_ids: Optional[list[str]] = ..., + size: Optional[str] = ..., + tier: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SkuSettingCapacity(SkuCapacity): + default: int + maximum: int + minimum: int + scale_type: Union[str, SkuScaleType] + + @overload + def __init__( + self, + *, + default: Optional[int] = ..., + maximum: Optional[int] = ..., + minimum: int, + scale_type: Optional[Union[str, SkuScaleType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SkuZoneDetail(_Model): + capabilities: Optional[list[SkuCapability]] + name: Optional[list[str]] + + @overload + def __init__( + self, + *, + capabilities: Optional[list[SkuCapability]] = ..., + name: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SubscriberSetting(_Model): + filter_rules: Optional[list[FilterRule]] + + @overload + def __init__( + self, + *, + filter_rules: Optional[list[FilterRule]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SubscriptionLifecycleNotificationSpecifications(_Model): + soft_delete_ttl: Optional[timedelta] + subscription_state_override_actions: Optional[list[SubscriptionStateOverrideAction]] + + @overload + def __init__( + self, + *, + soft_delete_ttl: Optional[timedelta] = ..., + subscription_state_override_actions: Optional[list[SubscriptionStateOverrideAction]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SubscriptionNotificationOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + BILLING_CANCELLATION = "BillingCancellation" + DELETE_ALL_RESOURCES = "DeleteAllResources" + NOT_DEFINED = "NotDefined" + NO_OP = "NoOp" + SOFT_DELETE_ALL_RESOURCES = "SoftDeleteAllResources" + UNDO_SOFT_DELETE = "UndoSoftDelete" + + + class azure.mgmt.providerhub.models.SubscriptionReregistrationResult(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CONDITIONAL_UPDATE = "ConditionalUpdate" + FAILED = "Failed" + FORCED_UPDATE = "ForcedUpdate" + NOT_APPLICABLE = "NotApplicable" + + + class azure.mgmt.providerhub.models.SubscriptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DELETED = "Deleted" + DISABLED = "Disabled" + ENABLED = "Enabled" + NOT_DEFINED = "NotDefined" + PAST_DUE = "PastDue" + WARNED = "Warned" + + + class azure.mgmt.providerhub.models.SubscriptionStateOverrideAction(_Model): + action: Union[str, SubscriptionNotificationOperation] + state: Union[str, SubscriptionTransitioningState] + + @overload + def __init__( + self, + *, + action: Union[str, SubscriptionNotificationOperation], + state: Union[str, SubscriptionTransitioningState] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SubscriptionStateRule(_Model): + allowed_actions: Optional[list[str]] + state: Optional[Union[str, SubscriptionState]] + + @overload + def __init__( + self, + *, + allowed_actions: Optional[list[str]] = ..., + state: Optional[Union[str, SubscriptionState]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SubscriptionTransitioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DELETED = "Deleted" + REGISTERED = "Registered" + SUSPENDED = "Suspended" + SUSPENDED_TO_DELETED = "SuspendedToDeleted" + SUSPENDED_TO_REGISTERED = "SuspendedToRegistered" + SUSPENDED_TO_UNREGISTERED = "SuspendedToUnregistered" + SUSPENDED_TO_WARNED = "SuspendedToWarned" + UNREGISTERED = "Unregistered" + WARNED = "Warned" + WARNED_TO_DELETED = "WarnedToDeleted" + WARNED_TO_REGISTERED = "WarnedToRegistered" + WARNED_TO_SUSPENDED = "WarnedToSuspended" + WARNED_TO_UNREGISTERED = "WarnedToUnregistered" + + + class azure.mgmt.providerhub.models.SupportedOperations(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DELETE = "Delete" + GET = "Get" + NOT_SPECIFIED = "NotSpecified" + + + class azure.mgmt.providerhub.models.SwaggerSpecification(_Model): + api_versions: Optional[list[str]] + swagger_spec_folder_uri: Optional[str] + + @overload + def __init__( + self, + *, + api_versions: Optional[list[str]] = ..., + swagger_spec_folder_uri: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.SystemData(_Model): + created_at: Optional[datetime] + created_by: Optional[str] + created_by_type: Optional[Union[str, CreatedByType]] + last_modified_at: Optional[datetime] + last_modified_by: Optional[str] + last_modified_by_type: Optional[Union[str, CreatedByType]] + + @overload + def __init__( + self, + *, + created_at: Optional[datetime] = ..., + created_by: Optional[str] = ..., + created_by_type: Optional[Union[str, CreatedByType]] = ..., + last_modified_at: Optional[datetime] = ..., + last_modified_by: Optional[str] = ..., + last_modified_by_type: Optional[Union[str, CreatedByType]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.TemplateDeploymentCapabilities(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEFAULT = "Default" + PREFLIGHT = "Preflight" + + + class azure.mgmt.providerhub.models.TemplateDeploymentOptions(_Model): + preflight_options: Optional[list[Union[str, PreflightOption]]] + preflight_supported: Optional[bool] + + @overload + def __init__( + self, + *, + preflight_options: Optional[list[Union[str, PreflightOption]]] = ..., + preflight_supported: Optional[bool] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.TemplateDeploymentPolicy(_Model): + capabilities: Union[str, TemplateDeploymentCapabilities] + preflight_notifications: Optional[Union[str, TemplateDeploymentPreflightNotifications]] + preflight_options: Union[str, TemplateDeploymentPreflightOptions] + + @overload + def __init__( + self, + *, + capabilities: Union[str, TemplateDeploymentCapabilities], + preflight_notifications: Optional[Union[str, TemplateDeploymentPreflightNotifications]] = ..., + preflight_options: Union[str, TemplateDeploymentPreflightOptions] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.TemplateDeploymentPreflightNotifications(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NONE = "None" + UNREGISTERED_SUBSCRIPTIONS = "UnregisteredSubscriptions" + + + class azure.mgmt.providerhub.models.TemplateDeploymentPreflightOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + DEPLOYMENT_REQUESTS = "DeploymentRequests" + NONE = "None" + REGISTERED_ONLY = "RegisteredOnly" + TEST_ONLY = "TestOnly" + VALIDATION_REQUESTS = "ValidationRequests" + + + class azure.mgmt.providerhub.models.ThirdPartyExtension(_Model): + name: Optional[str] + + @overload + def __init__( + self, + *, + name: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ThirdPartyProviderAuthorization(_Model): + authorizations: Optional[list[LightHouseAuthorization]] + managed_by_tenant_id: Optional[str] + + @overload + def __init__( + self, + *, + authorizations: Optional[list[LightHouseAuthorization]] = ..., + managed_by_tenant_id: Optional[str] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ThrottlingMetric(_Model): + interval: Optional[timedelta] + limit: int + type: Union[str, ThrottlingMetricType] + + @overload + def __init__( + self, + *, + interval: Optional[timedelta] = ..., + limit: int, + type: Union[str, ThrottlingMetricType] + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.ThrottlingMetricType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + NOT_SPECIFIED = "NotSpecified" + NUMBER_OF_REQUESTS = "NumberOfRequests" + NUMBER_OF_RESOURCES = "NumberOfResources" + + + class azure.mgmt.providerhub.models.ThrottlingRule(_Model): + action: str + application_id: Optional[list[str]] + metrics: list[ThrottlingMetric] + required_features: Optional[list[str]] + + @overload + def __init__( + self, + *, + action: str, + application_id: Optional[list[str]] = ..., + metrics: list[ThrottlingMetric], + required_features: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.TokenAuthConfiguration(_Model): + authentication_scheme: Optional[Union[str, AuthenticationScheme]] + disable_certificate_authentication_fallback: Optional[bool] + signed_request_scope: Optional[Union[str, SignedRequestScope]] + + @overload + def __init__( + self, + *, + authentication_scheme: Optional[Union[str, AuthenticationScheme]] = ..., + disable_certificate_authentication_fallback: Optional[bool] = ..., + signed_request_scope: Optional[Union[str, SignedRequestScope]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.TrackedResource(Resource): + id: str + location: str + name: str + system_data: SystemData + tags: Optional[dict[str, str]] + type: str + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.TrafficRegionCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + CANARY = "Canary" + HIGH_TRAFFIC = "HighTraffic" + LOW_TRAFFIC = "LowTraffic" + MEDIUM_TRAFFIC = "MediumTraffic" + NONE = "None" + NOT_SPECIFIED = "NotSpecified" + REST_OF_THE_WORLD_GROUP_ONE = "RestOfTheWorldGroupOne" + REST_OF_THE_WORLD_GROUP_TWO = "RestOfTheWorldGroupTwo" + + + class azure.mgmt.providerhub.models.TrafficRegionRolloutConfiguration(TrafficRegions): + regions: list[str] + wait_duration: Optional[timedelta] + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ..., + wait_duration: Optional[timedelta] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.TrafficRegions(_Model): + regions: Optional[list[str]] + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = ... + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + + class azure.mgmt.providerhub.models.TypedErrorInfo(_Model): + info: Optional[Any] + type: str + + @overload + def __init__( + self, + *, + type: str + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: ... + + +namespace azure.mgmt.providerhub.operations + + class azure.mgmt.providerhub.operations.AuthorizedApplicationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: AuthorizedApplication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[AuthorizedApplication]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: AuthorizedApplication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[AuthorizedApplication]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[AuthorizedApplication]: ... + + @distributed_trace + def delete( + self, + provider_namespace: str, + application_id: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def get( + self, + provider_namespace: str, + application_id: str, + **kwargs: Any + ) -> AuthorizedApplication: ... + + @distributed_trace + def list( + self, + provider_namespace: str, + **kwargs: Any + ) -> ItemPaged[AuthorizedApplication]: ... + + + class azure.mgmt.providerhub.operations.CustomRolloutsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: CustomRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[CustomRollout]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: CustomRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[CustomRollout]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[CustomRollout]: ... + + @distributed_trace + def delete( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def get( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> CustomRollout: ... + + @distributed_trace + def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> ItemPaged[CustomRollout]: ... + + @distributed_trace + def stop( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> None: ... + + + class azure.mgmt.providerhub.operations.DefaultRolloutsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: DefaultRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[DefaultRollout]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: DefaultRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[DefaultRollout]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[DefaultRollout]: ... + + @distributed_trace + def delete( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def get( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> DefaultRollout: ... + + @distributed_trace + def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> ItemPaged[DefaultRollout]: ... + + @distributed_trace + def stop( + self, + provider_namespace: str, + rollout_name: str, + **kwargs: Any + ) -> None: ... + + + class azure.mgmt.providerhub.operations.NewRegionFrontloadReleaseOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DefaultRollout: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DefaultRollout: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> DefaultRollout: ... + + @overload + def generate_manifest( + self, + provider_namespace: str, + properties: FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceProviderManifest: ... + + @overload + def generate_manifest( + self, + provider_namespace: str, + properties: FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceProviderManifest: ... + + @overload + def generate_manifest( + self, + provider_namespace: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> ResourceProviderManifest: ... + + @distributed_trace + def get( + self, + provider_namespace: str, + release_name: str, + **kwargs: Any + ) -> DefaultRollout: ... + + @distributed_trace + def stop( + self, + provider_namespace: str, + release_name: str, + **kwargs: Any + ) -> None: ... + + + class azure.mgmt.providerhub.operations.NotificationRegistrationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: NotificationRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> NotificationRegistration: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: NotificationRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> NotificationRegistration: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> NotificationRegistration: ... + + @distributed_trace + def delete( + self, + provider_namespace: str, + notification_registration_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def get( + self, + provider_namespace: str, + notification_registration_name: str, + **kwargs: Any + ) -> NotificationRegistration: ... + + @distributed_trace + def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> ItemPaged[NotificationRegistration]: ... + + + class azure.mgmt.providerhub.operations.Operations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + operations_put_content: OperationsPutContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> OperationsPutContent: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + operations_put_content: OperationsPutContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> OperationsPutContent: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + operations_put_content: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> OperationsPutContent: ... + + @distributed_trace + def delete( + self, + provider_namespace: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged[OperationsDefinition]: ... + + @distributed_trace + def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> List[OperationsDefinition]: ... + + + class azure.mgmt.providerhub.operations.ProviderMonitorSettingsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: ProviderMonitorSetting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ProviderMonitorSetting]: ... + + @overload + def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: ProviderMonitorSetting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ProviderMonitorSetting]: ... + + @overload + def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ProviderMonitorSetting]: ... + + @distributed_trace + def delete( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def get( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + **kwargs: Any + ) -> ProviderMonitorSetting: ... + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> ItemPaged[ProviderMonitorSetting]: ... + + @distributed_trace + def list_by_subscription(self, **kwargs: Any) -> ItemPaged[ProviderMonitorSetting]: ... + + @distributed_trace + def update( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + **kwargs: Any + ) -> ProviderMonitorSetting: ... + + + class azure.mgmt.providerhub.operations.ProviderRegistrationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + properties: ProviderRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ProviderRegistration]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + properties: ProviderRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ProviderRegistration]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ProviderRegistration]: ... + + @distributed_trace + def delete( + self, + provider_namespace: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def generate_operations( + self, + provider_namespace: str, + **kwargs: Any + ) -> List[OperationsDefinition]: ... + + @distributed_trace + def get( + self, + provider_namespace: str, + **kwargs: Any + ) -> ProviderRegistration: ... + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged[ProviderRegistration]: ... + + + class azure.mgmt.providerhub.operations.ResourceActionsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: ResourceManagementAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: ResourceManagementAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + + @overload + def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: ... + + + class azure.mgmt.providerhub.operations.ResourceTypeRegistrationsOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: ResourceTypeRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceTypeRegistration]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: ResourceTypeRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceTypeRegistration]: ... + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[ResourceTypeRegistration]: ... + + @distributed_trace + def begin_delete( + self, + provider_namespace: str, + resource_type: str, + **kwargs: Any + ) -> LROPoller[None]: ... + + @distributed_trace + def get( + self, + provider_namespace: str, + resource_type: str, + **kwargs: Any + ) -> ResourceTypeRegistration: ... + + @distributed_trace + def list_by_provider_registration( + self, + provider_namespace: str, + **kwargs: Any + ) -> ItemPaged[ResourceTypeRegistration]: ... + + + class azure.mgmt.providerhub.operations.SkusOperations: + + def __init__( + self, + *args, + **kwargs + ) -> None: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @overload + def create_or_update_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace + def delete( + self, + provider_namespace: str, + resource_type: str, + sku: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def delete_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def delete_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def delete_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + **kwargs: Any + ) -> None: ... + + @distributed_trace + def get( + self, + provider_namespace: str, + resource_type: str, + sku: str, + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace + def get_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace + def get_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace + def get_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + **kwargs: Any + ) -> SkuResource: ... + + @distributed_trace + def list_by_resource_type_registrations( + self, + provider_namespace: str, + resource_type: str, + **kwargs: Any + ) -> ItemPaged[SkuResource]: ... + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_first( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + **kwargs: Any + ) -> ItemPaged[SkuResource]: ... + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + **kwargs: Any + ) -> ItemPaged[SkuResource]: ... + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + **kwargs: Any + ) -> ItemPaged[SkuResource]: ... + + +namespace azure.mgmt.providerhub.types + + class azure.mgmt.providerhub.types.AdditionalAuthorization(TypedDict, total=False): + key "applicationId": str + key "roleDefinitionId": str + application_id: str + role_definition_id: str + + + class azure.mgmt.providerhub.types.AllowedResourceName(TypedDict, total=False): + key "getActionVerb": str + key "name": str + get_action_verb: str + name: str + + + class azure.mgmt.providerhub.types.AllowedUnauthorizedActionsExtension(TypedDict, total=False): + key "action": str + key "intent": Union[str, Intent] + action: str + intent: Union[str, Intent] + + + class azure.mgmt.providerhub.types.ApiProfile(TypedDict, total=False): + key "apiVersion": str + key "profileVersion": str + api_version: str + profile_version: str + + + class azure.mgmt.providerhub.types.ApplicationDataAuthorization(TypedDict, total=False): + key "role": Required[Union[str, Role]] + resourceTypes: list[str] + resource_types: list[str] + role: Union[str, Role] + + + class azure.mgmt.providerhub.types.ApplicationProviderAuthorization(TypedDict, total=False): + key "managedByRoleDefinitionId": str + key "roleDefinitionId": str + managed_by_role_definition_id: str + role_definition_id: str + + + class azure.mgmt.providerhub.types.AsyncOperationPollingRules(TypedDict, total=False): + key "additionalOptions": Union[str, AdditionalOptionsAsyncOperation] + additional_options: Union[str, AdditionalOptionsAsyncOperation] + authorizationActions: list[str] + authorization_actions: list[str] + + + class azure.mgmt.providerhub.types.AsyncTimeoutRule(TypedDict, total=False): + key "actionName": str + key "timeout": str + action_name: str + timeout: str + + + class azure.mgmt.providerhub.types.AuthorizationActionMapping(TypedDict, total=False): + key "desired": str + key "original": str + desired: str + original: str + + + class azure.mgmt.providerhub.types.AuthorizedApplication(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('AuthorizedApplicationProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: AuthorizedApplicationProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.AuthorizedApplicationProperties(TypedDict, total=False): + key "providerAuthorization": ForwardRef('ApplicationProviderAuthorization', module='types') + key "provisioningState": Union[str, ProvisioningState] + dataAuthorizations: list[ApplicationDataAuthorization] + data_authorizations: list[ApplicationDataAuthorization] + provider_authorization: ApplicationProviderAuthorization + provisioning_state: Union[str, ProvisioningState] + + + class azure.mgmt.providerhub.types.CanaryTrafficRegionRolloutConfiguration(TypedDict, total=False): + regions: list[str] + skipRegions: list[str] + skip_regions: list[str] + + + class azure.mgmt.providerhub.types.CheckNameAvailabilitySpecifications(TypedDict, total=False): + key "enableDefaultValidation": bool + enable_default_validation: bool + resourceTypesWithCustomValidation: list[str] + resource_types_with_custom_validation: list[str] + + + class azure.mgmt.providerhub.types.CheckinManifestInfo(TypedDict, total=False): + key "commitId": str + key "isCheckedIn": Required[bool] + key "pullRequest": str + key "statusMessage": Required[str] + commit_id: str + is_checked_in: bool + pull_request: str + status_message: str + + + class azure.mgmt.providerhub.types.CheckinManifestParams(TypedDict, total=False): + key "baselineArmManifestLocation": Required[str] + key "environment": Required[str] + baseline_arm_manifest_location: str + environment: str + + + class azure.mgmt.providerhub.types.CustomRollout(ProxyResource): + key "id": str + key "name": str + key "properties": Required[CustomRolloutProperties] + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: CustomRolloutProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.CustomRolloutProperties(TypedDict, total=False): + key "provisioningState": Union[str, ProvisioningState] + key "specification": Required[CustomRolloutPropertiesSpecification] + key "status": ForwardRef('CustomRolloutPropertiesStatus', module='types') + provisioning_state: Union[str, ProvisioningState] + specification: CustomRolloutPropertiesSpecification + status: CustomRolloutPropertiesStatus + + + class azure.mgmt.providerhub.types.CustomRolloutPropertiesSpecification(CustomRolloutSpecification): + key "autoProvisionConfig": ForwardRef('CustomRolloutSpecificationAutoProvisionConfig', module='types') + key "canary": ForwardRef('CustomRolloutSpecificationCanary', module='types') + key "providerRegistration": ForwardRef('CustomRolloutSpecificationProviderRegistration', module='types') + key "refreshSubscriptionRegistration": bool + key "skipReleaseScopeValidation": bool + auto_provision_config: CustomRolloutSpecificationAutoProvisionConfig + canary: CustomRolloutSpecificationCanary + provider_registration: CustomRolloutSpecificationProviderRegistration + refresh_subscription_registration: bool + releaseScopes: list[str] + release_scopes: list[str] + resourceTypeRegistrations: list[ResourceTypeRegistration] + resource_type_registrations: list[ResourceTypeRegistration] + skip_release_scope_validation: bool + + + class azure.mgmt.providerhub.types.CustomRolloutPropertiesStatus(CustomRolloutStatus): + key "manifestCheckinStatus": ForwardRef('CustomRolloutStatusManifestCheckinStatus', module='types') + completedRegions: list[str] + completed_regions: list[str] + failedOrSkippedRegions: dict[str, ExtendedErrorInfo] + failed_or_skipped_regions: dict[str, ExtendedErrorInfo] + manifest_checkin_status: CustomRolloutStatusManifestCheckinStatus + + + class azure.mgmt.providerhub.types.CustomRolloutSpecification(TypedDict, total=False): + key "autoProvisionConfig": ForwardRef('CustomRolloutSpecificationAutoProvisionConfig', module='types') + key "canary": ForwardRef('CustomRolloutSpecificationCanary', module='types') + key "providerRegistration": ForwardRef('CustomRolloutSpecificationProviderRegistration', module='types') + key "refreshSubscriptionRegistration": bool + key "skipReleaseScopeValidation": bool + auto_provision_config: CustomRolloutSpecificationAutoProvisionConfig + canary: CustomRolloutSpecificationCanary + provider_registration: CustomRolloutSpecificationProviderRegistration + refresh_subscription_registration: bool + releaseScopes: list[str] + release_scopes: list[str] + resourceTypeRegistrations: list[ResourceTypeRegistration] + resource_type_registrations: list[ResourceTypeRegistration] + skip_release_scope_validation: bool + + + class azure.mgmt.providerhub.types.CustomRolloutSpecificationAutoProvisionConfig(TypedDict, total=False): + key "resourceGraph": bool + key "storage": bool + resource_graph: bool + storage: bool + + + class azure.mgmt.providerhub.types.CustomRolloutSpecificationCanary(TrafficRegions): + regions: list[str] + + + class azure.mgmt.providerhub.types.CustomRolloutSpecificationProviderRegistration(ProviderRegistration): + key "id": str + key "kind": Union[str, ProviderRegistrationKind] + key "name": str + key "properties": ForwardRef('ProviderRegistrationProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + kind: Union[str, ProviderRegistrationKind] + name: str + properties: ProviderRegistrationProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.CustomRolloutStatus(TypedDict, total=False): + key "manifestCheckinStatus": ForwardRef('CustomRolloutStatusManifestCheckinStatus', module='types') + completedRegions: list[str] + completed_regions: list[str] + failedOrSkippedRegions: dict[str, ExtendedErrorInfo] + failed_or_skipped_regions: dict[str, ExtendedErrorInfo] + manifest_checkin_status: CustomRolloutStatusManifestCheckinStatus + + + class azure.mgmt.providerhub.types.CustomRolloutStatusManifestCheckinStatus(CheckinManifestInfo): + key "commitId": str + key "isCheckedIn": Required[bool] + key "pullRequest": str + key "statusMessage": Required[str] + commit_id: str + is_checked_in: bool + pull_request: str + status_message: str + + + class azure.mgmt.providerhub.types.DefaultRollout(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('DefaultRolloutProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: DefaultRolloutProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.DefaultRolloutProperties(TypedDict, total=False): + key "provisioningState": Union[str, ProvisioningState] + key "specification": ForwardRef('DefaultRolloutPropertiesSpecification', module='types') + key "status": ForwardRef('DefaultRolloutPropertiesStatus', module='types') + provisioning_state: Union[str, ProvisioningState] + specification: DefaultRolloutPropertiesSpecification + status: DefaultRolloutPropertiesStatus + + + class azure.mgmt.providerhub.types.DefaultRolloutPropertiesSpecification(DefaultRolloutSpecification): + key "autoProvisionConfig": ForwardRef('DefaultRolloutSpecificationAutoProvisionConfig', module='types') + key "canary": ForwardRef('DefaultRolloutSpecificationCanary', module='types') + key "expeditedRollout": ForwardRef('DefaultRolloutSpecificationExpeditedRollout', module='types') + key "highTraffic": ForwardRef('DefaultRolloutSpecificationHighTraffic', module='types') + key "lowTraffic": ForwardRef('DefaultRolloutSpecificationLowTraffic', module='types') + key "mediumTraffic": ForwardRef('DefaultRolloutSpecificationMediumTraffic', module='types') + key "providerRegistration": ForwardRef('DefaultRolloutSpecificationProviderRegistration', module='types') + key "restOfTheWorldGroupOne": ForwardRef('DefaultRolloutSpecificationRestOfTheWorldGroupOne', module='types') + key "restOfTheWorldGroupTwo": ForwardRef('DefaultRolloutSpecificationRestOfTheWorldGroupTwo', module='types') + auto_provision_config: DefaultRolloutSpecificationAutoProvisionConfig + canary: DefaultRolloutSpecificationCanary + expedited_rollout: DefaultRolloutSpecificationExpeditedRollout + high_traffic: DefaultRolloutSpecificationHighTraffic + low_traffic: DefaultRolloutSpecificationLowTraffic + medium_traffic: DefaultRolloutSpecificationMediumTraffic + provider_registration: DefaultRolloutSpecificationProviderRegistration + resourceTypeRegistrations: list[ResourceTypeRegistration] + resource_type_registrations: list[ResourceTypeRegistration] + rest_of_the_world_group_one: DefaultRolloutSpecificationRestOfTheWorldGroupOne + rest_of_the_world_group_two: DefaultRolloutSpecificationRestOfTheWorldGroupTwo + + + class azure.mgmt.providerhub.types.DefaultRolloutPropertiesStatus(DefaultRolloutStatus): + key "manifestCheckinStatus": ForwardRef('DefaultRolloutStatusManifestCheckinStatus', module='types') + key "nextTrafficRegion": Union[str, TrafficRegionCategory] + key "nextTrafficRegionScheduledTime": str + key "subscriptionReregistrationResult": Union[str, SubscriptionReregistrationResult] + completedRegions: list[str] + completed_regions: list[str] + failedOrSkippedRegions: dict[str, ExtendedErrorInfo] + failed_or_skipped_regions: dict[str, ExtendedErrorInfo] + manifest_checkin_status: DefaultRolloutStatusManifestCheckinStatus + next_traffic_region: Union[str, TrafficRegionCategory] + next_traffic_region_scheduled_time: str + subscription_reregistration_result: Union[str, SubscriptionReregistrationResult] + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecification(TypedDict, total=False): + key "autoProvisionConfig": ForwardRef('DefaultRolloutSpecificationAutoProvisionConfig', module='types') + key "canary": ForwardRef('DefaultRolloutSpecificationCanary', module='types') + key "expeditedRollout": ForwardRef('DefaultRolloutSpecificationExpeditedRollout', module='types') + key "highTraffic": ForwardRef('DefaultRolloutSpecificationHighTraffic', module='types') + key "lowTraffic": ForwardRef('DefaultRolloutSpecificationLowTraffic', module='types') + key "mediumTraffic": ForwardRef('DefaultRolloutSpecificationMediumTraffic', module='types') + key "providerRegistration": ForwardRef('DefaultRolloutSpecificationProviderRegistration', module='types') + key "restOfTheWorldGroupOne": ForwardRef('DefaultRolloutSpecificationRestOfTheWorldGroupOne', module='types') + key "restOfTheWorldGroupTwo": ForwardRef('DefaultRolloutSpecificationRestOfTheWorldGroupTwo', module='types') + auto_provision_config: DefaultRolloutSpecificationAutoProvisionConfig + canary: DefaultRolloutSpecificationCanary + expedited_rollout: DefaultRolloutSpecificationExpeditedRollout + high_traffic: DefaultRolloutSpecificationHighTraffic + low_traffic: DefaultRolloutSpecificationLowTraffic + medium_traffic: DefaultRolloutSpecificationMediumTraffic + provider_registration: DefaultRolloutSpecificationProviderRegistration + resourceTypeRegistrations: list[ResourceTypeRegistration] + resource_type_registrations: list[ResourceTypeRegistration] + rest_of_the_world_group_one: DefaultRolloutSpecificationRestOfTheWorldGroupOne + rest_of_the_world_group_two: DefaultRolloutSpecificationRestOfTheWorldGroupTwo + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecificationAutoProvisionConfig(TypedDict, total=False): + key "resourceGraph": bool + key "storage": bool + resource_graph: bool + storage: bool + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecificationCanary(CanaryTrafficRegionRolloutConfiguration): + regions: list[str] + skipRegions: list[str] + skip_regions: list[str] + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecificationExpeditedRollout(ExpeditedRolloutDefinition): + key "enabled": bool + enabled: bool + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecificationHighTraffic(TrafficRegionRolloutConfiguration): + key "waitDuration": str + regions: list[str] + wait_duration: str + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecificationLowTraffic(TrafficRegionRolloutConfiguration): + key "waitDuration": str + regions: list[str] + wait_duration: str + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecificationMediumTraffic(TrafficRegionRolloutConfiguration): + key "waitDuration": str + regions: list[str] + wait_duration: str + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecificationProviderRegistration(ProviderRegistration): + key "id": str + key "kind": Union[str, ProviderRegistrationKind] + key "name": str + key "properties": ForwardRef('ProviderRegistrationProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + kind: Union[str, ProviderRegistrationKind] + name: str + properties: ProviderRegistrationProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecificationRestOfTheWorldGroupOne(TrafficRegionRolloutConfiguration): + key "waitDuration": str + regions: list[str] + wait_duration: str + + + class azure.mgmt.providerhub.types.DefaultRolloutSpecificationRestOfTheWorldGroupTwo(TrafficRegionRolloutConfiguration): + key "waitDuration": str + regions: list[str] + wait_duration: str + + + class azure.mgmt.providerhub.types.DefaultRolloutStatus(RolloutStatusBase): + key "manifestCheckinStatus": ForwardRef('DefaultRolloutStatusManifestCheckinStatus', module='types') + key "nextTrafficRegion": Union[str, TrafficRegionCategory] + key "nextTrafficRegionScheduledTime": str + key "subscriptionReregistrationResult": Union[str, SubscriptionReregistrationResult] + completedRegions: list[str] + completed_regions: list[str] + failedOrSkippedRegions: dict[str, ExtendedErrorInfo] + failed_or_skipped_regions: dict[str, ExtendedErrorInfo] + manifest_checkin_status: DefaultRolloutStatusManifestCheckinStatus + next_traffic_region: Union[str, TrafficRegionCategory] + next_traffic_region_scheduled_time: str + subscription_reregistration_result: Union[str, SubscriptionReregistrationResult] + + + class azure.mgmt.providerhub.types.DefaultRolloutStatusManifestCheckinStatus(CheckinManifestInfo): + key "commitId": str + key "isCheckedIn": Required[bool] + key "pullRequest": str + key "statusMessage": Required[str] + commit_id: str + is_checked_in: bool + pull_request: str + status_message: str + + + class azure.mgmt.providerhub.types.DeleteDependency(TypedDict, total=False): + key "linkedProperty": str + key "linkedType": str + linked_property: str + linked_type: str + requiredFeatures: list[str] + required_features: list[str] + + + class azure.mgmt.providerhub.types.DstsConfiguration(TypedDict, total=False): + key "serviceDnsName": str + key "serviceName": Required[str] + service_dns_name: str + service_name: str + + + class azure.mgmt.providerhub.types.EndpointInformation(TypedDict, total=False): + key "endpoint": str + key "endpointType": Union[str, NotificationEndpointType] + key "schemaVersion": str + endpoint: str + endpoint_type: Union[str, NotificationEndpointType] + schema_version: str + + + class azure.mgmt.providerhub.types.ExpeditedRolloutDefinition(TypedDict, total=False): + key "enabled": bool + enabled: bool + + + class azure.mgmt.providerhub.types.ExtendedErrorInfo(TypedDict, total=False): + key "code": str + key "message": str + key "target": str + additionalInfo: list[TypedErrorInfo] + additional_info: list[TypedErrorInfo] + code: str + details: list[ExtendedErrorInfo] + message: str + target: str + + + class azure.mgmt.providerhub.types.ExtendedLocationOptions(TypedDict, total=False): + key "supportedPolicy": Union[str, ResourceTypeExtendedLocationPolicy] + key "type": Union[str, ExtendedLocationType] + supported_policy: Union[str, ResourceTypeExtendedLocationPolicy] + type: Union[str, ExtendedLocationType] + + + class azure.mgmt.providerhub.types.ExtensionOptions(TypedDict, total=False): + request: list[Union[str, ExtensionOptionType]] + response: list[Union[str, ExtensionOptionType]] + + + class azure.mgmt.providerhub.types.FanoutLinkedNotificationRule(TypedDict, total=False): + key "dstsConfiguration": ForwardRef('FanoutLinkedNotificationRuleDstsConfiguration', module='types') + key "tokenAuthConfiguration": ForwardRef('TokenAuthConfiguration', module='types') + actions: list[str] + dsts_configuration: FanoutLinkedNotificationRuleDstsConfiguration + endpoints: list[ResourceProviderEndpoint] + token_auth_configuration: TokenAuthConfiguration + + + class azure.mgmt.providerhub.types.FanoutLinkedNotificationRuleDstsConfiguration(DstsConfiguration): + key "serviceDnsName": str + key "serviceName": Required[str] + service_dns_name: str + service_name: str + + + class azure.mgmt.providerhub.types.FeaturesRule(TypedDict, total=False): + key "requiredFeaturesPolicy": Required[Union[str, FeaturesPolicy]] + required_features_policy: Union[str, FeaturesPolicy] + + + class azure.mgmt.providerhub.types.FilterRule(TypedDict, total=False): + key "filterQuery": str + endpointInformation: list[EndpointInformation] + endpoint_information: list[EndpointInformation] + filter_query: str + + + class azure.mgmt.providerhub.types.FrontloadPayload(TypedDict, total=False): + key "properties": Required[FrontloadPayloadProperties] + properties: FrontloadPayloadProperties + + + class azure.mgmt.providerhub.types.FrontloadPayloadProperties(TypedDict, total=False): + key "copyFromLocation": Required[str] + key "environmentType": Required[Union[str, AvailableCheckInManifestEnvironment]] + key "excludeResourceTypes": Required[list[str]] + key "frontloadLocation": Required[str] + key "ignoreFields": Required[list[str]] + key "includeResourceTypes": Required[list[str]] + key "operationType": Required[str] + key "overrideEndpointLevelFields": Required[FrontloadPayloadPropertiesOverrideEndpointLevelFields] + key "overrideManifestLevelFields": Required[FrontloadPayloadPropertiesOverrideManifestLevelFields] + key "providerNamespace": Required[str] + key "serviceFeatureFlag": Required[Union[str, ServiceFeatureFlagAction]] + copy_from_location: str + environment_type: Union[str, AvailableCheckInManifestEnvironment] + exclude_resource_types: list[str] + frontload_location: str + ignore_fields: list[str] + include_resource_types: list[str] + operation_type: str + override_endpoint_level_fields: FrontloadPayloadPropertiesOverrideEndpointLevelFields + override_manifest_level_fields: FrontloadPayloadPropertiesOverrideManifestLevelFields + provider_namespace: str + service_feature_flag: Union[str, ServiceFeatureFlagAction] + + + class azure.mgmt.providerhub.types.FrontloadPayloadPropertiesOverrideEndpointLevelFields(ResourceTypeEndpointBase): + key "apiVersion": Required[str] + key "apiVersions": Required[list[str]] + key "dstsConfiguration": Required[ResourceTypeEndpointBaseDstsConfiguration] + key "enabled": Required[bool] + key "endpointType": Required[Union[str, EndpointType]] + key "endpointUri": Required[str] + key "featuresRule": Required[ResourceTypeEndpointBaseFeaturesRule] + key "locations": Required[list[str]] + key "requiredFeatures": Required[list[str]] + key "skuLink": Required[str] + key "timeout": Required[str] + key "zones": Required[list[str]] + api_version: str + api_versions: list[str] + dsts_configuration: ResourceTypeEndpointBaseDstsConfiguration + enabled: bool + endpoint_type: Union[str, EndpointType] + endpoint_uri: str + features_rule: ResourceTypeEndpointBaseFeaturesRule + locations: list[str] + required_features: list[str] + sku_link: str + timeout: str + zones: list[str] + + + class azure.mgmt.providerhub.types.FrontloadPayloadPropertiesOverrideManifestLevelFields(ManifestLevelPropertyBag): + resourceHydrationAccounts: list[ResourceHydrationAccount] + resource_hydration_accounts: list[ResourceHydrationAccount] + + + class azure.mgmt.providerhub.types.IdentityManagementProperties(TypedDict, total=False): + key "applicationId": str + key "type": Union[str, IdentityManagementTypes] + applicationIds: list[str] + application_id: str + application_ids: list[str] + delegationAppIds: list[str] + delegation_app_ids: list[str] + type: Union[str, IdentityManagementTypes] + + + class azure.mgmt.providerhub.types.LegacyDisallowedCondition(TypedDict, total=False): + key "feature": str + disallowedLegacyOperations: list[Union[str, LegacyOperation]] + disallowed_legacy_operations: list[Union[str, LegacyOperation]] + feature: str + + + class azure.mgmt.providerhub.types.LightHouseAuthorization(TypedDict, total=False): + key "principalId": Required[str] + key "roleDefinitionId": Required[str] + principal_id: str + role_definition_id: str + + + class azure.mgmt.providerhub.types.LinkedAccessCheck(TypedDict, total=False): + key "actionName": str + key "linkedAction": str + key "linkedActionVerb": str + key "linkedProperty": str + key "linkedType": str + action_name: str + linked_action: str + linked_action_verb: str + linked_property: str + linked_type: str + + + class azure.mgmt.providerhub.types.LinkedNotificationRule(TypedDict, total=False): + key "linkedNotificationTimeout": str + actions: list[str] + actionsOnFailedOperation: list[str] + actions_on_failed_operation: list[str] + fastPathActions: list[str] + fastPathActionsOnFailedOperation: list[str] + fast_path_actions: list[str] + fast_path_actions_on_failed_operation: list[str] + linked_notification_timeout: str + + + class azure.mgmt.providerhub.types.LinkedOperationRule(TypedDict, total=False): + key "linkedAction": Required[Union[str, LinkedAction]] + key "linkedOperation": Required[Union[str, LinkedOperation]] + dependsOnTypes: list[str] + depends_on_types: list[str] + linked_action: Union[str, LinkedAction] + linked_operation: Union[str, LinkedOperation] + + + class azure.mgmt.providerhub.types.LocalizedOperationDefinition(TypedDict, total=False): + key "actionType": Union[str, OperationActionType] + key "display": Required[LocalizedOperationDefinitionDisplay] + key "isDataAction": bool + key "name": Required[str] + key "origin": Union[str, OperationOrigins] + action_type: Union[str, OperationActionType] + display: LocalizedOperationDefinitionDisplay + is_data_action: bool + name: str + origin: Union[str, OperationOrigins] + + + class azure.mgmt.providerhub.types.LocalizedOperationDefinitionDisplay(LocalizedOperationDisplayDefinition): + key "cs": ForwardRef('LocalizedOperationDisplayDefinitionCs', module='types') + key "de": ForwardRef('LocalizedOperationDisplayDefinitionDe', module='types') + key "default": Required[LocalizedOperationDisplayDefinitionDefault] + key "en": ForwardRef('LocalizedOperationDisplayDefinitionEn', module='types') + key "es": ForwardRef('LocalizedOperationDisplayDefinitionEs', module='types') + key "fr": ForwardRef('LocalizedOperationDisplayDefinitionFr', module='types') + key "hu": ForwardRef('LocalizedOperationDisplayDefinitionHu', module='types') + key "it": ForwardRef('LocalizedOperationDisplayDefinitionIt', module='types') + key "ja": ForwardRef('LocalizedOperationDisplayDefinitionJa', module='types') + key "ko": ForwardRef('LocalizedOperationDisplayDefinitionKo', module='types') + key "nl": ForwardRef('LocalizedOperationDisplayDefinitionNl', module='types') + key "pl": ForwardRef('LocalizedOperationDisplayDefinitionPl', module='types') + key "ptBR": ForwardRef('LocalizedOperationDisplayDefinitionPtBR', module='types') + key "ptPT": ForwardRef('LocalizedOperationDisplayDefinitionPtPT', module='types') + key "ru": ForwardRef('LocalizedOperationDisplayDefinitionRu', module='types') + key "sv": ForwardRef('LocalizedOperationDisplayDefinitionSv', module='types') + key "zhHans": ForwardRef('LocalizedOperationDisplayDefinitionZhHans', module='types') + key "zhHant": ForwardRef('LocalizedOperationDisplayDefinitionZhHant', module='types') + cs: LocalizedOperationDisplayDefinitionCs + de: LocalizedOperationDisplayDefinitionDe + default: LocalizedOperationDisplayDefinitionDefault + en: LocalizedOperationDisplayDefinitionEn + es: LocalizedOperationDisplayDefinitionEs + fr: LocalizedOperationDisplayDefinitionFr + hu: LocalizedOperationDisplayDefinitionHu + it: LocalizedOperationDisplayDefinitionIt + ja: LocalizedOperationDisplayDefinitionJa + ko: LocalizedOperationDisplayDefinitionKo + nl: LocalizedOperationDisplayDefinitionNl + pl: LocalizedOperationDisplayDefinitionPl + pt_br: LocalizedOperationDisplayDefinitionPtBR + pt_pt: LocalizedOperationDisplayDefinitionPtPT + ru: LocalizedOperationDisplayDefinitionRu + sv: LocalizedOperationDisplayDefinitionSv + zh_hans: LocalizedOperationDisplayDefinitionZhHans + zh_hant: LocalizedOperationDisplayDefinitionZhHant + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinition(TypedDict, total=False): + key "cs": ForwardRef('LocalizedOperationDisplayDefinitionCs', module='types') + key "de": ForwardRef('LocalizedOperationDisplayDefinitionDe', module='types') + key "default": Required[LocalizedOperationDisplayDefinitionDefault] + key "en": ForwardRef('LocalizedOperationDisplayDefinitionEn', module='types') + key "es": ForwardRef('LocalizedOperationDisplayDefinitionEs', module='types') + key "fr": ForwardRef('LocalizedOperationDisplayDefinitionFr', module='types') + key "hu": ForwardRef('LocalizedOperationDisplayDefinitionHu', module='types') + key "it": ForwardRef('LocalizedOperationDisplayDefinitionIt', module='types') + key "ja": ForwardRef('LocalizedOperationDisplayDefinitionJa', module='types') + key "ko": ForwardRef('LocalizedOperationDisplayDefinitionKo', module='types') + key "nl": ForwardRef('LocalizedOperationDisplayDefinitionNl', module='types') + key "pl": ForwardRef('LocalizedOperationDisplayDefinitionPl', module='types') + key "ptBR": ForwardRef('LocalizedOperationDisplayDefinitionPtBR', module='types') + key "ptPT": ForwardRef('LocalizedOperationDisplayDefinitionPtPT', module='types') + key "ru": ForwardRef('LocalizedOperationDisplayDefinitionRu', module='types') + key "sv": ForwardRef('LocalizedOperationDisplayDefinitionSv', module='types') + key "zhHans": ForwardRef('LocalizedOperationDisplayDefinitionZhHans', module='types') + key "zhHant": ForwardRef('LocalizedOperationDisplayDefinitionZhHant', module='types') + cs: LocalizedOperationDisplayDefinitionCs + de: LocalizedOperationDisplayDefinitionDe + default: LocalizedOperationDisplayDefinitionDefault + en: LocalizedOperationDisplayDefinitionEn + es: LocalizedOperationDisplayDefinitionEs + fr: LocalizedOperationDisplayDefinitionFr + hu: LocalizedOperationDisplayDefinitionHu + it: LocalizedOperationDisplayDefinitionIt + ja: LocalizedOperationDisplayDefinitionJa + ko: LocalizedOperationDisplayDefinitionKo + nl: LocalizedOperationDisplayDefinitionNl + pl: LocalizedOperationDisplayDefinitionPl + pt_br: LocalizedOperationDisplayDefinitionPtBR + pt_pt: LocalizedOperationDisplayDefinitionPtPT + ru: LocalizedOperationDisplayDefinitionRu + sv: LocalizedOperationDisplayDefinitionSv + zh_hans: LocalizedOperationDisplayDefinitionZhHans + zh_hant: LocalizedOperationDisplayDefinitionZhHant + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionCs(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionDe(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionDefault(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionEn(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionEs(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionFr(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionHu(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionIt(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionJa(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionKo(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionNl(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionPl(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionPtBR(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionPtPT(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionRu(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionSv(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionZhHans(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocalizedOperationDisplayDefinitionZhHant(OperationsDisplayDefinition): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.LocationQuotaRule(TypedDict, total=False): + key "location": str + key "policy": Union[str, QuotaPolicy] + key "quotaId": str + location: str + policy: Union[str, QuotaPolicy] + quota_id: str + + + class azure.mgmt.providerhub.types.LoggingHiddenPropertyPath(TypedDict, total=False): + hiddenPathsOnRequest: list[str] + hiddenPathsOnResponse: list[str] + hidden_paths_on_request: list[str] + hidden_paths_on_response: list[str] + + + class azure.mgmt.providerhub.types.LoggingRule(TypedDict, total=False): + key "action": Required[str] + key "detailLevel": Required[Union[str, LoggingDetails]] + key "direction": Required[Union[str, LoggingDirections]] + key "hiddenPropertyPaths": ForwardRef('LoggingRuleHiddenPropertyPaths', module='types') + action: str + detail_level: Union[str, LoggingDetails] + direction: Union[str, LoggingDirections] + hidden_property_paths: LoggingRuleHiddenPropertyPaths + + + class azure.mgmt.providerhub.types.LoggingRuleHiddenPropertyPaths(LoggingHiddenPropertyPath): + hiddenPathsOnRequest: list[str] + hiddenPathsOnResponse: list[str] + hidden_paths_on_request: list[str] + hidden_paths_on_response: list[str] + + + class azure.mgmt.providerhub.types.ManifestLevelPropertyBag(TypedDict, total=False): + resourceHydrationAccounts: list[ResourceHydrationAccount] + resource_hydration_accounts: list[ResourceHydrationAccount] + + + class azure.mgmt.providerhub.types.Notification(TypedDict, total=False): + key "notificationType": Union[str, NotificationType] + key "skipNotifications": Union[str, SkipNotifications] + notification_type: Union[str, NotificationType] + skip_notifications: Union[str, SkipNotifications] + + + class azure.mgmt.providerhub.types.NotificationEndpoint(TypedDict, total=False): + key "notificationDestination": str + locations: list[str] + notification_destination: str + + + class azure.mgmt.providerhub.types.NotificationRegistration(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('NotificationRegistrationProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: NotificationRegistrationProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.NotificationRegistrationProperties(TypedDict, total=False): + key "messageScope": Union[str, MessageScope] + key "notificationMode": Union[str, NotificationMode] + key "provisioningState": Union[str, ProvisioningState] + includedEvents: list[str] + included_events: list[str] + message_scope: Union[str, MessageScope] + notificationEndpoints: list[NotificationEndpoint] + notification_endpoints: list[NotificationEndpoint] + notification_mode: Union[str, NotificationMode] + provisioning_state: Union[str, ProvisioningState] + + + class azure.mgmt.providerhub.types.OpenApiConfiguration(TypedDict, total=False): + key "validation": ForwardRef('OpenApiValidation', module='types') + validation: OpenApiValidation + + + class azure.mgmt.providerhub.types.OpenApiValidation(TypedDict, total=False): + key "allowNoncompliantCollectionResponse": bool + allow_noncompliant_collection_response: bool + + + class azure.mgmt.providerhub.types.OperationsContentProperties(TypedDict, total=False): + contents: list[LocalizedOperationDefinition] + + + class azure.mgmt.providerhub.types.OperationsDisplayDefinition(TypedDict, total=False): + key "description": Required[str] + key "operation": Required[str] + key "provider": Required[str] + key "resource": Required[str] + description: str + operation: str + provider: str + resource: str + + + class azure.mgmt.providerhub.types.OperationsPutContent(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('OperationsPutContentProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: OperationsPutContentProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.OperationsPutContentProperties(OperationsContentProperties): + contents: list[LocalizedOperationDefinition] + + + class azure.mgmt.providerhub.types.PrivateResourceProviderConfiguration(TypedDict, total=False): + allowedSubscriptions: list[str] + allowed_subscriptions: list[str] + + + class azure.mgmt.providerhub.types.ProviderHubMetadata(TypedDict, total=False): + key "directRpRoleDefinitionId": str + key "globalAsyncOperationResourceTypeName": str + key "providerAuthentication": ForwardRef('ProviderHubMetadataProviderAuthentication', module='types') + key "regionalAsyncOperationResourceTypeName": str + key "thirdPartyProviderAuthorization": ForwardRef('ProviderHubMetadataThirdPartyProviderAuthorization', module='types') + direct_rp_role_definition_id: str + global_async_operation_resource_type_name: str + providerAuthorizations: list[ResourceProviderAuthorization] + provider_authentication: ProviderHubMetadataProviderAuthentication + provider_authorizations: list[ResourceProviderAuthorization] + regional_async_operation_resource_type_name: str + third_party_provider_authorization: ProviderHubMetadataThirdPartyProviderAuthorization + + + class azure.mgmt.providerhub.types.ProviderHubMetadataProviderAuthentication(ResourceProviderAuthentication): + key "allowedAudiences": Required[list[str]] + allowed_audiences: list[str] + + + class azure.mgmt.providerhub.types.ProviderHubMetadataThirdPartyProviderAuthorization(ThirdPartyProviderAuthorization): + key "managedByTenantId": str + authorizations: list[LightHouseAuthorization] + managed_by_tenant_id: str + + + class azure.mgmt.providerhub.types.ProviderMonitorSetting(TrackedResource): + key "id": str + key "location": Required[str] + key "name": str + key "properties": ForwardRef('ProviderMonitorSettingProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + properties: ProviderMonitorSettingProperties + system_data: SystemData + tags: dict[str, str] + type: str + + + class azure.mgmt.providerhub.types.ProviderMonitorSettingProperties(TypedDict, total=False): + key "provisioningState": Union[str, ProvisioningState] + provisioning_state: Union[str, ProvisioningState] + + + class azure.mgmt.providerhub.types.ProviderRegistration(ProxyResource): + key "id": str + key "kind": Union[str, ProviderRegistrationKind] + key "name": str + key "properties": ForwardRef('ProviderRegistrationProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + kind: Union[str, ProviderRegistrationKind] + name: str + properties: ProviderRegistrationProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.ProviderRegistrationProperties(ResourceProviderManifestProperties): + key "crossTenantTokenValidation": Union[str, CrossTenantTokenValidation] + key "customManifestVersion": str + key "dstsConfiguration": ForwardRef('ResourceProviderManifestPropertiesDstsConfiguration', module='types') + key "enableTenantLinkedNotification": Optional[bool] + key "featuresRule": ForwardRef('ResourceProviderManifestPropertiesFeaturesRule', module='types') + key "legacyNamespace": str + key "management": ForwardRef('ResourceProviderManifestPropertiesManagement', module='types') + key "metadata": Any + key "namespace": str + key "notificationOptions": Union[str, NotificationOptions] + key "notificationSettings": ForwardRef('ResourceProviderManifestPropertiesNotificationSettings', module='types') + key "privateResourceProviderConfiguration": ForwardRef('ProviderRegistrationPropertiesPrivateResourceProviderConfiguration', module='types') + key "providerAuthentication": ForwardRef('ResourceProviderManifestPropertiesProviderAuthentication', module='types') + key "providerHubMetadata": ForwardRef('ProviderRegistrationPropertiesProviderHubMetadata', module='types') + key "providerType": Union[str, ResourceProviderType] + key "providerVersion": str + key "provisioningState": Union[str, ProvisioningState] + key "requestHeaderOptions": ForwardRef('ResourceProviderManifestPropertiesRequestHeaderOptions', module='types') + key "resourceGroupLockOptionDuringMove": ForwardRef('ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove', module='types') + key "resourceProviderAuthorizationRules": ForwardRef('ResourceProviderAuthorizationRules', module='types') + key "responseOptions": ForwardRef('ResourceProviderManifestPropertiesResponseOptions', module='types') + key "serviceName": str + key "subscriptionLifecycleNotificationSpecifications": ForwardRef('ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications', module='types') + key "templateDeploymentOptions": ForwardRef('ResourceProviderManifestPropertiesTemplateDeploymentOptions', module='types') + key "tokenAuthConfiguration": ForwardRef('TokenAuthConfiguration', module='types') + capabilities: list[ResourceProviderCapabilities] + cross_tenant_token_validation: Union[str, CrossTenantTokenValidation] + custom_manifest_version: str + dsts_configuration: ResourceProviderManifestPropertiesDstsConfiguration + enable_tenant_linked_notification: bool + features_rule: ResourceProviderManifestPropertiesFeaturesRule + globalNotificationEndpoints: list[ResourceProviderEndpoint] + global_notification_endpoints: list[ResourceProviderEndpoint] + legacyRegistrations: list[str] + legacy_namespace: str + legacy_registrations: list[str] + linkedNotificationRules: list[FanoutLinkedNotificationRule] + linked_notification_rules: list[FanoutLinkedNotificationRule] + management: ResourceProviderManifestPropertiesManagement + managementGroupGlobalNotificationEndpoints: list[ResourceProviderEndpoint] + management_group_global_notification_endpoints: list[ResourceProviderEndpoint] + metadata: Any + namespace: str + notification_options: Union[str, NotificationOptions] + notification_settings: ResourceProviderManifestPropertiesNotificationSettings + notifications: list[Notification] + optionalFeatures: list[str] + optional_features: list[str] + private_resource_provider_configuration: ProviderRegistrationPropertiesPrivateResourceProviderConfiguration + providerAuthorizations: list[ResourceProviderAuthorization] + provider_authentication: ResourceProviderManifestPropertiesProviderAuthentication + provider_authorizations: list[ResourceProviderAuthorization] + provider_hub_metadata: ProviderRegistrationPropertiesProviderHubMetadata + provider_type: Union[str, ResourceProviderType] + provider_version: str + provisioning_state: Union[str, ProvisioningState] + request_header_options: ResourceProviderManifestPropertiesRequestHeaderOptions + requiredFeatures: list[str] + required_features: list[str] + resourceHydrationAccounts: list[ResourceHydrationAccount] + resource_group_lock_option_during_move: ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove + resource_hydration_accounts: list[ResourceHydrationAccount] + resource_provider_authorization_rules: ResourceProviderAuthorizationRules + response_options: ResourceProviderManifestPropertiesResponseOptions + service_name: str + services: list[ResourceProviderService] + subscription_lifecycle_notification_specifications: ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications + template_deployment_options: ResourceProviderManifestPropertiesTemplateDeploymentOptions + token_auth_configuration: TokenAuthConfiguration + + + class azure.mgmt.providerhub.types.ProviderRegistrationPropertiesPrivateResourceProviderConfiguration(PrivateResourceProviderConfiguration): + allowedSubscriptions: list[str] + allowed_subscriptions: list[str] + + + class azure.mgmt.providerhub.types.ProviderRegistrationPropertiesProviderHubMetadata(ProviderHubMetadata): + key "directRpRoleDefinitionId": str + key "globalAsyncOperationResourceTypeName": str + key "providerAuthentication": ForwardRef('ProviderHubMetadataProviderAuthentication', module='types') + key "regionalAsyncOperationResourceTypeName": str + key "thirdPartyProviderAuthorization": ForwardRef('ProviderHubMetadataThirdPartyProviderAuthorization', module='types') + direct_rp_role_definition_id: str + global_async_operation_resource_type_name: str + providerAuthorizations: list[ResourceProviderAuthorization] + provider_authentication: ProviderHubMetadataProviderAuthentication + provider_authorizations: list[ResourceProviderAuthorization] + regional_async_operation_resource_type_name: str + third_party_provider_authorization: ProviderHubMetadataThirdPartyProviderAuthorization + + + class azure.mgmt.providerhub.types.ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications(SubscriptionLifecycleNotificationSpecifications): + key "softDeleteTTL": str + soft_delete_ttl: str + subscriptionStateOverrideActions: list[SubscriptionStateOverrideAction] + subscription_state_override_actions: list[SubscriptionStateOverrideAction] + + + class azure.mgmt.providerhub.types.ProxyResource(Resource): + key "id": str + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.QuotaRule(TypedDict, total=False): + key "quotaPolicy": Union[str, QuotaPolicy] + locationRules: list[LocationQuotaRule] + location_rules: list[LocationQuotaRule] + quota_policy: Union[str, QuotaPolicy] + requiredFeatures: list[str] + required_features: list[str] + + + class azure.mgmt.providerhub.types.RequestHeaderOptions(TypedDict, total=False): + key "optInHeaders": Union[str, OptInHeaderType] + key "optOutHeaders": Union[str, OptOutHeaderType] + opt_in_headers: Union[str, OptInHeaderType] + opt_out_headers: Union[str, OptOutHeaderType] + + + class azure.mgmt.providerhub.types.Resource(TypedDict, total=False): + key "id": str + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.ResourceAccessRole(TypedDict, total=False): + actions: list[str] + allowedGroupClaims: list[str] + allowed_group_claims: list[str] + + + class azure.mgmt.providerhub.types.ResourceConcurrencyControlOption(TypedDict, total=False): + key "policy": Union[str, Policy] + policy: Union[str, Policy] + + + class azure.mgmt.providerhub.types.ResourceGraphConfiguration(TypedDict, total=False): + key "apiVersion": str + key "enabled": bool + api_version: str + enabled: bool + + + class azure.mgmt.providerhub.types.ResourceHydrationAccount(TypedDict, total=False): + key "accountName": str + key "encryptedKey": str + key "maxChildResourceConsistencyJobLimit": int + key "subscriptionId": str + account_name: str + encrypted_key: str + max_child_resource_consistency_job_limit: int + subscription_id: str + + + class azure.mgmt.providerhub.types.ResourceManagementAction(TypedDict, total=False): + resources: list[ResourceManagementEntity] + + + class azure.mgmt.providerhub.types.ResourceManagementEntity(TypedDict, total=False): + key "homeTenantId": str + key "location": str + key "resourceId": Required[str] + key "status": str + home_tenant_id: str + location: str + resource_id: str + status: str + + + class azure.mgmt.providerhub.types.ResourceMovePolicy(TypedDict, total=False): + key "crossResourceGroupMoveEnabled": bool + key "crossSubscriptionMoveEnabled": bool + key "validationRequired": bool + cross_resource_group_move_enabled: bool + cross_subscription_move_enabled: bool + validation_required: bool + + + class azure.mgmt.providerhub.types.ResourceProviderAuthentication(TypedDict, total=False): + key "allowedAudiences": Required[list[str]] + allowed_audiences: list[str] + + + class azure.mgmt.providerhub.types.ResourceProviderAuthorization(TypedDict, total=False): + key "applicationId": str + key "groupingTag": str + key "managedByAuthorization": ForwardRef('ResourceProviderAuthorizationManagedByAuthorization', module='types') + key "managedByRoleDefinitionId": str + key "roleDefinitionId": str + allowedThirdPartyExtensions: list[ThirdPartyExtension] + allowed_third_party_extensions: list[ThirdPartyExtension] + application_id: str + grouping_tag: str + managed_by_authorization: ResourceProviderAuthorizationManagedByAuthorization + managed_by_role_definition_id: str + role_definition_id: str + + + class azure.mgmt.providerhub.types.ResourceProviderAuthorizationManagedByAuthorization(TypedDict, total=False): + key "allowManagedByInheritance": bool + key "managedByResourceRoleDefinitionId": str + additionalAuthorizations: list[AdditionalAuthorization] + additional_authorizations: list[AdditionalAuthorization] + allow_managed_by_inheritance: bool + managed_by_resource_role_definition_id: str + + + class azure.mgmt.providerhub.types.ResourceProviderAuthorizationRules(TypedDict, total=False): + key "asyncOperationPollingRules": ForwardRef('AsyncOperationPollingRules', module='types') + async_operation_polling_rules: AsyncOperationPollingRules + + + class azure.mgmt.providerhub.types.ResourceProviderCapabilities(TypedDict, total=False): + key "effect": Required[Union[str, ResourceProviderCapabilitiesEffect]] + key "quotaId": Required[str] + effect: Union[str, ResourceProviderCapabilitiesEffect] + quota_id: str + requiredFeatures: list[str] + required_features: list[str] + + + class azure.mgmt.providerhub.types.ResourceProviderEndpoint(TypedDict, total=False): + key "enabled": bool + key "endpointType": Union[str, EndpointType] + key "endpointUri": str + key "featuresRule": ForwardRef('ResourceProviderEndpointFeaturesRule', module='types') + key "skuLink": str + key "timeout": str + apiVersions: list[str] + api_versions: list[str] + enabled: bool + endpoint_type: Union[str, EndpointType] + endpoint_uri: str + features_rule: ResourceProviderEndpointFeaturesRule + locations: list[str] + requiredFeatures: list[str] + required_features: list[str] + sku_link: str + timeout: str + + + class azure.mgmt.providerhub.types.ResourceProviderEndpointFeaturesRule(FeaturesRule): + key "requiredFeaturesPolicy": Required[Union[str, FeaturesPolicy]] + required_features_policy: Union[str, FeaturesPolicy] + + + class azure.mgmt.providerhub.types.ResourceProviderManagement(TypedDict, total=False): + key "errorResponseMessageOptions": ForwardRef('ResourceProviderManagementErrorResponseMessageOptions', module='types') + key "expeditedRolloutMetadata": ForwardRef('ResourceProviderManagementExpeditedRolloutMetadata', module='types') + key "incidentContactEmail": str + key "incidentRoutingService": str + key "incidentRoutingTeam": str + key "pcCode": str + key "profitCenterProgramId": str + key "resourceAccessPolicy": Union[str, ResourceAccessPolicy] + authorizationOwners: list[str] + authorization_owners: list[str] + canaryManifestOwners: list[str] + canary_manifest_owners: list[str] + error_response_message_options: ResourceProviderManagementErrorResponseMessageOptions + expeditedRolloutSubmitters: list[str] + expedited_rollout_metadata: ResourceProviderManagementExpeditedRolloutMetadata + expedited_rollout_submitters: list[str] + incident_contact_email: str + incident_routing_service: str + incident_routing_team: str + manifestOwners: list[str] + manifest_owners: list[str] + pc_code: str + profit_center_program_id: str + resourceAccessRoles: list[ResourceAccessRole] + resource_access_policy: Union[str, ResourceAccessPolicy] + resource_access_roles: list[ResourceAccessRole] + schemaOwners: list[str] + schema_owners: list[str] + serviceTreeInfos: list[ServiceTreeInfo] + service_tree_infos: list[ServiceTreeInfo] + + + class azure.mgmt.providerhub.types.ResourceProviderManagementErrorResponseMessageOptions(TypedDict, total=False): + key "serverFailureResponseMessageType": Union[str, ServerFailureResponseMessageType] + server_failure_response_message_type: Union[str, ServerFailureResponseMessageType] + + + class azure.mgmt.providerhub.types.ResourceProviderManagementExpeditedRolloutMetadata(TypedDict, total=False): + key "enabled": bool + key "expeditedRolloutIntent": Union[str, ExpeditedRolloutIntent] + enabled: bool + expedited_rollout_intent: Union[str, ExpeditedRolloutIntent] + + + class azure.mgmt.providerhub.types.ResourceProviderManifestProperties(TypedDict, total=False): + key "crossTenantTokenValidation": Union[str, CrossTenantTokenValidation] + key "customManifestVersion": str + key "dstsConfiguration": ForwardRef('ResourceProviderManifestPropertiesDstsConfiguration', module='types') + key "enableTenantLinkedNotification": Optional[bool] + key "featuresRule": ForwardRef('ResourceProviderManifestPropertiesFeaturesRule', module='types') + key "legacyNamespace": str + key "management": ForwardRef('ResourceProviderManifestPropertiesManagement', module='types') + key "metadata": Any + key "namespace": str + key "notificationOptions": Union[str, NotificationOptions] + key "notificationSettings": ForwardRef('ResourceProviderManifestPropertiesNotificationSettings', module='types') + key "providerAuthentication": ForwardRef('ResourceProviderManifestPropertiesProviderAuthentication', module='types') + key "providerType": Union[str, ResourceProviderType] + key "providerVersion": str + key "requestHeaderOptions": ForwardRef('ResourceProviderManifestPropertiesRequestHeaderOptions', module='types') + key "resourceGroupLockOptionDuringMove": ForwardRef('ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove', module='types') + key "resourceProviderAuthorizationRules": ForwardRef('ResourceProviderAuthorizationRules', module='types') + key "responseOptions": ForwardRef('ResourceProviderManifestPropertiesResponseOptions', module='types') + key "serviceName": str + key "templateDeploymentOptions": ForwardRef('ResourceProviderManifestPropertiesTemplateDeploymentOptions', module='types') + capabilities: list[ResourceProviderCapabilities] + cross_tenant_token_validation: Union[str, CrossTenantTokenValidation] + custom_manifest_version: str + dsts_configuration: ResourceProviderManifestPropertiesDstsConfiguration + enable_tenant_linked_notification: bool + features_rule: ResourceProviderManifestPropertiesFeaturesRule + globalNotificationEndpoints: list[ResourceProviderEndpoint] + global_notification_endpoints: list[ResourceProviderEndpoint] + legacyRegistrations: list[str] + legacy_namespace: str + legacy_registrations: list[str] + linkedNotificationRules: list[FanoutLinkedNotificationRule] + linked_notification_rules: list[FanoutLinkedNotificationRule] + management: ResourceProviderManifestPropertiesManagement + managementGroupGlobalNotificationEndpoints: list[ResourceProviderEndpoint] + management_group_global_notification_endpoints: list[ResourceProviderEndpoint] + metadata: Any + namespace: str + notification_options: Union[str, NotificationOptions] + notification_settings: ResourceProviderManifestPropertiesNotificationSettings + notifications: list[Notification] + optionalFeatures: list[str] + optional_features: list[str] + providerAuthorizations: list[ResourceProviderAuthorization] + provider_authentication: ResourceProviderManifestPropertiesProviderAuthentication + provider_authorizations: list[ResourceProviderAuthorization] + provider_type: Union[str, ResourceProviderType] + provider_version: str + request_header_options: ResourceProviderManifestPropertiesRequestHeaderOptions + requiredFeatures: list[str] + required_features: list[str] + resourceHydrationAccounts: list[ResourceHydrationAccount] + resource_group_lock_option_during_move: ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove + resource_hydration_accounts: list[ResourceHydrationAccount] + resource_provider_authorization_rules: ResourceProviderAuthorizationRules + response_options: ResourceProviderManifestPropertiesResponseOptions + service_name: str + services: list[ResourceProviderService] + template_deployment_options: ResourceProviderManifestPropertiesTemplateDeploymentOptions + + + class azure.mgmt.providerhub.types.ResourceProviderManifestPropertiesDstsConfiguration(DstsConfiguration): + key "serviceDnsName": str + key "serviceName": Required[str] + service_dns_name: str + service_name: str + + + class azure.mgmt.providerhub.types.ResourceProviderManifestPropertiesFeaturesRule(FeaturesRule): + key "requiredFeaturesPolicy": Required[Union[str, FeaturesPolicy]] + required_features_policy: Union[str, FeaturesPolicy] + + + class azure.mgmt.providerhub.types.ResourceProviderManifestPropertiesManagement(ResourceProviderManagement): + key "errorResponseMessageOptions": ForwardRef('ResourceProviderManagementErrorResponseMessageOptions', module='types') + key "expeditedRolloutMetadata": ForwardRef('ResourceProviderManagementExpeditedRolloutMetadata', module='types') + key "incidentContactEmail": str + key "incidentRoutingService": str + key "incidentRoutingTeam": str + key "pcCode": str + key "profitCenterProgramId": str + key "resourceAccessPolicy": Union[str, ResourceAccessPolicy] + authorizationOwners: list[str] + authorization_owners: list[str] + canaryManifestOwners: list[str] + canary_manifest_owners: list[str] + error_response_message_options: ResourceProviderManagementErrorResponseMessageOptions + expeditedRolloutSubmitters: list[str] + expedited_rollout_metadata: ResourceProviderManagementExpeditedRolloutMetadata + expedited_rollout_submitters: list[str] + incident_contact_email: str + incident_routing_service: str + incident_routing_team: str + manifestOwners: list[str] + manifest_owners: list[str] + pc_code: str + profit_center_program_id: str + resourceAccessRoles: list[ResourceAccessRole] + resource_access_policy: Union[str, ResourceAccessPolicy] + resource_access_roles: list[ResourceAccessRole] + schemaOwners: list[str] + schema_owners: list[str] + serviceTreeInfos: list[ServiceTreeInfo] + service_tree_infos: list[ServiceTreeInfo] + + + class azure.mgmt.providerhub.types.ResourceProviderManifestPropertiesNotificationSettings(TypedDict, total=False): + subscriberSettings: list[SubscriberSetting] + subscriber_settings: list[SubscriberSetting] + + + class azure.mgmt.providerhub.types.ResourceProviderManifestPropertiesProviderAuthentication(ResourceProviderAuthentication): + key "allowedAudiences": Required[list[str]] + allowed_audiences: list[str] + + + class azure.mgmt.providerhub.types.ResourceProviderManifestPropertiesRequestHeaderOptions(RequestHeaderOptions): + key "optInHeaders": Union[str, OptInHeaderType] + key "optOutHeaders": Union[str, OptOutHeaderType] + opt_in_headers: Union[str, OptInHeaderType] + opt_out_headers: Union[str, OptOutHeaderType] + + + class azure.mgmt.providerhub.types.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove(TypedDict, total=False): + key "blockActionVerb": Union[str, BlockActionVerb] + block_action_verb: Union[str, BlockActionVerb] + + + class azure.mgmt.providerhub.types.ResourceProviderManifestPropertiesResponseOptions(TypedDict, total=False): + key "serviceClientOptionsType": Union[str, ServiceClientOptionsType] + service_client_options_type: Union[str, ServiceClientOptionsType] + + + class azure.mgmt.providerhub.types.ResourceProviderManifestPropertiesTemplateDeploymentOptions(TemplateDeploymentOptions): + key "preflightSupported": bool + preflightOptions: list[Union[str, PreflightOption]] + preflight_options: list[Union[str, PreflightOption]] + preflight_supported: bool + + + class azure.mgmt.providerhub.types.ResourceProviderService(TypedDict, total=False): + key "serviceName": str + key "status": Union[str, ServiceStatus] + service_name: str + status: Union[str, ServiceStatus] + + + class azure.mgmt.providerhub.types.ResourceTypeEndpoint(TypedDict, total=False): + key "apiVersion": str + key "dataBoundary": Union[str, DataBoundary] + key "dstsConfiguration": ForwardRef('ResourceTypeEndpointDstsConfiguration', module='types') + key "enabled": bool + key "endpointType": Union[str, EndpointTypeResourceType] + key "endpointUri": str + key "featuresRule": ForwardRef('ResourceTypeEndpointFeaturesRule', module='types') + key "kind": Union[str, ResourceTypeEndpointKind] + key "skuLink": str + key "timeout": str + key "tokenAuthConfiguration": ForwardRef('TokenAuthConfiguration', module='types') + apiVersions: list[str] + api_version: str + api_versions: list[str] + data_boundary: Union[str, DataBoundary] + dsts_configuration: ResourceTypeEndpointDstsConfiguration + enabled: bool + endpoint_type: Union[str, EndpointTypeResourceType] + endpoint_uri: str + extensions: list[ResourceTypeExtension] + features_rule: ResourceTypeEndpointFeaturesRule + kind: Union[str, ResourceTypeEndpointKind] + locations: list[str] + requiredFeatures: list[str] + required_features: list[str] + sku_link: str + timeout: str + token_auth_configuration: TokenAuthConfiguration + zones: list[str] + + + class azure.mgmt.providerhub.types.ResourceTypeEndpointBase(TypedDict, total=False): + key "apiVersion": Required[str] + key "apiVersions": Required[list[str]] + key "dstsConfiguration": Required[ResourceTypeEndpointBaseDstsConfiguration] + key "enabled": Required[bool] + key "endpointType": Required[Union[str, EndpointType]] + key "endpointUri": Required[str] + key "featuresRule": Required[ResourceTypeEndpointBaseFeaturesRule] + key "locations": Required[list[str]] + key "requiredFeatures": Required[list[str]] + key "skuLink": Required[str] + key "timeout": Required[str] + key "zones": Required[list[str]] + api_version: str + api_versions: list[str] + dsts_configuration: ResourceTypeEndpointBaseDstsConfiguration + enabled: bool + endpoint_type: Union[str, EndpointType] + endpoint_uri: str + features_rule: ResourceTypeEndpointBaseFeaturesRule + locations: list[str] + required_features: list[str] + sku_link: str + timeout: str + zones: list[str] + + + class azure.mgmt.providerhub.types.ResourceTypeEndpointBaseDstsConfiguration(DstsConfiguration): + key "serviceDnsName": str + key "serviceName": Required[str] + service_dns_name: str + service_name: str + + + class azure.mgmt.providerhub.types.ResourceTypeEndpointBaseFeaturesRule(FeaturesRule): + key "requiredFeaturesPolicy": Required[Union[str, FeaturesPolicy]] + required_features_policy: Union[str, FeaturesPolicy] + + + class azure.mgmt.providerhub.types.ResourceTypeEndpointDstsConfiguration(DstsConfiguration): + key "serviceDnsName": str + key "serviceName": Required[str] + service_dns_name: str + service_name: str + + + class azure.mgmt.providerhub.types.ResourceTypeEndpointFeaturesRule(FeaturesRule): + key "requiredFeaturesPolicy": Required[Union[str, FeaturesPolicy]] + required_features_policy: Union[str, FeaturesPolicy] + + + class azure.mgmt.providerhub.types.ResourceTypeExtension(TypedDict, total=False): + key "endpointUri": str + key "timeout": str + endpoint_uri: str + extensionCategories: list[Union[str, ExtensionCategory]] + extension_categories: list[Union[str, ExtensionCategory]] + timeout: str + + + class azure.mgmt.providerhub.types.ResourceTypeExtensionOptions(TypedDict, total=False): + key "resourceCreationBegin": ForwardRef('ResourceTypeExtensionOptionsResourceCreationBegin', module='types') + resource_creation_begin: ResourceTypeExtensionOptionsResourceCreationBegin + + + class azure.mgmt.providerhub.types.ResourceTypeExtensionOptionsResourceCreationBegin(ExtensionOptions): + request: list[Union[str, ExtensionOptionType]] + response: list[Union[str, ExtensionOptionType]] + + + class azure.mgmt.providerhub.types.ResourceTypeOnBehalfOfToken(TypedDict, total=False): + key "actionName": str + key "lifeTime": str + action_name: str + life_time: str + + + class azure.mgmt.providerhub.types.ResourceTypeRegistration(ProxyResource): + key "id": str + key "kind": Union[str, ResourceTypeRegistrationKind] + key "name": str + key "properties": ForwardRef('ResourceTypeRegistrationProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + kind: Union[str, ResourceTypeRegistrationKind] + name: str + properties: ResourceTypeRegistrationProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationProperties(TypedDict, total=False): + key "addResourceListTargetLocations": bool + key "additionalOptions": Union[str, AdditionalOptionsResourceTypeRegistration] + key "allowEmptyRoleAssignments": bool + key "asyncOperationResourceTypeName": str + key "availabilityZoneRule": ForwardRef('ResourceTypeRegistrationPropertiesAvailabilityZoneRule', module='types') + key "capacityRule": ForwardRef('ResourceTypeRegistrationPropertiesCapacityRule', module='types') + key "category": Union[str, ResourceTypeCategory] + key "checkNameAvailabilitySpecifications": ForwardRef('ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications', module='types') + key "crossTenantTokenValidation": Union[str, CrossTenantTokenValidation] + key "defaultApiVersion": str + key "dstsConfiguration": ForwardRef('ResourceTypeRegistrationPropertiesDstsConfiguration', module='types') + key "enableAsyncOperation": bool + key "enableThirdPartyS2S": bool + key "extensionOptions": ForwardRef('ResourceTypeRegistrationPropertiesExtensionOptions', module='types') + key "featuresRule": ForwardRef('ResourceTypeRegistrationPropertiesFeaturesRule', module='types') + key "frontdoorRequestMode": Union[str, FrontdoorRequestMode] + key "groupingTag": str + key "identityManagement": ForwardRef('ResourceTypeRegistrationPropertiesIdentityManagement', module='types') + key "isPureProxy": bool + key "legacyName": str + key "legacyPolicy": ForwardRef('ResourceTypeRegistrationPropertiesLegacyPolicy', module='types') + key "management": ForwardRef('ResourceTypeRegistrationPropertiesManagement', module='types') + key "manifestLink": str + key "marketplaceOptions": ForwardRef('ResourceTypeRegistrationPropertiesMarketplaceOptions', module='types') + key "marketplaceType": Union[str, MarketplaceType] + key "onBehalfOfTokens": ForwardRef('ResourceTypeOnBehalfOfToken', module='types') + key "openApiConfiguration": ForwardRef('OpenApiConfiguration', module='types') + key "policyExecutionType": Union[str, PolicyExecutionType] + key "provisioningState": Union[str, ProvisioningState] + key "quotaRule": ForwardRef('QuotaRule', module='types') + key "regionality": Union[str, Regionality] + key "requestHeaderOptions": ForwardRef('ResourceTypeRegistrationPropertiesRequestHeaderOptions', module='types') + key "resourceCache": ForwardRef('ResourceTypeRegistrationPropertiesResourceCache', module='types') + key "resourceDeletionPolicy": Union[str, ResourceDeletionPolicy] + key "resourceGraphConfiguration": ForwardRef('ResourceTypeRegistrationPropertiesResourceGraphConfiguration', module='types') + key "resourceManagementOptions": ForwardRef('ResourceTypeRegistrationPropertiesResourceManagementOptions', module='types') + key "resourceMovePolicy": ForwardRef('ResourceTypeRegistrationPropertiesResourceMovePolicy', module='types') + key "resourceProviderAuthorizationRules": ForwardRef('ResourceProviderAuthorizationRules', module='types') + key "resourceQueryManagement": ForwardRef('ResourceTypeRegistrationPropertiesResourceQueryManagement', module='types') + key "resourceSubType": Union[str, ResourceSubType] + key "resourceTypeCommonAttributeManagement": ForwardRef('ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement', module='types') + key "resourceValidation": Union[str, ResourceValidation] + key "routingRule": ForwardRef('ResourceTypeRegistrationPropertiesRoutingRule', module='types') + key "routingType": Union[str, RoutingType] + key "skuLink": str + key "subscriptionLifecycleNotificationSpecifications": ForwardRef('ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications', module='types') + key "supportsTags": bool + key "templateDeploymentOptions": ForwardRef('ResourceTypeRegistrationPropertiesTemplateDeploymentOptions', module='types') + key "templateDeploymentPolicy": ForwardRef('ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy', module='types') + key "tokenAuthConfiguration": ForwardRef('TokenAuthConfiguration', module='types') + add_resource_list_target_locations: bool + additional_options: Union[str, AdditionalOptionsResourceTypeRegistration] + allow_empty_role_assignments: bool + allowedResourceNames: list[AllowedResourceName] + allowedTemplateDeploymentReferenceActions: list[str] + allowedUnauthorizedActions: list[str] + allowedUnauthorizedActionsExtensions: list[AllowedUnauthorizedActionsExtension] + allowed_resource_names: list[AllowedResourceName] + allowed_template_deployment_reference_actions: list[str] + allowed_unauthorized_actions: list[str] + allowed_unauthorized_actions_extensions: list[AllowedUnauthorizedActionsExtension] + apiProfiles: list[ApiProfile] + api_profiles: list[ApiProfile] + asyncTimeoutRules: list[AsyncTimeoutRule] + async_operation_resource_type_name: str + async_timeout_rules: list[AsyncTimeoutRule] + authorizationActionMappings: list[AuthorizationActionMapping] + authorization_action_mappings: list[AuthorizationActionMapping] + availability_zone_rule: ResourceTypeRegistrationPropertiesAvailabilityZoneRule + capacity_rule: ResourceTypeRegistrationPropertiesCapacityRule + category: Union[str, ResourceTypeCategory] + check_name_availability_specifications: ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications + commonApiVersions: list[str] + common_api_versions: list[str] + cross_tenant_token_validation: Union[str, CrossTenantTokenValidation] + default_api_version: str + disallowedActionVerbs: list[str] + disallowedEndUserOperations: list[str] + disallowed_action_verbs: list[str] + disallowed_end_user_operations: list[str] + dsts_configuration: ResourceTypeRegistrationPropertiesDstsConfiguration + enable_async_operation: bool + enable_third_party_s2_s: bool + endpoints: list[ResourceTypeEndpoint] + extendedLocations: list[ExtendedLocationOptions] + extended_locations: list[ExtendedLocationOptions] + extension_options: ResourceTypeRegistrationPropertiesExtensionOptions + features_rule: ResourceTypeRegistrationPropertiesFeaturesRule + frontdoor_request_mode: Union[str, FrontdoorRequestMode] + grouping_tag: str + identity_management: ResourceTypeRegistrationPropertiesIdentityManagement + is_pure_proxy: bool + legacyNames: list[str] + legacy_name: str + legacy_names: list[str] + legacy_policy: ResourceTypeRegistrationPropertiesLegacyPolicy + linkedAccessChecks: list[LinkedAccessCheck] + linkedNotificationRules: list[LinkedNotificationRule] + linkedOperationRules: list[LinkedOperationRule] + linked_access_checks: list[LinkedAccessCheck] + linked_notification_rules: list[LinkedNotificationRule] + linked_operation_rules: list[LinkedOperationRule] + loggingRules: list[LoggingRule] + logging_rules: list[LoggingRule] + management: ResourceTypeRegistrationPropertiesManagement + manifest_link: str + marketplace_options: ResourceTypeRegistrationPropertiesMarketplaceOptions + marketplace_type: Union[str, MarketplaceType] + metadata: dict[str, Any] + notifications: list[Notification] + on_behalf_of_tokens: ResourceTypeOnBehalfOfToken + open_api_configuration: OpenApiConfiguration + policy_execution_type: Union[str, PolicyExecutionType] + provisioning_state: Union[str, ProvisioningState] + quota_rule: QuotaRule + regionality: Union[str, Regionality] + request_header_options: ResourceTypeRegistrationPropertiesRequestHeaderOptions + requiredFeatures: list[str] + required_features: list[str] + resourceConcurrencyControlOptions: dict[str, ResourceConcurrencyControlOption] + resource_cache: ResourceTypeRegistrationPropertiesResourceCache + resource_concurrency_control_options: dict[str, ResourceConcurrencyControlOption] + resource_deletion_policy: Union[str, ResourceDeletionPolicy] + resource_graph_configuration: ResourceTypeRegistrationPropertiesResourceGraphConfiguration + resource_management_options: ResourceTypeRegistrationPropertiesResourceManagementOptions + resource_move_policy: ResourceTypeRegistrationPropertiesResourceMovePolicy + resource_provider_authorization_rules: ResourceProviderAuthorizationRules + resource_query_management: ResourceTypeRegistrationPropertiesResourceQueryManagement + resource_sub_type: Union[str, ResourceSubType] + resource_type_common_attribute_management: ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement + resource_validation: Union[str, ResourceValidation] + routing_rule: ResourceTypeRegistrationPropertiesRoutingRule + routing_type: Union[str, RoutingType] + serviceTreeInfos: list[ServiceTreeInfo] + service_tree_infos: list[ServiceTreeInfo] + sku_link: str + subscriptionStateRules: list[SubscriptionStateRule] + subscription_lifecycle_notification_specifications: ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications + subscription_state_rules: list[SubscriptionStateRule] + supports_tags: bool + swaggerSpecifications: list[SwaggerSpecification] + swagger_specifications: list[SwaggerSpecification] + template_deployment_options: ResourceTypeRegistrationPropertiesTemplateDeploymentOptions + template_deployment_policy: ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy + throttlingRules: list[ThrottlingRule] + throttling_rules: list[ThrottlingRule] + token_auth_configuration: TokenAuthConfiguration + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesAvailabilityZoneRule(TypedDict, total=False): + key "availabilityZonePolicy": Union[str, AvailabilityZonePolicy] + availability_zone_policy: Union[str, AvailabilityZonePolicy] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesCapacityRule(TypedDict, total=False): + key "capacityPolicy": Union[str, CapacityPolicy] + key "skuAlias": str + capacity_policy: Union[str, CapacityPolicy] + sku_alias: str + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications(CheckNameAvailabilitySpecifications): + key "enableDefaultValidation": bool + enable_default_validation: bool + resourceTypesWithCustomValidation: list[str] + resource_types_with_custom_validation: list[str] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesDstsConfiguration(DstsConfiguration): + key "serviceDnsName": str + key "serviceName": Required[str] + service_dns_name: str + service_name: str + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesExtensionOptions(ResourceTypeExtensionOptions): + key "resourceCreationBegin": ForwardRef('ResourceTypeExtensionOptionsResourceCreationBegin', module='types') + resource_creation_begin: ResourceTypeExtensionOptionsResourceCreationBegin + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesFeaturesRule(FeaturesRule): + key "requiredFeaturesPolicy": Required[Union[str, FeaturesPolicy]] + required_features_policy: Union[str, FeaturesPolicy] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesIdentityManagement(IdentityManagementProperties): + key "applicationId": str + key "type": Union[str, IdentityManagementTypes] + applicationIds: list[str] + application_id: str + application_ids: list[str] + delegationAppIds: list[str] + delegation_app_ids: list[str] + type: Union[str, IdentityManagementTypes] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesLegacyPolicy(TypedDict, total=False): + disallowedConditions: list[LegacyDisallowedCondition] + disallowedLegacyOperations: list[Union[str, LegacyOperation]] + disallowed_conditions: list[LegacyDisallowedCondition] + disallowed_legacy_operations: list[Union[str, LegacyOperation]] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesManagement(ResourceProviderManagement): + key "errorResponseMessageOptions": ForwardRef('ResourceProviderManagementErrorResponseMessageOptions', module='types') + key "expeditedRolloutMetadata": ForwardRef('ResourceProviderManagementExpeditedRolloutMetadata', module='types') + key "incidentContactEmail": str + key "incidentRoutingService": str + key "incidentRoutingTeam": str + key "pcCode": str + key "profitCenterProgramId": str + key "resourceAccessPolicy": Union[str, ResourceAccessPolicy] + authorizationOwners: list[str] + authorization_owners: list[str] + canaryManifestOwners: list[str] + canary_manifest_owners: list[str] + error_response_message_options: ResourceProviderManagementErrorResponseMessageOptions + expeditedRolloutSubmitters: list[str] + expedited_rollout_metadata: ResourceProviderManagementExpeditedRolloutMetadata + expedited_rollout_submitters: list[str] + incident_contact_email: str + incident_routing_service: str + incident_routing_team: str + manifestOwners: list[str] + manifest_owners: list[str] + pc_code: str + profit_center_program_id: str + resourceAccessRoles: list[ResourceAccessRole] + resource_access_policy: Union[str, ResourceAccessPolicy] + resource_access_roles: list[ResourceAccessRole] + schemaOwners: list[str] + schema_owners: list[str] + serviceTreeInfos: list[ServiceTreeInfo] + service_tree_infos: list[ServiceTreeInfo] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesMarketplaceOptions(TypedDict, total=False): + key "addOnPlanConversionAllowed": bool + add_on_plan_conversion_allowed: bool + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesRequestHeaderOptions(RequestHeaderOptions): + key "optInHeaders": Union[str, OptInHeaderType] + key "optOutHeaders": Union[str, OptOutHeaderType] + opt_in_headers: Union[str, OptInHeaderType] + opt_out_headers: Union[str, OptOutHeaderType] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesResourceCache(TypedDict, total=False): + key "enableResourceCache": bool + key "resourceCacheExpirationTimespan": str + enable_resource_cache: bool + resource_cache_expiration_timespan: str + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesResourceGraphConfiguration(ResourceGraphConfiguration): + key "apiVersion": str + key "enabled": bool + api_version: str + enabled: bool + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesResourceManagementOptions(TypedDict, total=False): + key "batchProvisioningSupport": ForwardRef('ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport', module='types') + key "nestedProvisioningSupport": ForwardRef('ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport', module='types') + batch_provisioning_support: ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport + deleteDependencies: list[DeleteDependency] + delete_dependencies: list[DeleteDependency] + nested_provisioning_support: ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport(TypedDict, total=False): + key "supportedOperations": Union[str, SupportedOperations] + supported_operations: Union[str, SupportedOperations] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport(TypedDict, total=False): + key "minimumApiVersion": str + minimum_api_version: str + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesResourceMovePolicy(ResourceMovePolicy): + key "crossResourceGroupMoveEnabled": bool + key "crossSubscriptionMoveEnabled": bool + key "validationRequired": bool + cross_resource_group_move_enabled: bool + cross_subscription_move_enabled: bool + validation_required: bool + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesResourceQueryManagement(TypedDict, total=False): + key "filterOption": Union[str, FilterOption] + filter_option: Union[str, FilterOption] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement(TypedDict, total=False): + key "commonApiVersionsMergeMode": Union[str, CommonApiVersionsMergeMode] + common_api_versions_merge_mode: Union[str, CommonApiVersionsMergeMode] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesRoutingRule(TypedDict, total=False): + key "hostResourceType": str + host_resource_type: str + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications(SubscriptionLifecycleNotificationSpecifications): + key "softDeleteTTL": str + soft_delete_ttl: str + subscriptionStateOverrideActions: list[SubscriptionStateOverrideAction] + subscription_state_override_actions: list[SubscriptionStateOverrideAction] + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesTemplateDeploymentOptions(TemplateDeploymentOptions): + key "preflightSupported": bool + preflightOptions: list[Union[str, PreflightOption]] + preflight_options: list[Union[str, PreflightOption]] + preflight_supported: bool + + + class azure.mgmt.providerhub.types.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy(TemplateDeploymentPolicy): + key "capabilities": Required[Union[str, TemplateDeploymentCapabilities]] + key "preflightNotifications": Union[str, TemplateDeploymentPreflightNotifications] + key "preflightOptions": Required[Union[str, TemplateDeploymentPreflightOptions]] + capabilities: Union[str, TemplateDeploymentCapabilities] + preflight_notifications: Union[str, TemplateDeploymentPreflightNotifications] + preflight_options: Union[str, TemplateDeploymentPreflightOptions] + + + class azure.mgmt.providerhub.types.ResourceTypeSku(TypedDict, total=False): + key "provisioningState": Union[str, ProvisioningState] + key "skuSettings": Required[list[SkuSetting]] + provisioning_state: Union[str, ProvisioningState] + sku_settings: list[SkuSetting] + + + class azure.mgmt.providerhub.types.RolloutStatusBase(TypedDict, total=False): + completedRegions: list[str] + completed_regions: list[str] + failedOrSkippedRegions: dict[str, ExtendedErrorInfo] + failed_or_skipped_regions: dict[str, ExtendedErrorInfo] + + + class azure.mgmt.providerhub.types.ServiceTreeInfo(TypedDict, total=False): + key "componentId": str + key "readiness": Union[str, Readiness] + key "serviceId": str + component_id: str + readiness: Union[str, Readiness] + service_id: str + + + class azure.mgmt.providerhub.types.SkuCapability(TypedDict, total=False): + key "name": Required[str] + key "value": Required[str] + name: str + value: str + + + class azure.mgmt.providerhub.types.SkuCapacity(TypedDict, total=False): + key "default": int + key "maximum": int + key "minimum": Required[int] + key "scaleType": Union[str, SkuScaleType] + default: int + maximum: int + minimum: int + scale_type: Union[str, SkuScaleType] + + + class azure.mgmt.providerhub.types.SkuCost(TypedDict, total=False): + key "extendedUnit": str + key "meterId": Required[str] + key "quantity": int + extended_unit: str + meter_id: str + quantity: int + + + class azure.mgmt.providerhub.types.SkuLocationInfo(TypedDict, total=False): + key "location": Required[str] + key "type": Union[str, ExtendedLocationType] + extendedLocations: list[str] + extended_locations: list[str] + location: str + type: Union[str, ExtendedLocationType] + zoneDetails: list[SkuZoneDetail] + zone_details: list[SkuZoneDetail] + zones: list[str] + + + class azure.mgmt.providerhub.types.SkuResource(ProxyResource): + key "id": str + key "name": str + key "properties": ForwardRef('SkuResourceProperties', module='types') + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + name: str + properties: SkuResourceProperties + system_data: SystemData + type: str + + + class azure.mgmt.providerhub.types.SkuResourceProperties(ResourceTypeSku): + key "provisioningState": Union[str, ProvisioningState] + key "skuSettings": Required[list[SkuSetting]] + provisioning_state: Union[str, ProvisioningState] + sku_settings: list[SkuSetting] + + + class azure.mgmt.providerhub.types.SkuSetting(TypedDict, total=False): + key "capacity": ForwardRef('SkuSettingCapacity', module='types') + key "family": str + key "kind": str + key "name": Required[str] + key "size": str + key "tier": str + capabilities: list[SkuCapability] + capacity: SkuSettingCapacity + costs: list[SkuCost] + family: str + kind: str + locationInfo: list[SkuLocationInfo] + location_info: list[SkuLocationInfo] + locations: list[str] + name: str + requiredFeatures: list[str] + requiredQuotaIds: list[str] + required_features: list[str] + required_quota_ids: list[str] + size: str + tier: str + + + class azure.mgmt.providerhub.types.SkuSettingCapacity(SkuCapacity): + key "default": int + key "maximum": int + key "minimum": Required[int] + key "scaleType": Union[str, SkuScaleType] + default: int + maximum: int + minimum: int + scale_type: Union[str, SkuScaleType] + + + class azure.mgmt.providerhub.types.SkuZoneDetail(TypedDict, total=False): + capabilities: list[SkuCapability] + name: list[str] + + + class azure.mgmt.providerhub.types.SubscriberSetting(TypedDict, total=False): + filterRules: list[FilterRule] + filter_rules: list[FilterRule] + + + class azure.mgmt.providerhub.types.SubscriptionLifecycleNotificationSpecifications(TypedDict, total=False): + key "softDeleteTTL": str + soft_delete_ttl: str + subscriptionStateOverrideActions: list[SubscriptionStateOverrideAction] + subscription_state_override_actions: list[SubscriptionStateOverrideAction] + + + class azure.mgmt.providerhub.types.SubscriptionStateOverrideAction(TypedDict, total=False): + key "action": Required[Union[str, SubscriptionNotificationOperation]] + key "state": Required[Union[str, SubscriptionTransitioningState]] + action: Union[str, SubscriptionNotificationOperation] + state: Union[str, SubscriptionTransitioningState] + + + class azure.mgmt.providerhub.types.SubscriptionStateRule(TypedDict, total=False): + key "state": Union[str, SubscriptionState] + allowedActions: list[str] + allowed_actions: list[str] + state: Union[str, SubscriptionState] + + + class azure.mgmt.providerhub.types.SwaggerSpecification(TypedDict, total=False): + key "swaggerSpecFolderUri": str + apiVersions: list[str] + api_versions: list[str] + swagger_spec_folder_uri: str + + + class azure.mgmt.providerhub.types.SystemData(TypedDict, total=False): + key "createdAt": str + key "createdBy": str + key "createdByType": Union[str, CreatedByType] + key "lastModifiedAt": str + key "lastModifiedBy": str + key "lastModifiedByType": Union[str, CreatedByType] + created_at: str + created_by: str + created_by_type: Union[str, CreatedByType] + last_modified_at: str + last_modified_by: str + last_modified_by_type: Union[str, CreatedByType] + + + class azure.mgmt.providerhub.types.TemplateDeploymentOptions(TypedDict, total=False): + key "preflightSupported": bool + preflightOptions: list[Union[str, PreflightOption]] + preflight_options: list[Union[str, PreflightOption]] + preflight_supported: bool + + + class azure.mgmt.providerhub.types.TemplateDeploymentPolicy(TypedDict, total=False): + key "capabilities": Required[Union[str, TemplateDeploymentCapabilities]] + key "preflightNotifications": Union[str, TemplateDeploymentPreflightNotifications] + key "preflightOptions": Required[Union[str, TemplateDeploymentPreflightOptions]] + capabilities: Union[str, TemplateDeploymentCapabilities] + preflight_notifications: Union[str, TemplateDeploymentPreflightNotifications] + preflight_options: Union[str, TemplateDeploymentPreflightOptions] + + + class azure.mgmt.providerhub.types.ThirdPartyExtension(TypedDict, total=False): + key "name": str + name: str + + + class azure.mgmt.providerhub.types.ThirdPartyProviderAuthorization(TypedDict, total=False): + key "managedByTenantId": str + authorizations: list[LightHouseAuthorization] + managed_by_tenant_id: str + + + class azure.mgmt.providerhub.types.ThrottlingMetric(TypedDict, total=False): + key "interval": str + key "limit": Required[int] + key "type": Required[Union[str, ThrottlingMetricType]] + interval: str + limit: int + type: Union[str, ThrottlingMetricType] + + + class azure.mgmt.providerhub.types.ThrottlingRule(TypedDict, total=False): + key "action": Required[str] + key "metrics": Required[list[ThrottlingMetric]] + action: str + applicationId: list[str] + application_id: list[str] + metrics: list[ThrottlingMetric] + requiredFeatures: list[str] + required_features: list[str] + + + class azure.mgmt.providerhub.types.TokenAuthConfiguration(TypedDict, total=False): + key "authenticationScheme": Union[str, AuthenticationScheme] + key "disableCertificateAuthenticationFallback": bool + key "signedRequestScope": Union[str, SignedRequestScope] + authentication_scheme: Union[str, AuthenticationScheme] + disable_certificate_authentication_fallback: bool + signed_request_scope: Union[str, SignedRequestScope] + + + class azure.mgmt.providerhub.types.TrackedResource(Resource): + key "id": str + key "location": Required[str] + key "name": str + key "systemData": ForwardRef('SystemData', module='types') + key "type": str + id: str + location: str + name: str + system_data: SystemData + tags: dict[str, str] + type: str + + + class azure.mgmt.providerhub.types.TrafficRegionRolloutConfiguration(TrafficRegions): + key "waitDuration": str + regions: list[str] + wait_duration: str + + + class azure.mgmt.providerhub.types.TrafficRegions(TypedDict, total=False): + regions: list[str] + + + class azure.mgmt.providerhub.types.TypedErrorInfo(TypedDict, total=False): + key "info": Any + key "type": Required[str] + info: Any + type: str + + +``` \ No newline at end of file diff --git a/sdk/providerhub/azure-mgmt-providerhub/api.metadata.yml b/sdk/providerhub/azure-mgmt-providerhub/api.metadata.yml new file mode 100644 index 000000000000..bb1c514e40ec --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/api.metadata.yml @@ -0,0 +1,3 @@ +apiMdSha256: 150cd01539f443ede916f50a6a254ff77ea034aab66556cda363d748fb24af3e +parserVersion: 0.3.28 +pythonVersion: 3.13.14 diff --git a/sdk/providerhub/azure-mgmt-providerhub/apiview-properties.json b/sdk/providerhub/azure-mgmt-providerhub/apiview-properties.json new file mode 100644 index 000000000000..3e9599ccb99b --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/apiview-properties.json @@ -0,0 +1,425 @@ +{ + "CrossLanguagePackageId": "Microsoft.ProviderHub", + "CrossLanguageDefinitionId": { + "azure.mgmt.providerhub.models.AdditionalAuthorization": "Microsoft.ProviderHub.AdditionalAuthorization", + "azure.mgmt.providerhub.models.AllowedResourceName": "Microsoft.ProviderHub.AllowedResourceName", + "azure.mgmt.providerhub.models.AllowedUnauthorizedActionsExtension": "Microsoft.ProviderHub.AllowedUnauthorizedActionsExtension", + "azure.mgmt.providerhub.models.ApiProfile": "Microsoft.ProviderHub.ApiProfile", + "azure.mgmt.providerhub.models.ApplicationDataAuthorization": "Microsoft.ProviderHub.ApplicationDataAuthorization", + "azure.mgmt.providerhub.models.ApplicationProviderAuthorization": "Microsoft.ProviderHub.ApplicationProviderAuthorization", + "azure.mgmt.providerhub.models.AsyncOperationPollingRules": "Microsoft.ProviderHub.AsyncOperationPollingRules", + "azure.mgmt.providerhub.models.AsyncTimeoutRule": "Microsoft.ProviderHub.AsyncTimeoutRule", + "azure.mgmt.providerhub.models.AuthorizationActionMapping": "Microsoft.ProviderHub.AuthorizationActionMapping", + "azure.mgmt.providerhub.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.providerhub.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.providerhub.models.AuthorizedApplication": "Microsoft.ProviderHub.AuthorizedApplication", + "azure.mgmt.providerhub.models.AuthorizedApplicationProperties": "Microsoft.ProviderHub.AuthorizedApplicationProperties", + "azure.mgmt.providerhub.models.CanaryTrafficRegionRolloutConfiguration": "Microsoft.ProviderHub.CanaryTrafficRegionRolloutConfiguration", + "azure.mgmt.providerhub.models.CheckinManifestInfo": "Microsoft.ProviderHub.CheckinManifestInfo", + "azure.mgmt.providerhub.models.CheckinManifestParams": "Microsoft.ProviderHub.CheckinManifestParams", + "azure.mgmt.providerhub.models.CheckNameAvailabilitySpecifications": "Microsoft.ProviderHub.CheckNameAvailabilitySpecifications", + "azure.mgmt.providerhub.models.CustomRollout": "Microsoft.ProviderHub.CustomRollout", + "azure.mgmt.providerhub.models.CustomRolloutProperties": "Microsoft.ProviderHub.CustomRolloutProperties", + "azure.mgmt.providerhub.models.CustomRolloutSpecification": "Microsoft.ProviderHub.CustomRolloutSpecification", + "azure.mgmt.providerhub.models.CustomRolloutPropertiesSpecification": "Microsoft.ProviderHub.CustomRolloutPropertiesSpecification", + "azure.mgmt.providerhub.models.CustomRolloutStatus": "Microsoft.ProviderHub.CustomRolloutStatus", + "azure.mgmt.providerhub.models.CustomRolloutPropertiesStatus": "Microsoft.ProviderHub.CustomRolloutPropertiesStatus", + "azure.mgmt.providerhub.models.CustomRolloutSpecificationAutoProvisionConfig": "Microsoft.ProviderHub.CustomRolloutSpecificationAutoProvisionConfig", + "azure.mgmt.providerhub.models.TrafficRegions": "Microsoft.ProviderHub.TrafficRegions", + "azure.mgmt.providerhub.models.CustomRolloutSpecificationCanary": "Microsoft.ProviderHub.CustomRolloutSpecificationCanary", + "azure.mgmt.providerhub.models.ProviderRegistration": "Microsoft.ProviderHub.ProviderRegistration", + "azure.mgmt.providerhub.models.CustomRolloutSpecificationProviderRegistration": "Microsoft.ProviderHub.CustomRolloutSpecificationProviderRegistration", + "azure.mgmt.providerhub.models.CustomRolloutStatusManifestCheckinStatus": "Microsoft.ProviderHub.CustomRolloutStatusManifestCheckinStatus", + "azure.mgmt.providerhub.models.DefaultRollout": "Microsoft.ProviderHub.DefaultRollout", + "azure.mgmt.providerhub.models.DefaultRolloutProperties": "Microsoft.ProviderHub.DefaultRolloutProperties", + "azure.mgmt.providerhub.models.DefaultRolloutSpecification": "Microsoft.ProviderHub.DefaultRolloutSpecification", + "azure.mgmt.providerhub.models.DefaultRolloutPropertiesSpecification": "Microsoft.ProviderHub.DefaultRolloutPropertiesSpecification", + "azure.mgmt.providerhub.models.RolloutStatusBase": "Microsoft.ProviderHub.RolloutStatusBase", + "azure.mgmt.providerhub.models.DefaultRolloutStatus": "Microsoft.ProviderHub.DefaultRolloutStatus", + "azure.mgmt.providerhub.models.DefaultRolloutPropertiesStatus": "Microsoft.ProviderHub.DefaultRolloutPropertiesStatus", + "azure.mgmt.providerhub.models.DefaultRolloutSpecificationAutoProvisionConfig": "Microsoft.ProviderHub.DefaultRolloutSpecificationAutoProvisionConfig", + "azure.mgmt.providerhub.models.DefaultRolloutSpecificationCanary": "Microsoft.ProviderHub.DefaultRolloutSpecificationCanary", + "azure.mgmt.providerhub.models.ExpeditedRolloutDefinition": "Microsoft.ProviderHub.ExpeditedRolloutDefinition", + "azure.mgmt.providerhub.models.DefaultRolloutSpecificationExpeditedRollout": "Microsoft.ProviderHub.DefaultRolloutSpecificationExpeditedRollout", + "azure.mgmt.providerhub.models.TrafficRegionRolloutConfiguration": "Microsoft.ProviderHub.TrafficRegionRolloutConfiguration", + "azure.mgmt.providerhub.models.DefaultRolloutSpecificationHighTraffic": "Microsoft.ProviderHub.DefaultRolloutSpecificationHighTraffic", + "azure.mgmt.providerhub.models.DefaultRolloutSpecificationLowTraffic": "Microsoft.ProviderHub.DefaultRolloutSpecificationLowTraffic", + "azure.mgmt.providerhub.models.DefaultRolloutSpecificationMediumTraffic": "Microsoft.ProviderHub.DefaultRolloutSpecificationMediumTraffic", + "azure.mgmt.providerhub.models.DefaultRolloutSpecificationProviderRegistration": "Microsoft.ProviderHub.DefaultRolloutSpecificationProviderRegistration", + "azure.mgmt.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupOne": "Microsoft.ProviderHub.DefaultRolloutSpecificationRestOfTheWorldGroupOne", + "azure.mgmt.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo": "Microsoft.ProviderHub.DefaultRolloutSpecificationRestOfTheWorldGroupTwo", + "azure.mgmt.providerhub.models.DefaultRolloutStatusManifestCheckinStatus": "Microsoft.ProviderHub.DefaultRolloutStatusManifestCheckinStatus", + "azure.mgmt.providerhub.models.DeleteDependency": "Microsoft.ProviderHub.DeleteDependency", + "azure.mgmt.providerhub.models.DstsConfiguration": "Microsoft.ProviderHub.DstsConfiguration", + "azure.mgmt.providerhub.models.EndpointInformation": "Microsoft.ProviderHub.EndpointInformation", + "azure.mgmt.providerhub.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.providerhub.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.providerhub.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.providerhub.models.ExtendedErrorInfo": "Microsoft.ProviderHub.ExtendedErrorInfo", + "azure.mgmt.providerhub.models.ExtendedLocationOptions": "Microsoft.ProviderHub.ExtendedLocationOptions", + "azure.mgmt.providerhub.models.ExtensionOptions": "Microsoft.ProviderHub.ExtensionOptions", + "azure.mgmt.providerhub.models.FanoutLinkedNotificationRule": "Microsoft.ProviderHub.FanoutLinkedNotificationRule", + "azure.mgmt.providerhub.models.FanoutLinkedNotificationRuleDstsConfiguration": "Microsoft.ProviderHub.FanoutLinkedNotificationRuleDstsConfiguration", + "azure.mgmt.providerhub.models.FeaturesRule": "Microsoft.ProviderHub.FeaturesRule", + "azure.mgmt.providerhub.models.FilterRule": "Microsoft.ProviderHub.FilterRule", + "azure.mgmt.providerhub.models.FrontloadPayload": "Microsoft.ProviderHub.FrontloadPayload", + "azure.mgmt.providerhub.models.FrontloadPayloadProperties": "Microsoft.ProviderHub.FrontloadPayloadProperties", + "azure.mgmt.providerhub.models.ResourceTypeEndpointBase": "Microsoft.ProviderHub.ResourceTypeEndpointBase", + "azure.mgmt.providerhub.models.FrontloadPayloadPropertiesOverrideEndpointLevelFields": "Microsoft.ProviderHub.FrontloadPayloadPropertiesOverrideEndpointLevelFields", + "azure.mgmt.providerhub.models.ManifestLevelPropertyBag": "Microsoft.ProviderHub.ManifestLevelPropertyBag", + "azure.mgmt.providerhub.models.FrontloadPayloadPropertiesOverrideManifestLevelFields": "Microsoft.ProviderHub.FrontloadPayloadPropertiesOverrideManifestLevelFields", + "azure.mgmt.providerhub.models.IdentityManagement": "Microsoft.ProviderHub.IdentityManagement", + "azure.mgmt.providerhub.models.IdentityManagementProperties": "Microsoft.ProviderHub.IdentityManagementProperties", + "azure.mgmt.providerhub.models.LegacyDisallowedCondition": "Microsoft.ProviderHub.LegacyDisallowedCondition", + "azure.mgmt.providerhub.models.LightHouseAuthorization": "Microsoft.ProviderHub.LightHouseAuthorization", + "azure.mgmt.providerhub.models.LinkedAccessCheck": "Microsoft.ProviderHub.LinkedAccessCheck", + "azure.mgmt.providerhub.models.LinkedNotificationRule": "Microsoft.ProviderHub.LinkedNotificationRule", + "azure.mgmt.providerhub.models.LinkedOperationRule": "Microsoft.ProviderHub.LinkedOperationRule", + "azure.mgmt.providerhub.models.LocalizedOperationDefinition": "Microsoft.ProviderHub.LocalizedOperationDefinition", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinition": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinition", + "azure.mgmt.providerhub.models.LocalizedOperationDefinitionDisplay": "Microsoft.ProviderHub.LocalizedOperationDefinitionDisplay", + "azure.mgmt.providerhub.models.OperationsDisplayDefinition": "Microsoft.ProviderHub.OperationsDisplayDefinition", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionCs": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionCs", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionDe": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionDe", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionDefault": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionDefault", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionEn": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionEn", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionEs": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionEs", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionFr": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionFr", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionHu": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionHu", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionIt": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionIt", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionJa": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionJa", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionKo": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionKo", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionNl": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionNl", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPl": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionPl", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPtBR": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionPtBR", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPtPT": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionPtPT", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionRu": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionRu", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionSv": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionSv", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionZhHans": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionZhHans", + "azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionZhHant": "Microsoft.ProviderHub.LocalizedOperationDisplayDefinitionZhHant", + "azure.mgmt.providerhub.models.LocationQuotaRule": "Microsoft.ProviderHub.LocationQuotaRule", + "azure.mgmt.providerhub.models.LoggingHiddenPropertyPath": "Microsoft.ProviderHub.LoggingHiddenPropertyPath", + "azure.mgmt.providerhub.models.LoggingRule": "Microsoft.ProviderHub.LoggingRule", + "azure.mgmt.providerhub.models.LoggingRuleHiddenPropertyPaths": "Microsoft.ProviderHub.LoggingRuleHiddenPropertyPaths", + "azure.mgmt.providerhub.models.Notification": "Microsoft.ProviderHub.Notification", + "azure.mgmt.providerhub.models.NotificationEndpoint": "Microsoft.ProviderHub.NotificationEndpoint", + "azure.mgmt.providerhub.models.NotificationRegistration": "Microsoft.ProviderHub.NotificationRegistration", + "azure.mgmt.providerhub.models.NotificationRegistrationProperties": "Microsoft.ProviderHub.NotificationRegistrationProperties", + "azure.mgmt.providerhub.models.OpenApiConfiguration": "Microsoft.ProviderHub.OpenApiConfiguration", + "azure.mgmt.providerhub.models.OpenApiValidation": "Microsoft.ProviderHub.OpenApiValidation", + "azure.mgmt.providerhub.models.OperationsContentProperties": "Microsoft.ProviderHub.OperationsContentProperties", + "azure.mgmt.providerhub.models.OperationsDefinition": "Microsoft.ProviderHub.OperationsDefinition", + "azure.mgmt.providerhub.models.OperationsDefinitionDisplay": "Microsoft.ProviderHub.OperationsDefinitionDisplay", + "azure.mgmt.providerhub.models.OperationsPutContent": "Microsoft.ProviderHub.OperationsPutContent", + "azure.mgmt.providerhub.models.OperationsPutContentProperties": "Microsoft.ProviderHub.OperationsPutContentProperties", + "azure.mgmt.providerhub.models.PrivateResourceProviderConfiguration": "Microsoft.ProviderHub.PrivateResourceProviderConfiguration", + "azure.mgmt.providerhub.models.ProviderHubMetadata": "Microsoft.ProviderHub.ProviderHubMetadata", + "azure.mgmt.providerhub.models.ResourceProviderAuthentication": "Microsoft.ProviderHub.ResourceProviderAuthentication", + "azure.mgmt.providerhub.models.ProviderHubMetadataProviderAuthentication": "Microsoft.ProviderHub.ProviderHubMetadataProviderAuthentication", + "azure.mgmt.providerhub.models.ThirdPartyProviderAuthorization": "Microsoft.ProviderHub.ThirdPartyProviderAuthorization", + "azure.mgmt.providerhub.models.ProviderHubMetadataThirdPartyProviderAuthorization": "Microsoft.ProviderHub.ProviderHubMetadataThirdPartyProviderAuthorization", + "azure.mgmt.providerhub.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.providerhub.models.ProviderMonitorSetting": "Microsoft.ProviderHub.ProviderMonitorSetting", + "azure.mgmt.providerhub.models.ProviderMonitorSettingProperties": "Microsoft.ProviderHub.ProviderMonitorSettingProperties", + "azure.mgmt.providerhub.models.ResourceProviderManifestProperties": "Microsoft.ProviderHub.ResourceProviderManifestProperties", + "azure.mgmt.providerhub.models.ProviderRegistrationProperties": "Microsoft.ProviderHub.ProviderRegistrationProperties", + "azure.mgmt.providerhub.models.ProviderRegistrationPropertiesPrivateResourceProviderConfiguration": "Microsoft.ProviderHub.ProviderRegistrationPropertiesPrivateResourceProviderConfiguration", + "azure.mgmt.providerhub.models.ProviderRegistrationPropertiesProviderHubMetadata": "Microsoft.ProviderHub.ProviderRegistrationPropertiesProviderHubMetadata", + "azure.mgmt.providerhub.models.SubscriptionLifecycleNotificationSpecifications": "Microsoft.ProviderHub.SubscriptionLifecycleNotificationSpecifications", + "azure.mgmt.providerhub.models.ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications": "Microsoft.ProviderHub.ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications", + "azure.mgmt.providerhub.models.QuotaRule": "Microsoft.ProviderHub.QuotaRule", + "azure.mgmt.providerhub.models.RequestHeaderOptions": "Microsoft.ProviderHub.RequestHeaderOptions", + "azure.mgmt.providerhub.models.ReRegisterSubscriptionMetadata": "Microsoft.ProviderHub.ReRegisterSubscriptionMetadata", + "azure.mgmt.providerhub.models.ResourceAccessRole": "Microsoft.ProviderHub.ResourceAccessRole", + "azure.mgmt.providerhub.models.ResourceConcurrencyControlOption": "Microsoft.ProviderHub.ResourceConcurrencyControlOption", + "azure.mgmt.providerhub.models.ResourceGraphConfiguration": "Microsoft.ProviderHub.ResourceGraphConfiguration", + "azure.mgmt.providerhub.models.ResourceHydrationAccount": "Microsoft.ProviderHub.ResourceHydrationAccount", + "azure.mgmt.providerhub.models.ResourceManagementAction": "Microsoft.ProviderHub.ResourceManagementAction", + "azure.mgmt.providerhub.models.ResourceManagementEntity": "Microsoft.ProviderHub.ResourceManagementEntity", + "azure.mgmt.providerhub.models.ResourceMovePolicy": "Microsoft.ProviderHub.ResourceMovePolicy", + "azure.mgmt.providerhub.models.ResourceProviderAuthorization": "Microsoft.ProviderHub.ResourceProviderAuthorization", + "azure.mgmt.providerhub.models.ResourceProviderAuthorizationManagedByAuthorization": "Microsoft.ProviderHub.ResourceProviderAuthorizationManagedByAuthorization", + "azure.mgmt.providerhub.models.ResourceProviderAuthorizationRules": "Microsoft.ProviderHub.ResourceProviderAuthorizationRules", + "azure.mgmt.providerhub.models.ResourceProviderCapabilities": "Microsoft.ProviderHub.ResourceProviderCapabilities", + "azure.mgmt.providerhub.models.ResourceProviderEndpoint": "Microsoft.ProviderHub.ResourceProviderEndpoint", + "azure.mgmt.providerhub.models.ResourceProviderEndpointFeaturesRule": "Microsoft.ProviderHub.ResourceProviderEndpointFeaturesRule", + "azure.mgmt.providerhub.models.ResourceProviderManagement": "Microsoft.ProviderHub.ResourceProviderManagement", + "azure.mgmt.providerhub.models.ResourceProviderManagementErrorResponseMessageOptions": "Microsoft.ProviderHub.ResourceProviderManagementErrorResponseMessageOptions", + "azure.mgmt.providerhub.models.ResourceProviderManagementExpeditedRolloutMetadata": "Microsoft.ProviderHub.ResourceProviderManagementExpeditedRolloutMetadata", + "azure.mgmt.providerhub.models.ResourceProviderManifest": "Microsoft.ProviderHub.ResourceProviderManifest", + "azure.mgmt.providerhub.models.ResourceProviderManifestFeaturesRule": "Microsoft.ProviderHub.ResourceProviderManifestFeaturesRule", + "azure.mgmt.providerhub.models.ResourceProviderManifestManagement": "Microsoft.ProviderHub.ResourceProviderManifestManagement", + "azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesDstsConfiguration": "Microsoft.ProviderHub.ResourceProviderManifestPropertiesDstsConfiguration", + "azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesFeaturesRule": "Microsoft.ProviderHub.ResourceProviderManifestPropertiesFeaturesRule", + "azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesManagement": "Microsoft.ProviderHub.ResourceProviderManifestPropertiesManagement", + "azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesNotificationSettings": "Microsoft.ProviderHub.ResourceProviderManifestPropertiesNotificationSettings", + "azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesProviderAuthentication": "Microsoft.ProviderHub.ResourceProviderManifestPropertiesProviderAuthentication", + "azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesRequestHeaderOptions": "Microsoft.ProviderHub.ResourceProviderManifestPropertiesRequestHeaderOptions", + "azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove": "Microsoft.ProviderHub.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove", + "azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesResponseOptions": "Microsoft.ProviderHub.ResourceProviderManifestPropertiesResponseOptions", + "azure.mgmt.providerhub.models.TemplateDeploymentOptions": "Microsoft.ProviderHub.TemplateDeploymentOptions", + "azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesTemplateDeploymentOptions": "Microsoft.ProviderHub.ResourceProviderManifestPropertiesTemplateDeploymentOptions", + "azure.mgmt.providerhub.models.ResourceProviderManifestProviderAuthentication": "Microsoft.ProviderHub.ResourceProviderManifestProviderAuthentication", + "azure.mgmt.providerhub.models.ResourceProviderManifestRequestHeaderOptions": "Microsoft.ProviderHub.ResourceProviderManifestRequestHeaderOptions", + "azure.mgmt.providerhub.models.ResourceProviderManifestReRegisterSubscriptionMetadata": "Microsoft.ProviderHub.ResourceProviderManifestReRegisterSubscriptionMetadata", + "azure.mgmt.providerhub.models.ResourceProviderService": "Microsoft.ProviderHub.ResourceProviderService", + "azure.mgmt.providerhub.models.ResourceType": "Microsoft.ProviderHub.ResourceType", + "azure.mgmt.providerhub.models.ResourceTypeEndpoint": "Microsoft.ProviderHub.ResourceTypeEndpoint", + "azure.mgmt.providerhub.models.ResourceTypeEndpointBaseDstsConfiguration": "Microsoft.ProviderHub.ResourceTypeEndpointBaseDstsConfiguration", + "azure.mgmt.providerhub.models.ResourceTypeEndpointBaseFeaturesRule": "Microsoft.ProviderHub.ResourceTypeEndpointBaseFeaturesRule", + "azure.mgmt.providerhub.models.ResourceTypeEndpointDstsConfiguration": "Microsoft.ProviderHub.ResourceTypeEndpointDstsConfiguration", + "azure.mgmt.providerhub.models.ResourceTypeEndpointFeaturesRule": "Microsoft.ProviderHub.ResourceTypeEndpointFeaturesRule", + "azure.mgmt.providerhub.models.ResourceTypeExtension": "Microsoft.ProviderHub.ResourceTypeExtension", + "azure.mgmt.providerhub.models.ResourceTypeExtensionOptions": "Microsoft.ProviderHub.ResourceTypeExtensionOptions", + "azure.mgmt.providerhub.models.ResourceTypeExtensionOptionsResourceCreationBegin": "Microsoft.ProviderHub.ResourceTypeExtensionOptionsResourceCreationBegin", + "azure.mgmt.providerhub.models.ResourceTypeFeaturesRule": "Microsoft.ProviderHub.ResourceTypeFeaturesRule", + "azure.mgmt.providerhub.models.ResourceTypeIdentityManagement": "Microsoft.ProviderHub.ResourceTypeIdentityManagement", + "azure.mgmt.providerhub.models.ResourceTypeOnBehalfOfToken": "Microsoft.ProviderHub.ResourceTypeOnBehalfOfToken", + "azure.mgmt.providerhub.models.ResourceTypeRegistration": "Microsoft.ProviderHub.ResourceTypeRegistration", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationProperties": "Microsoft.ProviderHub.ResourceTypeRegistrationProperties", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesAvailabilityZoneRule": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesAvailabilityZoneRule", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesCapacityRule": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesCapacityRule", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesDstsConfiguration": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesDstsConfiguration", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesExtensionOptions": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesExtensionOptions", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesFeaturesRule": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesFeaturesRule", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesIdentityManagement": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesIdentityManagement", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesLegacyPolicy": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesLegacyPolicy", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesManagement": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesManagement", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesMarketplaceOptions": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesMarketplaceOptions", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesRequestHeaderOptions": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesRequestHeaderOptions", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceCache": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesResourceCache", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceGraphConfiguration": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesResourceGraphConfiguration", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptions": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesResourceManagementOptions", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceMovePolicy": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesResourceMovePolicy", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceQueryManagement": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesResourceQueryManagement", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesRoutingRule": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesRoutingRule", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesTemplateDeploymentOptions": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesTemplateDeploymentOptions", + "azure.mgmt.providerhub.models.TemplateDeploymentPolicy": "Microsoft.ProviderHub.TemplateDeploymentPolicy", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy": "Microsoft.ProviderHub.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy", + "azure.mgmt.providerhub.models.ResourceTypeRequestHeaderOptions": "Microsoft.ProviderHub.ResourceTypeRequestHeaderOptions", + "azure.mgmt.providerhub.models.ResourceTypeSku": "Microsoft.ProviderHub.ResourceTypeSku", + "azure.mgmt.providerhub.models.ResourceTypeTemplateDeploymentPolicy": "Microsoft.ProviderHub.ResourceTypeTemplateDeploymentPolicy", + "azure.mgmt.providerhub.models.ServiceTreeInfo": "Microsoft.ProviderHub.ServiceTreeInfo", + "azure.mgmt.providerhub.models.SkuCapability": "Microsoft.ProviderHub.SkuCapability", + "azure.mgmt.providerhub.models.SkuCapacity": "Microsoft.ProviderHub.SkuCapacity", + "azure.mgmt.providerhub.models.SkuCost": "Microsoft.ProviderHub.SkuCost", + "azure.mgmt.providerhub.models.SkuLocationInfo": "Microsoft.ProviderHub.SkuLocationInfo", + "azure.mgmt.providerhub.models.SkuResource": "Microsoft.ProviderHub.SkuResource", + "azure.mgmt.providerhub.models.SkuResourceProperties": "Microsoft.ProviderHub.SkuResourceProperties", + "azure.mgmt.providerhub.models.SkuSetting": "Microsoft.ProviderHub.SkuSetting", + "azure.mgmt.providerhub.models.SkuSettingCapacity": "Microsoft.ProviderHub.SkuSettingCapacity", + "azure.mgmt.providerhub.models.SkuZoneDetail": "Microsoft.ProviderHub.SkuZoneDetail", + "azure.mgmt.providerhub.models.SubscriberSetting": "Microsoft.ProviderHub.SubscriberSetting", + "azure.mgmt.providerhub.models.SubscriptionStateOverrideAction": "Microsoft.ProviderHub.SubscriptionStateOverrideAction", + "azure.mgmt.providerhub.models.SubscriptionStateRule": "Microsoft.ProviderHub.SubscriptionStateRule", + "azure.mgmt.providerhub.models.SwaggerSpecification": "Microsoft.ProviderHub.SwaggerSpecification", + "azure.mgmt.providerhub.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.providerhub.models.ThirdPartyExtension": "Microsoft.ProviderHub.ThirdPartyExtension", + "azure.mgmt.providerhub.models.ThrottlingMetric": "Microsoft.ProviderHub.ThrottlingMetric", + "azure.mgmt.providerhub.models.ThrottlingRule": "Microsoft.ProviderHub.ThrottlingRule", + "azure.mgmt.providerhub.models.TokenAuthConfiguration": "Microsoft.ProviderHub.TokenAuthConfiguration", + "azure.mgmt.providerhub.models.TypedErrorInfo": "Microsoft.ProviderHub.TypedErrorInfo", + "azure.mgmt.providerhub.models.OperationOrigins": "Microsoft.ProviderHub.OperationOrigins", + "azure.mgmt.providerhub.models.OperationActionType": "Microsoft.ProviderHub.OperationActionType", + "azure.mgmt.providerhub.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.providerhub.models.ProvisioningState": "Microsoft.ProviderHub.ProvisioningState", + "azure.mgmt.providerhub.models.ServiceStatus": "Microsoft.ProviderHub.ServiceStatus", + "azure.mgmt.providerhub.models.ResourceProviderType": "Microsoft.ProviderHub.ResourceProviderType", + "azure.mgmt.providerhub.models.FeaturesPolicy": "Microsoft.ProviderHub.FeaturesPolicy", + "azure.mgmt.providerhub.models.OptInHeaderType": "Microsoft.ProviderHub.OptInHeaderType", + "azure.mgmt.providerhub.models.OptOutHeaderType": "Microsoft.ProviderHub.OptOutHeaderType", + "azure.mgmt.providerhub.models.Readiness": "Microsoft.ProviderHub.Readiness", + "azure.mgmt.providerhub.models.ResourceAccessPolicy": "Microsoft.ProviderHub.ResourceAccessPolicy", + "azure.mgmt.providerhub.models.ServerFailureResponseMessageType": "Microsoft.ProviderHub.ServerFailureResponseMessageType", + "azure.mgmt.providerhub.models.ExpeditedRolloutIntent": "Microsoft.ProviderHub.ExpeditedRolloutIntent", + "azure.mgmt.providerhub.models.ResourceProviderCapabilitiesEffect": "Microsoft.ProviderHub.ResourceProviderCapabilitiesEffect", + "azure.mgmt.providerhub.models.CrossTenantTokenValidation": "Microsoft.ProviderHub.CrossTenantTokenValidation", + "azure.mgmt.providerhub.models.PreflightOption": "Microsoft.ProviderHub.PreflightOption", + "azure.mgmt.providerhub.models.EndpointType": "Microsoft.ProviderHub.EndpointType", + "azure.mgmt.providerhub.models.NotificationType": "Microsoft.ProviderHub.NotificationType", + "azure.mgmt.providerhub.models.SkipNotifications": "Microsoft.ProviderHub.SkipNotifications", + "azure.mgmt.providerhub.models.AuthenticationScheme": "Microsoft.ProviderHub.AuthenticationScheme", + "azure.mgmt.providerhub.models.SignedRequestScope": "Microsoft.ProviderHub.SignedRequestScope", + "azure.mgmt.providerhub.models.AdditionalOptionsAsyncOperation": "Microsoft.ProviderHub.AdditionalOptionsAsyncOperation", + "azure.mgmt.providerhub.models.NotificationOptions": "Microsoft.ProviderHub.NotificationOptions", + "azure.mgmt.providerhub.models.NotificationEndpointType": "Microsoft.ProviderHub.NotificationEndpointType", + "azure.mgmt.providerhub.models.BlockActionVerb": "Microsoft.ProviderHub.BlockActionVerb", + "azure.mgmt.providerhub.models.ServiceClientOptionsType": "Microsoft.ProviderHub.ServiceClientOptionsType", + "azure.mgmt.providerhub.models.SubscriptionTransitioningState": "Microsoft.ProviderHub.SubscriptionTransitioningState", + "azure.mgmt.providerhub.models.SubscriptionNotificationOperation": "Microsoft.ProviderHub.SubscriptionNotificationOperation", + "azure.mgmt.providerhub.models.ProviderRegistrationKind": "Microsoft.ProviderHub.ProviderRegistrationKind", + "azure.mgmt.providerhub.models.RoutingType": "Microsoft.ProviderHub.RoutingType", + "azure.mgmt.providerhub.models.AdditionalOptionsResourceTypeRegistration": "Microsoft.ProviderHub.AdditionalOptionsResourceTypeRegistration", + "azure.mgmt.providerhub.models.Regionality": "Microsoft.ProviderHub.Regionality", + "azure.mgmt.providerhub.models.ResourceTypeEndpointKind": "Microsoft.ProviderHub.ResourceTypeEndpointKind", + "azure.mgmt.providerhub.models.ExtensionCategory": "Microsoft.ProviderHub.ExtensionCategory", + "azure.mgmt.providerhub.models.EndpointTypeResourceType": "Microsoft.ProviderHub.EndpointTypeResourceType", + "azure.mgmt.providerhub.models.DataBoundary": "Microsoft.ProviderHub.DataBoundary", + "azure.mgmt.providerhub.models.ExtensionOptionType": "Microsoft.ProviderHub.ExtensionOptionType", + "azure.mgmt.providerhub.models.MarketplaceType": "Microsoft.ProviderHub.MarketplaceType", + "azure.mgmt.providerhub.models.Intent": "Microsoft.ProviderHub.Intent", + "azure.mgmt.providerhub.models.LoggingDirections": "Microsoft.ProviderHub.LoggingDirections", + "azure.mgmt.providerhub.models.LoggingDetails": "Microsoft.ProviderHub.LoggingDetails", + "azure.mgmt.providerhub.models.ThrottlingMetricType": "Microsoft.ProviderHub.ThrottlingMetricType", + "azure.mgmt.providerhub.models.IdentityManagementTypes": "Microsoft.ProviderHub.IdentityManagementTypes", + "azure.mgmt.providerhub.models.SubscriptionState": "Microsoft.ProviderHub.SubscriptionState", + "azure.mgmt.providerhub.models.ExtendedLocationType": "Microsoft.ProviderHub.ExtendedLocationType", + "azure.mgmt.providerhub.models.ResourceTypeExtendedLocationPolicy": "Microsoft.ProviderHub.ResourceTypeExtendedLocationPolicy", + "azure.mgmt.providerhub.models.ResourceDeletionPolicy": "Microsoft.ProviderHub.ResourceDeletionPolicy", + "azure.mgmt.providerhub.models.Policy": "Microsoft.ProviderHub.Policy", + "azure.mgmt.providerhub.models.ResourceTypeCategory": "Microsoft.ProviderHub.ResourceTypeCategory", + "azure.mgmt.providerhub.models.ResourceValidation": "Microsoft.ProviderHub.ResourceValidation", + "azure.mgmt.providerhub.models.QuotaPolicy": "Microsoft.ProviderHub.QuotaPolicy", + "azure.mgmt.providerhub.models.TemplateDeploymentCapabilities": "Microsoft.ProviderHub.TemplateDeploymentCapabilities", + "azure.mgmt.providerhub.models.TemplateDeploymentPreflightOptions": "Microsoft.ProviderHub.TemplateDeploymentPreflightOptions", + "azure.mgmt.providerhub.models.TemplateDeploymentPreflightNotifications": "Microsoft.ProviderHub.TemplateDeploymentPreflightNotifications", + "azure.mgmt.providerhub.models.PolicyExecutionType": "Microsoft.ProviderHub.PolicyExecutionType", + "azure.mgmt.providerhub.models.AvailabilityZonePolicy": "Microsoft.ProviderHub.AvailabilityZonePolicy", + "azure.mgmt.providerhub.models.LinkedOperation": "Microsoft.ProviderHub.LinkedOperation", + "azure.mgmt.providerhub.models.LinkedAction": "Microsoft.ProviderHub.LinkedAction", + "azure.mgmt.providerhub.models.LegacyOperation": "Microsoft.ProviderHub.LegacyOperation", + "azure.mgmt.providerhub.models.CapacityPolicy": "Microsoft.ProviderHub.CapacityPolicy", + "azure.mgmt.providerhub.models.FilterOption": "Microsoft.ProviderHub.FilterOption", + "azure.mgmt.providerhub.models.SupportedOperations": "Microsoft.ProviderHub.SupportedOperations", + "azure.mgmt.providerhub.models.CommonApiVersionsMergeMode": "Microsoft.ProviderHub.CommonApiVersionsMergeMode", + "azure.mgmt.providerhub.models.FrontdoorRequestMode": "Microsoft.ProviderHub.FrontdoorRequestMode", + "azure.mgmt.providerhub.models.ResourceSubType": "Microsoft.ProviderHub.ResourceSubType", + "azure.mgmt.providerhub.models.ResourceTypeRegistrationKind": "Microsoft.ProviderHub.ResourceTypeRegistrationKind", + "azure.mgmt.providerhub.models.TrafficRegionCategory": "Microsoft.ProviderHub.TrafficRegionCategory", + "azure.mgmt.providerhub.models.SubscriptionReregistrationResult": "Microsoft.ProviderHub.SubscriptionReregistrationResult", + "azure.mgmt.providerhub.models.AvailableCheckInManifestEnvironment": "Microsoft.ProviderHub.AvailableCheckInManifestEnvironment", + "azure.mgmt.providerhub.models.ServiceFeatureFlagAction": "Microsoft.ProviderHub.ServiceFeatureFlagAction", + "azure.mgmt.providerhub.models.AdditionalOptions": "Microsoft.ProviderHub.AdditionalOptions", + "azure.mgmt.providerhub.models.ManifestResourceDeletionPolicy": "Microsoft.ProviderHub.ManifestResourceDeletionPolicy", + "azure.mgmt.providerhub.models.NotificationMode": "Microsoft.ProviderHub.NotificationMode", + "azure.mgmt.providerhub.models.MessageScope": "Microsoft.ProviderHub.MessageScope", + "azure.mgmt.providerhub.models.SkuScaleType": "Microsoft.ProviderHub.SkuScaleType", + "azure.mgmt.providerhub.models.Role": "Microsoft.ProviderHub.Role", + "azure.mgmt.providerhub.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.providerhub.aio.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list", + "azure.mgmt.providerhub.operations.Operations.list_by_provider_registration": "Microsoft.ProviderHub.OperationsPutContents.listByProviderRegistration", + "azure.mgmt.providerhub.aio.operations.Operations.list_by_provider_registration": "Microsoft.ProviderHub.OperationsPutContents.listByProviderRegistration", + "azure.mgmt.providerhub.operations.Operations.create_or_update": "Microsoft.ProviderHub.OperationsPutContents.createOrUpdate", + "azure.mgmt.providerhub.aio.operations.Operations.create_or_update": "Microsoft.ProviderHub.OperationsPutContents.createOrUpdate", + "azure.mgmt.providerhub.operations.Operations.delete": "Microsoft.ProviderHub.OperationsPutContents.delete", + "azure.mgmt.providerhub.aio.operations.Operations.delete": "Microsoft.ProviderHub.OperationsPutContents.delete", + "azure.mgmt.providerhub.operations.CustomRolloutsOperations.get": "Microsoft.ProviderHub.CustomRollouts.get", + "azure.mgmt.providerhub.aio.operations.CustomRolloutsOperations.get": "Microsoft.ProviderHub.CustomRollouts.get", + "azure.mgmt.providerhub.operations.CustomRolloutsOperations.begin_create_or_update": "Microsoft.ProviderHub.CustomRollouts.createOrUpdate", + "azure.mgmt.providerhub.aio.operations.CustomRolloutsOperations.begin_create_or_update": "Microsoft.ProviderHub.CustomRollouts.createOrUpdate", + "azure.mgmt.providerhub.operations.CustomRolloutsOperations.delete": "Microsoft.ProviderHub.CustomRollouts.delete", + "azure.mgmt.providerhub.aio.operations.CustomRolloutsOperations.delete": "Microsoft.ProviderHub.CustomRollouts.delete", + "azure.mgmt.providerhub.operations.CustomRolloutsOperations.list_by_provider_registration": "Microsoft.ProviderHub.CustomRollouts.listByProviderRegistration", + "azure.mgmt.providerhub.aio.operations.CustomRolloutsOperations.list_by_provider_registration": "Microsoft.ProviderHub.CustomRollouts.listByProviderRegistration", + "azure.mgmt.providerhub.operations.CustomRolloutsOperations.stop": "Microsoft.ProviderHub.CustomRollouts.stop", + "azure.mgmt.providerhub.aio.operations.CustomRolloutsOperations.stop": "Microsoft.ProviderHub.CustomRollouts.stop", + "azure.mgmt.providerhub.operations.NewRegionFrontloadReleaseOperations.get": "Microsoft.ProviderHub.NewRegionFrontloadRelease.get", + "azure.mgmt.providerhub.aio.operations.NewRegionFrontloadReleaseOperations.get": "Microsoft.ProviderHub.NewRegionFrontloadRelease.get", + "azure.mgmt.providerhub.operations.NewRegionFrontloadReleaseOperations.create_or_update": "Microsoft.ProviderHub.NewRegionFrontloadRelease.createOrUpdate", + "azure.mgmt.providerhub.aio.operations.NewRegionFrontloadReleaseOperations.create_or_update": "Microsoft.ProviderHub.NewRegionFrontloadRelease.createOrUpdate", + "azure.mgmt.providerhub.operations.NewRegionFrontloadReleaseOperations.stop": "Microsoft.ProviderHub.NewRegionFrontloadRelease.stop", + "azure.mgmt.providerhub.aio.operations.NewRegionFrontloadReleaseOperations.stop": "Microsoft.ProviderHub.NewRegionFrontloadRelease.stop", + "azure.mgmt.providerhub.operations.NewRegionFrontloadReleaseOperations.generate_manifest": "Microsoft.ProviderHub.ProviderRegistrations.newRegionFrontloadReleaseGenerateManifest", + "azure.mgmt.providerhub.aio.operations.NewRegionFrontloadReleaseOperations.generate_manifest": "Microsoft.ProviderHub.ProviderRegistrations.newRegionFrontloadReleaseGenerateManifest", + "azure.mgmt.providerhub.operations.ProviderRegistrationsOperations.get": "Microsoft.ProviderHub.ProviderRegistrations.get", + "azure.mgmt.providerhub.aio.operations.ProviderRegistrationsOperations.get": "Microsoft.ProviderHub.ProviderRegistrations.get", + "azure.mgmt.providerhub.operations.ProviderRegistrationsOperations.begin_create_or_update": "Microsoft.ProviderHub.ProviderRegistrations.createOrUpdate", + "azure.mgmt.providerhub.aio.operations.ProviderRegistrationsOperations.begin_create_or_update": "Microsoft.ProviderHub.ProviderRegistrations.createOrUpdate", + "azure.mgmt.providerhub.operations.ProviderRegistrationsOperations.delete": "Microsoft.ProviderHub.ProviderRegistrations.delete", + "azure.mgmt.providerhub.aio.operations.ProviderRegistrationsOperations.delete": "Microsoft.ProviderHub.ProviderRegistrations.delete", + "azure.mgmt.providerhub.operations.ProviderRegistrationsOperations.list": "Microsoft.ProviderHub.ProviderRegistrations.list", + "azure.mgmt.providerhub.aio.operations.ProviderRegistrationsOperations.list": "Microsoft.ProviderHub.ProviderRegistrations.list", + "azure.mgmt.providerhub.operations.ProviderRegistrationsOperations.generate_operations": "Microsoft.ProviderHub.ProviderRegistrations.generateOperations", + "azure.mgmt.providerhub.aio.operations.ProviderRegistrationsOperations.generate_operations": "Microsoft.ProviderHub.ProviderRegistrations.generateOperations", + "azure.mgmt.providerhub.operations.DefaultRolloutsOperations.get": "Microsoft.ProviderHub.DefaultRollouts.get", + "azure.mgmt.providerhub.aio.operations.DefaultRolloutsOperations.get": "Microsoft.ProviderHub.DefaultRollouts.get", + "azure.mgmt.providerhub.operations.DefaultRolloutsOperations.begin_create_or_update": "Microsoft.ProviderHub.DefaultRollouts.createOrUpdate", + "azure.mgmt.providerhub.aio.operations.DefaultRolloutsOperations.begin_create_or_update": "Microsoft.ProviderHub.DefaultRollouts.createOrUpdate", + "azure.mgmt.providerhub.operations.DefaultRolloutsOperations.delete": "Microsoft.ProviderHub.DefaultRollouts.delete", + "azure.mgmt.providerhub.aio.operations.DefaultRolloutsOperations.delete": "Microsoft.ProviderHub.DefaultRollouts.delete", + "azure.mgmt.providerhub.operations.DefaultRolloutsOperations.list_by_provider_registration": "Microsoft.ProviderHub.DefaultRollouts.listByProviderRegistration", + "azure.mgmt.providerhub.aio.operations.DefaultRolloutsOperations.list_by_provider_registration": "Microsoft.ProviderHub.DefaultRollouts.listByProviderRegistration", + "azure.mgmt.providerhub.operations.DefaultRolloutsOperations.stop": "Microsoft.ProviderHub.DefaultRollouts.stop", + "azure.mgmt.providerhub.aio.operations.DefaultRolloutsOperations.stop": "Microsoft.ProviderHub.DefaultRollouts.stop", + "azure.mgmt.providerhub.operations.NotificationRegistrationsOperations.get": "Microsoft.ProviderHub.NotificationRegistrations.get", + "azure.mgmt.providerhub.aio.operations.NotificationRegistrationsOperations.get": "Microsoft.ProviderHub.NotificationRegistrations.get", + "azure.mgmt.providerhub.operations.NotificationRegistrationsOperations.create_or_update": "Microsoft.ProviderHub.NotificationRegistrations.createOrUpdate", + "azure.mgmt.providerhub.aio.operations.NotificationRegistrationsOperations.create_or_update": "Microsoft.ProviderHub.NotificationRegistrations.createOrUpdate", + "azure.mgmt.providerhub.operations.NotificationRegistrationsOperations.delete": "Microsoft.ProviderHub.NotificationRegistrations.delete", + "azure.mgmt.providerhub.aio.operations.NotificationRegistrationsOperations.delete": "Microsoft.ProviderHub.NotificationRegistrations.delete", + "azure.mgmt.providerhub.operations.NotificationRegistrationsOperations.list_by_provider_registration": "Microsoft.ProviderHub.NotificationRegistrations.listByProviderRegistration", + "azure.mgmt.providerhub.aio.operations.NotificationRegistrationsOperations.list_by_provider_registration": "Microsoft.ProviderHub.NotificationRegistrations.listByProviderRegistration", + "azure.mgmt.providerhub.operations.ResourceTypeRegistrationsOperations.get": "Microsoft.ProviderHub.ResourceTypeRegistrations.get", + "azure.mgmt.providerhub.aio.operations.ResourceTypeRegistrationsOperations.get": "Microsoft.ProviderHub.ResourceTypeRegistrations.get", + "azure.mgmt.providerhub.operations.ResourceTypeRegistrationsOperations.begin_create_or_update": "Microsoft.ProviderHub.ResourceTypeRegistrations.createOrUpdate", + "azure.mgmt.providerhub.aio.operations.ResourceTypeRegistrationsOperations.begin_create_or_update": "Microsoft.ProviderHub.ResourceTypeRegistrations.createOrUpdate", + "azure.mgmt.providerhub.operations.ResourceTypeRegistrationsOperations.begin_delete": "Microsoft.ProviderHub.ResourceTypeRegistrations.delete", + "azure.mgmt.providerhub.aio.operations.ResourceTypeRegistrationsOperations.begin_delete": "Microsoft.ProviderHub.ResourceTypeRegistrations.delete", + "azure.mgmt.providerhub.operations.ResourceTypeRegistrationsOperations.list_by_provider_registration": "Microsoft.ProviderHub.ResourceTypeRegistrations.listByProviderRegistration", + "azure.mgmt.providerhub.aio.operations.ResourceTypeRegistrationsOperations.list_by_provider_registration": "Microsoft.ProviderHub.ResourceTypeRegistrations.listByProviderRegistration", + "azure.mgmt.providerhub.operations.SkusOperations.get_nested_resource_type_first": "Microsoft.ProviderHub.Skus.getNestedResourceTypeFirst", + "azure.mgmt.providerhub.aio.operations.SkusOperations.get_nested_resource_type_first": "Microsoft.ProviderHub.Skus.getNestedResourceTypeFirst", + "azure.mgmt.providerhub.operations.SkusOperations.create_or_update_nested_resource_type_first": "Microsoft.ProviderHub.Skus.createOrUpdateNestedResourceTypeFirst", + "azure.mgmt.providerhub.aio.operations.SkusOperations.create_or_update_nested_resource_type_first": "Microsoft.ProviderHub.Skus.createOrUpdateNestedResourceTypeFirst", + "azure.mgmt.providerhub.operations.SkusOperations.delete_nested_resource_type_first": "Microsoft.ProviderHub.Skus.deleteNestedResourceTypeFirst", + "azure.mgmt.providerhub.aio.operations.SkusOperations.delete_nested_resource_type_first": "Microsoft.ProviderHub.Skus.deleteNestedResourceTypeFirst", + "azure.mgmt.providerhub.operations.SkusOperations.list_by_resource_type_registrations_nested_resource_type_first": "Microsoft.ProviderHub.Skus.listByResourceTypeRegistrationsNestedResourceTypeFirst", + "azure.mgmt.providerhub.aio.operations.SkusOperations.list_by_resource_type_registrations_nested_resource_type_first": "Microsoft.ProviderHub.Skus.listByResourceTypeRegistrationsNestedResourceTypeFirst", + "azure.mgmt.providerhub.operations.SkusOperations.get": "Microsoft.ProviderHub.SkuResources.get", + "azure.mgmt.providerhub.aio.operations.SkusOperations.get": "Microsoft.ProviderHub.SkuResources.get", + "azure.mgmt.providerhub.operations.SkusOperations.create_or_update": "Microsoft.ProviderHub.SkuResources.createOrUpdate", + "azure.mgmt.providerhub.aio.operations.SkusOperations.create_or_update": "Microsoft.ProviderHub.SkuResources.createOrUpdate", + "azure.mgmt.providerhub.operations.SkusOperations.delete": "Microsoft.ProviderHub.SkuResources.delete", + "azure.mgmt.providerhub.aio.operations.SkusOperations.delete": "Microsoft.ProviderHub.SkuResources.delete", + "azure.mgmt.providerhub.operations.SkusOperations.list_by_resource_type_registrations": "Microsoft.ProviderHub.SkuResources.listByResourceTypeRegistrations", + "azure.mgmt.providerhub.aio.operations.SkusOperations.list_by_resource_type_registrations": "Microsoft.ProviderHub.SkuResources.listByResourceTypeRegistrations", + "azure.mgmt.providerhub.operations.SkusOperations.get_nested_resource_type_second": "Microsoft.ProviderHub.SkuResourceOperations.getNestedResourceTypeSecond", + "azure.mgmt.providerhub.aio.operations.SkusOperations.get_nested_resource_type_second": "Microsoft.ProviderHub.SkuResourceOperations.getNestedResourceTypeSecond", + "azure.mgmt.providerhub.operations.SkusOperations.create_or_update_nested_resource_type_second": "Microsoft.ProviderHub.SkuResourceOperations.createOrUpdateNestedResourceTypeSecond", + "azure.mgmt.providerhub.aio.operations.SkusOperations.create_or_update_nested_resource_type_second": "Microsoft.ProviderHub.SkuResourceOperations.createOrUpdateNestedResourceTypeSecond", + "azure.mgmt.providerhub.operations.SkusOperations.delete_nested_resource_type_second": "Microsoft.ProviderHub.SkuResourceOperations.deleteNestedResourceTypeSecond", + "azure.mgmt.providerhub.aio.operations.SkusOperations.delete_nested_resource_type_second": "Microsoft.ProviderHub.SkuResourceOperations.deleteNestedResourceTypeSecond", + "azure.mgmt.providerhub.operations.SkusOperations.list_by_resource_type_registrations_nested_resource_type_second": "Microsoft.ProviderHub.SkuResourceOperations.listByResourceTypeRegistrationsNestedResourceTypeSecond", + "azure.mgmt.providerhub.aio.operations.SkusOperations.list_by_resource_type_registrations_nested_resource_type_second": "Microsoft.ProviderHub.SkuResourceOperations.listByResourceTypeRegistrationsNestedResourceTypeSecond", + "azure.mgmt.providerhub.operations.SkusOperations.get_nested_resource_type_third": "Microsoft.ProviderHub.SkuResourceOperationGroup.getNestedResourceTypeThird", + "azure.mgmt.providerhub.aio.operations.SkusOperations.get_nested_resource_type_third": "Microsoft.ProviderHub.SkuResourceOperationGroup.getNestedResourceTypeThird", + "azure.mgmt.providerhub.operations.SkusOperations.create_or_update_nested_resource_type_third": "Microsoft.ProviderHub.SkuResourceOperationGroup.createOrUpdateNestedResourceTypeThird", + "azure.mgmt.providerhub.aio.operations.SkusOperations.create_or_update_nested_resource_type_third": "Microsoft.ProviderHub.SkuResourceOperationGroup.createOrUpdateNestedResourceTypeThird", + "azure.mgmt.providerhub.operations.SkusOperations.delete_nested_resource_type_third": "Microsoft.ProviderHub.SkuResourceOperationGroup.deleteNestedResourceTypeThird", + "azure.mgmt.providerhub.aio.operations.SkusOperations.delete_nested_resource_type_third": "Microsoft.ProviderHub.SkuResourceOperationGroup.deleteNestedResourceTypeThird", + "azure.mgmt.providerhub.operations.SkusOperations.list_by_resource_type_registrations_nested_resource_type_third": "Microsoft.ProviderHub.SkuResourceOperationGroup.listByResourceTypeRegistrationsNestedResourceTypeThird", + "azure.mgmt.providerhub.aio.operations.SkusOperations.list_by_resource_type_registrations_nested_resource_type_third": "Microsoft.ProviderHub.SkuResourceOperationGroup.listByResourceTypeRegistrationsNestedResourceTypeThird", + "azure.mgmt.providerhub.operations.AuthorizedApplicationsOperations.get": "Microsoft.ProviderHub.AuthorizedApplications.get", + "azure.mgmt.providerhub.aio.operations.AuthorizedApplicationsOperations.get": "Microsoft.ProviderHub.AuthorizedApplications.get", + "azure.mgmt.providerhub.operations.AuthorizedApplicationsOperations.begin_create_or_update": "Microsoft.ProviderHub.AuthorizedApplications.createOrUpdate", + "azure.mgmt.providerhub.aio.operations.AuthorizedApplicationsOperations.begin_create_or_update": "Microsoft.ProviderHub.AuthorizedApplications.createOrUpdate", + "azure.mgmt.providerhub.operations.AuthorizedApplicationsOperations.delete": "Microsoft.ProviderHub.AuthorizedApplications.delete", + "azure.mgmt.providerhub.aio.operations.AuthorizedApplicationsOperations.delete": "Microsoft.ProviderHub.AuthorizedApplications.delete", + "azure.mgmt.providerhub.operations.AuthorizedApplicationsOperations.list": "Microsoft.ProviderHub.AuthorizedApplications.list", + "azure.mgmt.providerhub.aio.operations.AuthorizedApplicationsOperations.list": "Microsoft.ProviderHub.AuthorizedApplications.list", + "azure.mgmt.providerhub.operations.ProviderMonitorSettingsOperations.get": "Microsoft.ProviderHub.ProviderMonitorSettings.get", + "azure.mgmt.providerhub.aio.operations.ProviderMonitorSettingsOperations.get": "Microsoft.ProviderHub.ProviderMonitorSettings.get", + "azure.mgmt.providerhub.operations.ProviderMonitorSettingsOperations.begin_create": "Microsoft.ProviderHub.ProviderMonitorSettings.create", + "azure.mgmt.providerhub.aio.operations.ProviderMonitorSettingsOperations.begin_create": "Microsoft.ProviderHub.ProviderMonitorSettings.create", + "azure.mgmt.providerhub.operations.ProviderMonitorSettingsOperations.update": "Microsoft.ProviderHub.ProviderMonitorSettings.update", + "azure.mgmt.providerhub.aio.operations.ProviderMonitorSettingsOperations.update": "Microsoft.ProviderHub.ProviderMonitorSettings.update", + "azure.mgmt.providerhub.operations.ProviderMonitorSettingsOperations.delete": "Microsoft.ProviderHub.ProviderMonitorSettings.delete", + "azure.mgmt.providerhub.aio.operations.ProviderMonitorSettingsOperations.delete": "Microsoft.ProviderHub.ProviderMonitorSettings.delete", + "azure.mgmt.providerhub.operations.ProviderMonitorSettingsOperations.list_by_resource_group": "Microsoft.ProviderHub.ProviderMonitorSettings.listByResourceGroup", + "azure.mgmt.providerhub.aio.operations.ProviderMonitorSettingsOperations.list_by_resource_group": "Microsoft.ProviderHub.ProviderMonitorSettings.listByResourceGroup", + "azure.mgmt.providerhub.operations.ProviderMonitorSettingsOperations.list_by_subscription": "Microsoft.ProviderHub.ProviderMonitorSettings.listBySubscription", + "azure.mgmt.providerhub.aio.operations.ProviderMonitorSettingsOperations.list_by_subscription": "Microsoft.ProviderHub.ProviderMonitorSettings.listBySubscription", + "azure.mgmt.providerhub.operations.ResourceActionsOperations.begin_delete_resources": "Microsoft.ProviderHub.ProviderRegistrations.deleteResources", + "azure.mgmt.providerhub.aio.operations.ResourceActionsOperations.begin_delete_resources": "Microsoft.ProviderHub.ProviderRegistrations.deleteResources", + "azure.mgmt.providerhub.ProviderHubMgmtClient.generate_manifest": "Microsoft.ProviderHub.ProviderRegistrations.generateManifest", + "azure.mgmt.providerhub.aio.ProviderHubMgmtClient.generate_manifest": "Microsoft.ProviderHub.ProviderRegistrations.generateManifest", + "azure.mgmt.providerhub.ProviderHubMgmtClient.checkin_manifest": "Microsoft.ProviderHub.ProviderRegistrations.checkinManifest", + "azure.mgmt.providerhub.aio.ProviderHubMgmtClient.checkin_manifest": "Microsoft.ProviderHub.ProviderRegistrations.checkinManifest" + }, + "CrossLanguageVersion": "ccdf900e4c3a" +} \ No newline at end of file diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/__init__.py b/sdk/providerhub/azure-mgmt-providerhub/azure/__init__.py new file mode 100644 index 000000000000..d55ccad1f573 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/__init__.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/__init__.py new file mode 100644 index 000000000000..d55ccad1f573 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/__init__.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/__init__.py new file mode 100644 index 000000000000..eff6c2ffff68 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/__init__.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ProviderHubMgmtClient # type: ignore +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ProviderHubMgmtClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_client.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_client.py new file mode 100644 index 000000000000..95dabb21803c --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_client.py @@ -0,0 +1,204 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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 copy import deepcopy +import sys +from typing import Any, Optional, TYPE_CHECKING, cast + +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 ._configuration import ProviderHubMgmtClientConfiguration +from ._utils.serialization import Deserializer, Serializer +from .operations import ( + AuthorizedApplicationsOperations, + CustomRolloutsOperations, + DefaultRolloutsOperations, + NewRegionFrontloadReleaseOperations, + NotificationRegistrationsOperations, + Operations, + ProviderMonitorSettingsOperations, + ProviderRegistrationsOperations, + ResourceActionsOperations, + ResourceTypeRegistrationsOperations, + SkusOperations, + _ProviderHubMgmtClientOperationsMixin, +) + +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 + + +class ProviderHubMgmtClient(_ProviderHubMgmtClientOperationsMixin): # pylint: disable=too-many-instance-attributes + """Provider Hub. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.providerhub.operations.Operations + :ivar custom_rollouts: CustomRolloutsOperations operations + :vartype custom_rollouts: azure.mgmt.providerhub.operations.CustomRolloutsOperations + :ivar new_region_frontload_release: NewRegionFrontloadReleaseOperations operations + :vartype new_region_frontload_release: + azure.mgmt.providerhub.operations.NewRegionFrontloadReleaseOperations + :ivar provider_registrations: ProviderRegistrationsOperations operations + :vartype provider_registrations: + azure.mgmt.providerhub.operations.ProviderRegistrationsOperations + :ivar default_rollouts: DefaultRolloutsOperations operations + :vartype default_rollouts: azure.mgmt.providerhub.operations.DefaultRolloutsOperations + :ivar notification_registrations: NotificationRegistrationsOperations operations + :vartype notification_registrations: + azure.mgmt.providerhub.operations.NotificationRegistrationsOperations + :ivar resource_type_registrations: ResourceTypeRegistrationsOperations operations + :vartype resource_type_registrations: + azure.mgmt.providerhub.operations.ResourceTypeRegistrationsOperations + :ivar skus: SkusOperations operations + :vartype skus: azure.mgmt.providerhub.operations.SkusOperations + :ivar authorized_applications: AuthorizedApplicationsOperations operations + :vartype authorized_applications: + azure.mgmt.providerhub.operations.AuthorizedApplicationsOperations + :ivar provider_monitor_settings: ProviderMonitorSettingsOperations operations + :vartype provider_monitor_settings: + azure.mgmt.providerhub.operations.ProviderMonitorSettingsOperations + :ivar resource_actions: ResourceActionsOperations operations + :vartype resource_actions: azure.mgmt.providerhub.operations.ResourceActionsOperations + :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 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: The API version to use for this operation. Known values are "2024-09-01" + 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. + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + 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: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) + self._config = ProviderHubMgmtClientConfiguration( + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + 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), + 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, _endpoint), policies=_policies, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.custom_rollouts = CustomRolloutsOperations(self._client, self._config, self._serialize, self._deserialize) + self.new_region_frontload_release = NewRegionFrontloadReleaseOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.provider_registrations = ProviderRegistrationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.default_rollouts = DefaultRolloutsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.notification_registrations = NotificationRegistrationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resource_type_registrations = ResourceTypeRegistrationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.authorized_applications = AuthorizedApplicationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.provider_monitor_settings = ProviderMonitorSettingsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resource_actions = ResourceActionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + 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) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + 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: + self._client.close() + + def __enter__(self) -> Self: + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_configuration.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_configuration.py new file mode 100644 index 000000000000..754938e819e8 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_configuration.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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 typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + from azure.core import AzureClouds + from azure.core.credentials import TokenCredential + + +class ProviderHubMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for ProviderHubMgmtClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :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: The API version to use for this operation. Known values are "2024-09-01" + 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 + """ + + 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", "2024-09-01") + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + 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"]) + kwargs.setdefault("sdk_moniker", "mgmt-providerhub/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + 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.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( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_patch.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_patch.py new file mode 100644 index 000000000000..87676c65a8f0 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_patch.py @@ -0,0 +1,21 @@ +# coding=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 +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/__init__.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/__init__.py new file mode 100644 index 000000000000..8026245c2abc --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/model_base.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/model_base.py new file mode 100644 index 000000000000..b93f5120d517 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/model_base.py @@ -0,0 +1,1770 @@ +# 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_duration(td: timedelta, format: typing.Optional[str] = None): + """Serialize a timedelta to its wire representation. + + For the ``seconds``/``milliseconds`` encodings the value is converted to a + numeric value, otherwise it falls back to an ISO 8601 duration string. + + :param timedelta td: The timedelta to serialize. + :param str format: The duration encoding format. + :rtype: int or float or str + :return: serialized duration + """ + seconds = td.total_seconds() + if format == "duration-seconds-int": + return int(seconds) + if format == "duration-seconds-float": + return seconds + if format == "duration-milliseconds-int": + return int(seconds * 1000) + if format == "duration-milliseconds-float": + return seconds * 1000 + return _timedelta_as_isostr(td) + + +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_duration_numeric(attr, unit): + if isinstance(attr, timedelta): + return attr + return timedelta(**{unit: float(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, + "duration-seconds-int": functools.partial(_deserialize_duration_numeric, unit="seconds"), + "duration-seconds-float": functools.partial(_deserialize_duration_numeric, unit="seconds"), + "duration-milliseconds-int": functools.partial(_deserialize_duration_numeric, unit="milliseconds"), + "duration-milliseconds-float": functools.partial(_deserialize_duration_numeric, unit="milliseconds"), +} + + +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 _serialize_duration(o, format) + 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/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/serialization.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/serialization.py new file mode 100644 index 000000000000..75906e2eb77f --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/serialization.py @@ -0,0 +1,2175 @@ +# 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. +# -------------------------------------------------------------------------- + +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + MutableMapping, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore + +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] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :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 + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) from err + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + 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 + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + 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 + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + 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 + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + +TZ_UTC = datetime.timezone.utc + +_FLATTEN = re.compile(r"(? None: + 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): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """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. + + :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: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + 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 server from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + 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 + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + 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, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + 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( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + 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: # 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, 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 + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def from_dict( + cls, + data: Any, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> Self: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + 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 + :rtype: Self + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) # type: ignore + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + 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. + + :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.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: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + 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: # pylint: disable=too-many-public-methods + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "duration-seconds-int": Serializer.serialize_duration_seconds_int, + "duration-seconds-float": Serializer.serialize_duration_seconds_float, + "duration-milliseconds-int": Serializer.serialize_duration_milliseconds_int, + "duration-milliseconds-float": Serializer.serialize_duration_milliseconds_float, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: dict[str, type] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + 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 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. + :returns: The serialized data. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() # pylint: disable=protected-access + try: + 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( # 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 |= target_obj.additional_properties + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + 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 "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + 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 SerializationError(msg) from err + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :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 + :returns: The serialized request body + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access + except DeserializationError as 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 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 + :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) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + output = output.replace("{", quote("{")).replace("}", quote("}")) + else: + output = quote(str(output), safe="") + 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 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, 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] + 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) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + 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 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 + :returns: The serialized header + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(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 object data: The data to be serialized. + :param str data_type: The type to be serialized from. + :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 CoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + 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, cast(type, data.__class__)) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise SerializationError(msg.format(data, data_type)) from err + return self._serialize(data, **kwargs) + + @classmethod + 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 + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible 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 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) + 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 str data: Object to be serialized. + :rtype: str + :return: serialized object + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list data: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :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.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + 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) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :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 as err: + if isinstance(err, SerializationError): + raise + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + 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 + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + :return: serialized object + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + 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 str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + if obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + 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)) from exc + + @staticmethod + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument + """Serialize bytearray into base-64 string. + + :param str attr: Object to be serialized. + :rtype: str + :return: serialized base64 + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument + """Serialize str into base-64 string. + + :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): # pylint: disable=unused-argument + """Serialize Decimal object to float. + + :param decimal attr: Object to be serialized. + :rtype: float + :return: serialized decimal + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument + """Serialize long (Py2) or int (Py3). + + :param int attr: Object to be serialized. + :rtype: int/long + :return: serialized long + """ + return _long_type(attr) + + @staticmethod + 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) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + 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) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + 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_duration_numeric(attr, scale, as_int): + """Serialize a TimeDelta into a numeric value scaled to the wire unit. + + :param TimeDelta attr: Object to be serialized. + :param int scale: Multiplier applied to total seconds (1 for seconds, 1000 for milliseconds). + :param bool as_int: Whether to truncate the result to an int. + :rtype: int or float + :return: serialized duration + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + value = attr.total_seconds() * scale if isinstance(attr, datetime.timedelta) else attr + return int(value) if as_int else float(value) + + @staticmethod + def serialize_duration_seconds_int(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into an integer number of seconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: int + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1, True) + + @staticmethod + def serialize_duration_seconds_float(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into a floating point number of seconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: float + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1, False) + + @staticmethod + def serialize_duration_milliseconds_int(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into an integer number of milliseconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: int + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1000, True) + + @staticmethod + def serialize_duration_milliseconds_float(attr, **kwargs): # pylint: disable=unused-argument + """Serialize TimeDelta object into a floating point number of milliseconds. + + :param TimeDelta attr: Object to be serialized. + :rtype: float + :return: serialized duration + """ + return Serializer._serialize_duration_numeric(attr, 1000, False) + + @staticmethod + 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. + :return: serialized rfc + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + 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], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + 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. + :return: serialized iso + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise SerializationError(msg) from err + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise TypeError(msg) from err + + @staticmethod + 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 + :return: serialied unix + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc + + +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)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, 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 + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_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 + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +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): # 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) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + 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 + # 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. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer: + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + 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}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "duration-seconds-int": Deserializer.deserialize_duration_seconds, + "duration-seconds-float": Deserializer.deserialize_duration_seconds, + "duration-milliseconds-int": Deserializer.deserialize_duration_milliseconds, + "duration-milliseconds-float": Deserializer.deserialize_duration_milliseconds, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "duration-seconds-int": (isodate.Duration, datetime.timedelta), + "duration-seconds-float": (isodate.Duration, datetime.timedelta), + "duration-milliseconds-int": (isodate.Duration, datetime.timedelta), + "duration-milliseconds-float": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + 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 + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + 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. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises DeserializationError: if deserialization fails. + :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) + + 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. + :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(): # pylint: disable=protected-access + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, str): + return self.deserialize_data(data, response) + if isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None or data is CoreNull: + return data + try: + 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"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + 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: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :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, str): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + 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 + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :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: # pylint: disable=bare-except + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :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", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + 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 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() # 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 # 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)) from err + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) from exp + + 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. + :return: Deserialized object. + :rtype: object + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + 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) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + 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: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :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): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + 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): # 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. + """ + 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, str): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_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 + valid bool values. + + :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 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 + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + # 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) + if isinstance(attr, str): + if attr.lower() in ["true", "1"]: + return True + if attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + 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): + """Preserve unicode objects in Python 2, otherwise return 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, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :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: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + try: + return list(enum_obj.__members__.values())[data] + except IndexError as exc: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) from exc + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + 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. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + 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. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(str(attr)) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + 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. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + 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. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def _deserialize_duration_numeric(attr, unit): + """Deserialize a numeric duration value into a TimeDelta object. + + :param float attr: response value to be deserialized. + :param str unit: The wire unit, used as the ``timedelta`` keyword + (``"seconds"`` or ``"milliseconds"``). + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if value is invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = datetime.timedelta(**{unit: float(attr)}) # type: ignore + except (ValueError, OverflowError, TypeError) as err: + msg = "Cannot deserialize duration object." + raise DeserializationError(msg) from err + return duration + + @staticmethod + def deserialize_duration_seconds(attr): + """Deserialize a numeric number of seconds into a TimeDelta object. + + :param float attr: response value to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if value is invalid. + """ + return Deserializer._deserialize_duration_numeric(attr, "seconds") + + @staticmethod + def deserialize_duration_milliseconds(attr): + """Deserialize a numeric number of milliseconds into a TimeDelta object. + + :param float attr: response value to be deserialized. + :return: Deserialized duration + :rtype: TimeDelta + :raises DeserializationError: if value is invalid. + """ + return Deserializer._deserialize_duration_numeric(attr, "milliseconds") + + @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. + """ + 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=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. + """ + 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) + return isodate.parse_time(attr) + + @staticmethod + 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. + """ + 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=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 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. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.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") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise DeserializationError(msg) from err + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :return: Deserialized datetime + :rtype: Datetime + :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 DeserializationError(msg) from err + return date_obj diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/utils.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/utils.py new file mode 100644 index 000000000000..35c9c836f85f --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_utils/utils.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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 abc import ABC +from typing import Generic, TYPE_CHECKING, TypeVar + +if TYPE_CHECKING: + from .serialization import Deserializer, Serializer + + +TClient = TypeVar("TClient") +TConfig = TypeVar("TConfig") + + +class ClientMixinABC(ABC, Generic[TClient, TConfig]): + """DO NOT use this class. It is for internal typing use only.""" + + _client: TClient + _config: TConfig + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_version.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_version.py new file mode 100644 index 000000000000..be71c81bd282 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/__init__.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/__init__.py new file mode 100644 index 000000000000..cf18bad3be37 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/__init__.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ProviderHubMgmtClient # type: ignore + +try: + from ._patch import __all__ as _patch_all + from ._patch import * +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "ProviderHubMgmtClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore + +_patch_sdk() diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_client.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_client.py new file mode 100644 index 000000000000..3ec9f8915656 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_client.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) 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 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 .._utils.serialization import Deserializer, Serializer +from ._configuration import ProviderHubMgmtClientConfiguration +from .operations import ( + AuthorizedApplicationsOperations, + CustomRolloutsOperations, + DefaultRolloutsOperations, + NewRegionFrontloadReleaseOperations, + NotificationRegistrationsOperations, + Operations, + ProviderMonitorSettingsOperations, + ProviderRegistrationsOperations, + ResourceActionsOperations, + ResourceTypeRegistrationsOperations, + SkusOperations, + _ProviderHubMgmtClientOperationsMixin, +) + +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 + + +class ProviderHubMgmtClient(_ProviderHubMgmtClientOperationsMixin): # pylint: disable=too-many-instance-attributes + """Provider Hub. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.providerhub.aio.operations.Operations + :ivar custom_rollouts: CustomRolloutsOperations operations + :vartype custom_rollouts: azure.mgmt.providerhub.aio.operations.CustomRolloutsOperations + :ivar new_region_frontload_release: NewRegionFrontloadReleaseOperations operations + :vartype new_region_frontload_release: + azure.mgmt.providerhub.aio.operations.NewRegionFrontloadReleaseOperations + :ivar provider_registrations: ProviderRegistrationsOperations operations + :vartype provider_registrations: + azure.mgmt.providerhub.aio.operations.ProviderRegistrationsOperations + :ivar default_rollouts: DefaultRolloutsOperations operations + :vartype default_rollouts: azure.mgmt.providerhub.aio.operations.DefaultRolloutsOperations + :ivar notification_registrations: NotificationRegistrationsOperations operations + :vartype notification_registrations: + azure.mgmt.providerhub.aio.operations.NotificationRegistrationsOperations + :ivar resource_type_registrations: ResourceTypeRegistrationsOperations operations + :vartype resource_type_registrations: + azure.mgmt.providerhub.aio.operations.ResourceTypeRegistrationsOperations + :ivar skus: SkusOperations operations + :vartype skus: azure.mgmt.providerhub.aio.operations.SkusOperations + :ivar authorized_applications: AuthorizedApplicationsOperations operations + :vartype authorized_applications: + azure.mgmt.providerhub.aio.operations.AuthorizedApplicationsOperations + :ivar provider_monitor_settings: ProviderMonitorSettingsOperations operations + :vartype provider_monitor_settings: + azure.mgmt.providerhub.aio.operations.ProviderMonitorSettingsOperations + :ivar resource_actions: ResourceActionsOperations operations + :vartype resource_actions: azure.mgmt.providerhub.aio.operations.ResourceActionsOperations + :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 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: The API version to use for this operation. Known values are "2024-09-01" + 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. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + 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: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) + self._config = ProviderHubMgmtClientConfiguration( + credential=credential, + subscription_id=subscription_id, + base_url=cast(str, base_url), + 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, _endpoint), policies=_policies, **kwargs + ) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + self.custom_rollouts = CustomRolloutsOperations(self._client, self._config, self._serialize, self._deserialize) + self.new_region_frontload_release = NewRegionFrontloadReleaseOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.provider_registrations = ProviderRegistrationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.default_rollouts = DefaultRolloutsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.notification_registrations = NotificationRegistrationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resource_type_registrations = ResourceTypeRegistrationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.authorized_applications = AuthorizedApplicationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.provider_monitor_settings = ProviderMonitorSettingsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resource_actions = ResourceActionsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + 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 + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + 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: + await self._client.close() + + async def __aenter__(self) -> Self: + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_configuration.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_configuration.py new file mode 100644 index 000000000000..8c0769f1d607 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_configuration.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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 typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + from azure.core import AzureClouds + from azure.core.credentials_async import AsyncTokenCredential + + +class ProviderHubMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes + """Configuration for ProviderHubMgmtClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :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: The API version to use for this operation. Known values are "2024-09-01" + 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 + """ + + 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", "2024-09-01") + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + 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"]) + kwargs.setdefault("sdk_moniker", "mgmt-providerhub/{}".format(VERSION)) + self.polling_interval = kwargs.get("polling_interval", 30) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + 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.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( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_patch.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_patch.py new file mode 100644 index 000000000000..87676c65a8f0 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/_patch.py @@ -0,0 +1,21 @@ +# coding=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 +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/__init__.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/__init__.py new file mode 100644 index 000000000000..b01ddac43f54 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/__init__.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. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._operations import CustomRolloutsOperations # type: ignore +from ._operations import NewRegionFrontloadReleaseOperations # type: ignore +from ._operations import ProviderRegistrationsOperations # type: ignore +from ._operations import DefaultRolloutsOperations # type: ignore +from ._operations import NotificationRegistrationsOperations # type: ignore +from ._operations import ResourceTypeRegistrationsOperations # type: ignore +from ._operations import SkusOperations # type: ignore +from ._operations import AuthorizedApplicationsOperations # type: ignore +from ._operations import ProviderMonitorSettingsOperations # type: ignore +from ._operations import ResourceActionsOperations # type: ignore +from ._operations import _ProviderHubMgmtClientOperationsMixin # type: ignore # pylint: disable=unused-import + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Operations", + "CustomRolloutsOperations", + "NewRegionFrontloadReleaseOperations", + "ProviderRegistrationsOperations", + "DefaultRolloutsOperations", + "NotificationRegistrationsOperations", + "ResourceTypeRegistrationsOperations", + "SkusOperations", + "AuthorizedApplicationsOperations", + "ProviderMonitorSettingsOperations", + "ResourceActionsOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/_operations.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/_operations.py new file mode 100644 index 000000000000..97bb8aac4662 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/_operations.py @@ -0,0 +1,7059 @@ +# 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. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +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 +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, types as _types +from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._utils.serialization import Deserializer, Serializer +from ..._utils.utils import ClientMixinABC +from ...operations._operations import ( + build_authorized_applications_create_or_update_request, + build_authorized_applications_delete_request, + build_authorized_applications_get_request, + build_authorized_applications_list_request, + build_custom_rollouts_create_or_update_request, + build_custom_rollouts_delete_request, + build_custom_rollouts_get_request, + build_custom_rollouts_list_by_provider_registration_request, + build_custom_rollouts_stop_request, + build_default_rollouts_create_or_update_request, + build_default_rollouts_delete_request, + build_default_rollouts_get_request, + build_default_rollouts_list_by_provider_registration_request, + build_default_rollouts_stop_request, + build_new_region_frontload_release_create_or_update_request, + build_new_region_frontload_release_generate_manifest_request, + build_new_region_frontload_release_get_request, + build_new_region_frontload_release_stop_request, + build_notification_registrations_create_or_update_request, + build_notification_registrations_delete_request, + build_notification_registrations_get_request, + build_notification_registrations_list_by_provider_registration_request, + build_operations_create_or_update_request, + build_operations_delete_request, + build_operations_list_by_provider_registration_request, + build_operations_list_request, + build_provider_hub_mgmt_checkin_manifest_request, + build_provider_hub_mgmt_generate_manifest_request, + build_provider_monitor_settings_create_request, + build_provider_monitor_settings_delete_request, + build_provider_monitor_settings_get_request, + build_provider_monitor_settings_list_by_resource_group_request, + build_provider_monitor_settings_list_by_subscription_request, + build_provider_monitor_settings_update_request, + build_provider_registrations_create_or_update_request, + build_provider_registrations_delete_request, + build_provider_registrations_generate_operations_request, + build_provider_registrations_get_request, + build_provider_registrations_list_request, + build_resource_actions_delete_resources_request, + build_resource_type_registrations_create_or_update_request, + build_resource_type_registrations_delete_request, + build_resource_type_registrations_get_request, + build_resource_type_registrations_list_by_provider_registration_request, + build_skus_create_or_update_nested_resource_type_first_request, + build_skus_create_or_update_nested_resource_type_second_request, + build_skus_create_or_update_nested_resource_type_third_request, + build_skus_create_or_update_request, + build_skus_delete_nested_resource_type_first_request, + build_skus_delete_nested_resource_type_second_request, + build_skus_delete_nested_resource_type_third_request, + build_skus_delete_request, + build_skus_get_nested_resource_type_first_request, + build_skus_get_nested_resource_type_second_request, + build_skus_get_nested_resource_type_third_request, + build_skus_get_request, + build_skus_list_by_resource_type_registrations_nested_resource_type_first_request, + build_skus_list_by_resource_type_registrations_nested_resource_type_second_request, + build_skus_list_by_resource_type_registrations_nested_resource_type_third_request, + build_skus_list_by_resource_type_registrations_request, +) +from .._configuration import ProviderHubMgmtClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] +List = list + + +class Operations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`operations` 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: ProviderHubMgmtClientConfiguration = 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) -> AsyncItemPaged["_models.OperationsDefinition"]: + """List the operations for the provider. + + :return: An iterator like instance of OperationsDefinition + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.OperationsDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OperationsDefinition]] = 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 + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OperationsDefinition], + 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_async + async def list_by_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> List[_models.OperationsDefinition]: + """Gets the operations supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: list of OperationsDefinition + :rtype: list[~azure.mgmt.providerhub.models.OperationsDefinition] + :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[List[_models.OperationsDefinition]] = kwargs.pop("cls", None) + + _request = build_operations_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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(List[_models.OperationsDefinition], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + provider_namespace: str, + operations_put_content: _models.OperationsPutContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationsPutContent: + """Creates or updates the operation supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param operations_put_content: The operations content properties supplied to the CreateOrUpdate + operation. Required. + :type operations_put_content: ~azure.mgmt.providerhub.models.OperationsPutContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationsPutContent. The OperationsPutContent is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.OperationsPutContent + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + provider_namespace: str, + operations_put_content: _types.OperationsPutContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationsPutContent: + """Creates or updates the operation supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param operations_put_content: The operations content properties supplied to the CreateOrUpdate + operation. Required. + :type operations_put_content: ~azure.mgmt.providerhub.types.OperationsPutContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationsPutContent. The OperationsPutContent is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.OperationsPutContent + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + provider_namespace: str, + operations_put_content: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationsPutContent: + """Creates or updates the operation supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param operations_put_content: The operations content properties supplied to the CreateOrUpdate + operation. Required. + :type operations_put_content: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationsPutContent. The OperationsPutContent is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.OperationsPutContent + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + provider_namespace: str, + operations_put_content: Union[_models.OperationsPutContent, _types.OperationsPutContent, IO[bytes]], + **kwargs: Any + ) -> _models.OperationsPutContent: + """Creates or updates the operation supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param operations_put_content: The operations content properties supplied to the CreateOrUpdate + operation. Is either a OperationsPutContent type or a IO[bytes] type. Required. + :type operations_put_content: ~azure.mgmt.providerhub.models.OperationsPutContent or + ~azure.mgmt.providerhub.types.OperationsPutContent or IO[bytes] + :return: OperationsPutContent. The OperationsPutContent is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.OperationsPutContent + :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 = case_insensitive_dict(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.OperationsPutContent] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(operations_put_content, (IOBase, bytes)): + _content = operations_put_content + else: + _content = json.dumps(operations_put_content, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_operations_create_or_update_request( + provider_namespace=provider_namespace, + 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 = 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.OperationsPutContent, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, provider_namespace: str, **kwargs: Any) -> None: + """Deletes an operation. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_operations_delete_request( + provider_namespace=provider_namespace, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class CustomRolloutsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`custom_rollouts` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, rollout_name: str, **kwargs: Any) -> _models.CustomRollout: + """Gets the custom rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: CustomRollout. The CustomRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CustomRollout + :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.CustomRollout] = kwargs.pop("cls", None) + + _request = build_custom_rollouts_get_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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.CustomRollout, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + provider_namespace: str, + rollout_name: str, + properties: Union[_models.CustomRollout, _types.CustomRollout, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_custom_rollouts_create_or_update_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: _models.CustomRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The custom rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.CustomRollout + :keyword content_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 CustomRollout. The CustomRollout is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.CustomRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: _types.CustomRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The custom rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.CustomRollout + :keyword content_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 CustomRollout. The CustomRollout is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.CustomRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The custom rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: IO[bytes] + :keyword content_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 CustomRollout. The CustomRollout is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.CustomRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: Union[_models.CustomRollout, _types.CustomRollout, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.CustomRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The custom rollout properties supplied to the CreateOrUpdate operation. Is + either a CustomRollout type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.CustomRollout or + ~azure.mgmt.providerhub.types.CustomRollout or IO[bytes] + :return: An instance of AsyncLROPoller that returns CustomRollout. The CustomRollout is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.CustomRollout] + :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.CustomRollout] = 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_or_update_initial( + provider_namespace=provider_namespace, + rollout_name=rollout_name, + properties=properties, + 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.CustomRollout, 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.CustomRollout].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.CustomRollout]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete(self, provider_namespace: str, rollout_name: str, **kwargs: Any) -> None: + """Deletes the custom rollout resource. Custom rollout must be in terminal state. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_custom_rollouts_delete_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> AsyncItemPaged["_models.CustomRollout"]: + """Gets the list of the custom rollouts for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of CustomRollout + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.CustomRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CustomRollout]] = 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_custom_rollouts_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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.CustomRollout], + 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_async + async def stop(self, provider_namespace: str, rollout_name: str, **kwargs: Any) -> None: + """Stops or cancels the custom rollout, if in progress. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_custom_rollouts_stop_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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) + + _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) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class NewRegionFrontloadReleaseOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`new_region_frontload_release` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, release_name: str, **kwargs: Any) -> _models.DefaultRollout: + """Gets a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :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.DefaultRollout] = kwargs.pop("cls", None) + + _request = build_new_region_frontload_release_get_request( + provider_namespace=provider_namespace, + release_name=release_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.DefaultRollout, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: _models.FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DefaultRollout: + """Creates or updates a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :param properties: Required. + :type properties: ~azure.mgmt.providerhub.models.FrontloadPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: _types.FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DefaultRollout: + """Creates or updates a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :param properties: Required. + :type properties: ~azure.mgmt.providerhub.types.FrontloadPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DefaultRollout: + """Creates or updates a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :param properties: Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: Union[_models.FrontloadPayload, _types.FrontloadPayload, IO[bytes]], + **kwargs: Any + ) -> _models.DefaultRollout: + """Creates or updates a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :param properties: Is either a FrontloadPayload type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.FrontloadPayload or + ~azure.mgmt.providerhub.types.FrontloadPayload or IO[bytes] + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :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 = case_insensitive_dict(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.DefaultRollout] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_new_region_frontload_release_create_or_update_request( + provider_namespace=provider_namespace, + release_name=release_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 = 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, 201]: + 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.DefaultRollout, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def stop(self, provider_namespace: str, release_name: str, **kwargs: Any) -> None: + """Stops a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_new_region_frontload_release_stop_request( + provider_namespace=provider_namespace, + release_name=release_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) + + _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) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @overload + async def generate_manifest( + self, + provider_namespace: str, + properties: _models.FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceProviderManifest: + """Generates the new region frontload manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: Required. + :type properties: ~azure.mgmt.providerhub.models.FrontloadPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def generate_manifest( + self, + provider_namespace: str, + properties: _types.FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceProviderManifest: + """Generates the new region frontload manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: Required. + :type properties: ~azure.mgmt.providerhub.types.FrontloadPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def generate_manifest( + self, provider_namespace: str, properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ResourceProviderManifest: + """Generates the new region frontload manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def generate_manifest( + self, + provider_namespace: str, + properties: Union[_models.FrontloadPayload, _types.FrontloadPayload, IO[bytes]], + **kwargs: Any + ) -> _models.ResourceProviderManifest: + """Generates the new region frontload manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: Is either a FrontloadPayload type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.FrontloadPayload or + ~azure.mgmt.providerhub.types.FrontloadPayload or IO[bytes] + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :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 = case_insensitive_dict(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.ResourceProviderManifest] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_new_region_frontload_release_generate_manifest_request( + provider_namespace=provider_namespace, + 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 = 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.ResourceProviderManifest, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ProviderRegistrationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`provider_registrations` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, **kwargs: Any) -> _models.ProviderRegistration: + """Gets the provider registration details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: ProviderRegistration. The ProviderRegistration is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ProviderRegistration + :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.ProviderRegistration] = kwargs.pop("cls", None) + + _request = build_provider_registrations_get_request( + provider_namespace=provider_namespace, + 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.ProviderRegistration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + provider_namespace: str, + properties: Union[_models.ProviderRegistration, _types.ProviderRegistration, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_provider_registrations_create_or_update_request( + provider_namespace=provider_namespace, + 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_or_update( + self, + provider_namespace: str, + properties: _models.ProviderRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ProviderRegistration]: + """Creates or updates the provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: The provider registration properties supplied to the CreateOrUpdate + operation. Required. + :type properties: ~azure.mgmt.providerhub.models.ProviderRegistration + :keyword content_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 ProviderRegistration. The + ProviderRegistration is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ProviderRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + properties: _types.ProviderRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ProviderRegistration]: + """Creates or updates the provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: The provider registration properties supplied to the CreateOrUpdate + operation. Required. + :type properties: ~azure.mgmt.providerhub.types.ProviderRegistration + :keyword content_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 ProviderRegistration. The + ProviderRegistration is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ProviderRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, provider_namespace: str, properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.ProviderRegistration]: + """Creates or updates the provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: The provider registration properties supplied to the CreateOrUpdate + operation. Required. + :type properties: IO[bytes] + :keyword content_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 ProviderRegistration. The + ProviderRegistration is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ProviderRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + provider_namespace: str, + properties: Union[_models.ProviderRegistration, _types.ProviderRegistration, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ProviderRegistration]: + """Creates or updates the provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: The provider registration properties supplied to the CreateOrUpdate + operation. Is either a ProviderRegistration type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.ProviderRegistration or + ~azure.mgmt.providerhub.types.ProviderRegistration or IO[bytes] + :return: An instance of AsyncLROPoller that returns ProviderRegistration. The + ProviderRegistration is compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ProviderRegistration] + :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.ProviderRegistration] = 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_or_update_initial( + provider_namespace=provider_namespace, + properties=properties, + 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.ProviderRegistration, 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.ProviderRegistration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ProviderRegistration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete(self, provider_namespace: str, **kwargs: Any) -> None: + """Deletes a provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_provider_registrations_delete_request( + provider_namespace=provider_namespace, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ProviderRegistration"]: + """Gets the list of the provider registrations in the subscription. + + :return: An iterator like instance of ProviderRegistration + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.ProviderRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProviderRegistration]] = 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_provider_registrations_list_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.ProviderRegistration], + 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_async + async def generate_operations(self, provider_namespace: str, **kwargs: Any) -> List[_models.OperationsDefinition]: + """Generates the operations api for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: list of OperationsDefinition + :rtype: list[~azure.mgmt.providerhub.models.OperationsDefinition] + :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[List[_models.OperationsDefinition]] = kwargs.pop("cls", None) + + _request = build_provider_registrations_generate_operations_request( + provider_namespace=provider_namespace, + 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(List[_models.OperationsDefinition], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DefaultRolloutsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`default_rollouts` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, rollout_name: str, **kwargs: Any) -> _models.DefaultRollout: + """Gets the default rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :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.DefaultRollout] = kwargs.pop("cls", None) + + _request = build_default_rollouts_get_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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.DefaultRollout, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + provider_namespace: str, + rollout_name: str, + properties: Union[_models.DefaultRollout, _types.DefaultRollout, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_default_rollouts_create_or_update_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: _models.DefaultRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DefaultRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The Default rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.DefaultRollout + :keyword content_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 DefaultRollout. The DefaultRollout is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.DefaultRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: _types.DefaultRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DefaultRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The Default rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.DefaultRollout + :keyword content_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 DefaultRollout. The DefaultRollout is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.DefaultRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DefaultRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The Default rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: IO[bytes] + :keyword content_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 DefaultRollout. The DefaultRollout is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.DefaultRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: Union[_models.DefaultRollout, _types.DefaultRollout, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.DefaultRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The Default rollout properties supplied to the CreateOrUpdate operation. Is + either a DefaultRollout type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.DefaultRollout or + ~azure.mgmt.providerhub.types.DefaultRollout or IO[bytes] + :return: An instance of AsyncLROPoller that returns DefaultRollout. The DefaultRollout is + compatible with MutableMapping + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.DefaultRollout] + :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.DefaultRollout] = 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_or_update_initial( + provider_namespace=provider_namespace, + rollout_name=rollout_name, + properties=properties, + 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.DefaultRollout, 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.DefaultRollout].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.DefaultRollout]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete(self, provider_namespace: str, rollout_name: str, **kwargs: Any) -> None: + """Deletes the rollout resource. Rollout must be in terminal state. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_default_rollouts_delete_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> AsyncItemPaged["_models.DefaultRollout"]: + """Gets the list of the rollouts for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of DefaultRollout + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.DefaultRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DefaultRollout]] = 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_default_rollouts_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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.DefaultRollout], + 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_async + async def stop(self, provider_namespace: str, rollout_name: str, **kwargs: Any) -> None: + """Stops or cancels the rollout, if in progress. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_default_rollouts_stop_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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) + + _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) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class NotificationRegistrationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`notification_registrations` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, notification_registration_name: str, **kwargs: Any + ) -> _models.NotificationRegistration: + """Gets the notification registration details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :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.NotificationRegistration] = kwargs.pop("cls", None) + + _request = build_notification_registrations_get_request( + provider_namespace=provider_namespace, + notification_registration_name=notification_registration_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.NotificationRegistration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: _models.NotificationRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NotificationRegistration: + """Creates or updates a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :param properties: The required body parameters supplied to the notification registration + operation. Required. + :type properties: ~azure.mgmt.providerhub.models.NotificationRegistration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: _types.NotificationRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NotificationRegistration: + """Creates or updates a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :param properties: The required body parameters supplied to the notification registration + operation. Required. + :type properties: ~azure.mgmt.providerhub.types.NotificationRegistration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NotificationRegistration: + """Creates or updates a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :param properties: The required body parameters supplied to the notification registration + operation. Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: Union[_models.NotificationRegistration, _types.NotificationRegistration, IO[bytes]], + **kwargs: Any + ) -> _models.NotificationRegistration: + """Creates or updates a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :param properties: The required body parameters supplied to the notification registration + operation. Is either a NotificationRegistration type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.NotificationRegistration or + ~azure.mgmt.providerhub.types.NotificationRegistration or IO[bytes] + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :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 = case_insensitive_dict(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.NotificationRegistration] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_notification_registrations_create_or_update_request( + provider_namespace=provider_namespace, + notification_registration_name=notification_registration_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 = 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.NotificationRegistration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, provider_namespace: str, notification_registration_name: str, **kwargs: Any) -> None: + """Deletes a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_notification_registrations_delete_request( + provider_namespace=provider_namespace, + notification_registration_name=notification_registration_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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> AsyncItemPaged["_models.NotificationRegistration"]: + """Gets the list of the notification registrations for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of NotificationRegistration + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.NotificationRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NotificationRegistration]] = 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_notification_registrations_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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.NotificationRegistration], + 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 ResourceTypeRegistrationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`resource_type_registrations` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, resource_type: str, **kwargs: Any) -> _models.ResourceTypeRegistration: + """Gets a resource type details in the given subscription and provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :return: ResourceTypeRegistration. The ResourceTypeRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceTypeRegistration + :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.ResourceTypeRegistration] = kwargs.pop("cls", None) + + _request = build_resource_type_registrations_get_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + 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.ResourceTypeRegistration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + provider_namespace: str, + resource_type: str, + properties: Union[_models.ResourceTypeRegistration, _types.ResourceTypeRegistration, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_resource_type_registrations_create_or_update_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + 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_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: _models.ResourceTypeRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceTypeRegistration]: + """Creates or updates a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param properties: The required request body parameters supplied to the resource type + registration CreateOrUpdate operation. Required. + :type properties: ~azure.mgmt.providerhub.models.ResourceTypeRegistration + :keyword content_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 ResourceTypeRegistration. The + ResourceTypeRegistration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: _types.ResourceTypeRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceTypeRegistration]: + """Creates or updates a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param properties: The required request body parameters supplied to the resource type + registration CreateOrUpdate operation. Required. + :type properties: ~azure.mgmt.providerhub.types.ResourceTypeRegistration + :keyword content_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 ResourceTypeRegistration. The + ResourceTypeRegistration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceTypeRegistration]: + """Creates or updates a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param properties: The required request body parameters supplied to the resource type + registration CreateOrUpdate operation. Required. + :type properties: IO[bytes] + :keyword content_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 ResourceTypeRegistration. The + ResourceTypeRegistration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: Union[_models.ResourceTypeRegistration, _types.ResourceTypeRegistration, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ResourceTypeRegistration]: + """Creates or updates a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param properties: The required request body parameters supplied to the resource type + registration CreateOrUpdate operation. Is either a ResourceTypeRegistration type or a IO[bytes] + type. Required. + :type properties: ~azure.mgmt.providerhub.models.ResourceTypeRegistration or + ~azure.mgmt.providerhub.types.ResourceTypeRegistration or IO[bytes] + :return: An instance of AsyncLROPoller that returns ResourceTypeRegistration. The + ResourceTypeRegistration is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :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.ResourceTypeRegistration] = 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_or_update_initial( + provider_namespace=provider_namespace, + resource_type=resource_type, + properties=properties, + 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.ResourceTypeRegistration, 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.ResourceTypeRegistration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ResourceTypeRegistration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial(self, provider_namespace: str, resource_type: 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_resource_type_registrations_delete_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + 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, provider_namespace: str, resource_type: str, **kwargs: Any) -> AsyncLROPoller[None]: + """Deletes a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: 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( + provider_namespace=provider_namespace, + resource_type=resource_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): # 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_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ResourceTypeRegistration"]: + """Gets the list of the resource types for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of ResourceTypeRegistration + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceTypeRegistration]] = 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_resource_type_registrations_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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.ResourceTypeRegistration], + 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 SkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`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: ProviderHubMgmtClientConfiguration = 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_nested_resource_type_first( + self, provider_namespace: str, resource_type: str, nested_resource_type_first: str, sku: str, **kwargs: Any + ) -> _models.SkuResource: + """Gets the sku details for the given resource type and sku name. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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.SkuResource] = kwargs.pop("cls", None) + + _request = build_skus_get_nested_resource_type_first_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + sku=sku, + 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update_nested_resource_type_first( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: _models.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_nested_resource_type_first( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: _types.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_nested_resource_type_first( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update_nested_resource_type_first( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: Union[_models.SkuResource, _types.SkuResource, IO[bytes]], + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. Is + either a SkuResource type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource or + ~azure.mgmt.providerhub.types.SkuResource or IO[bytes] + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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 = case_insensitive_dict(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.SkuResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_skus_create_or_update_nested_resource_type_first_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + sku=sku, + 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 = 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete_nested_resource_type_first( + self, provider_namespace: str, resource_type: str, nested_resource_type_first: str, sku: str, **kwargs: Any + ) -> None: + """Deletes a resource type sku. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_skus_delete_nested_resource_type_first_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + sku=sku, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_first( # pylint: disable=name-too-long + self, provider_namespace: str, resource_type: str, nested_resource_type_first: str, **kwargs: Any + ) -> AsyncItemPaged["_models.SkuResource"]: + """Gets the list of skus for the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :return: An iterator like instance of SkuResource + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.SkuResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuResource]] = 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_skus_list_by_resource_type_registrations_nested_resource_type_first_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + 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.SkuResource], + 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_async + async def get(self, provider_namespace: str, resource_type: str, sku: str, **kwargs: Any) -> _models.SkuResource: + """Gets the sku details for the given resource type and sku name. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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.SkuResource] = kwargs.pop("cls", None) + + _request = build_skus_get_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + sku=sku, + 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: _models.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: _types.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: Union[_models.SkuResource, _types.SkuResource, IO[bytes]], + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. Is + either a SkuResource type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource or + ~azure.mgmt.providerhub.types.SkuResource or IO[bytes] + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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 = case_insensitive_dict(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.SkuResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_skus_create_or_update_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + sku=sku, + 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 = 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, provider_namespace: str, resource_type: str, sku: str, **kwargs: Any) -> None: + """Deletes a resource type sku. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_skus_delete_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + sku=sku, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_type_registrations( + self, provider_namespace: str, resource_type: str, **kwargs: Any + ) -> AsyncItemPaged["_models.SkuResource"]: + """Gets the list of skus for the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :return: An iterator like instance of SkuResource + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.SkuResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuResource]] = 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_skus_list_by_resource_type_registrations_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + 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.SkuResource], + 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_async + async def get_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + **kwargs: Any + ) -> _models.SkuResource: + """Gets the sku details for the given resource type and sku name. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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.SkuResource] = kwargs.pop("cls", None) + + _request = build_skus_get_nested_resource_type_second_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + sku=sku, + 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: _models.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: _types.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: Union[_models.SkuResource, _types.SkuResource, IO[bytes]], + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. Is + either a SkuResource type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource or + ~azure.mgmt.providerhub.types.SkuResource or IO[bytes] + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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 = case_insensitive_dict(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.SkuResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_skus_create_or_update_nested_resource_type_second_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + sku=sku, + 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 = 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + **kwargs: Any + ) -> None: + """Deletes a resource type sku. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_skus_delete_nested_resource_type_second_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + sku=sku, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + **kwargs: Any + ) -> AsyncItemPaged["_models.SkuResource"]: + """Gets the list of skus for the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :return: An iterator like instance of SkuResource + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.SkuResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuResource]] = 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_skus_list_by_resource_type_registrations_nested_resource_type_second_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + 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.SkuResource], + 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_async + async def get_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + **kwargs: Any + ) -> _models.SkuResource: + """Gets the sku details for the given resource type and sku name. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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.SkuResource] = kwargs.pop("cls", None) + + _request = build_skus_get_nested_resource_type_third_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + nested_resource_type_third=nested_resource_type_third, + sku=sku, + 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def create_or_update_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: _models.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: _types.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def create_or_update_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: Union[_models.SkuResource, _types.SkuResource, IO[bytes]], + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. Is + either a SkuResource type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource or + ~azure.mgmt.providerhub.types.SkuResource or IO[bytes] + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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 = case_insensitive_dict(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.SkuResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_skus_create_or_update_nested_resource_type_third_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + nested_resource_type_third=nested_resource_type_third, + sku=sku, + 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 = 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + **kwargs: Any + ) -> None: + """Deletes a resource type sku. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_skus_delete_nested_resource_type_third_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + nested_resource_type_third=nested_resource_type_third, + sku=sku, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + **kwargs: Any + ) -> AsyncItemPaged["_models.SkuResource"]: + """Gets the list of skus for the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :return: An iterator like instance of SkuResource + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.SkuResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuResource]] = 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_skus_list_by_resource_type_registrations_nested_resource_type_third_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + nested_resource_type_third=nested_resource_type_third, + 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.SkuResource], + 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 AuthorizedApplicationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`authorized_applications` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, application_id: str, **kwargs: Any) -> _models.AuthorizedApplication: + """Gets the authorized application details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :return: AuthorizedApplication. The AuthorizedApplication is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.AuthorizedApplication + :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.AuthorizedApplication] = kwargs.pop("cls", None) + + _request = build_authorized_applications_get_request( + provider_namespace=provider_namespace, + application_id=application_id, + 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.AuthorizedApplication, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_or_update_initial( + self, + provider_namespace: str, + application_id: str, + properties: Union[_models.AuthorizedApplication, _types.AuthorizedApplication, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorized_applications_create_or_update_request( + provider_namespace=provider_namespace, + application_id=application_id, + 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_or_update( + self, + provider_namespace: str, + application_id: str, + properties: _models.AuthorizedApplication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AuthorizedApplication]: + """Creates or updates the authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :param properties: The authorized application properties supplied to the CreateOrUpdate + operation. Required. + :type properties: ~azure.mgmt.providerhub.models.AuthorizedApplication + :keyword content_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 AuthorizedApplication. The + AuthorizedApplication is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.AuthorizedApplication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: _types.AuthorizedApplication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AuthorizedApplication]: + """Creates or updates the authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :param properties: The authorized application properties supplied to the CreateOrUpdate + operation. Required. + :type properties: ~azure.mgmt.providerhub.types.AuthorizedApplication + :keyword content_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 AuthorizedApplication. The + AuthorizedApplication is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.AuthorizedApplication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.AuthorizedApplication]: + """Creates or updates the authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :param properties: The authorized application properties supplied to the CreateOrUpdate + operation. Required. + :type properties: IO[bytes] + :keyword content_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 AuthorizedApplication. The + AuthorizedApplication is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.AuthorizedApplication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: Union[_models.AuthorizedApplication, _types.AuthorizedApplication, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.AuthorizedApplication]: + """Creates or updates the authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :param properties: The authorized application properties supplied to the CreateOrUpdate + operation. Is either a AuthorizedApplication type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.AuthorizedApplication or + ~azure.mgmt.providerhub.types.AuthorizedApplication or IO[bytes] + :return: An instance of AsyncLROPoller that returns AuthorizedApplication. The + AuthorizedApplication is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.AuthorizedApplication] + :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.AuthorizedApplication] = 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_or_update_initial( + provider_namespace=provider_namespace, + application_id=application_id, + properties=properties, + 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.AuthorizedApplication, 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.AuthorizedApplication].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.AuthorizedApplication]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def delete(self, provider_namespace: str, application_id: str, **kwargs: Any) -> None: + """Deletes an authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_authorized_applications_delete_request( + provider_namespace=provider_namespace, + application_id=application_id, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, provider_namespace: str, **kwargs: Any) -> AsyncItemPaged["_models.AuthorizedApplication"]: + """Gets the list of the authorized applications in the provider namespace. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of AuthorizedApplication + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.AuthorizedApplication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizedApplication]] = 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_authorized_applications_list_request( + provider_namespace=provider_namespace, + 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.AuthorizedApplication], + 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 ProviderMonitorSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`provider_monitor_settings` 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: ProviderHubMgmtClientConfiguration = 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, provider_monitor_setting_name: str, **kwargs: Any + ) -> _models.ProviderMonitorSetting: + """Gets the provider monitor setting details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :return: ProviderMonitorSetting. The ProviderMonitorSetting is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ProviderMonitorSetting + :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.ProviderMonitorSetting] = kwargs.pop("cls", None) + + _request = build_provider_monitor_settings_get_request( + resource_group_name=resource_group_name, + provider_monitor_setting_name=provider_monitor_setting_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.ProviderMonitorSetting, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: Union[_models.ProviderMonitorSetting, _types.ProviderMonitorSetting, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_provider_monitor_settings_create_request( + resource_group_name=resource_group_name, + provider_monitor_setting_name=provider_monitor_setting_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, + provider_monitor_setting_name: str, + properties: _models.ProviderMonitorSetting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ProviderMonitorSetting]: + """Creates the provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :param properties: The provider monitor setting properties supplied to the create operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.ProviderMonitorSetting + :keyword content_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 ProviderMonitorSetting. The + ProviderMonitorSetting is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: _types.ProviderMonitorSetting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ProviderMonitorSetting]: + """Creates the provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :param properties: The provider monitor setting properties supplied to the create operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.ProviderMonitorSetting + :keyword content_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 ProviderMonitorSetting. The + ProviderMonitorSetting is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ProviderMonitorSetting]: + """Creates the provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :param properties: The provider monitor setting properties supplied to the create operation. + Required. + :type properties: IO[bytes] + :keyword content_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 ProviderMonitorSetting. The + ProviderMonitorSetting is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: Union[_models.ProviderMonitorSetting, _types.ProviderMonitorSetting, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ProviderMonitorSetting]: + """Creates the provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :param properties: The provider monitor setting properties supplied to the create operation. Is + either a ProviderMonitorSetting type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.ProviderMonitorSetting or + ~azure.mgmt.providerhub.types.ProviderMonitorSetting or IO[bytes] + :return: An instance of AsyncLROPoller that returns ProviderMonitorSetting. The + ProviderMonitorSetting is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :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.ProviderMonitorSetting] = 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, + provider_monitor_setting_name=provider_monitor_setting_name, + properties=properties, + 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.ProviderMonitorSetting, 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.ProviderMonitorSetting].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ProviderMonitorSetting]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace_async + async def update( + self, resource_group_name: str, provider_monitor_setting_name: str, **kwargs: Any + ) -> _models.ProviderMonitorSetting: + """Updates the provider monitor setting properties as specified in the request body. Update fails + if the specified provider monitor setting does not already exist. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :return: ProviderMonitorSetting. The ProviderMonitorSetting is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ProviderMonitorSetting + :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.ProviderMonitorSetting] = kwargs.pop("cls", None) + + _request = build_provider_monitor_settings_update_request( + resource_group_name=resource_group_name, + provider_monitor_setting_name=provider_monitor_setting_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.ProviderMonitorSetting, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, resource_group_name: str, provider_monitor_setting_name: str, **kwargs: Any) -> None: + """Deletes a provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_provider_monitor_settings_delete_request( + resource_group_name=resource_group_name, + provider_monitor_setting_name=provider_monitor_setting_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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.ProviderMonitorSetting"]: + """Gets the list of the provider monitor settings 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 ProviderMonitorSetting + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProviderMonitorSetting]] = 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_provider_monitor_settings_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.ProviderMonitorSetting], + 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.ProviderMonitorSetting"]: + """Gets the list of the provider monitor settings in the subscription. + + :return: An iterator like instance of ProviderMonitorSetting + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProviderMonitorSetting]] = 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_provider_monitor_settings_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.ProviderMonitorSetting], + 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 ResourceActionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.aio.ProviderHubMgmtClient`'s + :attr:`resource_actions` 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: ProviderHubMgmtClientConfiguration = 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 _delete_resources_initial( + self, + provider_namespace: str, + resource_action_name: str, + properties: Union[_models.ResourceManagementAction, _types.ResourceManagementAction, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_resource_actions_delete_resources_request( + provider_namespace=provider_namespace, + resource_action_name=resource_action_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 [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 = {} + 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_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: _models.ResourceManagementAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes resources. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_action_name: The resource action name. Required. + :type resource_action_name: str + :param properties: The properties supplied to the DeleteResources operation. Required. + :type properties: ~azure.mgmt.providerhub.models.ResourceManagementAction + :keyword content_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 None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: _types.ResourceManagementAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes resources. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_action_name: The resource action name. Required. + :type resource_action_name: str + :param properties: The properties supplied to the DeleteResources operation. Required. + :type properties: ~azure.mgmt.providerhub.types.ResourceManagementAction + :keyword content_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 None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes resources. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_action_name: The resource action name. Required. + :type resource_action_name: str + :param properties: The properties supplied to the DeleteResources operation. Required. + :type properties: IO[bytes] + :keyword content_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 None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: Union[_models.ResourceManagementAction, _types.ResourceManagementAction, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes resources. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_action_name: The resource action name. Required. + :type resource_action_name: str + :param properties: The properties supplied to the DeleteResources operation. Is either a + ResourceManagementAction type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.ResourceManagementAction or + ~azure.mgmt.providerhub.types.ResourceManagementAction or IO[bytes] + :return: An instance of AsyncLROPoller that returns None + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :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[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_resources_initial( + provider_namespace=provider_namespace, + resource_action_name=resource_action_name, + properties=properties, + 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): # 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 + + +class _ProviderHubMgmtClientOperationsMixin( + ClientMixinABC[AsyncPipelineClient[HttpRequest, AsyncHttpResponse], ProviderHubMgmtClientConfiguration] +): + + @distributed_trace_async + async def generate_manifest(self, provider_namespace: str, **kwargs: Any) -> _models.ResourceProviderManifest: + """Generates the manifest for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :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.ResourceProviderManifest] = kwargs.pop("cls", None) + + _request = build_provider_hub_mgmt_generate_manifest_request( + provider_namespace=provider_namespace, + 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( # type: ignore # 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.ResourceProviderManifest, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + async def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: _models.CheckinManifestParams, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckinManifestInfo: + """Checkin the manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param checkin_manifest_params: The required body parameters supplied to the checkin manifest + operation. Required. + :type checkin_manifest_params: ~azure.mgmt.providerhub.models.CheckinManifestParams + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckinManifestInfo. The CheckinManifestInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CheckinManifestInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: _types.CheckinManifestParams, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckinManifestInfo: + """Checkin the manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param checkin_manifest_params: The required body parameters supplied to the checkin manifest + operation. Required. + :type checkin_manifest_params: ~azure.mgmt.providerhub.types.CheckinManifestParams + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckinManifestInfo. The CheckinManifestInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CheckinManifestInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckinManifestInfo: + """Checkin the manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param checkin_manifest_params: The required body parameters supplied to the checkin manifest + operation. Required. + :type checkin_manifest_params: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckinManifestInfo. The CheckinManifestInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CheckinManifestInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: Union[_models.CheckinManifestParams, _types.CheckinManifestParams, IO[bytes]], + **kwargs: Any + ) -> _models.CheckinManifestInfo: + """Checkin the manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param checkin_manifest_params: The required body parameters supplied to the checkin manifest + operation. Is either a CheckinManifestParams type or a IO[bytes] type. Required. + :type checkin_manifest_params: ~azure.mgmt.providerhub.models.CheckinManifestParams or + ~azure.mgmt.providerhub.types.CheckinManifestParams or IO[bytes] + :return: CheckinManifestInfo. The CheckinManifestInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CheckinManifestInfo + :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 = case_insensitive_dict(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.CheckinManifestInfo] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(checkin_manifest_params, (IOBase, bytes)): + _content = checkin_manifest_params + else: + _content = json.dumps(checkin_manifest_params, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_provider_hub_mgmt_checkin_manifest_request( + provider_namespace=provider_namespace, + 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 = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # 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.CheckinManifestInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/_patch.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/_patch.py new file mode 100644 index 000000000000..87676c65a8f0 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/aio/operations/_patch.py @@ -0,0 +1,21 @@ +# coding=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 +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/__init__.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/__init__.py new file mode 100644 index 000000000000..a8b9bcb85697 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/__init__.py @@ -0,0 +1,626 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models import ( # type: ignore + AdditionalAuthorization, + AllowedResourceName, + AllowedUnauthorizedActionsExtension, + ApiProfile, + ApplicationDataAuthorization, + ApplicationProviderAuthorization, + AsyncOperationPollingRules, + AsyncTimeoutRule, + AuthorizationActionMapping, + AuthorizedApplication, + AuthorizedApplicationProperties, + CanaryTrafficRegionRolloutConfiguration, + CheckNameAvailabilitySpecifications, + CheckinManifestInfo, + CheckinManifestParams, + CustomRollout, + CustomRolloutProperties, + CustomRolloutPropertiesSpecification, + CustomRolloutPropertiesStatus, + CustomRolloutSpecification, + CustomRolloutSpecificationAutoProvisionConfig, + CustomRolloutSpecificationCanary, + CustomRolloutSpecificationProviderRegistration, + CustomRolloutStatus, + CustomRolloutStatusManifestCheckinStatus, + DefaultRollout, + DefaultRolloutProperties, + DefaultRolloutPropertiesSpecification, + DefaultRolloutPropertiesStatus, + DefaultRolloutSpecification, + DefaultRolloutSpecificationAutoProvisionConfig, + DefaultRolloutSpecificationCanary, + DefaultRolloutSpecificationExpeditedRollout, + DefaultRolloutSpecificationHighTraffic, + DefaultRolloutSpecificationLowTraffic, + DefaultRolloutSpecificationMediumTraffic, + DefaultRolloutSpecificationProviderRegistration, + DefaultRolloutSpecificationRestOfTheWorldGroupOne, + DefaultRolloutSpecificationRestOfTheWorldGroupTwo, + DefaultRolloutStatus, + DefaultRolloutStatusManifestCheckinStatus, + DeleteDependency, + DstsConfiguration, + EndpointInformation, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + ExpeditedRolloutDefinition, + ExtendedErrorInfo, + ExtendedLocationOptions, + ExtensionOptions, + FanoutLinkedNotificationRule, + FanoutLinkedNotificationRuleDstsConfiguration, + FeaturesRule, + FilterRule, + FrontloadPayload, + FrontloadPayloadProperties, + FrontloadPayloadPropertiesOverrideEndpointLevelFields, + FrontloadPayloadPropertiesOverrideManifestLevelFields, + IdentityManagement, + IdentityManagementProperties, + LegacyDisallowedCondition, + LightHouseAuthorization, + LinkedAccessCheck, + LinkedNotificationRule, + LinkedOperationRule, + LocalizedOperationDefinition, + LocalizedOperationDefinitionDisplay, + LocalizedOperationDisplayDefinition, + LocalizedOperationDisplayDefinitionCs, + LocalizedOperationDisplayDefinitionDe, + LocalizedOperationDisplayDefinitionDefault, + LocalizedOperationDisplayDefinitionEn, + LocalizedOperationDisplayDefinitionEs, + LocalizedOperationDisplayDefinitionFr, + LocalizedOperationDisplayDefinitionHu, + LocalizedOperationDisplayDefinitionIt, + LocalizedOperationDisplayDefinitionJa, + LocalizedOperationDisplayDefinitionKo, + LocalizedOperationDisplayDefinitionNl, + LocalizedOperationDisplayDefinitionPl, + LocalizedOperationDisplayDefinitionPtBR, + LocalizedOperationDisplayDefinitionPtPT, + LocalizedOperationDisplayDefinitionRu, + LocalizedOperationDisplayDefinitionSv, + LocalizedOperationDisplayDefinitionZhHans, + LocalizedOperationDisplayDefinitionZhHant, + LocationQuotaRule, + LoggingHiddenPropertyPath, + LoggingRule, + LoggingRuleHiddenPropertyPaths, + ManifestLevelPropertyBag, + Notification, + NotificationEndpoint, + NotificationRegistration, + NotificationRegistrationProperties, + OpenApiConfiguration, + OpenApiValidation, + OperationsContentProperties, + OperationsDefinition, + OperationsDefinitionDisplay, + OperationsDisplayDefinition, + OperationsPutContent, + OperationsPutContentProperties, + PrivateResourceProviderConfiguration, + ProviderHubMetadata, + ProviderHubMetadataProviderAuthentication, + ProviderHubMetadataThirdPartyProviderAuthorization, + ProviderMonitorSetting, + ProviderMonitorSettingProperties, + ProviderRegistration, + ProviderRegistrationProperties, + ProviderRegistrationPropertiesPrivateResourceProviderConfiguration, + ProviderRegistrationPropertiesProviderHubMetadata, + ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications, + ProxyResource, + QuotaRule, + ReRegisterSubscriptionMetadata, + RequestHeaderOptions, + Resource, + ResourceAccessRole, + ResourceConcurrencyControlOption, + ResourceGraphConfiguration, + ResourceHydrationAccount, + ResourceManagementAction, + ResourceManagementEntity, + ResourceMovePolicy, + ResourceProviderAuthentication, + ResourceProviderAuthorization, + ResourceProviderAuthorizationManagedByAuthorization, + ResourceProviderAuthorizationRules, + ResourceProviderCapabilities, + ResourceProviderEndpoint, + ResourceProviderEndpointFeaturesRule, + ResourceProviderManagement, + ResourceProviderManagementErrorResponseMessageOptions, + ResourceProviderManagementExpeditedRolloutMetadata, + ResourceProviderManifest, + ResourceProviderManifestFeaturesRule, + ResourceProviderManifestManagement, + ResourceProviderManifestProperties, + ResourceProviderManifestPropertiesDstsConfiguration, + ResourceProviderManifestPropertiesFeaturesRule, + ResourceProviderManifestPropertiesManagement, + ResourceProviderManifestPropertiesNotificationSettings, + ResourceProviderManifestPropertiesProviderAuthentication, + ResourceProviderManifestPropertiesRequestHeaderOptions, + ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove, + ResourceProviderManifestPropertiesResponseOptions, + ResourceProviderManifestPropertiesTemplateDeploymentOptions, + ResourceProviderManifestProviderAuthentication, + ResourceProviderManifestReRegisterSubscriptionMetadata, + ResourceProviderManifestRequestHeaderOptions, + ResourceProviderService, + ResourceType, + ResourceTypeEndpoint, + ResourceTypeEndpointBase, + ResourceTypeEndpointBaseDstsConfiguration, + ResourceTypeEndpointBaseFeaturesRule, + ResourceTypeEndpointDstsConfiguration, + ResourceTypeEndpointFeaturesRule, + ResourceTypeExtension, + ResourceTypeExtensionOptions, + ResourceTypeExtensionOptionsResourceCreationBegin, + ResourceTypeFeaturesRule, + ResourceTypeIdentityManagement, + ResourceTypeOnBehalfOfToken, + ResourceTypeRegistration, + ResourceTypeRegistrationProperties, + ResourceTypeRegistrationPropertiesAvailabilityZoneRule, + ResourceTypeRegistrationPropertiesCapacityRule, + ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications, + ResourceTypeRegistrationPropertiesDstsConfiguration, + ResourceTypeRegistrationPropertiesExtensionOptions, + ResourceTypeRegistrationPropertiesFeaturesRule, + ResourceTypeRegistrationPropertiesIdentityManagement, + ResourceTypeRegistrationPropertiesLegacyPolicy, + ResourceTypeRegistrationPropertiesManagement, + ResourceTypeRegistrationPropertiesMarketplaceOptions, + ResourceTypeRegistrationPropertiesRequestHeaderOptions, + ResourceTypeRegistrationPropertiesResourceCache, + ResourceTypeRegistrationPropertiesResourceGraphConfiguration, + ResourceTypeRegistrationPropertiesResourceManagementOptions, + ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport, + ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport, + ResourceTypeRegistrationPropertiesResourceMovePolicy, + ResourceTypeRegistrationPropertiesResourceQueryManagement, + ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement, + ResourceTypeRegistrationPropertiesRoutingRule, + ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications, + ResourceTypeRegistrationPropertiesTemplateDeploymentOptions, + ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy, + ResourceTypeRequestHeaderOptions, + ResourceTypeSku, + ResourceTypeTemplateDeploymentPolicy, + RolloutStatusBase, + ServiceTreeInfo, + SkuCapability, + SkuCapacity, + SkuCost, + SkuLocationInfo, + SkuResource, + SkuResourceProperties, + SkuSetting, + SkuSettingCapacity, + SkuZoneDetail, + SubscriberSetting, + SubscriptionLifecycleNotificationSpecifications, + SubscriptionStateOverrideAction, + SubscriptionStateRule, + SwaggerSpecification, + SystemData, + TemplateDeploymentOptions, + TemplateDeploymentPolicy, + ThirdPartyExtension, + ThirdPartyProviderAuthorization, + ThrottlingMetric, + ThrottlingRule, + TokenAuthConfiguration, + TrackedResource, + TrafficRegionRolloutConfiguration, + TrafficRegions, + TypedErrorInfo, +) + +from ._enums import ( # type: ignore + AdditionalOptions, + AdditionalOptionsAsyncOperation, + AdditionalOptionsResourceTypeRegistration, + AuthenticationScheme, + AvailabilityZonePolicy, + AvailableCheckInManifestEnvironment, + BlockActionVerb, + CapacityPolicy, + CommonApiVersionsMergeMode, + CreatedByType, + CrossTenantTokenValidation, + DataBoundary, + EndpointType, + EndpointTypeResourceType, + ExpeditedRolloutIntent, + ExtendedLocationType, + ExtensionCategory, + ExtensionOptionType, + FeaturesPolicy, + FilterOption, + FrontdoorRequestMode, + IdentityManagementTypes, + Intent, + LegacyOperation, + LinkedAction, + LinkedOperation, + LoggingDetails, + LoggingDirections, + ManifestResourceDeletionPolicy, + MarketplaceType, + MessageScope, + NotificationEndpointType, + NotificationMode, + NotificationOptions, + NotificationType, + OperationActionType, + OperationOrigins, + OptInHeaderType, + OptOutHeaderType, + Policy, + PolicyExecutionType, + PreflightOption, + ProviderRegistrationKind, + ProvisioningState, + QuotaPolicy, + Readiness, + Regionality, + ResourceAccessPolicy, + ResourceDeletionPolicy, + ResourceProviderCapabilitiesEffect, + ResourceProviderType, + ResourceSubType, + ResourceTypeCategory, + ResourceTypeEndpointKind, + ResourceTypeExtendedLocationPolicy, + ResourceTypeRegistrationKind, + ResourceValidation, + Role, + RoutingType, + ServerFailureResponseMessageType, + ServiceClientOptionsType, + ServiceFeatureFlagAction, + ServiceStatus, + SignedRequestScope, + SkipNotifications, + SkuScaleType, + SubscriptionNotificationOperation, + SubscriptionReregistrationResult, + SubscriptionState, + SubscriptionTransitioningState, + SupportedOperations, + TemplateDeploymentCapabilities, + TemplateDeploymentPreflightNotifications, + TemplateDeploymentPreflightOptions, + ThrottlingMetricType, + TrafficRegionCategory, +) +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "AdditionalAuthorization", + "AllowedResourceName", + "AllowedUnauthorizedActionsExtension", + "ApiProfile", + "ApplicationDataAuthorization", + "ApplicationProviderAuthorization", + "AsyncOperationPollingRules", + "AsyncTimeoutRule", + "AuthorizationActionMapping", + "AuthorizedApplication", + "AuthorizedApplicationProperties", + "CanaryTrafficRegionRolloutConfiguration", + "CheckNameAvailabilitySpecifications", + "CheckinManifestInfo", + "CheckinManifestParams", + "CustomRollout", + "CustomRolloutProperties", + "CustomRolloutPropertiesSpecification", + "CustomRolloutPropertiesStatus", + "CustomRolloutSpecification", + "CustomRolloutSpecificationAutoProvisionConfig", + "CustomRolloutSpecificationCanary", + "CustomRolloutSpecificationProviderRegistration", + "CustomRolloutStatus", + "CustomRolloutStatusManifestCheckinStatus", + "DefaultRollout", + "DefaultRolloutProperties", + "DefaultRolloutPropertiesSpecification", + "DefaultRolloutPropertiesStatus", + "DefaultRolloutSpecification", + "DefaultRolloutSpecificationAutoProvisionConfig", + "DefaultRolloutSpecificationCanary", + "DefaultRolloutSpecificationExpeditedRollout", + "DefaultRolloutSpecificationHighTraffic", + "DefaultRolloutSpecificationLowTraffic", + "DefaultRolloutSpecificationMediumTraffic", + "DefaultRolloutSpecificationProviderRegistration", + "DefaultRolloutSpecificationRestOfTheWorldGroupOne", + "DefaultRolloutSpecificationRestOfTheWorldGroupTwo", + "DefaultRolloutStatus", + "DefaultRolloutStatusManifestCheckinStatus", + "DeleteDependency", + "DstsConfiguration", + "EndpointInformation", + "ErrorAdditionalInfo", + "ErrorDetail", + "ErrorResponse", + "ExpeditedRolloutDefinition", + "ExtendedErrorInfo", + "ExtendedLocationOptions", + "ExtensionOptions", + "FanoutLinkedNotificationRule", + "FanoutLinkedNotificationRuleDstsConfiguration", + "FeaturesRule", + "FilterRule", + "FrontloadPayload", + "FrontloadPayloadProperties", + "FrontloadPayloadPropertiesOverrideEndpointLevelFields", + "FrontloadPayloadPropertiesOverrideManifestLevelFields", + "IdentityManagement", + "IdentityManagementProperties", + "LegacyDisallowedCondition", + "LightHouseAuthorization", + "LinkedAccessCheck", + "LinkedNotificationRule", + "LinkedOperationRule", + "LocalizedOperationDefinition", + "LocalizedOperationDefinitionDisplay", + "LocalizedOperationDisplayDefinition", + "LocalizedOperationDisplayDefinitionCs", + "LocalizedOperationDisplayDefinitionDe", + "LocalizedOperationDisplayDefinitionDefault", + "LocalizedOperationDisplayDefinitionEn", + "LocalizedOperationDisplayDefinitionEs", + "LocalizedOperationDisplayDefinitionFr", + "LocalizedOperationDisplayDefinitionHu", + "LocalizedOperationDisplayDefinitionIt", + "LocalizedOperationDisplayDefinitionJa", + "LocalizedOperationDisplayDefinitionKo", + "LocalizedOperationDisplayDefinitionNl", + "LocalizedOperationDisplayDefinitionPl", + "LocalizedOperationDisplayDefinitionPtBR", + "LocalizedOperationDisplayDefinitionPtPT", + "LocalizedOperationDisplayDefinitionRu", + "LocalizedOperationDisplayDefinitionSv", + "LocalizedOperationDisplayDefinitionZhHans", + "LocalizedOperationDisplayDefinitionZhHant", + "LocationQuotaRule", + "LoggingHiddenPropertyPath", + "LoggingRule", + "LoggingRuleHiddenPropertyPaths", + "ManifestLevelPropertyBag", + "Notification", + "NotificationEndpoint", + "NotificationRegistration", + "NotificationRegistrationProperties", + "OpenApiConfiguration", + "OpenApiValidation", + "OperationsContentProperties", + "OperationsDefinition", + "OperationsDefinitionDisplay", + "OperationsDisplayDefinition", + "OperationsPutContent", + "OperationsPutContentProperties", + "PrivateResourceProviderConfiguration", + "ProviderHubMetadata", + "ProviderHubMetadataProviderAuthentication", + "ProviderHubMetadataThirdPartyProviderAuthorization", + "ProviderMonitorSetting", + "ProviderMonitorSettingProperties", + "ProviderRegistration", + "ProviderRegistrationProperties", + "ProviderRegistrationPropertiesPrivateResourceProviderConfiguration", + "ProviderRegistrationPropertiesProviderHubMetadata", + "ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications", + "ProxyResource", + "QuotaRule", + "ReRegisterSubscriptionMetadata", + "RequestHeaderOptions", + "Resource", + "ResourceAccessRole", + "ResourceConcurrencyControlOption", + "ResourceGraphConfiguration", + "ResourceHydrationAccount", + "ResourceManagementAction", + "ResourceManagementEntity", + "ResourceMovePolicy", + "ResourceProviderAuthentication", + "ResourceProviderAuthorization", + "ResourceProviderAuthorizationManagedByAuthorization", + "ResourceProviderAuthorizationRules", + "ResourceProviderCapabilities", + "ResourceProviderEndpoint", + "ResourceProviderEndpointFeaturesRule", + "ResourceProviderManagement", + "ResourceProviderManagementErrorResponseMessageOptions", + "ResourceProviderManagementExpeditedRolloutMetadata", + "ResourceProviderManifest", + "ResourceProviderManifestFeaturesRule", + "ResourceProviderManifestManagement", + "ResourceProviderManifestProperties", + "ResourceProviderManifestPropertiesDstsConfiguration", + "ResourceProviderManifestPropertiesFeaturesRule", + "ResourceProviderManifestPropertiesManagement", + "ResourceProviderManifestPropertiesNotificationSettings", + "ResourceProviderManifestPropertiesProviderAuthentication", + "ResourceProviderManifestPropertiesRequestHeaderOptions", + "ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove", + "ResourceProviderManifestPropertiesResponseOptions", + "ResourceProviderManifestPropertiesTemplateDeploymentOptions", + "ResourceProviderManifestProviderAuthentication", + "ResourceProviderManifestReRegisterSubscriptionMetadata", + "ResourceProviderManifestRequestHeaderOptions", + "ResourceProviderService", + "ResourceType", + "ResourceTypeEndpoint", + "ResourceTypeEndpointBase", + "ResourceTypeEndpointBaseDstsConfiguration", + "ResourceTypeEndpointBaseFeaturesRule", + "ResourceTypeEndpointDstsConfiguration", + "ResourceTypeEndpointFeaturesRule", + "ResourceTypeExtension", + "ResourceTypeExtensionOptions", + "ResourceTypeExtensionOptionsResourceCreationBegin", + "ResourceTypeFeaturesRule", + "ResourceTypeIdentityManagement", + "ResourceTypeOnBehalfOfToken", + "ResourceTypeRegistration", + "ResourceTypeRegistrationProperties", + "ResourceTypeRegistrationPropertiesAvailabilityZoneRule", + "ResourceTypeRegistrationPropertiesCapacityRule", + "ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications", + "ResourceTypeRegistrationPropertiesDstsConfiguration", + "ResourceTypeRegistrationPropertiesExtensionOptions", + "ResourceTypeRegistrationPropertiesFeaturesRule", + "ResourceTypeRegistrationPropertiesIdentityManagement", + "ResourceTypeRegistrationPropertiesLegacyPolicy", + "ResourceTypeRegistrationPropertiesManagement", + "ResourceTypeRegistrationPropertiesMarketplaceOptions", + "ResourceTypeRegistrationPropertiesRequestHeaderOptions", + "ResourceTypeRegistrationPropertiesResourceCache", + "ResourceTypeRegistrationPropertiesResourceGraphConfiguration", + "ResourceTypeRegistrationPropertiesResourceManagementOptions", + "ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport", + "ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport", + "ResourceTypeRegistrationPropertiesResourceMovePolicy", + "ResourceTypeRegistrationPropertiesResourceQueryManagement", + "ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement", + "ResourceTypeRegistrationPropertiesRoutingRule", + "ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications", + "ResourceTypeRegistrationPropertiesTemplateDeploymentOptions", + "ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy", + "ResourceTypeRequestHeaderOptions", + "ResourceTypeSku", + "ResourceTypeTemplateDeploymentPolicy", + "RolloutStatusBase", + "ServiceTreeInfo", + "SkuCapability", + "SkuCapacity", + "SkuCost", + "SkuLocationInfo", + "SkuResource", + "SkuResourceProperties", + "SkuSetting", + "SkuSettingCapacity", + "SkuZoneDetail", + "SubscriberSetting", + "SubscriptionLifecycleNotificationSpecifications", + "SubscriptionStateOverrideAction", + "SubscriptionStateRule", + "SwaggerSpecification", + "SystemData", + "TemplateDeploymentOptions", + "TemplateDeploymentPolicy", + "ThirdPartyExtension", + "ThirdPartyProviderAuthorization", + "ThrottlingMetric", + "ThrottlingRule", + "TokenAuthConfiguration", + "TrackedResource", + "TrafficRegionRolloutConfiguration", + "TrafficRegions", + "TypedErrorInfo", + "AdditionalOptions", + "AdditionalOptionsAsyncOperation", + "AdditionalOptionsResourceTypeRegistration", + "AuthenticationScheme", + "AvailabilityZonePolicy", + "AvailableCheckInManifestEnvironment", + "BlockActionVerb", + "CapacityPolicy", + "CommonApiVersionsMergeMode", + "CreatedByType", + "CrossTenantTokenValidation", + "DataBoundary", + "EndpointType", + "EndpointTypeResourceType", + "ExpeditedRolloutIntent", + "ExtendedLocationType", + "ExtensionCategory", + "ExtensionOptionType", + "FeaturesPolicy", + "FilterOption", + "FrontdoorRequestMode", + "IdentityManagementTypes", + "Intent", + "LegacyOperation", + "LinkedAction", + "LinkedOperation", + "LoggingDetails", + "LoggingDirections", + "ManifestResourceDeletionPolicy", + "MarketplaceType", + "MessageScope", + "NotificationEndpointType", + "NotificationMode", + "NotificationOptions", + "NotificationType", + "OperationActionType", + "OperationOrigins", + "OptInHeaderType", + "OptOutHeaderType", + "Policy", + "PolicyExecutionType", + "PreflightOption", + "ProviderRegistrationKind", + "ProvisioningState", + "QuotaPolicy", + "Readiness", + "Regionality", + "ResourceAccessPolicy", + "ResourceDeletionPolicy", + "ResourceProviderCapabilitiesEffect", + "ResourceProviderType", + "ResourceSubType", + "ResourceTypeCategory", + "ResourceTypeEndpointKind", + "ResourceTypeExtendedLocationPolicy", + "ResourceTypeRegistrationKind", + "ResourceValidation", + "Role", + "RoutingType", + "ServerFailureResponseMessageType", + "ServiceClientOptionsType", + "ServiceFeatureFlagAction", + "ServiceStatus", + "SignedRequestScope", + "SkipNotifications", + "SkuScaleType", + "SubscriptionNotificationOperation", + "SubscriptionReregistrationResult", + "SubscriptionState", + "SubscriptionTransitioningState", + "SupportedOperations", + "TemplateDeploymentCapabilities", + "TemplateDeploymentPreflightNotifications", + "TemplateDeploymentPreflightOptions", + "ThrottlingMetricType", + "TrafficRegionCategory", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_enums.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_enums.py new file mode 100644 index 000000000000..1997b19211a7 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_enums.py @@ -0,0 +1,1011 @@ +# pylint: disable=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. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class AdditionalOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The additional options.""" + + PROTECTED_ASYNC_OPERATION_POLLING = "ProtectedAsyncOperationPolling" + """PROTECTED_ASYNC_OPERATION_POLLING.""" + PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY = "ProtectedAsyncOperationPollingAuditOnly" + """PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY.""" + + +class AdditionalOptionsAsyncOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The additional options.""" + + PROTECTED_ASYNC_OPERATION_POLLING = "ProtectedAsyncOperationPolling" + """PROTECTED_ASYNC_OPERATION_POLLING.""" + PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY = "ProtectedAsyncOperationPollingAuditOnly" + """PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY.""" + + +class AdditionalOptionsResourceTypeRegistration( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """The additional options.""" + + PROTECTED_ASYNC_OPERATION_POLLING = "ProtectedAsyncOperationPolling" + """PROTECTED_ASYNC_OPERATION_POLLING.""" + PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY = "ProtectedAsyncOperationPollingAuditOnly" + """PROTECTED_ASYNC_OPERATION_POLLING_AUDIT_ONLY.""" + + +class AuthenticationScheme(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The authentication scheme.""" + + PO_P = "PoP" + """PO_P.""" + BEARER = "Bearer" + """BEARER.""" + + +class AvailabilityZonePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of AvailabilityZonePolicy.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + SINGLE_ZONED = "SingleZoned" + """SINGLE_ZONED.""" + MULTI_ZONED = "MultiZoned" + """MULTI_ZONED.""" + + +class AvailableCheckInManifestEnvironment(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The environment type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + CANARY = "Canary" + """CANARY.""" + PROD = "Prod" + """PROD.""" + ALL = "All" + """ALL.""" + MOONCAKE = "Mooncake" + """MOONCAKE.""" + FAIRFAX = "Fairfax" + """FAIRFAX.""" + + +class BlockActionVerb(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The action verb that will be blocked when the resource group is locked during move.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + READ = "Read" + """READ.""" + WRITE = "Write" + """WRITE.""" + ACTION = "Action" + """ACTION.""" + DELETE = "Delete" + """DELETE.""" + UNRECOGNIZED = "Unrecognized" + """UNRECOGNIZED.""" + + +class CapacityPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Capacity policy.""" + + DEFAULT = "Default" + """DEFAULT.""" + RESTRICTED = "Restricted" + """RESTRICTED.""" + + +class CommonApiVersionsMergeMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Common api versions merge mode.""" + + MERGE = "Merge" + """MERGE.""" + OVERWRITE = "Overwrite" + """OVERWRITE.""" + + +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 CrossTenantTokenValidation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The cross tenant token validation.""" + + ENSURE_SECURE_VALIDATION = "EnsureSecureValidation" + """ENSURE_SECURE_VALIDATION.""" + PASSTHROUGH_INSECURE_TOKEN = "PassthroughInsecureToken" + """PASSTHROUGH_INSECURE_TOKEN.""" + + +class DataBoundary(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The data boundary.""" + + NOT_DEFINED = "NotDefined" + """NOT_DEFINED.""" + GLOBAL = "Global" + """GLOBAL.""" + EU = "EU" + """EU.""" + US = "US" + """US.""" + + +class EndpointType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The endpoint type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + CANARY = "Canary" + """CANARY.""" + PRODUCTION = "Production" + """PRODUCTION.""" + TEST_IN_PRODUCTION = "TestInProduction" + """TEST_IN_PRODUCTION.""" + + +class EndpointTypeResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The endpoint type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + CANARY = "Canary" + """CANARY.""" + PRODUCTION = "Production" + """PRODUCTION.""" + TEST_IN_PRODUCTION = "TestInProduction" + """TEST_IN_PRODUCTION.""" + + +class ExpeditedRolloutIntent(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Expedited rollout intent.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + HOTFIX = "Hotfix" + """HOTFIX.""" + + +class ExtendedLocationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The extended location type.""" + + NOT_SPECIFIED = "NotSpecified" + """The extended location type is not specified.""" + CUSTOM_LOCATION = "CustomLocation" + """The extended location type is custom location.""" + EDGE_ZONE = "EdgeZone" + """The extended location type is edge zone.""" + ARC_ZONE = "ArcZone" + """The extended location type is arc zone.""" + + +class ExtensionCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of ExtensionCategory.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + RESOURCE_CREATION_VALIDATE = "ResourceCreationValidate" + """RESOURCE_CREATION_VALIDATE.""" + RESOURCE_CREATION_BEGIN = "ResourceCreationBegin" + """RESOURCE_CREATION_BEGIN.""" + RESOURCE_CREATION_COMPLETED = "ResourceCreationCompleted" + """RESOURCE_CREATION_COMPLETED.""" + RESOURCE_READ_VALIDATE = "ResourceReadValidate" + """RESOURCE_READ_VALIDATE.""" + RESOURCE_READ_BEGIN = "ResourceReadBegin" + """RESOURCE_READ_BEGIN.""" + RESOURCE_PATCH_VALIDATE = "ResourcePatchValidate" + """RESOURCE_PATCH_VALIDATE.""" + RESOURCE_PATCH_COMPLETED = "ResourcePatchCompleted" + """RESOURCE_PATCH_COMPLETED.""" + RESOURCE_DELETION_VALIDATE = "ResourceDeletionValidate" + """RESOURCE_DELETION_VALIDATE.""" + RESOURCE_DELETION_BEGIN = "ResourceDeletionBegin" + """RESOURCE_DELETION_BEGIN.""" + RESOURCE_DELETION_COMPLETED = "ResourceDeletionCompleted" + """RESOURCE_DELETION_COMPLETED.""" + RESOURCE_POST_ACTION = "ResourcePostAction" + """RESOURCE_POST_ACTION.""" + SUBSCRIPTION_LIFECYCLE_NOTIFICATION = "SubscriptionLifecycleNotification" + """SUBSCRIPTION_LIFECYCLE_NOTIFICATION.""" + RESOURCE_PATCH_BEGIN = "ResourcePatchBegin" + """RESOURCE_PATCH_BEGIN.""" + RESOURCE_MOVE_BEGIN = "ResourceMoveBegin" + """RESOURCE_MOVE_BEGIN.""" + RESOURCE_MOVE_COMPLETED = "ResourceMoveCompleted" + """RESOURCE_MOVE_COMPLETED.""" + BEST_MATCH_OPERATION_BEGIN = "BestMatchOperationBegin" + """BEST_MATCH_OPERATION_BEGIN.""" + SUBSCRIPTION_LIFECYCLE_NOTIFICATION_DELETION = "SubscriptionLifecycleNotificationDeletion" + """SUBSCRIPTION_LIFECYCLE_NOTIFICATION_DELETION.""" + + +class ExtensionOptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of ExtensionOptionType.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES = "DoNotMergeExistingReadOnlyAndSecretProperties" + """DO_NOT_MERGE_EXISTING_READ_ONLY_AND_SECRET_PROPERTIES.""" + INCLUDE_INTERNAL_METADATA = "IncludeInternalMetadata" + """INCLUDE_INTERNAL_METADATA.""" + + +class FeaturesPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The required feature policy.""" + + ANY = "Any" + """ANY.""" + ALL = "All" + """ALL.""" + + +class FilterOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Filter option.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + ENABLE_SUBSCRIPTION_FILTER_ON_TENANT = "EnableSubscriptionFilterOnTenant" + """ENABLE_SUBSCRIPTION_FILTER_ON_TENANT.""" + + +class FrontdoorRequestMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The frontdoor request mode.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + USE_MANIFEST = "UseManifest" + """USE_MANIFEST.""" + + +class IdentityManagementTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + SYSTEM_ASSIGNED = "SystemAssigned" + """SYSTEM_ASSIGNED.""" + USER_ASSIGNED = "UserAssigned" + """USER_ASSIGNED.""" + ACTOR = "Actor" + """ACTOR.""" + DELEGATED_RESOURCE_IDENTITY = "DelegatedResourceIdentity" + """DELEGATED_RESOURCE_IDENTITY.""" + + +class Intent(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The intent.""" + + NOT_SPECIFIED = "NOT_SPECIFIED" + """Default value.""" + LOW_PRIVILEGE = "LOW_PRIVILEGE" + """Data is not sensitive and ok to access.""" + DEFERRED_ACCESS_CHECK = "DEFERRED_ACCESS_CHECK" + """Used for RP's using a custom authorization check outside of ARM.""" + RP_CONTRACT = "RP_CONTRACT" + """RP contract allows certain operations to be unauthorized action.""" + + +class LegacyOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of LegacyOperation.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + CREATE = "Create" + """CREATE.""" + DELETE = "Delete" + """DELETE.""" + WAITING = "Waiting" + """WAITING.""" + AZURE_ASYNC_OPERATION_WAITING = "AzureAsyncOperationWaiting" + """AZURE_ASYNC_OPERATION_WAITING.""" + RESOURCE_CACHE_WAITING = "ResourceCacheWaiting" + """RESOURCE_CACHE_WAITING.""" + ACTION = "Action" + """ACTION.""" + READ = "Read" + """READ.""" + EVALUATE_DEPLOYMENT_OUTPUT = "EvaluateDeploymentOutput" + """EVALUATE_DEPLOYMENT_OUTPUT.""" + DEPLOYMENT_CLEANUP = "DeploymentCleanup" + """DEPLOYMENT_CLEANUP.""" + + +class LinkedAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The linked action.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + BLOCKED = "Blocked" + """BLOCKED.""" + VALIDATE = "Validate" + """VALIDATE.""" + ENABLED = "Enabled" + """ENABLED.""" + + +class LinkedOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The linked operation.""" + + NONE = "None" + """NONE.""" + CROSS_RESOURCE_GROUP_RESOURCE_MOVE = "CrossResourceGroupResourceMove" + """CROSS_RESOURCE_GROUP_RESOURCE_MOVE.""" + CROSS_SUBSCRIPTION_RESOURCE_MOVE = "CrossSubscriptionResourceMove" + """CROSS_SUBSCRIPTION_RESOURCE_MOVE.""" + + +class LoggingDetails(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The detail level.""" + + NONE = "None" + """NONE.""" + BODY = "Body" + """BODY.""" + + +class LoggingDirections(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The direction.""" + + NONE = "None" + """NONE.""" + REQUEST = "Request" + """REQUEST.""" + RESPONSE = "Response" + """RESPONSE.""" + + +class ManifestResourceDeletionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The resource deletion policy.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + CASCADE = "Cascade" + """CASCADE.""" + FORCE = "Force" + """FORCE.""" + + +class MarketplaceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The marketplace type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + ADD_ON = "AddOn" + """ADD_ON.""" + BYPASS = "Bypass" + """BYPASS.""" + STORE = "Store" + """STORE.""" + + +class MessageScope(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The message scope.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + REGISTERED_SUBSCRIPTIONS = "RegisteredSubscriptions" + """REGISTERED_SUBSCRIPTIONS.""" + + +class NotificationEndpointType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The endpoint type.""" + + WEBHOOK = "Webhook" + """WEBHOOK.""" + EVENTHUB = "Eventhub" + """EVENTHUB.""" + + +class NotificationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The notification mode.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + EVENT_HUB = "EventHub" + """EVENT_HUB.""" + WEB_HOOK = "WebHook" + """WEB_HOOK.""" + + +class NotificationOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Notification options.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + NONE = "None" + """NONE.""" + EMIT_SPENDING_LIMIT = "EmitSpendingLimit" + """EMIT_SPENDING_LIMIT.""" + + +class NotificationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The notification type.""" + + UNSPECIFIED = "Unspecified" + """UNSPECIFIED.""" + SUBSCRIPTION_NOTIFICATION = "SubscriptionNotification" + """SUBSCRIPTION_NOTIFICATION.""" + + +class OperationActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The action type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + INTERNAL = "Internal" + """INTERNAL.""" + + +class OperationOrigins(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The origin.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + USER = "User" + """USER.""" + SYSTEM = "System" + """SYSTEM.""" + + +class OptInHeaderType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The opt in headers.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + SIGNED_USER_TOKEN = "SignedUserToken" + """SIGNED_USER_TOKEN.""" + CLIENT_GROUP_MEMBERSHIP = "ClientGroupMembership" + """CLIENT_GROUP_MEMBERSHIP.""" + SIGNED_AUXILIARY_TOKENS = "SignedAuxiliaryTokens" + """SIGNED_AUXILIARY_TOKENS.""" + UNBOUNDED_CLIENT_GROUP_MEMBERSHIP = "UnboundedClientGroupMembership" + """UNBOUNDED_CLIENT_GROUP_MEMBERSHIP.""" + PRIVATE_LINK_ID = "PrivateLinkId" + """PRIVATE_LINK_ID.""" + PRIVATE_LINK_RESOURCE_ID = "PrivateLinkResourceId" + """PRIVATE_LINK_RESOURCE_ID.""" + MANAGEMENT_GROUP_ANCESTORS_ENCODED = "ManagementGroupAncestorsEncoded" + """MANAGEMENT_GROUP_ANCESTORS_ENCODED.""" + PRIVATE_LINK_VNET_TRAFFIC_TAG = "PrivateLinkVnetTrafficTag" + """PRIVATE_LINK_VNET_TRAFFIC_TAG.""" + RESOURCE_GROUP_LOCATION = "ResourceGroupLocation" + """RESOURCE_GROUP_LOCATION.""" + CLIENT_PRINCIPAL_NAME_ENCODED = "ClientPrincipalNameEncoded" + """CLIENT_PRINCIPAL_NAME_ENCODED.""" + MSI_RESOURCE_ID_ENCODED = "MSIResourceIdEncoded" + """MSI_RESOURCE_ID_ENCODED.""" + + +class OptOutHeaderType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The opt out headers.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + SYSTEM_DATA_CREATED_BY_LAST_MODIFIED_BY = "SystemDataCreatedByLastModifiedBy" + """SYSTEM_DATA_CREATED_BY_LAST_MODIFIED_BY.""" + + +class Policy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The policy.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + SYNCHRONIZE_BEGIN_EXTENSION = "SynchronizeBeginExtension" + """SYNCHRONIZE_BEGIN_EXTENSION.""" + + +class PolicyExecutionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The policy execution type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + EXECUTE_POLICIES = "ExecutePolicies" + """EXECUTE_POLICIES.""" + BYPASS_POLICIES = "BypassPolicies" + """BYPASS_POLICIES.""" + EXPECT_PARTIAL_PUT_REQUESTS = "ExpectPartialPutRequests" + """EXPECT_PARTIAL_PUT_REQUESTS.""" + + +class PreflightOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of PreflightOption.""" + + NONE = "None" + """NONE.""" + CONTINUE_DEPLOYMENT_ON_FAILURE = "ContinueDeploymentOnFailure" + """CONTINUE_DEPLOYMENT_ON_FAILURE.""" + DEFAULT_VALIDATION_ONLY = "DefaultValidationOnly" + """DEFAULT_VALIDATION_ONLY.""" + + +class ProviderRegistrationKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Provider registration kind. This Metadata is also used by portal/tooling/etc to render + different UX experiences for resources of the same type. + """ + + MANAGED = "Managed" + """Resource Provider with all the resource types 'managed' by the ProviderHub service.""" + HYBRID = "Hybrid" + """Resource Provider with a mix of 'managed' and 'direct' resource types.""" + DIRECT = "Direct" + """Resource Provider with all the resource types 'managed' on by itself.""" + + +class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of ProvisioningState.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + ACCEPTED = "Accepted" + """ACCEPTED.""" + RUNNING = "Running" + """RUNNING.""" + CREATING = "Creating" + """CREATING.""" + CREATED = "Created" + """CREATED.""" + DELETING = "Deleting" + """DELETING.""" + DELETED = "Deleted" + """DELETED.""" + CANCELED = "Canceled" + """CANCELED.""" + FAILED = "Failed" + """FAILED.""" + SUCCEEDED = "Succeeded" + """SUCCEEDED.""" + MOVING_RESOURCES = "MovingResources" + """MOVING_RESOURCES.""" + TRANSIENT_FAILURE = "TransientFailure" + """TRANSIENT_FAILURE.""" + ROLLOUT_IN_PROGRESS = "RolloutInProgress" + """ROLLOUT_IN_PROGRESS.""" + + +class QuotaPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of QuotaPolicy.""" + + DEFAULT = "Default" + """DEFAULT.""" + NONE = "None" + """NONE.""" + RESTRICTED = "Restricted" + """RESTRICTED.""" + + +class Readiness(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The readiness.""" + + CLOSING_DOWN = "ClosingDown" + """CLOSING_DOWN.""" + DEPRECATED = "Deprecated" + """DEPRECATED.""" + GA = "GA" + """GA.""" + IN_DEVELOPMENT = "InDevelopment" + """IN_DEVELOPMENT.""" + INTERNAL_ONLY = "InternalOnly" + """INTERNAL_ONLY.""" + PRIVATE_PREVIEW = "PrivatePreview" + """PRIVATE_PREVIEW.""" + PUBLIC_PREVIEW = "PublicPreview" + """PUBLIC_PREVIEW.""" + REMOVED_FROM_ARM = "RemovedFromARM" + """REMOVED_FROM_ARM.""" + RETIRED = "Retired" + """RETIRED.""" + + +class Regionality(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The regionality.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + GLOBAL = "Global" + """GLOBAL.""" + REGIONAL = "Regional" + """REGIONAL.""" + + +class ResourceAccessPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The resource access policy.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + ACIS_READ_ALLOWED = "AcisReadAllowed" + """ACIS_READ_ALLOWED.""" + ACIS_ACTION_ALLOWED = "AcisActionAllowed" + """ACIS_ACTION_ALLOWED.""" + + +class ResourceDeletionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The resource deletion policy.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + CASCADE_DELETE_ALL = "CascadeDeleteAll" + """CASCADE_DELETE_ALL.""" + CASCADE_DELETE_PROXY_ONLY_CHILDREN = "CascadeDeleteProxyOnlyChildren" + """CASCADE_DELETE_PROXY_ONLY_CHILDREN.""" + + +class ResourceProviderCapabilitiesEffect(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The effect.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + ALLOW = "Allow" + """ALLOW.""" + DISALLOW = "Disallow" + """DISALLOW.""" + + +class ResourceProviderType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The provider type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + INTERNAL = "Internal" + """INTERNAL.""" + EXTERNAL = "External" + """EXTERNAL.""" + HIDDEN = "Hidden" + """HIDDEN.""" + REGISTRATION_FREE = "RegistrationFree" + """REGISTRATION_FREE.""" + LEGACY_REGISTRATION_REQUIRED = "LegacyRegistrationRequired" + """LEGACY_REGISTRATION_REQUIRED.""" + TENANT_ONLY = "TenantOnly" + """TENANT_ONLY.""" + AUTHORIZATION_FREE = "AuthorizationFree" + """AUTHORIZATION_FREE.""" + + +class ResourceSubType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The resource sub type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + ASYNC_OPERATION = "AsyncOperation" + """ASYNC_OPERATION.""" + + +class ResourceTypeCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The category.""" + + NONE = "None" + """NONE.""" + FREE_FORM = "FreeForm" + """FREE_FORM.""" + INTERNAL = "Internal" + """INTERNAL.""" + PURE_PROXY = "PureProxy" + """PURE_PROXY.""" + + +class ResourceTypeEndpointKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render + different UX experiences for resources of the same type. + """ + + MANAGED = "Managed" + """Endpoint served by ProviderHub service.""" + DIRECT = "Direct" + """Endpoint served by the onboarded Resource Provider Service.""" + + +class ResourceTypeExtendedLocationPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of ResourceTypeExtendedLocationPolicy.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + ALL = "All" + """ALL.""" + + +class ResourceTypeRegistrationKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Resource type registration kind. This Metadata is also used by portal/tooling/etc to render + different UX experiences for resources of the same type. + """ + + MANAGED = "Managed" + """Resource type served by the ProviderHub service.""" + HYBRID = "Hybrid" + """Resource type served by both the ProviderHub & the onboarded Resource Provider Services (i.e. + The type has a mix of managed and direct endpoints).""" + DIRECT = "Direct" + """Resource type served by the onboarded Resource Provider Service.""" + + +class ResourceValidation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The resource validation.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + RESERVED_WORDS = "ReservedWords" + """RESERVED_WORDS.""" + PROFANE_WORDS = "ProfaneWords" + """PROFANE_WORDS.""" + + +class Role(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The ownership role the application has on the resource types. The service owner role gives the + application owner permissions. The limited owner role gives elevated permissions but does not + allow all the permissions of a service owner, such as read/write on internal metadata. + """ + + SERVICE_OWNER = "ServiceOwner" + """SERVICE_OWNER.""" + LIMITED_OWNER = "LimitedOwner" + """LIMITED_OWNER.""" + + +class RoutingType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The routing type.""" + + DEFAULT = "Default" + """The resource routing type is default.""" + PROXY_ONLY = "ProxyOnly" + """The resource routing type is proxy only.""" + HOST_BASED = "HostBased" + """The resource routing type is host based.""" + EXTENSION = "Extension" + """The resource routing type is extension.""" + TENANT = "Tenant" + """The resource routing type is tenant.""" + FANOUT = "Fanout" + """The resource routing type is fanout.""" + LOCATION_BASED = "LocationBased" + """The resource routing type is location based.""" + FAILOVER = "Failover" + """The resource routing type is failover.""" + CASCADE_EXTENSION = "CascadeExtension" + """The resource routing type is cascade extension.""" + CHILD_FANOUT = "ChildFanout" + """The resource routing type is child fanout.""" + CASCADE_AUTHORIZED_EXTENSION = "CascadeAuthorizedExtension" + """The resource routing type is cascade authorized extension.""" + BYPASS_ENDPOINT_SELECTION_OPTIMIZATION = "BypassEndpointSelectionOptimization" + """The resource routing type is bypass endpoint selection optimization.""" + LOCATION_MAPPING = "LocationMapping" + """The resource routing type is location mapping.""" + SERVICE_FANOUT = "ServiceFanout" + """The resource routing type is service fanout.""" + + +class ServerFailureResponseMessageType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of server failure response message.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + OUTAGE_REPORTING = "OutageReporting" + """OUTAGE_REPORTING.""" + + +class ServiceClientOptionsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of ServiceClientOptionsType.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + DISABLE_AUTOMATIC_DECOMPRESSION = "DisableAutomaticDecompression" + """DISABLE_AUTOMATIC_DECOMPRESSION.""" + + +class ServiceFeatureFlagAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The service feature flag.""" + + DO_NOT_CREATE = "DoNotCreate" + """DO_NOT_CREATE.""" + CREATE = "Create" + """CREATE.""" + + +class ServiceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The status.""" + + ACTIVE = "Active" + """ACTIVE.""" + INACTIVE = "Inactive" + """INACTIVE.""" + + +class SignedRequestScope(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The signed request scope.""" + + RESOURCE_URI = "ResourceUri" + """RESOURCE_URI.""" + ENDPOINT = "Endpoint" + """ENDPOINT.""" + + +class SkipNotifications(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether notifications should be skipped.""" + + UNSPECIFIED = "Unspecified" + """UNSPECIFIED.""" + ENABLED = "Enabled" + """ENABLED.""" + DISABLED = "Disabled" + """DISABLED.""" + + +class SkuScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The scale type.""" + + NONE = "None" + """NONE.""" + MANUAL = "Manual" + """MANUAL.""" + AUTOMATIC = "Automatic" + """AUTOMATIC.""" + + +class SubscriptionNotificationOperation(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The action.""" + + NOT_DEFINED = "NotDefined" + """NOT_DEFINED.""" + DELETE_ALL_RESOURCES = "DeleteAllResources" + """DELETE_ALL_RESOURCES.""" + SOFT_DELETE_ALL_RESOURCES = "SoftDeleteAllResources" + """SOFT_DELETE_ALL_RESOURCES.""" + NO_OP = "NoOp" + """NO_OP.""" + BILLING_CANCELLATION = "BillingCancellation" + """BILLING_CANCELLATION.""" + UNDO_SOFT_DELETE = "UndoSoftDelete" + """UNDO_SOFT_DELETE.""" + + +class SubscriptionReregistrationResult(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The subscription reregistration result.""" + + NOT_APPLICABLE = "NotApplicable" + """NOT_APPLICABLE.""" + CONDITIONAL_UPDATE = "ConditionalUpdate" + """CONDITIONAL_UPDATE.""" + FORCED_UPDATE = "ForcedUpdate" + """FORCED_UPDATE.""" + FAILED = "Failed" + """FAILED.""" + + +class SubscriptionState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The subscription state.""" + + NOT_DEFINED = "NotDefined" + """NOT_DEFINED.""" + ENABLED = "Enabled" + """ENABLED.""" + WARNED = "Warned" + """WARNED.""" + PAST_DUE = "PastDue" + """PAST_DUE.""" + DISABLED = "Disabled" + """DISABLED.""" + DELETED = "Deleted" + """DELETED.""" + + +class SubscriptionTransitioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The state.""" + + REGISTERED = "Registered" + """REGISTERED.""" + UNREGISTERED = "Unregistered" + """UNREGISTERED.""" + WARNED = "Warned" + """WARNED.""" + SUSPENDED = "Suspended" + """SUSPENDED.""" + DELETED = "Deleted" + """DELETED.""" + WARNED_TO_REGISTERED = "WarnedToRegistered" + """WARNED_TO_REGISTERED.""" + WARNED_TO_SUSPENDED = "WarnedToSuspended" + """WARNED_TO_SUSPENDED.""" + WARNED_TO_DELETED = "WarnedToDeleted" + """WARNED_TO_DELETED.""" + WARNED_TO_UNREGISTERED = "WarnedToUnregistered" + """WARNED_TO_UNREGISTERED.""" + SUSPENDED_TO_REGISTERED = "SuspendedToRegistered" + """SUSPENDED_TO_REGISTERED.""" + SUSPENDED_TO_WARNED = "SuspendedToWarned" + """SUSPENDED_TO_WARNED.""" + SUSPENDED_TO_DELETED = "SuspendedToDeleted" + """SUSPENDED_TO_DELETED.""" + SUSPENDED_TO_UNREGISTERED = "SuspendedToUnregistered" + """SUSPENDED_TO_UNREGISTERED.""" + + +class SupportedOperations(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Supported operations.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + GET = "Get" + """GET.""" + DELETE = "Delete" + """DELETE.""" + + +class TemplateDeploymentCapabilities(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The capabilities.""" + + DEFAULT = "Default" + """DEFAULT.""" + PREFLIGHT = "Preflight" + """PREFLIGHT.""" + + +class TemplateDeploymentPreflightNotifications(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The preflight notifications.""" + + NONE = "None" + """NONE.""" + UNREGISTERED_SUBSCRIPTIONS = "UnregisteredSubscriptions" + """UNREGISTERED_SUBSCRIPTIONS.""" + + +class TemplateDeploymentPreflightOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The preflight options.""" + + NONE = "None" + """NONE.""" + VALIDATION_REQUESTS = "ValidationRequests" + """VALIDATION_REQUESTS.""" + DEPLOYMENT_REQUESTS = "DeploymentRequests" + """DEPLOYMENT_REQUESTS.""" + TEST_ONLY = "TestOnly" + """TEST_ONLY.""" + REGISTERED_ONLY = "RegisteredOnly" + """REGISTERED_ONLY.""" + + +class ThrottlingMetricType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The throttling metric type.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + NUMBER_OF_REQUESTS = "NumberOfRequests" + """NUMBER_OF_REQUESTS.""" + NUMBER_OF_RESOURCES = "NumberOfResources" + """NUMBER_OF_RESOURCES.""" + + +class TrafficRegionCategory(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The next traffic region.""" + + NOT_SPECIFIED = "NotSpecified" + """NOT_SPECIFIED.""" + CANARY = "Canary" + """CANARY.""" + LOW_TRAFFIC = "LowTraffic" + """LOW_TRAFFIC.""" + MEDIUM_TRAFFIC = "MediumTraffic" + """MEDIUM_TRAFFIC.""" + HIGH_TRAFFIC = "HighTraffic" + """HIGH_TRAFFIC.""" + NONE = "None" + """NONE.""" + REST_OF_THE_WORLD_GROUP_ONE = "RestOfTheWorldGroupOne" + """REST_OF_THE_WORLD_GROUP_ONE.""" + REST_OF_THE_WORLD_GROUP_TWO = "RestOfTheWorldGroupTwo" + """REST_OF_THE_WORLD_GROUP_TWO.""" diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_models.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_models.py new file mode 100644 index 000000000000..5874d4cc3a4c --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_models.py @@ -0,0 +1,10292 @@ +# 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 AdditionalAuthorization(_Model): + """AdditionalAuthorization. + + :ivar application_id: + :vartype application_id: str + :ivar role_definition_id: + :vartype role_definition_id: str + """ + + application_id: Optional[str] = rest_field( + name="applicationId", visibility=["read", "create", "update", "delete", "query"] + ) + role_definition_id: Optional[str] = rest_field( + name="roleDefinitionId", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + application_id: Optional[str] = None, + role_definition_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 AllowedResourceName(_Model): + """AllowedResourceName. + + :ivar name: Resource name. + :vartype name: str + :ivar get_action_verb: Get action verb. + :vartype get_action_verb: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource name.""" + get_action_verb: Optional[str] = rest_field( + name="getActionVerb", visibility=["read", "create", "update", "delete", "query"] + ) + """Get action verb.""" + + @overload + def __init__( + self, + *, + name: Optional[str] = None, + get_action_verb: 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 AllowedUnauthorizedActionsExtension(_Model): + """AllowedUnauthorizedActionsExtension. + + :ivar action: The action. + :vartype action: str + :ivar intent: The intent. Known values are: "NOT_SPECIFIED", "LOW_PRIVILEGE", + "DEFERRED_ACCESS_CHECK", and "RP_CONTRACT". + :vartype intent: str or ~azure.mgmt.providerhub.models.Intent + """ + + action: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The action.""" + intent: Optional[Union[str, "_models.Intent"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The intent. Known values are: \"NOT_SPECIFIED\", \"LOW_PRIVILEGE\", \"DEFERRED_ACCESS_CHECK\", + and \"RP_CONTRACT\".""" + + @overload + def __init__( + self, + *, + action: Optional[str] = None, + intent: Optional[Union[str, "_models.Intent"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ApiProfile(_Model): + """ApiProfile. + + :ivar profile_version: Profile version. + :vartype profile_version: str + :ivar api_version: Api version. + :vartype api_version: str + """ + + profile_version: Optional[str] = rest_field( + name="profileVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Profile version.""" + api_version: Optional[str] = rest_field( + name="apiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Api version.""" + + @overload + def __init__( + self, + *, + profile_version: Optional[str] = None, + api_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 ApplicationDataAuthorization(_Model): + """ApplicationDataAuthorization. + + :ivar role: The ownership role the application has on the resource types. The service owner + role gives the application owner permissions. The limited owner role gives elevated permissions + but does not allow all the permissions of a service owner, such as read/write on internal + metadata. Required. Known values are: "ServiceOwner" and "LimitedOwner". + :vartype role: str or ~azure.mgmt.providerhub.models.Role + :ivar resource_types: The resource types from the defined resource types in the provider + namespace that the application can access. If no resource types are specified and the role is + service owner, the default is * which is all resource types. + :vartype resource_types: list[str] + """ + + role: Union[str, "_models.Role"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The ownership role the application has on the resource types. The service owner role gives the + application owner permissions. The limited owner role gives elevated permissions but does not + allow all the permissions of a service owner, such as read/write on internal metadata. + Required. Known values are: \"ServiceOwner\" and \"LimitedOwner\".""" + resource_types: Optional[list[str]] = rest_field( + name="resourceTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource types from the defined resource types in the provider namespace that the + application can access. If no resource types are specified and the role is service owner, the + default is * which is all resource types.""" + + @overload + def __init__( + self, + *, + role: Union[str, "_models.Role"], + resource_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 ApplicationProviderAuthorization(_Model): + """ApplicationProviderAuthorization. + + :ivar role_definition_id: The role definition ID for the application. + :vartype role_definition_id: str + :ivar managed_by_role_definition_id: The managed by role definition ID for the application. + :vartype managed_by_role_definition_id: str + """ + + role_definition_id: Optional[str] = rest_field( + name="roleDefinitionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The role definition ID for the application.""" + managed_by_role_definition_id: Optional[str] = rest_field( + name="managedByRoleDefinitionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The managed by role definition ID for the application.""" + + @overload + def __init__( + self, + *, + role_definition_id: Optional[str] = None, + managed_by_role_definition_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 AsyncOperationPollingRules(_Model): + """AsyncOperationPollingRules. + + :ivar authorization_actions: The authorization actions. + :vartype authorization_actions: list[str] + :ivar additional_options: The additional options. Known values are: + "ProtectedAsyncOperationPolling" and "ProtectedAsyncOperationPollingAuditOnly". + :vartype additional_options: str or + ~azure.mgmt.providerhub.models.AdditionalOptionsAsyncOperation + """ + + authorization_actions: Optional[list[str]] = rest_field( + name="authorizationActions", visibility=["read", "create", "update", "delete", "query"] + ) + """The authorization actions.""" + additional_options: Optional[Union[str, "_models.AdditionalOptionsAsyncOperation"]] = rest_field( + name="additionalOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The additional options. Known values are: \"ProtectedAsyncOperationPolling\" and + \"ProtectedAsyncOperationPollingAuditOnly\".""" + + @overload + def __init__( + self, + *, + authorization_actions: Optional[list[str]] = None, + additional_options: Optional[Union[str, "_models.AdditionalOptionsAsyncOperation"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AsyncTimeoutRule(_Model): + """AsyncTimeoutRule. + + :ivar action_name: + :vartype action_name: str + :ivar timeout: This is a TimeSpan property. + :vartype timeout: str + """ + + action_name: Optional[str] = rest_field( + name="actionName", visibility=["read", "create", "update", "delete", "query"] + ) + timeout: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """This is a TimeSpan property.""" + + @overload + def __init__( + self, + *, + action_name: Optional[str] = None, + timeout: 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 AuthorizationActionMapping(_Model): + """AuthorizationActionMapping. + + :ivar original: The original action name. + :vartype original: str + :ivar desired: The desired action name. + :vartype desired: str + """ + + original: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The original action name.""" + desired: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The desired action name.""" + + @overload + def __init__( + self, + *, + original: Optional[str] = None, + desired: 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 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.providerhub.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 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.providerhub.models.SystemData + """ + + +class AuthorizedApplication(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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.providerhub.models.SystemData + :ivar properties: + :vartype properties: ~azure.mgmt.providerhub.models.AuthorizedApplicationProperties + """ + + properties: Optional["_models.AuthorizedApplicationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + properties: Optional["_models.AuthorizedApplicationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class AuthorizedApplicationProperties(_Model): + """AuthorizedApplicationProperties. + + :ivar provider_authorization: + :vartype provider_authorization: + ~azure.mgmt.providerhub.models.ApplicationProviderAuthorization + :ivar data_authorizations: The authorizations that determine the level of data access + permissions on the specified resource types. + :vartype data_authorizations: list[~azure.mgmt.providerhub.models.ApplicationDataAuthorization] + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: str or ~azure.mgmt.providerhub.models.ProvisioningState + """ + + provider_authorization: Optional["_models.ApplicationProviderAuthorization"] = rest_field( + name="providerAuthorization", visibility=["read", "create", "update", "delete", "query"] + ) + data_authorizations: Optional[list["_models.ApplicationDataAuthorization"]] = rest_field( + name="dataAuthorizations", visibility=["read", "create", "update", "delete", "query"] + ) + """The authorizations that determine the level of data access permissions on the specified + resource types.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + + @overload + def __init__( + self, + *, + provider_authorization: Optional["_models.ApplicationProviderAuthorization"] = None, + data_authorizations: Optional[list["_models.ApplicationDataAuthorization"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CanaryTrafficRegionRolloutConfiguration(_Model): + """CanaryTrafficRegionRolloutConfiguration. + + :ivar skip_regions: The skip regions. + :vartype skip_regions: list[str] + :ivar regions: The regions. + :vartype regions: list[str] + """ + + skip_regions: Optional[list[str]] = rest_field( + name="skipRegions", visibility=["read", "create", "update", "delete", "query"] + ) + """The skip regions.""" + regions: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The regions.""" + + @overload + def __init__( + self, + *, + skip_regions: Optional[list[str]] = None, + regions: 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 CheckinManifestInfo(_Model): + """CheckinManifestInfo. + + :ivar is_checked_in: Whether the manifest is checked in. Required. + :vartype is_checked_in: bool + :ivar status_message: The status message. Required. + :vartype status_message: str + :ivar pull_request: The pull request. + :vartype pull_request: str + :ivar commit_id: The commit id. + :vartype commit_id: str + """ + + is_checked_in: bool = rest_field(name="isCheckedIn", visibility=["read", "create", "update", "delete", "query"]) + """Whether the manifest is checked in. Required.""" + status_message: str = rest_field(name="statusMessage", visibility=["read", "create", "update", "delete", "query"]) + """The status message. Required.""" + pull_request: Optional[str] = rest_field( + name="pullRequest", visibility=["read", "create", "update", "delete", "query"] + ) + """The pull request.""" + commit_id: Optional[str] = rest_field(name="commitId", visibility=["read", "create", "update", "delete", "query"]) + """The commit id.""" + + @overload + def __init__( + self, + *, + is_checked_in: bool, + status_message: str, + pull_request: Optional[str] = None, + commit_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 CheckinManifestParams(_Model): + """CheckinManifestParams. + + :ivar environment: The environment supplied to the checkin manifest operation. Required. + :vartype environment: str + :ivar baseline_arm_manifest_location: The baseline ARM manifest location supplied to the + checkin manifest operation. Required. + :vartype baseline_arm_manifest_location: str + """ + + environment: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The environment supplied to the checkin manifest operation. Required.""" + baseline_arm_manifest_location: str = rest_field( + name="baselineArmManifestLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """The baseline ARM manifest location supplied to the checkin manifest operation. Required.""" + + @overload + def __init__( + self, + *, + environment: str, + baseline_arm_manifest_location: 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 CheckNameAvailabilitySpecifications(_Model): + """CheckNameAvailabilitySpecifications. + + :ivar enable_default_validation: Whether default validation is enabled. + :vartype enable_default_validation: bool + :ivar resource_types_with_custom_validation: The resource types with custom validation. + :vartype resource_types_with_custom_validation: list[str] + """ + + enable_default_validation: Optional[bool] = rest_field( + name="enableDefaultValidation", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether default validation is enabled.""" + resource_types_with_custom_validation: Optional[list[str]] = rest_field( + name="resourceTypesWithCustomValidation", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource types with custom validation.""" + + @overload + def __init__( + self, + *, + enable_default_validation: Optional[bool] = None, + resource_types_with_custom_validation: 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 CustomRollout(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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.providerhub.models.SystemData + :ivar properties: Properties of the rollout. Required. + :vartype properties: ~azure.mgmt.providerhub.models.CustomRolloutProperties + """ + + properties: "_models.CustomRolloutProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the rollout. Required.""" + + @overload + def __init__( + self, + *, + properties: "_models.CustomRolloutProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomRolloutProperties(_Model): + """CustomRolloutProperties. + + :ivar provisioning_state: The provisioned state of the resource. Known values are: + "NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", + "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", and + "RolloutInProgress". + :vartype provisioning_state: str or ~azure.mgmt.providerhub.models.ProvisioningState + :ivar specification: The specification. Required. + :vartype specification: ~azure.mgmt.providerhub.models.CustomRolloutPropertiesSpecification + :ivar status: The status. + :vartype status: ~azure.mgmt.providerhub.models.CustomRolloutPropertiesStatus + """ + + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"NotSpecified\", \"Accepted\", + \"Running\", \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", + \"Succeeded\", \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + specification: "_models.CustomRolloutPropertiesSpecification" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The specification. Required.""" + status: Optional["_models.CustomRolloutPropertiesStatus"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status.""" + + @overload + def __init__( + self, + *, + specification: "_models.CustomRolloutPropertiesSpecification", + status: Optional["_models.CustomRolloutPropertiesStatus"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomRolloutSpecification(_Model): + """CustomRolloutSpecification. + + :ivar auto_provision_config: The auto provisioning configuration. + :vartype auto_provision_config: + ~azure.mgmt.providerhub.models.CustomRolloutSpecificationAutoProvisionConfig + :ivar canary: The canary region configuration. + :vartype canary: ~azure.mgmt.providerhub.models.CustomRolloutSpecificationCanary + :ivar release_scopes: The list of ARM regions scoped for the release. + :vartype release_scopes: list[str] + :ivar refresh_subscription_registration: Whether refreshing subscription registration is + enabled or disabled. + :vartype refresh_subscription_registration: bool + :ivar skip_release_scope_validation: Whether release scope validation should be skipped. + :vartype skip_release_scope_validation: bool + :ivar provider_registration: The provider registration. + :vartype provider_registration: + ~azure.mgmt.providerhub.models.CustomRolloutSpecificationProviderRegistration + :ivar resource_type_registrations: The resource type registrations. + :vartype resource_type_registrations: + list[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + """ + + auto_provision_config: Optional["_models.CustomRolloutSpecificationAutoProvisionConfig"] = rest_field( + name="autoProvisionConfig", visibility=["read", "create", "update", "delete", "query"] + ) + """The auto provisioning configuration.""" + canary: Optional["_models.CustomRolloutSpecificationCanary"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The canary region configuration.""" + release_scopes: Optional[list[str]] = rest_field( + name="releaseScopes", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of ARM regions scoped for the release.""" + refresh_subscription_registration: Optional[bool] = rest_field( + name="refreshSubscriptionRegistration", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether refreshing subscription registration is enabled or disabled.""" + skip_release_scope_validation: Optional[bool] = rest_field( + name="skipReleaseScopeValidation", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether release scope validation should be skipped.""" + provider_registration: Optional["_models.CustomRolloutSpecificationProviderRegistration"] = rest_field( + name="providerRegistration", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider registration.""" + resource_type_registrations: Optional[list["_models.ResourceTypeRegistration"]] = rest_field( + name="resourceTypeRegistrations", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource type registrations.""" + + @overload + def __init__( + self, + *, + auto_provision_config: Optional["_models.CustomRolloutSpecificationAutoProvisionConfig"] = None, + canary: Optional["_models.CustomRolloutSpecificationCanary"] = None, + release_scopes: Optional[list[str]] = None, + refresh_subscription_registration: Optional[bool] = None, + skip_release_scope_validation: Optional[bool] = None, + provider_registration: Optional["_models.CustomRolloutSpecificationProviderRegistration"] = None, + resource_type_registrations: Optional[list["_models.ResourceTypeRegistration"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomRolloutPropertiesSpecification(CustomRolloutSpecification): + """The specification. + + :ivar auto_provision_config: The auto provisioning configuration. + :vartype auto_provision_config: + ~azure.mgmt.providerhub.models.CustomRolloutSpecificationAutoProvisionConfig + :ivar canary: The canary region configuration. + :vartype canary: ~azure.mgmt.providerhub.models.CustomRolloutSpecificationCanary + :ivar release_scopes: The list of ARM regions scoped for the release. + :vartype release_scopes: list[str] + :ivar refresh_subscription_registration: Whether refreshing subscription registration is + enabled or disabled. + :vartype refresh_subscription_registration: bool + :ivar skip_release_scope_validation: Whether release scope validation should be skipped. + :vartype skip_release_scope_validation: bool + :ivar provider_registration: The provider registration. + :vartype provider_registration: + ~azure.mgmt.providerhub.models.CustomRolloutSpecificationProviderRegistration + :ivar resource_type_registrations: The resource type registrations. + :vartype resource_type_registrations: + list[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + """ + + @overload + def __init__( + self, + *, + auto_provision_config: Optional["_models.CustomRolloutSpecificationAutoProvisionConfig"] = None, + canary: Optional["_models.CustomRolloutSpecificationCanary"] = None, + release_scopes: Optional[list[str]] = None, + refresh_subscription_registration: Optional[bool] = None, + skip_release_scope_validation: Optional[bool] = None, + provider_registration: Optional["_models.CustomRolloutSpecificationProviderRegistration"] = None, + resource_type_registrations: Optional[list["_models.ResourceTypeRegistration"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomRolloutStatus(_Model): + """CustomRolloutStatus. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, ~azure.mgmt.providerhub.models.ExtendedErrorInfo] + :ivar manifest_checkin_status: The manifest checkin status. + :vartype manifest_checkin_status: + ~azure.mgmt.providerhub.models.CustomRolloutStatusManifestCheckinStatus + """ + + completed_regions: Optional[list[str]] = rest_field( + name="completedRegions", visibility=["read", "create", "update", "delete", "query"] + ) + """The completed regions.""" + failed_or_skipped_regions: Optional[dict[str, "_models.ExtendedErrorInfo"]] = rest_field( + name="failedOrSkippedRegions", visibility=["read", "create", "update", "delete", "query"] + ) + """The failed or skipped regions.""" + manifest_checkin_status: Optional["_models.CustomRolloutStatusManifestCheckinStatus"] = rest_field( + name="manifestCheckinStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """The manifest checkin status.""" + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = None, + failed_or_skipped_regions: Optional[dict[str, "_models.ExtendedErrorInfo"]] = None, + manifest_checkin_status: Optional["_models.CustomRolloutStatusManifestCheckinStatus"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomRolloutPropertiesStatus(CustomRolloutStatus): + """The status. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, ~azure.mgmt.providerhub.models.ExtendedErrorInfo] + :ivar manifest_checkin_status: The manifest checkin status. + :vartype manifest_checkin_status: + ~azure.mgmt.providerhub.models.CustomRolloutStatusManifestCheckinStatus + """ + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = None, + failed_or_skipped_regions: Optional[dict[str, "_models.ExtendedErrorInfo"]] = None, + manifest_checkin_status: Optional["_models.CustomRolloutStatusManifestCheckinStatus"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomRolloutSpecificationAutoProvisionConfig(_Model): # pylint: disable=name-too-long + """The auto provisioning configuration. + + :ivar storage: + :vartype storage: bool + :ivar resource_graph: + :vartype resource_graph: bool + """ + + storage: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + resource_graph: Optional[bool] = rest_field( + name="resourceGraph", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + storage: Optional[bool] = None, + resource_graph: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TrafficRegions(_Model): + """TrafficRegions. + + :ivar regions: + :vartype regions: list[str] + """ + + regions: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + + @overload + def __init__( + self, + *, + regions: 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 CustomRolloutSpecificationCanary(TrafficRegions): + """The canary region configuration. + + :ivar regions: + :vartype regions: list[str] + """ + + @overload + def __init__( + self, + *, + regions: 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 ProviderRegistration(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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.providerhub.models.SystemData + :ivar properties: + :vartype properties: ~azure.mgmt.providerhub.models.ProviderRegistrationProperties + :ivar kind: Provider registration kind. This Metadata is also used by portal/tooling/etc to + render different UX experiences for resources of the same type. Known values are: "Managed", + "Hybrid", and "Direct". + :vartype kind: str or ~azure.mgmt.providerhub.models.ProviderRegistrationKind + """ + + properties: Optional["_models.ProviderRegistrationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + kind: Optional[Union[str, "_models.ProviderRegistrationKind"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Provider registration kind. This Metadata is also used by portal/tooling/etc to render + different UX experiences for resources of the same type. Known values are: \"Managed\", + \"Hybrid\", and \"Direct\".""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.ProviderRegistrationProperties"] = None, + kind: Optional[Union[str, "_models.ProviderRegistrationKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomRolloutSpecificationProviderRegistration(ProviderRegistration): # pylint: disable=name-too-long + """The provider registration. + + :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.providerhub.models.SystemData + :ivar properties: + :vartype properties: ~azure.mgmt.providerhub.models.ProviderRegistrationProperties + :ivar kind: Provider registration kind. This Metadata is also used by portal/tooling/etc to + render different UX experiences for resources of the same type. Known values are: "Managed", + "Hybrid", and "Direct". + :vartype kind: str or ~azure.mgmt.providerhub.models.ProviderRegistrationKind + """ + + @overload + def __init__( + self, + *, + properties: Optional["_models.ProviderRegistrationProperties"] = None, + kind: Optional[Union[str, "_models.ProviderRegistrationKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class CustomRolloutStatusManifestCheckinStatus(CheckinManifestInfo): + """The manifest checkin status. + + :ivar is_checked_in: Whether the manifest is checked in. Required. + :vartype is_checked_in: bool + :ivar status_message: The status message. Required. + :vartype status_message: str + :ivar pull_request: The pull request. + :vartype pull_request: str + :ivar commit_id: The commit id. + :vartype commit_id: str + """ + + @overload + def __init__( + self, + *, + is_checked_in: bool, + status_message: str, + pull_request: Optional[str] = None, + commit_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 DefaultRollout(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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.providerhub.models.SystemData + :ivar properties: Properties of the rollout. + :vartype properties: ~azure.mgmt.providerhub.models.DefaultRolloutProperties + """ + + properties: Optional["_models.DefaultRolloutProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the rollout.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.DefaultRolloutProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutProperties(_Model): + """DefaultRolloutProperties. + + :ivar provisioning_state: The provisioned state of the resource. Known values are: + "NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", + "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", and + "RolloutInProgress". + :vartype provisioning_state: str or ~azure.mgmt.providerhub.models.ProvisioningState + :ivar specification: The default rollout specification. + :vartype specification: ~azure.mgmt.providerhub.models.DefaultRolloutPropertiesSpecification + :ivar status: The default rollout status. + :vartype status: ~azure.mgmt.providerhub.models.DefaultRolloutPropertiesStatus + """ + + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"NotSpecified\", \"Accepted\", + \"Running\", \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", + \"Succeeded\", \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + specification: Optional["_models.DefaultRolloutPropertiesSpecification"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The default rollout specification.""" + status: Optional["_models.DefaultRolloutPropertiesStatus"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The default rollout status.""" + + @overload + def __init__( + self, + *, + specification: Optional["_models.DefaultRolloutPropertiesSpecification"] = None, + status: Optional["_models.DefaultRolloutPropertiesStatus"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecification(_Model): + """DefaultRolloutSpecification. + + :ivar expedited_rollout: The expedited rollout definition. + :vartype expedited_rollout: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationExpeditedRollout + :ivar canary: The canary traffic region configuration. + :vartype canary: ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationCanary + :ivar low_traffic: The low traffic region configuration. + :vartype low_traffic: ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationLowTraffic + :ivar medium_traffic: The medium traffic region configuration. + :vartype medium_traffic: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationMediumTraffic + :ivar high_traffic: The high traffic region configuration. + :vartype high_traffic: ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationHighTraffic + :ivar rest_of_the_world_group_one: The rest of the world group one region configuration. + :vartype rest_of_the_world_group_one: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupOne + :ivar rest_of_the_world_group_two: The rest of the world group two region configuration. + :vartype rest_of_the_world_group_two: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo + :ivar provider_registration: The provider registration. + :vartype provider_registration: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationProviderRegistration + :ivar resource_type_registrations: The resource type registrations. + :vartype resource_type_registrations: + list[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :ivar auto_provision_config: The auto provisioning config. + :vartype auto_provision_config: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationAutoProvisionConfig + """ + + expedited_rollout: Optional["_models.DefaultRolloutSpecificationExpeditedRollout"] = rest_field( + name="expeditedRollout", visibility=["read", "create", "update", "delete", "query"] + ) + """The expedited rollout definition.""" + canary: Optional["_models.DefaultRolloutSpecificationCanary"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The canary traffic region configuration.""" + low_traffic: Optional["_models.DefaultRolloutSpecificationLowTraffic"] = rest_field( + name="lowTraffic", visibility=["read", "create", "update", "delete", "query"] + ) + """The low traffic region configuration.""" + medium_traffic: Optional["_models.DefaultRolloutSpecificationMediumTraffic"] = rest_field( + name="mediumTraffic", visibility=["read", "create", "update", "delete", "query"] + ) + """The medium traffic region configuration.""" + high_traffic: Optional["_models.DefaultRolloutSpecificationHighTraffic"] = rest_field( + name="highTraffic", visibility=["read", "create", "update", "delete", "query"] + ) + """The high traffic region configuration.""" + rest_of_the_world_group_one: Optional["_models.DefaultRolloutSpecificationRestOfTheWorldGroupOne"] = rest_field( + name="restOfTheWorldGroupOne", visibility=["read", "create", "update", "delete", "query"] + ) + """The rest of the world group one region configuration.""" + rest_of_the_world_group_two: Optional["_models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo"] = rest_field( + name="restOfTheWorldGroupTwo", visibility=["read", "create", "update", "delete", "query"] + ) + """The rest of the world group two region configuration.""" + provider_registration: Optional["_models.DefaultRolloutSpecificationProviderRegistration"] = rest_field( + name="providerRegistration", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider registration.""" + resource_type_registrations: Optional[list["_models.ResourceTypeRegistration"]] = rest_field( + name="resourceTypeRegistrations", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource type registrations.""" + auto_provision_config: Optional["_models.DefaultRolloutSpecificationAutoProvisionConfig"] = rest_field( + name="autoProvisionConfig", visibility=["read", "create", "update", "delete", "query"] + ) + """The auto provisioning config.""" + + @overload + def __init__( + self, + *, + expedited_rollout: Optional["_models.DefaultRolloutSpecificationExpeditedRollout"] = None, + canary: Optional["_models.DefaultRolloutSpecificationCanary"] = None, + low_traffic: Optional["_models.DefaultRolloutSpecificationLowTraffic"] = None, + medium_traffic: Optional["_models.DefaultRolloutSpecificationMediumTraffic"] = None, + high_traffic: Optional["_models.DefaultRolloutSpecificationHighTraffic"] = None, + rest_of_the_world_group_one: Optional["_models.DefaultRolloutSpecificationRestOfTheWorldGroupOne"] = None, + rest_of_the_world_group_two: Optional["_models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo"] = None, + provider_registration: Optional["_models.DefaultRolloutSpecificationProviderRegistration"] = None, + resource_type_registrations: Optional[list["_models.ResourceTypeRegistration"]] = None, + auto_provision_config: Optional["_models.DefaultRolloutSpecificationAutoProvisionConfig"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutPropertiesSpecification(DefaultRolloutSpecification): + """The default rollout specification. + + :ivar expedited_rollout: The expedited rollout definition. + :vartype expedited_rollout: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationExpeditedRollout + :ivar canary: The canary traffic region configuration. + :vartype canary: ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationCanary + :ivar low_traffic: The low traffic region configuration. + :vartype low_traffic: ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationLowTraffic + :ivar medium_traffic: The medium traffic region configuration. + :vartype medium_traffic: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationMediumTraffic + :ivar high_traffic: The high traffic region configuration. + :vartype high_traffic: ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationHighTraffic + :ivar rest_of_the_world_group_one: The rest of the world group one region configuration. + :vartype rest_of_the_world_group_one: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupOne + :ivar rest_of_the_world_group_two: The rest of the world group two region configuration. + :vartype rest_of_the_world_group_two: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo + :ivar provider_registration: The provider registration. + :vartype provider_registration: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationProviderRegistration + :ivar resource_type_registrations: The resource type registrations. + :vartype resource_type_registrations: + list[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :ivar auto_provision_config: The auto provisioning config. + :vartype auto_provision_config: + ~azure.mgmt.providerhub.models.DefaultRolloutSpecificationAutoProvisionConfig + """ + + @overload + def __init__( + self, + *, + expedited_rollout: Optional["_models.DefaultRolloutSpecificationExpeditedRollout"] = None, + canary: Optional["_models.DefaultRolloutSpecificationCanary"] = None, + low_traffic: Optional["_models.DefaultRolloutSpecificationLowTraffic"] = None, + medium_traffic: Optional["_models.DefaultRolloutSpecificationMediumTraffic"] = None, + high_traffic: Optional["_models.DefaultRolloutSpecificationHighTraffic"] = None, + rest_of_the_world_group_one: Optional["_models.DefaultRolloutSpecificationRestOfTheWorldGroupOne"] = None, + rest_of_the_world_group_two: Optional["_models.DefaultRolloutSpecificationRestOfTheWorldGroupTwo"] = None, + provider_registration: Optional["_models.DefaultRolloutSpecificationProviderRegistration"] = None, + resource_type_registrations: Optional[list["_models.ResourceTypeRegistration"]] = None, + auto_provision_config: Optional["_models.DefaultRolloutSpecificationAutoProvisionConfig"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RolloutStatusBase(_Model): + """RolloutStatusBase. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, ~azure.mgmt.providerhub.models.ExtendedErrorInfo] + """ + + completed_regions: Optional[list[str]] = rest_field( + name="completedRegions", visibility=["read", "create", "update", "delete", "query"] + ) + """The completed regions.""" + failed_or_skipped_regions: Optional[dict[str, "_models.ExtendedErrorInfo"]] = rest_field( + name="failedOrSkippedRegions", visibility=["read", "create", "update", "delete", "query"] + ) + """The failed or skipped regions.""" + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = None, + failed_or_skipped_regions: Optional[dict[str, "_models.ExtendedErrorInfo"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutStatus(RolloutStatusBase): + """DefaultRolloutStatus. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, ~azure.mgmt.providerhub.models.ExtendedErrorInfo] + :ivar next_traffic_region: The next traffic region. Known values are: "NotSpecified", "Canary", + "LowTraffic", "MediumTraffic", "HighTraffic", "None", "RestOfTheWorldGroupOne", and + "RestOfTheWorldGroupTwo". + :vartype next_traffic_region: str or ~azure.mgmt.providerhub.models.TrafficRegionCategory + :ivar next_traffic_region_scheduled_time: The next traffic region scheduled time. + :vartype next_traffic_region_scheduled_time: ~datetime.datetime + :ivar subscription_reregistration_result: The subscription reregistration result. Known values + are: "NotApplicable", "ConditionalUpdate", "ForcedUpdate", and "Failed". + :vartype subscription_reregistration_result: str or + ~azure.mgmt.providerhub.models.SubscriptionReregistrationResult + :ivar manifest_checkin_status: The manifest checkin status. + :vartype manifest_checkin_status: + ~azure.mgmt.providerhub.models.DefaultRolloutStatusManifestCheckinStatus + """ + + next_traffic_region: Optional[Union[str, "_models.TrafficRegionCategory"]] = rest_field( + name="nextTrafficRegion", visibility=["read", "create", "update", "delete", "query"] + ) + """The next traffic region. Known values are: \"NotSpecified\", \"Canary\", \"LowTraffic\", + \"MediumTraffic\", \"HighTraffic\", \"None\", \"RestOfTheWorldGroupOne\", and + \"RestOfTheWorldGroupTwo\".""" + next_traffic_region_scheduled_time: Optional[datetime.datetime] = rest_field( + name="nextTrafficRegionScheduledTime", + visibility=["read", "create", "update", "delete", "query"], + format="rfc3339", + ) + """The next traffic region scheduled time.""" + subscription_reregistration_result: Optional[Union[str, "_models.SubscriptionReregistrationResult"]] = rest_field( + name="subscriptionReregistrationResult", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription reregistration result. Known values are: \"NotApplicable\", + \"ConditionalUpdate\", \"ForcedUpdate\", and \"Failed\".""" + manifest_checkin_status: Optional["_models.DefaultRolloutStatusManifestCheckinStatus"] = rest_field( + name="manifestCheckinStatus", visibility=["read", "create", "update", "delete", "query"] + ) + """The manifest checkin status.""" + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = None, + failed_or_skipped_regions: Optional[dict[str, "_models.ExtendedErrorInfo"]] = None, + next_traffic_region: Optional[Union[str, "_models.TrafficRegionCategory"]] = None, + next_traffic_region_scheduled_time: Optional[datetime.datetime] = None, + subscription_reregistration_result: Optional[Union[str, "_models.SubscriptionReregistrationResult"]] = None, + manifest_checkin_status: Optional["_models.DefaultRolloutStatusManifestCheckinStatus"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutPropertiesStatus(DefaultRolloutStatus): + """The default rollout status. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, ~azure.mgmt.providerhub.models.ExtendedErrorInfo] + :ivar next_traffic_region: The next traffic region. Known values are: "NotSpecified", "Canary", + "LowTraffic", "MediumTraffic", "HighTraffic", "None", "RestOfTheWorldGroupOne", and + "RestOfTheWorldGroupTwo". + :vartype next_traffic_region: str or ~azure.mgmt.providerhub.models.TrafficRegionCategory + :ivar next_traffic_region_scheduled_time: The next traffic region scheduled time. + :vartype next_traffic_region_scheduled_time: ~datetime.datetime + :ivar subscription_reregistration_result: The subscription reregistration result. Known values + are: "NotApplicable", "ConditionalUpdate", "ForcedUpdate", and "Failed". + :vartype subscription_reregistration_result: str or + ~azure.mgmt.providerhub.models.SubscriptionReregistrationResult + :ivar manifest_checkin_status: The manifest checkin status. + :vartype manifest_checkin_status: + ~azure.mgmt.providerhub.models.DefaultRolloutStatusManifestCheckinStatus + """ + + @overload + def __init__( + self, + *, + completed_regions: Optional[list[str]] = None, + failed_or_skipped_regions: Optional[dict[str, "_models.ExtendedErrorInfo"]] = None, + next_traffic_region: Optional[Union[str, "_models.TrafficRegionCategory"]] = None, + next_traffic_region_scheduled_time: Optional[datetime.datetime] = None, + subscription_reregistration_result: Optional[Union[str, "_models.SubscriptionReregistrationResult"]] = None, + manifest_checkin_status: Optional["_models.DefaultRolloutStatusManifestCheckinStatus"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecificationAutoProvisionConfig(_Model): # pylint: disable=name-too-long + """The auto provisioning config. + + :ivar storage: Whether auto provisioning for storage is enabled. + :vartype storage: bool + :ivar resource_graph: Whether auto provisioning for resource graph is enabled. + :vartype resource_graph: bool + """ + + storage: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether auto provisioning for storage is enabled.""" + resource_graph: Optional[bool] = rest_field( + name="resourceGraph", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether auto provisioning for resource graph is enabled.""" + + @overload + def __init__( + self, + *, + storage: Optional[bool] = None, + resource_graph: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecificationCanary(CanaryTrafficRegionRolloutConfiguration): + """The canary traffic region configuration. + + :ivar skip_regions: The skip regions. + :vartype skip_regions: list[str] + :ivar regions: The regions. + :vartype regions: list[str] + """ + + @overload + def __init__( + self, + *, + skip_regions: Optional[list[str]] = None, + regions: 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 ExpeditedRolloutDefinition(_Model): + """ExpeditedRolloutDefinition. + + :ivar enabled: Indicates whether expedited rollout is enabled/disabled. + :vartype enabled: bool + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Indicates whether expedited rollout is enabled/disabled.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecificationExpeditedRollout(ExpeditedRolloutDefinition): # pylint: disable=name-too-long + """The expedited rollout definition. + + :ivar enabled: Indicates whether expedited rollout is enabled/disabled. + :vartype enabled: bool + """ + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TrafficRegionRolloutConfiguration(TrafficRegions): + """TrafficRegionRolloutConfiguration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: ~datetime.timedelta + """ + + wait_duration: Optional[datetime.timedelta] = rest_field( + name="waitDuration", visibility=["read", "create", "update", "delete", "query"] + ) + """The wait duration.""" + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = None, + wait_duration: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecificationHighTraffic(TrafficRegionRolloutConfiguration): + """The high traffic region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: ~datetime.timedelta + """ + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = None, + wait_duration: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecificationLowTraffic(TrafficRegionRolloutConfiguration): + """The low traffic region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: ~datetime.timedelta + """ + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = None, + wait_duration: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecificationMediumTraffic(TrafficRegionRolloutConfiguration): + """The medium traffic region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: ~datetime.timedelta + """ + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = None, + wait_duration: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecificationProviderRegistration(ProviderRegistration): # pylint: disable=name-too-long + """The provider registration. + + :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.providerhub.models.SystemData + :ivar properties: + :vartype properties: ~azure.mgmt.providerhub.models.ProviderRegistrationProperties + :ivar kind: Provider registration kind. This Metadata is also used by portal/tooling/etc to + render different UX experiences for resources of the same type. Known values are: "Managed", + "Hybrid", and "Direct". + :vartype kind: str or ~azure.mgmt.providerhub.models.ProviderRegistrationKind + """ + + @overload + def __init__( + self, + *, + properties: Optional["_models.ProviderRegistrationProperties"] = None, + kind: Optional[Union[str, "_models.ProviderRegistrationKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecificationRestOfTheWorldGroupOne( + TrafficRegionRolloutConfiguration +): # pylint: disable=name-too-long + """The rest of the world group one region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: ~datetime.timedelta + """ + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = None, + wait_duration: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutSpecificationRestOfTheWorldGroupTwo( + TrafficRegionRolloutConfiguration +): # pylint: disable=name-too-long + """The rest of the world group two region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: ~datetime.timedelta + """ + + @overload + def __init__( + self, + *, + regions: Optional[list[str]] = None, + wait_duration: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class DefaultRolloutStatusManifestCheckinStatus(CheckinManifestInfo): # pylint: disable=name-too-long + """The manifest checkin status. + + :ivar is_checked_in: Whether the manifest is checked in. Required. + :vartype is_checked_in: bool + :ivar status_message: The status message. Required. + :vartype status_message: str + :ivar pull_request: The pull request. + :vartype pull_request: str + :ivar commit_id: The commit id. + :vartype commit_id: str + """ + + @overload + def __init__( + self, + *, + is_checked_in: bool, + status_message: str, + pull_request: Optional[str] = None, + commit_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 DeleteDependency(_Model): + """DeleteDependency. + + :ivar required_features: Required features. + :vartype required_features: list[str] + :ivar linked_property: Linked property. + :vartype linked_property: str + :ivar linked_type: Linked type. + :vartype linked_type: str + """ + + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """Required features.""" + linked_property: Optional[str] = rest_field( + name="linkedProperty", visibility=["read", "create", "update", "delete", "query"] + ) + """Linked property.""" + linked_type: Optional[str] = rest_field( + name="linkedType", visibility=["read", "create", "update", "delete", "query"] + ) + """Linked type.""" + + @overload + def __init__( + self, + *, + required_features: Optional[list[str]] = None, + linked_property: Optional[str] = None, + linked_type: 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 DstsConfiguration(_Model): + """DstsConfiguration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + service_name: str = rest_field(name="serviceName", visibility=["read", "create", "update", "delete", "query"]) + """The service name. Required.""" + service_dns_name: Optional[str] = rest_field( + name="serviceDnsName", visibility=["read", "create", "update", "delete", "query"] + ) + """This is a URI property.""" + + @overload + def __init__( + self, + *, + service_name: str, + service_dns_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 EndpointInformation(_Model): + """EndpointInformation. + + :ivar endpoint: The endpoint. + :vartype endpoint: str + :ivar endpoint_type: The endpoint type. Known values are: "Webhook" and "Eventhub". + :vartype endpoint_type: str or ~azure.mgmt.providerhub.models.NotificationEndpointType + :ivar schema_version: The schema version. + :vartype schema_version: str + """ + + endpoint: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The endpoint.""" + endpoint_type: Optional[Union[str, "_models.NotificationEndpointType"]] = rest_field( + name="endpointType", visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoint type. Known values are: \"Webhook\" and \"Eventhub\".""" + schema_version: Optional[str] = rest_field( + name="schemaVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The schema version.""" + + @overload + def __init__( + self, + *, + endpoint: Optional[str] = None, + endpoint_type: Optional[Union[str, "_models.NotificationEndpointType"]] = None, + schema_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 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.providerhub.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.providerhub.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.providerhub.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 ExtendedErrorInfo(_Model): + """Error information. + + :ivar code: The error code. + :vartype code: str + :ivar target: The target of the error. + :vartype target: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.providerhub.models.ExtendedErrorInfo] + :ivar additional_info: The additional error information. + :vartype additional_info: list[~azure.mgmt.providerhub.models.TypedErrorInfo] + """ + + code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error code.""" + target: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The target of the error.""" + message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error message.""" + details: Optional[list["_models.ExtendedErrorInfo"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The error details.""" + additional_info: Optional[list["_models.TypedErrorInfo"]] = rest_field( + name="additionalInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """The additional error information.""" + + @overload + def __init__( + self, + *, + code: Optional[str] = None, + target: Optional[str] = None, + message: Optional[str] = None, + details: Optional[list["_models.ExtendedErrorInfo"]] = None, + additional_info: Optional[list["_models.TypedErrorInfo"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExtendedLocationOptions(_Model): + """ExtendedLocationOptions. + + :ivar type: The type. Known values are: "NotSpecified", "CustomLocation", "EdgeZone", and + "ArcZone". + :vartype type: str or ~azure.mgmt.providerhub.models.ExtendedLocationType + :ivar supported_policy: Known values are: "NotSpecified" and "All". + :vartype supported_policy: str or + ~azure.mgmt.providerhub.models.ResourceTypeExtendedLocationPolicy + """ + + type: Optional[Union[str, "_models.ExtendedLocationType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type. Known values are: \"NotSpecified\", \"CustomLocation\", \"EdgeZone\", and + \"ArcZone\".""" + supported_policy: Optional[Union[str, "_models.ResourceTypeExtendedLocationPolicy"]] = rest_field( + name="supportedPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Known values are: \"NotSpecified\" and \"All\".""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.ExtendedLocationType"]] = None, + supported_policy: Optional[Union[str, "_models.ResourceTypeExtendedLocationPolicy"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExtensionOptions(_Model): + """ExtensionOptions. + + :ivar request: The request. + :vartype request: list[str or ~azure.mgmt.providerhub.models.ExtensionOptionType] + :ivar response: The response. + :vartype response: list[str or ~azure.mgmt.providerhub.models.ExtensionOptionType] + """ + + request: Optional[list[Union[str, "_models.ExtensionOptionType"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The request.""" + response: Optional[list[Union[str, "_models.ExtensionOptionType"]]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The response.""" + + @overload + def __init__( + self, + *, + request: Optional[list[Union[str, "_models.ExtensionOptionType"]]] = None, + response: Optional[list[Union[str, "_models.ExtensionOptionType"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FanoutLinkedNotificationRule(_Model): + """FanoutLinkedNotificationRule. + + :ivar token_auth_configuration: The token auth configuration. + :vartype token_auth_configuration: ~azure.mgmt.providerhub.models.TokenAuthConfiguration + :ivar actions: The actions. + :vartype actions: list[str] + :ivar endpoints: The endpoints. + :vartype endpoints: list[~azure.mgmt.providerhub.models.ResourceProviderEndpoint] + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: + ~azure.mgmt.providerhub.models.FanoutLinkedNotificationRuleDstsConfiguration + """ + + token_auth_configuration: Optional["_models.TokenAuthConfiguration"] = rest_field( + name="tokenAuthConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The token auth configuration.""" + actions: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The actions.""" + endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoints.""" + dsts_configuration: Optional["_models.FanoutLinkedNotificationRuleDstsConfiguration"] = rest_field( + name="dstsConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The dsts configuration.""" + + @overload + def __init__( + self, + *, + token_auth_configuration: Optional["_models.TokenAuthConfiguration"] = None, + actions: Optional[list[str]] = None, + endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = None, + dsts_configuration: Optional["_models.FanoutLinkedNotificationRuleDstsConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FanoutLinkedNotificationRuleDstsConfiguration(DstsConfiguration): # pylint: disable=name-too-long + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + @overload + def __init__( + self, + *, + service_name: str, + service_dns_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 FeaturesRule(_Model): + """FeaturesRule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: str or ~azure.mgmt.providerhub.models.FeaturesPolicy + """ + + required_features_policy: Union[str, "_models.FeaturesPolicy"] = rest_field( + name="requiredFeaturesPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The required feature policy. Required. Known values are: \"Any\" and \"All\".""" + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, "_models.FeaturesPolicy"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FilterRule(_Model): + """FilterRule. + + :ivar filter_query: The filter query. + :vartype filter_query: str + :ivar endpoint_information: The endpoint information. + :vartype endpoint_information: list[~azure.mgmt.providerhub.models.EndpointInformation] + """ + + filter_query: Optional[str] = rest_field( + name="filterQuery", visibility=["read", "create", "update", "delete", "query"] + ) + """The filter query.""" + endpoint_information: Optional[list["_models.EndpointInformation"]] = rest_field( + name="endpointInformation", visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoint information.""" + + @overload + def __init__( + self, + *, + filter_query: Optional[str] = None, + endpoint_information: Optional[list["_models.EndpointInformation"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FrontloadPayload(_Model): + """FrontloadPayload. + + :ivar properties: Properties of the frontload payload. Required. + :vartype properties: ~azure.mgmt.providerhub.models.FrontloadPayloadProperties + """ + + properties: "_models.FrontloadPayloadProperties" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Properties of the frontload payload. Required.""" + + @overload + def __init__( + self, + *, + properties: "_models.FrontloadPayloadProperties", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FrontloadPayloadProperties(_Model): + """FrontloadPayloadProperties. + + :ivar operation_type: The operation type. Required. + :vartype operation_type: str + :ivar provider_namespace: The provider namespace. Required. + :vartype provider_namespace: str + :ivar frontload_location: The frontload location. Required. + :vartype frontload_location: str + :ivar copy_from_location: The copy from location. Required. + :vartype copy_from_location: str + :ivar environment_type: The environment type. Required. Known values are: "NotSpecified", + "Canary", "Prod", "All", "Mooncake", and "Fairfax". + :vartype environment_type: str or + ~azure.mgmt.providerhub.models.AvailableCheckInManifestEnvironment + :ivar service_feature_flag: The service feature flag. Required. Known values are: "DoNotCreate" + and "Create". + :vartype service_feature_flag: str or ~azure.mgmt.providerhub.models.ServiceFeatureFlagAction + :ivar include_resource_types: The resource types to include. Required. + :vartype include_resource_types: list[str] + :ivar exclude_resource_types: The resource types to exclude. Required. + :vartype exclude_resource_types: list[str] + :ivar override_manifest_level_fields: The manifest level fields to override. Required. + :vartype override_manifest_level_fields: + ~azure.mgmt.providerhub.models.FrontloadPayloadPropertiesOverrideManifestLevelFields + :ivar override_endpoint_level_fields: The endpoint level fields to override. Required. + :vartype override_endpoint_level_fields: + ~azure.mgmt.providerhub.models.FrontloadPayloadPropertiesOverrideEndpointLevelFields + :ivar ignore_fields: The fields to ignore. Required. + :vartype ignore_fields: list[str] + """ + + operation_type: str = rest_field(name="operationType", visibility=["read", "create", "update", "delete", "query"]) + """The operation type. Required.""" + provider_namespace: str = rest_field( + name="providerNamespace", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider namespace. Required.""" + frontload_location: str = rest_field( + name="frontloadLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """The frontload location. Required.""" + copy_from_location: str = rest_field( + name="copyFromLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """The copy from location. Required.""" + environment_type: Union[str, "_models.AvailableCheckInManifestEnvironment"] = rest_field( + name="environmentType", visibility=["read", "create", "update", "delete", "query"] + ) + """The environment type. Required. Known values are: \"NotSpecified\", \"Canary\", \"Prod\", + \"All\", \"Mooncake\", and \"Fairfax\".""" + service_feature_flag: Union[str, "_models.ServiceFeatureFlagAction"] = rest_field( + name="serviceFeatureFlag", visibility=["read", "create", "update", "delete", "query"] + ) + """The service feature flag. Required. Known values are: \"DoNotCreate\" and \"Create\".""" + include_resource_types: list[str] = rest_field( + name="includeResourceTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource types to include. Required.""" + exclude_resource_types: list[str] = rest_field( + name="excludeResourceTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource types to exclude. Required.""" + override_manifest_level_fields: "_models.FrontloadPayloadPropertiesOverrideManifestLevelFields" = rest_field( + name="overrideManifestLevelFields", visibility=["read", "create", "update", "delete", "query"] + ) + """The manifest level fields to override. Required.""" + override_endpoint_level_fields: "_models.FrontloadPayloadPropertiesOverrideEndpointLevelFields" = rest_field( + name="overrideEndpointLevelFields", visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoint level fields to override. Required.""" + ignore_fields: list[str] = rest_field( + name="ignoreFields", visibility=["read", "create", "update", "delete", "query"] + ) + """The fields to ignore. Required.""" + + @overload + def __init__( + self, + *, + operation_type: str, + provider_namespace: str, + frontload_location: str, + copy_from_location: str, + environment_type: Union[str, "_models.AvailableCheckInManifestEnvironment"], + service_feature_flag: Union[str, "_models.ServiceFeatureFlagAction"], + include_resource_types: list[str], + exclude_resource_types: list[str], + override_manifest_level_fields: "_models.FrontloadPayloadPropertiesOverrideManifestLevelFields", + override_endpoint_level_fields: "_models.FrontloadPayloadPropertiesOverrideEndpointLevelFields", + ignore_fields: 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 ResourceTypeEndpointBase(_Model): + """ResourceTypeEndpointBase. + + :ivar enabled: Whether it's enabled. Required. + :vartype enabled: bool + :ivar api_versions: The api versions. Required. + :vartype api_versions: list[str] + :ivar endpoint_uri: The endpoint uri. Required. + :vartype endpoint_uri: str + :ivar locations: The locations. Required. + :vartype locations: list[str] + :ivar required_features: The required features. Required. + :vartype required_features: list[str] + :ivar features_rule: The features rule. Required. + :vartype features_rule: ~azure.mgmt.providerhub.models.ResourceTypeEndpointBaseFeaturesRule + :ivar timeout: This is a TimeSpan property. Required. + :vartype timeout: ~datetime.timedelta + :ivar endpoint_type: The endpoint type. Required. Known values are: "NotSpecified", "Canary", + "Production", and "TestInProduction". + :vartype endpoint_type: str or ~azure.mgmt.providerhub.models.EndpointType + :ivar dsts_configuration: The dsts configuration. Required. + :vartype dsts_configuration: + ~azure.mgmt.providerhub.models.ResourceTypeEndpointBaseDstsConfiguration + :ivar sku_link: The sku link. Required. + :vartype sku_link: str + :ivar api_version: The api version. Required. + :vartype api_version: str + :ivar zones: The zones. Required. + :vartype zones: list[str] + """ + + enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether it's enabled. Required.""" + api_versions: list[str] = rest_field(name="apiVersions", visibility=["read", "create", "update", "delete", "query"]) + """The api versions. Required.""" + endpoint_uri: str = rest_field(name="endpointUri", visibility=["read", "create", "update", "delete", "query"]) + """The endpoint uri. Required.""" + locations: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The locations. Required.""" + required_features: list[str] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features. Required.""" + features_rule: "_models.ResourceTypeEndpointBaseFeaturesRule" = rest_field( + name="featuresRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The features rule. Required.""" + timeout: datetime.timedelta = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """This is a TimeSpan property. Required.""" + endpoint_type: Union[str, "_models.EndpointType"] = rest_field( + name="endpointType", visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoint type. Required. Known values are: \"NotSpecified\", \"Canary\", \"Production\", + and \"TestInProduction\".""" + dsts_configuration: "_models.ResourceTypeEndpointBaseDstsConfiguration" = rest_field( + name="dstsConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The dsts configuration. Required.""" + sku_link: str = rest_field(name="skuLink", visibility=["read", "create", "update", "delete", "query"]) + """The sku link. Required.""" + api_version: str = rest_field(name="apiVersion", visibility=["read", "create", "update", "delete", "query"]) + """The api version. Required.""" + zones: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The zones. Required.""" + + @overload + def __init__( + self, + *, + enabled: bool, + api_versions: list[str], + endpoint_uri: str, + locations: list[str], + required_features: list[str], + features_rule: "_models.ResourceTypeEndpointBaseFeaturesRule", + timeout: datetime.timedelta, + endpoint_type: Union[str, "_models.EndpointType"], + dsts_configuration: "_models.ResourceTypeEndpointBaseDstsConfiguration", + sku_link: str, + api_version: str, + zones: 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 FrontloadPayloadPropertiesOverrideEndpointLevelFields(ResourceTypeEndpointBase): # pylint: disable=name-too-long + """The endpoint level fields to override. + + :ivar enabled: Whether it's enabled. Required. + :vartype enabled: bool + :ivar api_versions: The api versions. Required. + :vartype api_versions: list[str] + :ivar endpoint_uri: The endpoint uri. Required. + :vartype endpoint_uri: str + :ivar locations: The locations. Required. + :vartype locations: list[str] + :ivar required_features: The required features. Required. + :vartype required_features: list[str] + :ivar features_rule: The features rule. Required. + :vartype features_rule: ~azure.mgmt.providerhub.models.ResourceTypeEndpointBaseFeaturesRule + :ivar timeout: This is a TimeSpan property. Required. + :vartype timeout: ~datetime.timedelta + :ivar endpoint_type: The endpoint type. Required. Known values are: "NotSpecified", "Canary", + "Production", and "TestInProduction". + :vartype endpoint_type: str or ~azure.mgmt.providerhub.models.EndpointType + :ivar dsts_configuration: The dsts configuration. Required. + :vartype dsts_configuration: + ~azure.mgmt.providerhub.models.ResourceTypeEndpointBaseDstsConfiguration + :ivar sku_link: The sku link. Required. + :vartype sku_link: str + :ivar api_version: The api version. Required. + :vartype api_version: str + :ivar zones: The zones. Required. + :vartype zones: list[str] + """ + + @overload + def __init__( + self, + *, + enabled: bool, + api_versions: list[str], + endpoint_uri: str, + locations: list[str], + required_features: list[str], + features_rule: "_models.ResourceTypeEndpointBaseFeaturesRule", + timeout: datetime.timedelta, + endpoint_type: Union[str, "_models.EndpointType"], + dsts_configuration: "_models.ResourceTypeEndpointBaseDstsConfiguration", + sku_link: str, + api_version: str, + zones: 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 ManifestLevelPropertyBag(_Model): + """ManifestLevelPropertyBag. + + :ivar resource_hydration_accounts: The resource hydration accounts. + :vartype resource_hydration_accounts: + list[~azure.mgmt.providerhub.models.ResourceHydrationAccount] + """ + + resource_hydration_accounts: Optional[list["_models.ResourceHydrationAccount"]] = rest_field( + name="resourceHydrationAccounts", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource hydration accounts.""" + + @overload + def __init__( + self, + *, + resource_hydration_accounts: Optional[list["_models.ResourceHydrationAccount"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FrontloadPayloadPropertiesOverrideManifestLevelFields(ManifestLevelPropertyBag): # pylint: disable=name-too-long + """The manifest level fields to override. + + :ivar resource_hydration_accounts: The resource hydration accounts. + :vartype resource_hydration_accounts: + list[~azure.mgmt.providerhub.models.ResourceHydrationAccount] + """ + + @overload + def __init__( + self, + *, + resource_hydration_accounts: Optional[list["_models.ResourceHydrationAccount"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IdentityManagement(_Model): + """IdentityManagement. + + :ivar type: The type. Known values are: "NotSpecified", "SystemAssigned", "UserAssigned", + "Actor", and "DelegatedResourceIdentity". + :vartype type: str or ~azure.mgmt.providerhub.models.IdentityManagementTypes + """ + + type: Optional[Union[str, "_models.IdentityManagementTypes"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type. Known values are: \"NotSpecified\", \"SystemAssigned\", \"UserAssigned\", \"Actor\", + and \"DelegatedResourceIdentity\".""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.IdentityManagementTypes"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class IdentityManagementProperties(_Model): + """IdentityManagementProperties. + + :ivar type: The type. Known values are: "NotSpecified", "SystemAssigned", "UserAssigned", + "Actor", and "DelegatedResourceIdentity". + :vartype type: str or ~azure.mgmt.providerhub.models.IdentityManagementTypes + :ivar application_id: The application id. + :vartype application_id: str + :ivar application_ids: The application ids. + :vartype application_ids: list[str] + :ivar delegation_app_ids: The delegation app ids. + :vartype delegation_app_ids: list[str] + """ + + type: Optional[Union[str, "_models.IdentityManagementTypes"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type. Known values are: \"NotSpecified\", \"SystemAssigned\", \"UserAssigned\", \"Actor\", + and \"DelegatedResourceIdentity\".""" + application_id: Optional[str] = rest_field( + name="applicationId", visibility=["read", "create", "update", "delete", "query"] + ) + """The application id.""" + application_ids: Optional[list[str]] = rest_field( + name="applicationIds", visibility=["read", "create", "update", "delete", "query"] + ) + """The application ids.""" + delegation_app_ids: Optional[list[str]] = rest_field( + name="delegationAppIds", visibility=["read", "create", "update", "delete", "query"] + ) + """The delegation app ids.""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.IdentityManagementTypes"]] = None, + application_id: Optional[str] = None, + application_ids: Optional[list[str]] = None, + delegation_app_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 LegacyDisallowedCondition(_Model): + """LegacyDisallowedCondition. + + :ivar disallowed_legacy_operations: The disallowed legacy operations. + :vartype disallowed_legacy_operations: list[str or + ~azure.mgmt.providerhub.models.LegacyOperation] + :ivar feature: Feature string. + :vartype feature: str + """ + + disallowed_legacy_operations: Optional[list[Union[str, "_models.LegacyOperation"]]] = rest_field( + name="disallowedLegacyOperations", visibility=["read", "create", "update", "delete", "query"] + ) + """The disallowed legacy operations.""" + feature: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Feature string.""" + + @overload + def __init__( + self, + *, + disallowed_legacy_operations: Optional[list[Union[str, "_models.LegacyOperation"]]] = None, + feature: 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 LightHouseAuthorization(_Model): + """LightHouseAuthorization. + + :ivar principal_id: The principal id. Required. + :vartype principal_id: str + :ivar role_definition_id: The role definition id. Required. + :vartype role_definition_id: str + """ + + principal_id: str = rest_field(name="principalId", visibility=["read", "create", "update", "delete", "query"]) + """The principal id. Required.""" + role_definition_id: str = rest_field( + name="roleDefinitionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The role definition id. Required.""" + + @overload + def __init__( + self, + *, + principal_id: str, + role_definition_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 LinkedAccessCheck(_Model): + """LinkedAccessCheck. + + :ivar action_name: The action name. + :vartype action_name: str + :ivar linked_property: The linked property. + :vartype linked_property: str + :ivar linked_action: The linked action. + :vartype linked_action: str + :ivar linked_action_verb: The linked action verb. + :vartype linked_action_verb: str + :ivar linked_type: The linked type. + :vartype linked_type: str + """ + + action_name: Optional[str] = rest_field( + name="actionName", visibility=["read", "create", "update", "delete", "query"] + ) + """The action name.""" + linked_property: Optional[str] = rest_field( + name="linkedProperty", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked property.""" + linked_action: Optional[str] = rest_field( + name="linkedAction", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked action.""" + linked_action_verb: Optional[str] = rest_field( + name="linkedActionVerb", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked action verb.""" + linked_type: Optional[str] = rest_field( + name="linkedType", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked type.""" + + @overload + def __init__( + self, + *, + action_name: Optional[str] = None, + linked_property: Optional[str] = None, + linked_action: Optional[str] = None, + linked_action_verb: Optional[str] = None, + linked_type: 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 LinkedNotificationRule(_Model): + """LinkedNotificationRule. + + :ivar actions: The actions. + :vartype actions: list[str] + :ivar actions_on_failed_operation: The actions on failed operation. + :vartype actions_on_failed_operation: list[str] + :ivar fast_path_actions: The fast path actions. + :vartype fast_path_actions: list[str] + :ivar fast_path_actions_on_failed_operation: The fast path action on failed operation. + :vartype fast_path_actions_on_failed_operation: list[str] + :ivar linked_notification_timeout: This is a TimeSpan property. + :vartype linked_notification_timeout: ~datetime.timedelta + """ + + actions: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The actions.""" + actions_on_failed_operation: Optional[list[str]] = rest_field( + name="actionsOnFailedOperation", visibility=["read", "create", "update", "delete", "query"] + ) + """The actions on failed operation.""" + fast_path_actions: Optional[list[str]] = rest_field( + name="fastPathActions", visibility=["read", "create", "update", "delete", "query"] + ) + """The fast path actions.""" + fast_path_actions_on_failed_operation: Optional[list[str]] = rest_field( + name="fastPathActionsOnFailedOperation", visibility=["read", "create", "update", "delete", "query"] + ) + """The fast path action on failed operation.""" + linked_notification_timeout: Optional[datetime.timedelta] = rest_field( + name="linkedNotificationTimeout", visibility=["read", "create", "update", "delete", "query"] + ) + """This is a TimeSpan property.""" + + @overload + def __init__( + self, + *, + actions: Optional[list[str]] = None, + actions_on_failed_operation: Optional[list[str]] = None, + fast_path_actions: Optional[list[str]] = None, + fast_path_actions_on_failed_operation: Optional[list[str]] = None, + linked_notification_timeout: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LinkedOperationRule(_Model): + """LinkedOperationRule. + + :ivar linked_operation: The linked operation. Required. Known values are: "None", + "CrossResourceGroupResourceMove", and "CrossSubscriptionResourceMove". + :vartype linked_operation: str or ~azure.mgmt.providerhub.models.LinkedOperation + :ivar linked_action: The linked action. Required. Known values are: "NotSpecified", "Blocked", + "Validate", and "Enabled". + :vartype linked_action: str or ~azure.mgmt.providerhub.models.LinkedAction + :ivar depends_on_types: Depends on types. + :vartype depends_on_types: list[str] + """ + + linked_operation: Union[str, "_models.LinkedOperation"] = rest_field( + name="linkedOperation", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked operation. Required. Known values are: \"None\", \"CrossResourceGroupResourceMove\", + and \"CrossSubscriptionResourceMove\".""" + linked_action: Union[str, "_models.LinkedAction"] = rest_field( + name="linkedAction", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked action. Required. Known values are: \"NotSpecified\", \"Blocked\", \"Validate\", and + \"Enabled\".""" + depends_on_types: Optional[list[str]] = rest_field( + name="dependsOnTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """Depends on types.""" + + @overload + def __init__( + self, + *, + linked_operation: Union[str, "_models.LinkedOperation"], + linked_action: Union[str, "_models.LinkedAction"], + depends_on_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 LocalizedOperationDefinition(_Model): + """LocalizedOperationDefinition. + + :ivar name: Name of the operation. Required. + :vartype name: str + :ivar is_data_action: Indicates whether the operation applies to data-plane. + :vartype is_data_action: bool + :ivar origin: The origin. Known values are: "NotSpecified", "User", and "System". + :vartype origin: str or ~azure.mgmt.providerhub.models.OperationOrigins + :ivar display: Display information of the operation. Required. + :vartype display: ~azure.mgmt.providerhub.models.LocalizedOperationDefinitionDisplay + :ivar action_type: The action type. Known values are: "NotSpecified" and "Internal". + :vartype action_type: str or ~azure.mgmt.providerhub.models.OperationActionType + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the operation. Required.""" + is_data_action: Optional[bool] = rest_field( + name="isDataAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether the operation applies to data-plane.""" + origin: Optional[Union[str, "_models.OperationOrigins"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The origin. Known values are: \"NotSpecified\", \"User\", and \"System\".""" + display: "_models.LocalizedOperationDefinitionDisplay" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation. Required.""" + action_type: Optional[Union[str, "_models.OperationActionType"]] = rest_field( + name="actionType", visibility=["read", "create", "update", "delete", "query"] + ) + """The action type. Known values are: \"NotSpecified\" and \"Internal\".""" + + @overload + def __init__( + self, + *, + name: str, + display: "_models.LocalizedOperationDefinitionDisplay", + is_data_action: Optional[bool] = None, + origin: Optional[Union[str, "_models.OperationOrigins"]] = None, + action_type: Optional[Union[str, "_models.OperationActionType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LocalizedOperationDisplayDefinition(_Model): + """LocalizedOperationDisplayDefinition. + + :ivar default: Display information of the operation. Required. + :vartype default: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionDefault + :ivar en: Display information of the operation for en locale. + :vartype en: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionEn + :ivar cs: Display information of the operation for cs locale. + :vartype cs: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionCs + :ivar de: Display information of the operation for de locale. + :vartype de: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionDe + :ivar es: Display information of the operation for es locale. + :vartype es: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionEs + :ivar fr: Display information of the operation for fr locale. + :vartype fr: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionFr + :ivar hu: Display information of the operation for hu locale. + :vartype hu: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionHu + :ivar it: Display information of the operation for it locale. + :vartype it: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionIt + :ivar ja: Display information of the operation for ja locale. + :vartype ja: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionJa + :ivar ko: Display information of the operation for ko locale. + :vartype ko: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionKo + :ivar nl: Display information of the operation for nl locale. + :vartype nl: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionNl + :ivar pl: Display information of the operation for pl locale. + :vartype pl: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPl + :ivar pt_br: Display information of the operation for pt-BR locale. + :vartype pt_br: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPtBR + :ivar pt_pt: Display information of the operation for pt-PT locale. + :vartype pt_pt: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPtPT + :ivar ru: Display information of the operation for ru locale. + :vartype ru: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionRu + :ivar sv: Display information of the operation for sv locale. + :vartype sv: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionSv + :ivar zh_hans: Display information of the operation for zh-Hans locale. + :vartype zh_hans: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionZhHans + :ivar zh_hant: Display information of the operation for zh-Hant locale. + :vartype zh_hant: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionZhHant + """ + + default: "_models.LocalizedOperationDisplayDefinitionDefault" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation. Required.""" + en: Optional["_models.LocalizedOperationDisplayDefinitionEn"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for en locale.""" + cs: Optional["_models.LocalizedOperationDisplayDefinitionCs"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for cs locale.""" + de: Optional["_models.LocalizedOperationDisplayDefinitionDe"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for de locale.""" + es: Optional["_models.LocalizedOperationDisplayDefinitionEs"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for es locale.""" + fr: Optional["_models.LocalizedOperationDisplayDefinitionFr"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for fr locale.""" + hu: Optional["_models.LocalizedOperationDisplayDefinitionHu"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for hu locale.""" + it: Optional["_models.LocalizedOperationDisplayDefinitionIt"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for it locale.""" + ja: Optional["_models.LocalizedOperationDisplayDefinitionJa"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for ja locale.""" + ko: Optional["_models.LocalizedOperationDisplayDefinitionKo"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for ko locale.""" + nl: Optional["_models.LocalizedOperationDisplayDefinitionNl"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for nl locale.""" + pl: Optional["_models.LocalizedOperationDisplayDefinitionPl"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for pl locale.""" + pt_br: Optional["_models.LocalizedOperationDisplayDefinitionPtBR"] = rest_field( + name="ptBR", visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for pt-BR locale.""" + pt_pt: Optional["_models.LocalizedOperationDisplayDefinitionPtPT"] = rest_field( + name="ptPT", visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for pt-PT locale.""" + ru: Optional["_models.LocalizedOperationDisplayDefinitionRu"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for ru locale.""" + sv: Optional["_models.LocalizedOperationDisplayDefinitionSv"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for sv locale.""" + zh_hans: Optional["_models.LocalizedOperationDisplayDefinitionZhHans"] = rest_field( + name="zhHans", visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for zh-Hans locale.""" + zh_hant: Optional["_models.LocalizedOperationDisplayDefinitionZhHant"] = rest_field( + name="zhHant", visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation for zh-Hant locale.""" + + @overload + def __init__( + self, + *, + default: "_models.LocalizedOperationDisplayDefinitionDefault", + en: Optional["_models.LocalizedOperationDisplayDefinitionEn"] = None, + cs: Optional["_models.LocalizedOperationDisplayDefinitionCs"] = None, + de: Optional["_models.LocalizedOperationDisplayDefinitionDe"] = None, + es: Optional["_models.LocalizedOperationDisplayDefinitionEs"] = None, + fr: Optional["_models.LocalizedOperationDisplayDefinitionFr"] = None, + hu: Optional["_models.LocalizedOperationDisplayDefinitionHu"] = None, + it: Optional["_models.LocalizedOperationDisplayDefinitionIt"] = None, + ja: Optional["_models.LocalizedOperationDisplayDefinitionJa"] = None, + ko: Optional["_models.LocalizedOperationDisplayDefinitionKo"] = None, + nl: Optional["_models.LocalizedOperationDisplayDefinitionNl"] = None, + pl: Optional["_models.LocalizedOperationDisplayDefinitionPl"] = None, + pt_br: Optional["_models.LocalizedOperationDisplayDefinitionPtBR"] = None, + pt_pt: Optional["_models.LocalizedOperationDisplayDefinitionPtPT"] = None, + ru: Optional["_models.LocalizedOperationDisplayDefinitionRu"] = None, + sv: Optional["_models.LocalizedOperationDisplayDefinitionSv"] = None, + zh_hans: Optional["_models.LocalizedOperationDisplayDefinitionZhHans"] = None, + zh_hant: Optional["_models.LocalizedOperationDisplayDefinitionZhHant"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LocalizedOperationDefinitionDisplay(LocalizedOperationDisplayDefinition): + """Display information of the operation. + + :ivar default: Display information of the operation. Required. + :vartype default: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionDefault + :ivar en: Display information of the operation for en locale. + :vartype en: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionEn + :ivar cs: Display information of the operation for cs locale. + :vartype cs: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionCs + :ivar de: Display information of the operation for de locale. + :vartype de: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionDe + :ivar es: Display information of the operation for es locale. + :vartype es: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionEs + :ivar fr: Display information of the operation for fr locale. + :vartype fr: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionFr + :ivar hu: Display information of the operation for hu locale. + :vartype hu: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionHu + :ivar it: Display information of the operation for it locale. + :vartype it: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionIt + :ivar ja: Display information of the operation for ja locale. + :vartype ja: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionJa + :ivar ko: Display information of the operation for ko locale. + :vartype ko: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionKo + :ivar nl: Display information of the operation for nl locale. + :vartype nl: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionNl + :ivar pl: Display information of the operation for pl locale. + :vartype pl: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPl + :ivar pt_br: Display information of the operation for pt-BR locale. + :vartype pt_br: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPtBR + :ivar pt_pt: Display information of the operation for pt-PT locale. + :vartype pt_pt: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionPtPT + :ivar ru: Display information of the operation for ru locale. + :vartype ru: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionRu + :ivar sv: Display information of the operation for sv locale. + :vartype sv: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionSv + :ivar zh_hans: Display information of the operation for zh-Hans locale. + :vartype zh_hans: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionZhHans + :ivar zh_hant: Display information of the operation for zh-Hant locale. + :vartype zh_hant: ~azure.mgmt.providerhub.models.LocalizedOperationDisplayDefinitionZhHant + """ + + @overload + def __init__( + self, + *, + default: "_models.LocalizedOperationDisplayDefinitionDefault", + en: Optional["_models.LocalizedOperationDisplayDefinitionEn"] = None, + cs: Optional["_models.LocalizedOperationDisplayDefinitionCs"] = None, + de: Optional["_models.LocalizedOperationDisplayDefinitionDe"] = None, + es: Optional["_models.LocalizedOperationDisplayDefinitionEs"] = None, + fr: Optional["_models.LocalizedOperationDisplayDefinitionFr"] = None, + hu: Optional["_models.LocalizedOperationDisplayDefinitionHu"] = None, + it: Optional["_models.LocalizedOperationDisplayDefinitionIt"] = None, + ja: Optional["_models.LocalizedOperationDisplayDefinitionJa"] = None, + ko: Optional["_models.LocalizedOperationDisplayDefinitionKo"] = None, + nl: Optional["_models.LocalizedOperationDisplayDefinitionNl"] = None, + pl: Optional["_models.LocalizedOperationDisplayDefinitionPl"] = None, + pt_br: Optional["_models.LocalizedOperationDisplayDefinitionPtBR"] = None, + pt_pt: Optional["_models.LocalizedOperationDisplayDefinitionPtPT"] = None, + ru: Optional["_models.LocalizedOperationDisplayDefinitionRu"] = None, + sv: Optional["_models.LocalizedOperationDisplayDefinitionSv"] = None, + zh_hans: Optional["_models.LocalizedOperationDisplayDefinitionZhHans"] = None, + zh_hant: Optional["_models.LocalizedOperationDisplayDefinitionZhHant"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationsDisplayDefinition(_Model): + """OperationsDisplayDefinition. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + provider: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The provider. Required.""" + resource: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resource. Required.""" + operation: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The operation. Required.""" + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The description. Required.""" + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionCs(OperationsDisplayDefinition): + """Display information of the operation for cs locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionDe(OperationsDisplayDefinition): + """Display information of the operation for de locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionDefault(OperationsDisplayDefinition): # pylint: disable=name-too-long + """Display information of the operation. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionEn(OperationsDisplayDefinition): + """Display information of the operation for en locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionEs(OperationsDisplayDefinition): + """Display information of the operation for es locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionFr(OperationsDisplayDefinition): + """Display information of the operation for fr locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionHu(OperationsDisplayDefinition): + """Display information of the operation for hu locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionIt(OperationsDisplayDefinition): + """Display information of the operation for it locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionJa(OperationsDisplayDefinition): + """Display information of the operation for ja locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionKo(OperationsDisplayDefinition): + """Display information of the operation for ko locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionNl(OperationsDisplayDefinition): + """Display information of the operation for nl locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionPl(OperationsDisplayDefinition): + """Display information of the operation for pl locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionPtBR(OperationsDisplayDefinition): + """Display information of the operation for pt-BR locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionPtPT(OperationsDisplayDefinition): + """Display information of the operation for pt-PT locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionRu(OperationsDisplayDefinition): + """Display information of the operation for ru locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionSv(OperationsDisplayDefinition): + """Display information of the operation for sv locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionZhHans(OperationsDisplayDefinition): # pylint: disable=name-too-long + """Display information of the operation for zh-Hans locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocalizedOperationDisplayDefinitionZhHant(OperationsDisplayDefinition): # pylint: disable=name-too-long + """Display information of the operation for zh-Hant locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 LocationQuotaRule(_Model): + """LocationQuotaRule. + + :ivar policy: The policy. Known values are: "Default", "None", and "Restricted". + :vartype policy: str or ~azure.mgmt.providerhub.models.QuotaPolicy + :ivar quota_id: The quota id. + :vartype quota_id: str + :ivar location: The location. + :vartype location: str + """ + + policy: Optional[Union[str, "_models.QuotaPolicy"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The policy. Known values are: \"Default\", \"None\", and \"Restricted\".""" + quota_id: Optional[str] = rest_field(name="quotaId", visibility=["read", "create", "update", "delete", "query"]) + """The quota id.""" + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The location.""" + + @overload + def __init__( + self, + *, + policy: Optional[Union[str, "_models.QuotaPolicy"]] = None, + quota_id: 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 LoggingHiddenPropertyPath(_Model): + """LoggingHiddenPropertyPath. + + :ivar hidden_paths_on_request: The hidden paths on request. + :vartype hidden_paths_on_request: list[str] + :ivar hidden_paths_on_response: The hidden paths on response. + :vartype hidden_paths_on_response: list[str] + """ + + hidden_paths_on_request: Optional[list[str]] = rest_field( + name="hiddenPathsOnRequest", visibility=["read", "create", "update", "delete", "query"] + ) + """The hidden paths on request.""" + hidden_paths_on_response: Optional[list[str]] = rest_field( + name="hiddenPathsOnResponse", visibility=["read", "create", "update", "delete", "query"] + ) + """The hidden paths on response.""" + + @overload + def __init__( + self, + *, + hidden_paths_on_request: Optional[list[str]] = None, + hidden_paths_on_response: 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 LoggingRule(_Model): + """LoggingRule. + + :ivar action: The action. Required. + :vartype action: str + :ivar direction: The direction. Required. Known values are: "None", "Request", and "Response". + :vartype direction: str or ~azure.mgmt.providerhub.models.LoggingDirections + :ivar detail_level: The detail level. Required. Known values are: "None" and "Body". + :vartype detail_level: str or ~azure.mgmt.providerhub.models.LoggingDetails + :ivar hidden_property_paths: The hidden property paths. + :vartype hidden_property_paths: ~azure.mgmt.providerhub.models.LoggingRuleHiddenPropertyPaths + """ + + action: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The action. Required.""" + direction: Union[str, "_models.LoggingDirections"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The direction. Required. Known values are: \"None\", \"Request\", and \"Response\".""" + detail_level: Union[str, "_models.LoggingDetails"] = rest_field( + name="detailLevel", visibility=["read", "create", "update", "delete", "query"] + ) + """The detail level. Required. Known values are: \"None\" and \"Body\".""" + hidden_property_paths: Optional["_models.LoggingRuleHiddenPropertyPaths"] = rest_field( + name="hiddenPropertyPaths", visibility=["read", "create", "update", "delete", "query"] + ) + """The hidden property paths.""" + + @overload + def __init__( + self, + *, + action: str, + direction: Union[str, "_models.LoggingDirections"], + detail_level: Union[str, "_models.LoggingDetails"], + hidden_property_paths: Optional["_models.LoggingRuleHiddenPropertyPaths"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LoggingRuleHiddenPropertyPaths(LoggingHiddenPropertyPath): + """The hidden property paths. + + :ivar hidden_paths_on_request: The hidden paths on request. + :vartype hidden_paths_on_request: list[str] + :ivar hidden_paths_on_response: The hidden paths on response. + :vartype hidden_paths_on_response: list[str] + """ + + @overload + def __init__( + self, + *, + hidden_paths_on_request: Optional[list[str]] = None, + hidden_paths_on_response: 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 Notification(_Model): + """Notification. + + :ivar notification_type: The notification type. Known values are: "Unspecified" and + "SubscriptionNotification". + :vartype notification_type: str or ~azure.mgmt.providerhub.models.NotificationType + :ivar skip_notifications: Whether notifications should be skipped. Known values are: + "Unspecified", "Enabled", and "Disabled". + :vartype skip_notifications: str or ~azure.mgmt.providerhub.models.SkipNotifications + """ + + notification_type: Optional[Union[str, "_models.NotificationType"]] = rest_field( + name="notificationType", visibility=["read", "create", "update", "delete", "query"] + ) + """The notification type. Known values are: \"Unspecified\" and \"SubscriptionNotification\".""" + skip_notifications: Optional[Union[str, "_models.SkipNotifications"]] = rest_field( + name="skipNotifications", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether notifications should be skipped. Known values are: \"Unspecified\", \"Enabled\", and + \"Disabled\".""" + + @overload + def __init__( + self, + *, + notification_type: Optional[Union[str, "_models.NotificationType"]] = None, + skip_notifications: Optional[Union[str, "_models.SkipNotifications"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NotificationEndpoint(_Model): + """NotificationEndpoint. + + :ivar notification_destination: The notification destination. + :vartype notification_destination: str + :ivar locations: The locations. + :vartype locations: list[str] + """ + + notification_destination: Optional[str] = rest_field( + name="notificationDestination", visibility=["read", "create", "update", "delete", "query"] + ) + """The notification destination.""" + locations: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The locations.""" + + @overload + def __init__( + self, + *, + notification_destination: Optional[str] = None, + locations: 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 NotificationRegistration(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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.providerhub.models.SystemData + :ivar properties: + :vartype properties: ~azure.mgmt.providerhub.models.NotificationRegistrationProperties + """ + + properties: Optional["_models.NotificationRegistrationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + properties: Optional["_models.NotificationRegistrationProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NotificationRegistrationProperties(_Model): + """NotificationRegistrationProperties. + + :ivar notification_mode: The notification mode. Known values are: "NotSpecified", "EventHub", + and "WebHook". + :vartype notification_mode: str or ~azure.mgmt.providerhub.models.NotificationMode + :ivar message_scope: The message scope. Known values are: "NotSpecified" and + "RegisteredSubscriptions". + :vartype message_scope: str or ~azure.mgmt.providerhub.models.MessageScope + :ivar included_events: The included events. + :vartype included_events: list[str] + :ivar notification_endpoints: The notification endpoints. + :vartype notification_endpoints: list[~azure.mgmt.providerhub.models.NotificationEndpoint] + :ivar provisioning_state: The provisioned state of the resource. Known values are: + "NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", + "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", and + "RolloutInProgress". + :vartype provisioning_state: str or ~azure.mgmt.providerhub.models.ProvisioningState + """ + + notification_mode: Optional[Union[str, "_models.NotificationMode"]] = rest_field( + name="notificationMode", visibility=["read", "create", "update", "delete", "query"] + ) + """The notification mode. Known values are: \"NotSpecified\", \"EventHub\", and \"WebHook\".""" + message_scope: Optional[Union[str, "_models.MessageScope"]] = rest_field( + name="messageScope", visibility=["read", "create", "update", "delete", "query"] + ) + """The message scope. Known values are: \"NotSpecified\" and \"RegisteredSubscriptions\".""" + included_events: Optional[list[str]] = rest_field( + name="includedEvents", visibility=["read", "create", "update", "delete", "query"] + ) + """The included events.""" + notification_endpoints: Optional[list["_models.NotificationEndpoint"]] = rest_field( + name="notificationEndpoints", visibility=["read", "create", "update", "delete", "query"] + ) + """The notification endpoints.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioned state of the resource. Known values are: \"NotSpecified\", \"Accepted\", + \"Running\", \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", + \"Succeeded\", \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + + @overload + def __init__( + self, + *, + notification_mode: Optional[Union[str, "_models.NotificationMode"]] = None, + message_scope: Optional[Union[str, "_models.MessageScope"]] = None, + included_events: Optional[list[str]] = None, + notification_endpoints: Optional[list["_models.NotificationEndpoint"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OpenApiConfiguration(_Model): + """OpenApiConfiguration. + + :ivar validation: The open api validation. + :vartype validation: ~azure.mgmt.providerhub.models.OpenApiValidation + """ + + validation: Optional["_models.OpenApiValidation"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The open api validation.""" + + @overload + def __init__( + self, + *, + validation: Optional["_models.OpenApiValidation"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OpenApiValidation(_Model): + """OpenApiValidation. + + :ivar allow_noncompliant_collection_response: Indicates whether a non compliance response is + allowed for a LIST call. + :vartype allow_noncompliant_collection_response: bool + """ + + allow_noncompliant_collection_response: Optional[bool] = rest_field( + name="allowNoncompliantCollectionResponse", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether a non compliance response is allowed for a LIST call.""" + + @overload + def __init__( + self, + *, + allow_noncompliant_collection_response: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationsContentProperties(_Model): + """OperationsContentProperties. + + :ivar contents: Operations content. + :vartype contents: list[~azure.mgmt.providerhub.models.LocalizedOperationDefinition] + """ + + contents: Optional[list["_models.LocalizedOperationDefinition"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Operations content.""" + + @overload + def __init__( + self, + *, + contents: Optional[list["_models.LocalizedOperationDefinition"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationsDefinition(_Model): + """Properties of an Operation. + + :ivar name: Name of the operation. Required. + :vartype name: str + :ivar is_data_action: Indicates whether the operation applies to data-plane. + :vartype is_data_action: bool + :ivar origin: The origin. Known values are: "NotSpecified", "User", and "System". + :vartype origin: str or ~azure.mgmt.providerhub.models.OperationOrigins + :ivar display: Display information of the operation. Required. + :vartype display: ~azure.mgmt.providerhub.models.OperationsDefinitionDisplay + :ivar action_type: The action type. Known values are: "NotSpecified" and "Internal". + :vartype action_type: str or ~azure.mgmt.providerhub.models.OperationActionType + :ivar properties: Anything. + :vartype properties: any + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of the operation. Required.""" + is_data_action: Optional[bool] = rest_field( + name="isDataAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether the operation applies to data-plane.""" + origin: Optional[Union[str, "_models.OperationOrigins"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The origin. Known values are: \"NotSpecified\", \"User\", and \"System\".""" + display: "_models.OperationsDefinitionDisplay" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Display information of the operation. Required.""" + action_type: Optional[Union[str, "_models.OperationActionType"]] = rest_field( + name="actionType", visibility=["read", "create", "update", "delete", "query"] + ) + """The action type. Known values are: \"NotSpecified\" and \"Internal\".""" + properties: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Anything.""" + + @overload + def __init__( + self, + *, + name: str, + display: "_models.OperationsDefinitionDisplay", + is_data_action: Optional[bool] = None, + origin: Optional[Union[str, "_models.OperationOrigins"]] = None, + action_type: Optional[Union[str, "_models.OperationActionType"]] = None, + properties: Optional[Any] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationsDefinitionDisplay(OperationsDisplayDefinition): + """Display information of the operation. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + @overload + def __init__( + self, + *, + provider: str, + resource: str, + operation: str, + description: 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 OperationsPutContent(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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.providerhub.models.SystemData + :ivar properties: + :vartype properties: ~azure.mgmt.providerhub.models.OperationsPutContentProperties + """ + + properties: Optional["_models.OperationsPutContentProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + properties: Optional["_models.OperationsPutContentProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationsPutContentProperties(OperationsContentProperties): + """OperationsPutContentProperties. + + :ivar contents: Operations content. + :vartype contents: list[~azure.mgmt.providerhub.models.LocalizedOperationDefinition] + """ + + @overload + def __init__( + self, + *, + contents: Optional[list["_models.LocalizedOperationDefinition"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PrivateResourceProviderConfiguration(_Model): + """PrivateResourceProviderConfiguration. + + :ivar allowed_subscriptions: The allowed subscriptions. + :vartype allowed_subscriptions: list[str] + """ + + allowed_subscriptions: Optional[list[str]] = rest_field( + name="allowedSubscriptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed subscriptions.""" + + @overload + def __init__( + self, + *, + allowed_subscriptions: 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 ProviderHubMetadata(_Model): + """ProviderHubMetadata. + + :ivar provider_authorizations: The provider authorizations. + :vartype provider_authorizations: + list[~azure.mgmt.providerhub.models.ResourceProviderAuthorization] + :ivar provider_authentication: The provider authentication. + :vartype provider_authentication: + ~azure.mgmt.providerhub.models.ProviderHubMetadataProviderAuthentication + :ivar third_party_provider_authorization: The third party provider authorization. + :vartype third_party_provider_authorization: + ~azure.mgmt.providerhub.models.ProviderHubMetadataThirdPartyProviderAuthorization + :ivar direct_rp_role_definition_id: The direct RP role definition id. + :vartype direct_rp_role_definition_id: str + :ivar regional_async_operation_resource_type_name: The regional async operation resource type + name. + :vartype regional_async_operation_resource_type_name: str + :ivar global_async_operation_resource_type_name: The global async operation resource type name. + :vartype global_async_operation_resource_type_name: str + """ + + provider_authorizations: Optional[list["_models.ResourceProviderAuthorization"]] = rest_field( + name="providerAuthorizations", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider authorizations.""" + provider_authentication: Optional["_models.ProviderHubMetadataProviderAuthentication"] = rest_field( + name="providerAuthentication", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider authentication.""" + third_party_provider_authorization: Optional["_models.ProviderHubMetadataThirdPartyProviderAuthorization"] = ( + rest_field(name="thirdPartyProviderAuthorization", visibility=["read", "create", "update", "delete", "query"]) + ) + """The third party provider authorization.""" + direct_rp_role_definition_id: Optional[str] = rest_field( + name="directRpRoleDefinitionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The direct RP role definition id.""" + regional_async_operation_resource_type_name: Optional[str] = rest_field( + name="regionalAsyncOperationResourceTypeName", visibility=["read", "create", "update", "delete", "query"] + ) + """The regional async operation resource type name.""" + global_async_operation_resource_type_name: Optional[str] = rest_field( + name="globalAsyncOperationResourceTypeName", visibility=["read", "create", "update", "delete", "query"] + ) + """The global async operation resource type name.""" + + @overload + def __init__( + self, + *, + provider_authorizations: Optional[list["_models.ResourceProviderAuthorization"]] = None, + provider_authentication: Optional["_models.ProviderHubMetadataProviderAuthentication"] = None, + third_party_provider_authorization: Optional[ + "_models.ProviderHubMetadataThirdPartyProviderAuthorization" + ] = None, + direct_rp_role_definition_id: Optional[str] = None, + regional_async_operation_resource_type_name: Optional[str] = None, + global_async_operation_resource_type_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 ResourceProviderAuthentication(_Model): + """ResourceProviderAuthentication. + + :ivar allowed_audiences: The allowed audiences. Required. + :vartype allowed_audiences: list[str] + """ + + allowed_audiences: list[str] = rest_field( + name="allowedAudiences", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed audiences. Required.""" + + @overload + def __init__( + self, + *, + allowed_audiences: 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 ProviderHubMetadataProviderAuthentication(ResourceProviderAuthentication): # pylint: disable=name-too-long + """The provider authentication. + + :ivar allowed_audiences: The allowed audiences. Required. + :vartype allowed_audiences: list[str] + """ + + @overload + def __init__( + self, + *, + allowed_audiences: 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 ThirdPartyProviderAuthorization(_Model): + """ThirdPartyProviderAuthorization. + + :ivar authorizations: The authorizations. + :vartype authorizations: list[~azure.mgmt.providerhub.models.LightHouseAuthorization] + :ivar managed_by_tenant_id: The managed by tenant id. + :vartype managed_by_tenant_id: str + """ + + authorizations: Optional[list["_models.LightHouseAuthorization"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The authorizations.""" + managed_by_tenant_id: Optional[str] = rest_field( + name="managedByTenantId", visibility=["read", "create", "update", "delete", "query"] + ) + """The managed by tenant id.""" + + @overload + def __init__( + self, + *, + authorizations: Optional[list["_models.LightHouseAuthorization"]] = None, + managed_by_tenant_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 ProviderHubMetadataThirdPartyProviderAuthorization( + ThirdPartyProviderAuthorization +): # pylint: disable=name-too-long + """The third party provider authorization. + + :ivar authorizations: The authorizations. + :vartype authorizations: list[~azure.mgmt.providerhub.models.LightHouseAuthorization] + :ivar managed_by_tenant_id: The managed by tenant id. + :vartype managed_by_tenant_id: str + """ + + @overload + def __init__( + self, + *, + authorizations: Optional[list["_models.LightHouseAuthorization"]] = None, + managed_by_tenant_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 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.providerhub.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 ProviderMonitorSetting(TrackedResource): + """Concrete tracked resource types can be created by aliasing this type using a specific property + type. + + :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.providerhub.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: + :vartype properties: ~azure.mgmt.providerhub.models.ProviderMonitorSettingProperties + """ + + properties: Optional["_models.ProviderMonitorSettingProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ProviderMonitorSettingProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProviderMonitorSettingProperties(_Model): + """ProviderMonitorSettingProperties. + + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: str or ~azure.mgmt.providerhub.models.ProvisioningState + """ + + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + + +class ResourceProviderManifestProperties(_Model): + """ResourceProviderManifestProperties. + + :ivar provider_authentication: The provider authentication. + :vartype provider_authentication: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesProviderAuthentication + :ivar provider_authorizations: The provider authorizations. + :vartype provider_authorizations: + list[~azure.mgmt.providerhub.models.ResourceProviderAuthorization] + :ivar namespace: The namespace. + :vartype namespace: str + :ivar services: The services. + :vartype services: list[~azure.mgmt.providerhub.models.ResourceProviderService] + :ivar service_name: The service name. + :vartype service_name: str + :ivar provider_version: The provider version. + :vartype provider_version: str + :ivar provider_type: The provider type. Known values are: "NotSpecified", "Internal", + "External", "Hidden", "RegistrationFree", "LegacyRegistrationRequired", "TenantOnly", and + "AuthorizationFree". + :vartype provider_type: str or ~azure.mgmt.providerhub.models.ResourceProviderType + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesFeaturesRule + :ivar request_header_options: The request header options. + :vartype request_header_options: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesRequestHeaderOptions + :ivar management: The resource provider management. + :vartype management: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesManagement + :ivar capabilities: The capabilities. + :vartype capabilities: list[~azure.mgmt.providerhub.models.ResourceProviderCapabilities] + :ivar cross_tenant_token_validation: The cross tenant token validation. Known values are: + "EnsureSecureValidation" and "PassthroughInsecureToken". + :vartype cross_tenant_token_validation: str or + ~azure.mgmt.providerhub.models.CrossTenantTokenValidation + :ivar metadata: The metadata. + :vartype metadata: any + :ivar template_deployment_options: The template deployment options. + :vartype template_deployment_options: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesTemplateDeploymentOptions + :ivar global_notification_endpoints: The global notification endpoints. + :vartype global_notification_endpoints: + list[~azure.mgmt.providerhub.models.ResourceProviderEndpoint] + :ivar enable_tenant_linked_notification: The enable tenant linked notification. + :vartype enable_tenant_linked_notification: bool + :ivar notifications: The notifications. + :vartype notifications: list[~azure.mgmt.providerhub.models.Notification] + :ivar linked_notification_rules: The linked notification rules. + :vartype linked_notification_rules: + list[~azure.mgmt.providerhub.models.FanoutLinkedNotificationRule] + :ivar resource_provider_authorization_rules: The resource provider authorization rules. + :vartype resource_provider_authorization_rules: + ~azure.mgmt.providerhub.models.ResourceProviderAuthorizationRules + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesDstsConfiguration + :ivar notification_options: Notification options. Known values are: "NotSpecified", "None", and + "EmitSpendingLimit". + :vartype notification_options: str or ~azure.mgmt.providerhub.models.NotificationOptions + :ivar resource_hydration_accounts: resource hydration accounts. + :vartype resource_hydration_accounts: + list[~azure.mgmt.providerhub.models.ResourceHydrationAccount] + :ivar notification_settings: Notification settings. + :vartype notification_settings: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesNotificationSettings + :ivar management_group_global_notification_endpoints: Management groups global notification + endpoints. + :vartype management_group_global_notification_endpoints: + list[~azure.mgmt.providerhub.models.ResourceProviderEndpoint] + :ivar optional_features: Optional features. + :vartype optional_features: list[str] + :ivar resource_group_lock_option_during_move: Resource group lock option during move. + :vartype resource_group_lock_option_during_move: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove + :ivar response_options: Response options. + :vartype response_options: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesResponseOptions + :ivar legacy_namespace: Legacy namespace. + :vartype legacy_namespace: str + :ivar legacy_registrations: Legacy registrations. + :vartype legacy_registrations: list[str] + :ivar custom_manifest_version: Custom manifest version. + :vartype custom_manifest_version: str + """ + + provider_authentication: Optional["_models.ResourceProviderManifestPropertiesProviderAuthentication"] = rest_field( + name="providerAuthentication", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider authentication.""" + provider_authorizations: Optional[list["_models.ResourceProviderAuthorization"]] = rest_field( + name="providerAuthorizations", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider authorizations.""" + namespace: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The namespace.""" + services: Optional[list["_models.ResourceProviderService"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The services.""" + service_name: Optional[str] = rest_field( + name="serviceName", visibility=["read", "create", "update", "delete", "query"] + ) + """The service name.""" + provider_version: Optional[str] = rest_field( + name="providerVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider version.""" + provider_type: Optional[Union[str, "_models.ResourceProviderType"]] = rest_field( + name="providerType", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider type. Known values are: \"NotSpecified\", \"Internal\", \"External\", \"Hidden\", + \"RegistrationFree\", \"LegacyRegistrationRequired\", \"TenantOnly\", and + \"AuthorizationFree\".""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + features_rule: Optional["_models.ResourceProviderManifestPropertiesFeaturesRule"] = rest_field( + name="featuresRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The features rule.""" + request_header_options: Optional["_models.ResourceProviderManifestPropertiesRequestHeaderOptions"] = rest_field( + name="requestHeaderOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The request header options.""" + management: Optional["_models.ResourceProviderManifestPropertiesManagement"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource provider management.""" + capabilities: Optional[list["_models.ResourceProviderCapabilities"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The capabilities.""" + cross_tenant_token_validation: Optional[Union[str, "_models.CrossTenantTokenValidation"]] = rest_field( + name="crossTenantTokenValidation", visibility=["read", "create", "update", "delete", "query"] + ) + """The cross tenant token validation. Known values are: \"EnsureSecureValidation\" and + \"PassthroughInsecureToken\".""" + metadata: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The metadata.""" + template_deployment_options: Optional["_models.ResourceProviderManifestPropertiesTemplateDeploymentOptions"] = ( + rest_field(name="templateDeploymentOptions", visibility=["read", "create", "update", "delete", "query"]) + ) + """The template deployment options.""" + global_notification_endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = rest_field( + name="globalNotificationEndpoints", visibility=["read", "create", "update", "delete", "query"] + ) + """The global notification endpoints.""" + enable_tenant_linked_notification: Optional[bool] = rest_field( + name="enableTenantLinkedNotification", visibility=["read", "create", "update", "delete", "query"] + ) + """The enable tenant linked notification.""" + notifications: Optional[list["_models.Notification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The notifications.""" + linked_notification_rules: Optional[list["_models.FanoutLinkedNotificationRule"]] = rest_field( + name="linkedNotificationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked notification rules.""" + resource_provider_authorization_rules: Optional["_models.ResourceProviderAuthorizationRules"] = rest_field( + name="resourceProviderAuthorizationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource provider authorization rules.""" + dsts_configuration: Optional["_models.ResourceProviderManifestPropertiesDstsConfiguration"] = rest_field( + name="dstsConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The dsts configuration.""" + notification_options: Optional[Union[str, "_models.NotificationOptions"]] = rest_field( + name="notificationOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """Notification options. Known values are: \"NotSpecified\", \"None\", and \"EmitSpendingLimit\".""" + resource_hydration_accounts: Optional[list["_models.ResourceHydrationAccount"]] = rest_field( + name="resourceHydrationAccounts", visibility=["read", "create", "update", "delete", "query"] + ) + """resource hydration accounts.""" + notification_settings: Optional["_models.ResourceProviderManifestPropertiesNotificationSettings"] = rest_field( + name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Notification settings.""" + management_group_global_notification_endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = rest_field( + name="managementGroupGlobalNotificationEndpoints", visibility=["read", "create", "update", "delete", "query"] + ) + """Management groups global notification endpoints.""" + optional_features: Optional[list[str]] = rest_field( + name="optionalFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional features.""" + resource_group_lock_option_during_move: Optional[ + "_models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove" + ] = rest_field(name="resourceGroupLockOptionDuringMove", visibility=["read", "create", "update", "delete", "query"]) + """Resource group lock option during move.""" + response_options: Optional["_models.ResourceProviderManifestPropertiesResponseOptions"] = rest_field( + name="responseOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """Response options.""" + legacy_namespace: Optional[str] = rest_field( + name="legacyNamespace", visibility=["read", "create", "update", "delete", "query"] + ) + """Legacy namespace.""" + legacy_registrations: Optional[list[str]] = rest_field( + name="legacyRegistrations", visibility=["read", "create", "update", "delete", "query"] + ) + """Legacy registrations.""" + custom_manifest_version: Optional[str] = rest_field( + name="customManifestVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Custom manifest version.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + provider_authentication: Optional["_models.ResourceProviderManifestPropertiesProviderAuthentication"] = None, + provider_authorizations: Optional[list["_models.ResourceProviderAuthorization"]] = None, + namespace: Optional[str] = None, + services: Optional[list["_models.ResourceProviderService"]] = None, + service_name: Optional[str] = None, + provider_version: Optional[str] = None, + provider_type: Optional[Union[str, "_models.ResourceProviderType"]] = None, + required_features: Optional[list[str]] = None, + features_rule: Optional["_models.ResourceProviderManifestPropertiesFeaturesRule"] = None, + request_header_options: Optional["_models.ResourceProviderManifestPropertiesRequestHeaderOptions"] = None, + management: Optional["_models.ResourceProviderManifestPropertiesManagement"] = None, + capabilities: Optional[list["_models.ResourceProviderCapabilities"]] = None, + cross_tenant_token_validation: Optional[Union[str, "_models.CrossTenantTokenValidation"]] = None, + metadata: Optional[Any] = None, + template_deployment_options: Optional[ + "_models.ResourceProviderManifestPropertiesTemplateDeploymentOptions" + ] = None, + global_notification_endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = None, + enable_tenant_linked_notification: Optional[bool] = None, + notifications: Optional[list["_models.Notification"]] = None, + linked_notification_rules: Optional[list["_models.FanoutLinkedNotificationRule"]] = None, + resource_provider_authorization_rules: Optional["_models.ResourceProviderAuthorizationRules"] = None, + dsts_configuration: Optional["_models.ResourceProviderManifestPropertiesDstsConfiguration"] = None, + notification_options: Optional[Union[str, "_models.NotificationOptions"]] = None, + resource_hydration_accounts: Optional[list["_models.ResourceHydrationAccount"]] = None, + notification_settings: Optional["_models.ResourceProviderManifestPropertiesNotificationSettings"] = None, + management_group_global_notification_endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = None, + optional_features: Optional[list[str]] = None, + resource_group_lock_option_during_move: Optional[ + "_models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove" + ] = None, + response_options: Optional["_models.ResourceProviderManifestPropertiesResponseOptions"] = None, + legacy_namespace: Optional[str] = None, + legacy_registrations: Optional[list[str]] = None, + custom_manifest_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 ProviderRegistrationProperties(ResourceProviderManifestProperties): + """ProviderRegistrationProperties. + + :ivar provider_authentication: The provider authentication. + :vartype provider_authentication: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesProviderAuthentication + :ivar provider_authorizations: The provider authorizations. + :vartype provider_authorizations: + list[~azure.mgmt.providerhub.models.ResourceProviderAuthorization] + :ivar namespace: The namespace. + :vartype namespace: str + :ivar services: The services. + :vartype services: list[~azure.mgmt.providerhub.models.ResourceProviderService] + :ivar service_name: The service name. + :vartype service_name: str + :ivar provider_version: The provider version. + :vartype provider_version: str + :ivar provider_type: The provider type. Known values are: "NotSpecified", "Internal", + "External", "Hidden", "RegistrationFree", "LegacyRegistrationRequired", "TenantOnly", and + "AuthorizationFree". + :vartype provider_type: str or ~azure.mgmt.providerhub.models.ResourceProviderType + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesFeaturesRule + :ivar request_header_options: The request header options. + :vartype request_header_options: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesRequestHeaderOptions + :ivar management: The resource provider management. + :vartype management: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesManagement + :ivar capabilities: The capabilities. + :vartype capabilities: list[~azure.mgmt.providerhub.models.ResourceProviderCapabilities] + :ivar cross_tenant_token_validation: The cross tenant token validation. Known values are: + "EnsureSecureValidation" and "PassthroughInsecureToken". + :vartype cross_tenant_token_validation: str or + ~azure.mgmt.providerhub.models.CrossTenantTokenValidation + :ivar metadata: The metadata. + :vartype metadata: any + :ivar template_deployment_options: The template deployment options. + :vartype template_deployment_options: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesTemplateDeploymentOptions + :ivar global_notification_endpoints: The global notification endpoints. + :vartype global_notification_endpoints: + list[~azure.mgmt.providerhub.models.ResourceProviderEndpoint] + :ivar enable_tenant_linked_notification: The enable tenant linked notification. + :vartype enable_tenant_linked_notification: bool + :ivar notifications: The notifications. + :vartype notifications: list[~azure.mgmt.providerhub.models.Notification] + :ivar linked_notification_rules: The linked notification rules. + :vartype linked_notification_rules: + list[~azure.mgmt.providerhub.models.FanoutLinkedNotificationRule] + :ivar resource_provider_authorization_rules: The resource provider authorization rules. + :vartype resource_provider_authorization_rules: + ~azure.mgmt.providerhub.models.ResourceProviderAuthorizationRules + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesDstsConfiguration + :ivar notification_options: Notification options. Known values are: "NotSpecified", "None", and + "EmitSpendingLimit". + :vartype notification_options: str or ~azure.mgmt.providerhub.models.NotificationOptions + :ivar resource_hydration_accounts: resource hydration accounts. + :vartype resource_hydration_accounts: + list[~azure.mgmt.providerhub.models.ResourceHydrationAccount] + :ivar notification_settings: Notification settings. + :vartype notification_settings: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesNotificationSettings + :ivar management_group_global_notification_endpoints: Management groups global notification + endpoints. + :vartype management_group_global_notification_endpoints: + list[~azure.mgmt.providerhub.models.ResourceProviderEndpoint] + :ivar optional_features: Optional features. + :vartype optional_features: list[str] + :ivar resource_group_lock_option_during_move: Resource group lock option during move. + :vartype resource_group_lock_option_during_move: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove + :ivar response_options: Response options. + :vartype response_options: + ~azure.mgmt.providerhub.models.ResourceProviderManifestPropertiesResponseOptions + :ivar legacy_namespace: Legacy namespace. + :vartype legacy_namespace: str + :ivar legacy_registrations: Legacy registrations. + :vartype legacy_registrations: list[str] + :ivar custom_manifest_version: Custom manifest version. + :vartype custom_manifest_version: str + :ivar provider_hub_metadata: The provider hub metadata. + :vartype provider_hub_metadata: + ~azure.mgmt.providerhub.models.ProviderRegistrationPropertiesProviderHubMetadata + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: str or ~azure.mgmt.providerhub.models.ProvisioningState + :ivar subscription_lifecycle_notification_specifications: The subscription lifecycle + notification specifications. + :vartype subscription_lifecycle_notification_specifications: + ~azure.mgmt.providerhub.models.ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications + :ivar private_resource_provider_configuration: The private resource provider configuration. + :vartype private_resource_provider_configuration: + ~azure.mgmt.providerhub.models.ProviderRegistrationPropertiesPrivateResourceProviderConfiguration + :ivar token_auth_configuration: The token auth configuration. + :vartype token_auth_configuration: ~azure.mgmt.providerhub.models.TokenAuthConfiguration + """ + + provider_hub_metadata: Optional["_models.ProviderRegistrationPropertiesProviderHubMetadata"] = rest_field( + name="providerHubMetadata", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider hub metadata.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + subscription_lifecycle_notification_specifications: Optional[ + "_models.ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications" + ] = rest_field( + name="subscriptionLifecycleNotificationSpecifications", + visibility=["read", "create", "update", "delete", "query"], + ) + """The subscription lifecycle notification specifications.""" + private_resource_provider_configuration: Optional[ + "_models.ProviderRegistrationPropertiesPrivateResourceProviderConfiguration" + ] = rest_field( + name="privateResourceProviderConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The private resource provider configuration.""" + token_auth_configuration: Optional["_models.TokenAuthConfiguration"] = rest_field( + name="tokenAuthConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The token auth configuration.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + provider_authentication: Optional["_models.ResourceProviderManifestPropertiesProviderAuthentication"] = None, + provider_authorizations: Optional[list["_models.ResourceProviderAuthorization"]] = None, + namespace: Optional[str] = None, + services: Optional[list["_models.ResourceProviderService"]] = None, + service_name: Optional[str] = None, + provider_version: Optional[str] = None, + provider_type: Optional[Union[str, "_models.ResourceProviderType"]] = None, + required_features: Optional[list[str]] = None, + features_rule: Optional["_models.ResourceProviderManifestPropertiesFeaturesRule"] = None, + request_header_options: Optional["_models.ResourceProviderManifestPropertiesRequestHeaderOptions"] = None, + management: Optional["_models.ResourceProviderManifestPropertiesManagement"] = None, + capabilities: Optional[list["_models.ResourceProviderCapabilities"]] = None, + cross_tenant_token_validation: Optional[Union[str, "_models.CrossTenantTokenValidation"]] = None, + metadata: Optional[Any] = None, + template_deployment_options: Optional[ + "_models.ResourceProviderManifestPropertiesTemplateDeploymentOptions" + ] = None, + global_notification_endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = None, + enable_tenant_linked_notification: Optional[bool] = None, + notifications: Optional[list["_models.Notification"]] = None, + linked_notification_rules: Optional[list["_models.FanoutLinkedNotificationRule"]] = None, + resource_provider_authorization_rules: Optional["_models.ResourceProviderAuthorizationRules"] = None, + dsts_configuration: Optional["_models.ResourceProviderManifestPropertiesDstsConfiguration"] = None, + notification_options: Optional[Union[str, "_models.NotificationOptions"]] = None, + resource_hydration_accounts: Optional[list["_models.ResourceHydrationAccount"]] = None, + notification_settings: Optional["_models.ResourceProviderManifestPropertiesNotificationSettings"] = None, + management_group_global_notification_endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = None, + optional_features: Optional[list[str]] = None, + resource_group_lock_option_during_move: Optional[ + "_models.ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove" + ] = None, + response_options: Optional["_models.ResourceProviderManifestPropertiesResponseOptions"] = None, + legacy_namespace: Optional[str] = None, + legacy_registrations: Optional[list[str]] = None, + custom_manifest_version: Optional[str] = None, + provider_hub_metadata: Optional["_models.ProviderRegistrationPropertiesProviderHubMetadata"] = None, + subscription_lifecycle_notification_specifications: Optional[ + "_models.ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications" + ] = None, + private_resource_provider_configuration: Optional[ + "_models.ProviderRegistrationPropertiesPrivateResourceProviderConfiguration" + ] = None, + token_auth_configuration: Optional["_models.TokenAuthConfiguration"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProviderRegistrationPropertiesPrivateResourceProviderConfiguration( + PrivateResourceProviderConfiguration +): # pylint: disable=name-too-long + """The private resource provider configuration. + + :ivar allowed_subscriptions: The allowed subscriptions. + :vartype allowed_subscriptions: list[str] + """ + + @overload + def __init__( + self, + *, + allowed_subscriptions: 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 ProviderRegistrationPropertiesProviderHubMetadata(ProviderHubMetadata): # pylint: disable=name-too-long + """The provider hub metadata. + + :ivar provider_authorizations: The provider authorizations. + :vartype provider_authorizations: + list[~azure.mgmt.providerhub.models.ResourceProviderAuthorization] + :ivar provider_authentication: The provider authentication. + :vartype provider_authentication: + ~azure.mgmt.providerhub.models.ProviderHubMetadataProviderAuthentication + :ivar third_party_provider_authorization: The third party provider authorization. + :vartype third_party_provider_authorization: + ~azure.mgmt.providerhub.models.ProviderHubMetadataThirdPartyProviderAuthorization + :ivar direct_rp_role_definition_id: The direct RP role definition id. + :vartype direct_rp_role_definition_id: str + :ivar regional_async_operation_resource_type_name: The regional async operation resource type + name. + :vartype regional_async_operation_resource_type_name: str + :ivar global_async_operation_resource_type_name: The global async operation resource type name. + :vartype global_async_operation_resource_type_name: str + """ + + @overload + def __init__( + self, + *, + provider_authorizations: Optional[list["_models.ResourceProviderAuthorization"]] = None, + provider_authentication: Optional["_models.ProviderHubMetadataProviderAuthentication"] = None, + third_party_provider_authorization: Optional[ + "_models.ProviderHubMetadataThirdPartyProviderAuthorization" + ] = None, + direct_rp_role_definition_id: Optional[str] = None, + regional_async_operation_resource_type_name: Optional[str] = None, + global_async_operation_resource_type_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 SubscriptionLifecycleNotificationSpecifications(_Model): # pylint: disable=name-too-long + """SubscriptionLifecycleNotificationSpecifications. + + :ivar subscription_state_override_actions: The subscription state override actions. + :vartype subscription_state_override_actions: + list[~azure.mgmt.providerhub.models.SubscriptionStateOverrideAction] + :ivar soft_delete_ttl: The soft delete TTL. + :vartype soft_delete_ttl: ~datetime.timedelta + """ + + subscription_state_override_actions: Optional[list["_models.SubscriptionStateOverrideAction"]] = rest_field( + name="subscriptionStateOverrideActions", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription state override actions.""" + soft_delete_ttl: Optional[datetime.timedelta] = rest_field( + name="softDeleteTTL", visibility=["read", "create", "update", "delete", "query"] + ) + """The soft delete TTL.""" + + @overload + def __init__( + self, + *, + subscription_state_override_actions: Optional[list["_models.SubscriptionStateOverrideAction"]] = None, + soft_delete_ttl: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications( + SubscriptionLifecycleNotificationSpecifications +): # pylint: disable=name-too-long + """The subscription lifecycle notification specifications. + + :ivar subscription_state_override_actions: The subscription state override actions. + :vartype subscription_state_override_actions: + list[~azure.mgmt.providerhub.models.SubscriptionStateOverrideAction] + :ivar soft_delete_ttl: The soft delete TTL. + :vartype soft_delete_ttl: ~datetime.timedelta + """ + + @overload + def __init__( + self, + *, + subscription_state_override_actions: Optional[list["_models.SubscriptionStateOverrideAction"]] = None, + soft_delete_ttl: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class QuotaRule(_Model): + """QuotaRule. + + :ivar quota_policy: The quota policy. Known values are: "Default", "None", and "Restricted". + :vartype quota_policy: str or ~azure.mgmt.providerhub.models.QuotaPolicy + :ivar location_rules: The location rules. + :vartype location_rules: list[~azure.mgmt.providerhub.models.LocationQuotaRule] + :ivar required_features: The required features. + :vartype required_features: list[str] + """ + + quota_policy: Optional[Union[str, "_models.QuotaPolicy"]] = rest_field( + name="quotaPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The quota policy. Known values are: \"Default\", \"None\", and \"Restricted\".""" + location_rules: Optional[list["_models.LocationQuotaRule"]] = rest_field( + name="locationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The location rules.""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + + @overload + def __init__( + self, + *, + quota_policy: Optional[Union[str, "_models.QuotaPolicy"]] = None, + location_rules: Optional[list["_models.LocationQuotaRule"]] = None, + required_features: 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 RequestHeaderOptions(_Model): + """RequestHeaderOptions. + + :ivar opt_in_headers: The opt in headers. Known values are: "NotSpecified", "SignedUserToken", + "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership", + "PrivateLinkId", "PrivateLinkResourceId", "ManagementGroupAncestorsEncoded", + "PrivateLinkVnetTrafficTag", "ResourceGroupLocation", "ClientPrincipalNameEncoded", and + "MSIResourceIdEncoded". + :vartype opt_in_headers: str or ~azure.mgmt.providerhub.models.OptInHeaderType + :ivar opt_out_headers: The opt out headers. Known values are: "NotSpecified" and + "SystemDataCreatedByLastModifiedBy". + :vartype opt_out_headers: str or ~azure.mgmt.providerhub.models.OptOutHeaderType + """ + + opt_in_headers: Optional[Union[str, "_models.OptInHeaderType"]] = rest_field( + name="optInHeaders", visibility=["read", "create", "update", "delete", "query"] + ) + """The opt in headers. Known values are: \"NotSpecified\", \"SignedUserToken\", + \"ClientGroupMembership\", \"SignedAuxiliaryTokens\", \"UnboundedClientGroupMembership\", + \"PrivateLinkId\", \"PrivateLinkResourceId\", \"ManagementGroupAncestorsEncoded\", + \"PrivateLinkVnetTrafficTag\", \"ResourceGroupLocation\", \"ClientPrincipalNameEncoded\", and + \"MSIResourceIdEncoded\".""" + opt_out_headers: Optional[Union[str, "_models.OptOutHeaderType"]] = rest_field( + name="optOutHeaders", visibility=["read", "create", "update", "delete", "query"] + ) + """The opt out headers. Known values are: \"NotSpecified\" and + \"SystemDataCreatedByLastModifiedBy\".""" + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, "_models.OptInHeaderType"]] = None, + opt_out_headers: Optional[Union[str, "_models.OptOutHeaderType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ReRegisterSubscriptionMetadata(_Model): + """ReRegisterSubscriptionMetadata. + + :ivar enabled: Whether it's enabled or not. Required. + :vartype enabled: bool + :ivar concurrency_limit: The concurrency limit. + :vartype concurrency_limit: int + """ + + enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether it's enabled or not. Required.""" + concurrency_limit: Optional[int] = rest_field( + name="concurrencyLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """The concurrency limit.""" + + @overload + def __init__( + self, + *, + enabled: bool, + concurrency_limit: 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 ResourceAccessRole(_Model): + """ResourceAccessRole. + + :ivar allowed_group_claims: The allowed group claims. + :vartype allowed_group_claims: list[str] + :ivar actions: The actions. + :vartype actions: list[str] + """ + + allowed_group_claims: Optional[list[str]] = rest_field( + name="allowedGroupClaims", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed group claims.""" + actions: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The actions.""" + + @overload + def __init__( + self, + *, + allowed_group_claims: Optional[list[str]] = None, + actions: 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 ResourceConcurrencyControlOption(_Model): + """ResourceConcurrencyControlOption. + + :ivar policy: The policy. Known values are: "NotSpecified" and "SynchronizeBeginExtension". + :vartype policy: str or ~azure.mgmt.providerhub.models.Policy + """ + + policy: Optional[Union[str, "_models.Policy"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The policy. Known values are: \"NotSpecified\" and \"SynchronizeBeginExtension\".""" + + @overload + def __init__( + self, + *, + policy: Optional[Union[str, "_models.Policy"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceGraphConfiguration(_Model): + """ResourceGraphConfiguration. + + :ivar enabled: Whether it's enabled. + :vartype enabled: bool + :ivar api_version: The api version. + :vartype api_version: str + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether it's enabled.""" + api_version: Optional[str] = rest_field( + name="apiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The api version.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + api_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 ResourceHydrationAccount(_Model): + """ResourceHydrationAccount. + + :ivar max_child_resource_consistency_job_limit: The max child resource consistency job limit. + :vartype max_child_resource_consistency_job_limit: int + :ivar encrypted_key: The encrypted key. + :vartype encrypted_key: str + :ivar account_name: The account name. + :vartype account_name: str + :ivar subscription_id: The subscription id. + :vartype subscription_id: str + """ + + max_child_resource_consistency_job_limit: Optional[int] = rest_field( + name="maxChildResourceConsistencyJobLimit", visibility=["read", "create", "update", "delete", "query"] + ) + """The max child resource consistency job limit.""" + encrypted_key: Optional[str] = rest_field( + name="encryptedKey", visibility=["read", "create", "update", "delete", "query"] + ) + """The encrypted key.""" + account_name: Optional[str] = rest_field( + name="accountName", visibility=["read", "create", "update", "delete", "query"] + ) + """The account name.""" + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription id.""" + + @overload + def __init__( + self, + *, + max_child_resource_consistency_job_limit: Optional[int] = None, + encrypted_key: Optional[str] = None, + account_name: Optional[str] = None, + subscription_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 ResourceManagementAction(_Model): + """ResourceManagementAction. + + :ivar resources: resource management action content. + :vartype resources: list[~azure.mgmt.providerhub.models.ResourceManagementEntity] + """ + + resources: Optional[list["_models.ResourceManagementEntity"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """resource management action content.""" + + @overload + def __init__( + self, + *, + resources: Optional[list["_models.ResourceManagementEntity"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceManagementEntity(_Model): + """ResourceManagementEntity. + + :ivar resource_id: The resource id. Required. + :vartype resource_id: str + :ivar home_tenant_id: The home tenant id. + :vartype home_tenant_id: str + :ivar location: The location. + :vartype location: str + :ivar status: The operation status. + :vartype status: str + """ + + resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) + """The resource id. Required.""" + home_tenant_id: Optional[str] = rest_field( + name="homeTenantId", visibility=["read", "create", "update", "delete", "query"] + ) + """The home tenant id.""" + location: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The location.""" + status: Optional[str] = rest_field(visibility=["read"]) + """The operation status.""" + + @overload + def __init__( + self, + *, + resource_id: str, + home_tenant_id: 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 ResourceMovePolicy(_Model): + """ResourceMovePolicy. + + :ivar validation_required: Whether validation is required. + :vartype validation_required: bool + :ivar cross_resource_group_move_enabled: Whether cross resource group move is enabled. + :vartype cross_resource_group_move_enabled: bool + :ivar cross_subscription_move_enabled: Whether cross subscription move is enabled. + :vartype cross_subscription_move_enabled: bool + """ + + validation_required: Optional[bool] = rest_field( + name="validationRequired", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether validation is required.""" + cross_resource_group_move_enabled: Optional[bool] = rest_field( + name="crossResourceGroupMoveEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether cross resource group move is enabled.""" + cross_subscription_move_enabled: Optional[bool] = rest_field( + name="crossSubscriptionMoveEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether cross subscription move is enabled.""" + + @overload + def __init__( + self, + *, + validation_required: Optional[bool] = None, + cross_resource_group_move_enabled: Optional[bool] = None, + cross_subscription_move_enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderAuthorization(_Model): + """ResourceProviderAuthorization. + + :ivar application_id: The application id. + :vartype application_id: str + :ivar role_definition_id: The role definition id. + :vartype role_definition_id: str + :ivar managed_by_role_definition_id: The managed by role definition id. + :vartype managed_by_role_definition_id: str + :ivar managed_by_authorization: Managed by authorization. + :vartype managed_by_authorization: + ~azure.mgmt.providerhub.models.ResourceProviderAuthorizationManagedByAuthorization + :ivar allowed_third_party_extensions: The allowed third party extensions. + :vartype allowed_third_party_extensions: + list[~azure.mgmt.providerhub.models.ThirdPartyExtension] + :ivar grouping_tag: The grouping tag. + :vartype grouping_tag: str + """ + + application_id: Optional[str] = rest_field( + name="applicationId", visibility=["read", "create", "update", "delete", "query"] + ) + """The application id.""" + role_definition_id: Optional[str] = rest_field( + name="roleDefinitionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The role definition id.""" + managed_by_role_definition_id: Optional[str] = rest_field( + name="managedByRoleDefinitionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The managed by role definition id.""" + managed_by_authorization: Optional["_models.ResourceProviderAuthorizationManagedByAuthorization"] = rest_field( + name="managedByAuthorization", visibility=["read", "create", "update", "delete", "query"] + ) + """Managed by authorization.""" + allowed_third_party_extensions: Optional[list["_models.ThirdPartyExtension"]] = rest_field( + name="allowedThirdPartyExtensions", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed third party extensions.""" + grouping_tag: Optional[str] = rest_field( + name="groupingTag", visibility=["read", "create", "update", "delete", "query"] + ) + """The grouping tag.""" + + @overload + def __init__( + self, + *, + application_id: Optional[str] = None, + role_definition_id: Optional[str] = None, + managed_by_role_definition_id: Optional[str] = None, + managed_by_authorization: Optional["_models.ResourceProviderAuthorizationManagedByAuthorization"] = None, + allowed_third_party_extensions: Optional[list["_models.ThirdPartyExtension"]] = None, + grouping_tag: 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 ResourceProviderAuthorizationManagedByAuthorization(_Model): # pylint: disable=name-too-long + """Managed by authorization. + + :ivar additional_authorizations: + :vartype additional_authorizations: + list[~azure.mgmt.providerhub.models.AdditionalAuthorization] + :ivar managed_by_resource_role_definition_id: The managed by resource role definition ID for + the application. + :vartype managed_by_resource_role_definition_id: str + :ivar allow_managed_by_inheritance: Indicates whether the managed by resource role definition + ID should be inherited. + :vartype allow_managed_by_inheritance: bool + """ + + additional_authorizations: Optional[list["_models.AdditionalAuthorization"]] = rest_field( + name="additionalAuthorizations", visibility=["read", "create", "update", "delete", "query"] + ) + managed_by_resource_role_definition_id: Optional[str] = rest_field( + name="managedByResourceRoleDefinitionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The managed by resource role definition ID for the application.""" + allow_managed_by_inheritance: Optional[bool] = rest_field( + name="allowManagedByInheritance", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether the managed by resource role definition ID should be inherited.""" + + @overload + def __init__( + self, + *, + additional_authorizations: Optional[list["_models.AdditionalAuthorization"]] = None, + managed_by_resource_role_definition_id: Optional[str] = None, + allow_managed_by_inheritance: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderAuthorizationRules(_Model): + """ResourceProviderAuthorizationRules. + + :ivar async_operation_polling_rules: The async operation polling rules. + :vartype async_operation_polling_rules: + ~azure.mgmt.providerhub.models.AsyncOperationPollingRules + """ + + async_operation_polling_rules: Optional["_models.AsyncOperationPollingRules"] = rest_field( + name="asyncOperationPollingRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The async operation polling rules.""" + + @overload + def __init__( + self, + *, + async_operation_polling_rules: Optional["_models.AsyncOperationPollingRules"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderCapabilities(_Model): + """ResourceProviderCapabilities. + + :ivar quota_id: The quota id. Required. + :vartype quota_id: str + :ivar effect: The effect. Required. Known values are: "NotSpecified", "Allow", and "Disallow". + :vartype effect: str or ~azure.mgmt.providerhub.models.ResourceProviderCapabilitiesEffect + :ivar required_features: The required features. + :vartype required_features: list[str] + """ + + quota_id: str = rest_field(name="quotaId", visibility=["read", "create", "update", "delete", "query"]) + """The quota id. Required.""" + effect: Union[str, "_models.ResourceProviderCapabilitiesEffect"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The effect. Required. Known values are: \"NotSpecified\", \"Allow\", and \"Disallow\".""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + + @overload + def __init__( + self, + *, + quota_id: str, + effect: Union[str, "_models.ResourceProviderCapabilitiesEffect"], + required_features: 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 ResourceProviderEndpoint(_Model): + """ResourceProviderEndpoint. + + :ivar enabled: Whether the endpoint is enabled. + :vartype enabled: bool + :ivar api_versions: The api versions. + :vartype api_versions: list[str] + :ivar endpoint_uri: The endpoint uri. + :vartype endpoint_uri: str + :ivar locations: The locations. + :vartype locations: list[str] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The feature rules. + :vartype features_rule: ~azure.mgmt.providerhub.models.ResourceProviderEndpointFeaturesRule + :ivar timeout: The timeout. + :vartype timeout: ~datetime.timedelta + :ivar endpoint_type: The endpoint type. Known values are: "NotSpecified", "Canary", + "Production", and "TestInProduction". + :vartype endpoint_type: str or ~azure.mgmt.providerhub.models.EndpointType + :ivar sku_link: The sku link. + :vartype sku_link: str + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether the endpoint is enabled.""" + api_versions: Optional[list[str]] = rest_field( + name="apiVersions", visibility=["read", "create", "update", "delete", "query"] + ) + """The api versions.""" + endpoint_uri: Optional[str] = rest_field( + name="endpointUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoint uri.""" + locations: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The locations.""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + features_rule: Optional["_models.ResourceProviderEndpointFeaturesRule"] = rest_field( + name="featuresRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The feature rules.""" + timeout: Optional[datetime.timedelta] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The timeout.""" + endpoint_type: Optional[Union[str, "_models.EndpointType"]] = rest_field( + name="endpointType", visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoint type. Known values are: \"NotSpecified\", \"Canary\", \"Production\", and + \"TestInProduction\".""" + sku_link: Optional[str] = rest_field(name="skuLink", visibility=["read", "create", "update", "delete", "query"]) + """The sku link.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + api_versions: Optional[list[str]] = None, + endpoint_uri: Optional[str] = None, + locations: Optional[list[str]] = None, + required_features: Optional[list[str]] = None, + features_rule: Optional["_models.ResourceProviderEndpointFeaturesRule"] = None, + timeout: Optional[datetime.timedelta] = None, + endpoint_type: Optional[Union[str, "_models.EndpointType"]] = None, + sku_link: 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 ResourceProviderEndpointFeaturesRule(FeaturesRule): + """The feature rules. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: str or ~azure.mgmt.providerhub.models.FeaturesPolicy + """ + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, "_models.FeaturesPolicy"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManagement(_Model): + """ResourceProviderManagement. + + :ivar schema_owners: The schema owners. + :vartype schema_owners: list[str] + :ivar manifest_owners: The manifest owners. + :vartype manifest_owners: list[str] + :ivar authorization_owners: The authorization owners. + :vartype authorization_owners: list[str] + :ivar incident_routing_service: The incident routing service. + :vartype incident_routing_service: str + :ivar incident_routing_team: The incident routing team. + :vartype incident_routing_team: str + :ivar incident_contact_email: The incident contact email. + :vartype incident_contact_email: str + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list[~azure.mgmt.providerhub.models.ServiceTreeInfo] + :ivar resource_access_policy: The resource access policy. Known values are: "NotSpecified", + "AcisReadAllowed", and "AcisActionAllowed". + :vartype resource_access_policy: str or ~azure.mgmt.providerhub.models.ResourceAccessPolicy + :ivar resource_access_roles: The resource access roles. + :vartype resource_access_roles: list[~azure.mgmt.providerhub.models.ResourceAccessRole] + :ivar expedited_rollout_submitters: List of expedited rollout submitters. + :vartype expedited_rollout_submitters: list[str] + :ivar error_response_message_options: Options for error response messages. + :vartype error_response_message_options: + ~azure.mgmt.providerhub.models.ResourceProviderManagementErrorResponseMessageOptions + :ivar expedited_rollout_metadata: Metadata for expedited rollout. + :vartype expedited_rollout_metadata: + ~azure.mgmt.providerhub.models.ResourceProviderManagementExpeditedRolloutMetadata + :ivar canary_manifest_owners: List of manifest owners for canary. + :vartype canary_manifest_owners: list[str] + :ivar pc_code: The profit center code for the subscription. + :vartype pc_code: str + :ivar profit_center_program_id: The profit center program id for the subscription. + :vartype profit_center_program_id: str + """ + + schema_owners: Optional[list[str]] = rest_field( + name="schemaOwners", visibility=["read", "create", "update", "delete", "query"] + ) + """The schema owners.""" + manifest_owners: Optional[list[str]] = rest_field( + name="manifestOwners", visibility=["read", "create", "update", "delete", "query"] + ) + """The manifest owners.""" + authorization_owners: Optional[list[str]] = rest_field( + name="authorizationOwners", visibility=["read", "create", "update", "delete", "query"] + ) + """The authorization owners.""" + incident_routing_service: Optional[str] = rest_field( + name="incidentRoutingService", visibility=["read", "create", "update", "delete", "query"] + ) + """The incident routing service.""" + incident_routing_team: Optional[str] = rest_field( + name="incidentRoutingTeam", visibility=["read", "create", "update", "delete", "query"] + ) + """The incident routing team.""" + incident_contact_email: Optional[str] = rest_field( + name="incidentContactEmail", visibility=["read", "create", "update", "delete", "query"] + ) + """The incident contact email.""" + service_tree_infos: Optional[list["_models.ServiceTreeInfo"]] = rest_field( + name="serviceTreeInfos", visibility=["read", "create", "update", "delete", "query"] + ) + """The service tree infos.""" + resource_access_policy: Optional[Union[str, "_models.ResourceAccessPolicy"]] = rest_field( + name="resourceAccessPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource access policy. Known values are: \"NotSpecified\", \"AcisReadAllowed\", and + \"AcisActionAllowed\".""" + resource_access_roles: Optional[list["_models.ResourceAccessRole"]] = rest_field( + name="resourceAccessRoles", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource access roles.""" + expedited_rollout_submitters: Optional[list[str]] = rest_field( + name="expeditedRolloutSubmitters", visibility=["read", "create", "update", "delete", "query"] + ) + """List of expedited rollout submitters.""" + error_response_message_options: Optional["_models.ResourceProviderManagementErrorResponseMessageOptions"] = ( + rest_field(name="errorResponseMessageOptions", visibility=["read", "create", "update", "delete", "query"]) + ) + """Options for error response messages.""" + expedited_rollout_metadata: Optional["_models.ResourceProviderManagementExpeditedRolloutMetadata"] = rest_field( + name="expeditedRolloutMetadata", visibility=["read", "create", "update", "delete", "query"] + ) + """Metadata for expedited rollout.""" + canary_manifest_owners: Optional[list[str]] = rest_field( + name="canaryManifestOwners", visibility=["read", "create", "update", "delete", "query"] + ) + """List of manifest owners for canary.""" + pc_code: Optional[str] = rest_field(name="pcCode", visibility=["read", "create", "update", "delete", "query"]) + """The profit center code for the subscription.""" + profit_center_program_id: Optional[str] = rest_field( + name="profitCenterProgramId", visibility=["read", "create", "update", "delete", "query"] + ) + """The profit center program id for the subscription.""" + + @overload + def __init__( + self, + *, + schema_owners: Optional[list[str]] = None, + manifest_owners: Optional[list[str]] = None, + authorization_owners: Optional[list[str]] = None, + incident_routing_service: Optional[str] = None, + incident_routing_team: Optional[str] = None, + incident_contact_email: Optional[str] = None, + service_tree_infos: Optional[list["_models.ServiceTreeInfo"]] = None, + resource_access_policy: Optional[Union[str, "_models.ResourceAccessPolicy"]] = None, + resource_access_roles: Optional[list["_models.ResourceAccessRole"]] = None, + expedited_rollout_submitters: Optional[list[str]] = None, + error_response_message_options: Optional[ + "_models.ResourceProviderManagementErrorResponseMessageOptions" + ] = None, + expedited_rollout_metadata: Optional["_models.ResourceProviderManagementExpeditedRolloutMetadata"] = None, + canary_manifest_owners: Optional[list[str]] = None, + pc_code: Optional[str] = None, + profit_center_program_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 ResourceProviderManagementErrorResponseMessageOptions(_Model): # pylint: disable=name-too-long + """Options for error response messages. + + :ivar server_failure_response_message_type: Type of server failure response message. Known + values are: "NotSpecified" and "OutageReporting". + :vartype server_failure_response_message_type: str or + ~azure.mgmt.providerhub.models.ServerFailureResponseMessageType + """ + + server_failure_response_message_type: Optional[Union[str, "_models.ServerFailureResponseMessageType"]] = rest_field( + name="serverFailureResponseMessageType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of server failure response message. Known values are: \"NotSpecified\" and + \"OutageReporting\".""" + + @overload + def __init__( + self, + *, + server_failure_response_message_type: Optional[Union[str, "_models.ServerFailureResponseMessageType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManagementExpeditedRolloutMetadata(_Model): # pylint: disable=name-too-long + """Metadata for expedited rollout. + + :ivar enabled: Expedited rollout enabled?. + :vartype enabled: bool + :ivar expedited_rollout_intent: Expedited rollout intent. Known values are: "NotSpecified" and + "Hotfix". + :vartype expedited_rollout_intent: str or ~azure.mgmt.providerhub.models.ExpeditedRolloutIntent + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Expedited rollout enabled?.""" + expedited_rollout_intent: Optional[Union[str, "_models.ExpeditedRolloutIntent"]] = rest_field( + name="expeditedRolloutIntent", visibility=["read", "create", "update", "delete", "query"] + ) + """Expedited rollout intent. Known values are: \"NotSpecified\" and \"Hotfix\".""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + expedited_rollout_intent: Optional[Union[str, "_models.ExpeditedRolloutIntent"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifest(_Model): + """ResourceProviderManifest. + + :ivar provider_authentication: The provider authentication. + :vartype provider_authentication: + ~azure.mgmt.providerhub.models.ResourceProviderManifestProviderAuthentication + :ivar provider_authorizations: The provider authorizations. + :vartype provider_authorizations: + list[~azure.mgmt.providerhub.models.ResourceProviderAuthorization] + :ivar namespace: The namespace. + :vartype namespace: str + :ivar services: The services. + :vartype services: list[~azure.mgmt.providerhub.models.ResourceProviderService] + :ivar service_name: The service name. + :vartype service_name: str + :ivar provider_version: The provider version. + :vartype provider_version: str + :ivar provider_type: The provider type. Known values are: "NotSpecified", "Internal", + "External", "Hidden", "RegistrationFree", "LegacyRegistrationRequired", "TenantOnly", and + "AuthorizationFree". + :vartype provider_type: str or ~azure.mgmt.providerhub.models.ResourceProviderType + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: ~azure.mgmt.providerhub.models.ResourceProviderManifestFeaturesRule + :ivar request_header_options: The request header options. + :vartype request_header_options: + ~azure.mgmt.providerhub.models.ResourceProviderManifestRequestHeaderOptions + :ivar resource_types: The resource types. + :vartype resource_types: list[~azure.mgmt.providerhub.models.ResourceType] + :ivar management: The resource provider management. + :vartype management: ~azure.mgmt.providerhub.models.ResourceProviderManifestManagement + :ivar capabilities: The capabilities. + :vartype capabilities: list[~azure.mgmt.providerhub.models.ResourceProviderCapabilities] + :ivar cross_tenant_token_validation: The cross tenant token validation. Known values are: + "EnsureSecureValidation" and "PassthroughInsecureToken". + :vartype cross_tenant_token_validation: str or + ~azure.mgmt.providerhub.models.CrossTenantTokenValidation + :ivar metadata: The metadata. + :vartype metadata: any + :ivar global_notification_endpoints: The global notification endpoints. + :vartype global_notification_endpoints: + list[~azure.mgmt.providerhub.models.ResourceProviderEndpoint] + :ivar re_register_subscription_metadata: The re-register subscription metadata. + :vartype re_register_subscription_metadata: + ~azure.mgmt.providerhub.models.ResourceProviderManifestReRegisterSubscriptionMetadata + :ivar enable_tenant_linked_notification: Whether tenant linked notification is enabled. + :vartype enable_tenant_linked_notification: bool + :ivar notifications: The notifications. + :vartype notifications: list[~azure.mgmt.providerhub.models.Notification] + :ivar linked_notification_rules: The linked notification rules. + :vartype linked_notification_rules: + list[~azure.mgmt.providerhub.models.FanoutLinkedNotificationRule] + :ivar resource_provider_authorization_rules: The resource provider authorization rules. + :vartype resource_provider_authorization_rules: + ~azure.mgmt.providerhub.models.ResourceProviderAuthorizationRules + """ + + provider_authentication: Optional["_models.ResourceProviderManifestProviderAuthentication"] = rest_field( + name="providerAuthentication", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider authentication.""" + provider_authorizations: Optional[list["_models.ResourceProviderAuthorization"]] = rest_field( + name="providerAuthorizations", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider authorizations.""" + namespace: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The namespace.""" + services: Optional[list["_models.ResourceProviderService"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The services.""" + service_name: Optional[str] = rest_field( + name="serviceName", visibility=["read", "create", "update", "delete", "query"] + ) + """The service name.""" + provider_version: Optional[str] = rest_field( + name="providerVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider version.""" + provider_type: Optional[Union[str, "_models.ResourceProviderType"]] = rest_field( + name="providerType", visibility=["read", "create", "update", "delete", "query"] + ) + """The provider type. Known values are: \"NotSpecified\", \"Internal\", \"External\", \"Hidden\", + \"RegistrationFree\", \"LegacyRegistrationRequired\", \"TenantOnly\", and + \"AuthorizationFree\".""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + features_rule: Optional["_models.ResourceProviderManifestFeaturesRule"] = rest_field( + name="featuresRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The features rule.""" + request_header_options: Optional["_models.ResourceProviderManifestRequestHeaderOptions"] = rest_field( + name="requestHeaderOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The request header options.""" + resource_types: Optional[list["_models.ResourceType"]] = rest_field( + name="resourceTypes", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource types.""" + management: Optional["_models.ResourceProviderManifestManagement"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource provider management.""" + capabilities: Optional[list["_models.ResourceProviderCapabilities"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The capabilities.""" + cross_tenant_token_validation: Optional[Union[str, "_models.CrossTenantTokenValidation"]] = rest_field( + name="crossTenantTokenValidation", visibility=["read", "create", "update", "delete", "query"] + ) + """The cross tenant token validation. Known values are: \"EnsureSecureValidation\" and + \"PassthroughInsecureToken\".""" + metadata: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The metadata.""" + global_notification_endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = rest_field( + name="globalNotificationEndpoints", visibility=["read", "create", "update", "delete", "query"] + ) + """The global notification endpoints.""" + re_register_subscription_metadata: Optional["_models.ResourceProviderManifestReRegisterSubscriptionMetadata"] = ( + rest_field(name="reRegisterSubscriptionMetadata", visibility=["read", "create", "update", "delete", "query"]) + ) + """The re-register subscription metadata.""" + enable_tenant_linked_notification: Optional[bool] = rest_field( + name="enableTenantLinkedNotification", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether tenant linked notification is enabled.""" + notifications: Optional[list["_models.Notification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The notifications.""" + linked_notification_rules: Optional[list["_models.FanoutLinkedNotificationRule"]] = rest_field( + name="linkedNotificationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked notification rules.""" + resource_provider_authorization_rules: Optional["_models.ResourceProviderAuthorizationRules"] = rest_field( + name="resourceProviderAuthorizationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource provider authorization rules.""" + + @overload + def __init__( + self, + *, + provider_authentication: Optional["_models.ResourceProviderManifestProviderAuthentication"] = None, + provider_authorizations: Optional[list["_models.ResourceProviderAuthorization"]] = None, + namespace: Optional[str] = None, + services: Optional[list["_models.ResourceProviderService"]] = None, + service_name: Optional[str] = None, + provider_version: Optional[str] = None, + provider_type: Optional[Union[str, "_models.ResourceProviderType"]] = None, + required_features: Optional[list[str]] = None, + features_rule: Optional["_models.ResourceProviderManifestFeaturesRule"] = None, + request_header_options: Optional["_models.ResourceProviderManifestRequestHeaderOptions"] = None, + resource_types: Optional[list["_models.ResourceType"]] = None, + management: Optional["_models.ResourceProviderManifestManagement"] = None, + capabilities: Optional[list["_models.ResourceProviderCapabilities"]] = None, + cross_tenant_token_validation: Optional[Union[str, "_models.CrossTenantTokenValidation"]] = None, + metadata: Optional[Any] = None, + global_notification_endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = None, + re_register_subscription_metadata: Optional[ + "_models.ResourceProviderManifestReRegisterSubscriptionMetadata" + ] = None, + enable_tenant_linked_notification: Optional[bool] = None, + notifications: Optional[list["_models.Notification"]] = None, + linked_notification_rules: Optional[list["_models.FanoutLinkedNotificationRule"]] = None, + resource_provider_authorization_rules: Optional["_models.ResourceProviderAuthorizationRules"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifestFeaturesRule(FeaturesRule): + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: str or ~azure.mgmt.providerhub.models.FeaturesPolicy + """ + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, "_models.FeaturesPolicy"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifestManagement(ResourceProviderManagement): + """The resource provider management. + + :ivar schema_owners: The schema owners. + :vartype schema_owners: list[str] + :ivar manifest_owners: The manifest owners. + :vartype manifest_owners: list[str] + :ivar authorization_owners: The authorization owners. + :vartype authorization_owners: list[str] + :ivar incident_routing_service: The incident routing service. + :vartype incident_routing_service: str + :ivar incident_routing_team: The incident routing team. + :vartype incident_routing_team: str + :ivar incident_contact_email: The incident contact email. + :vartype incident_contact_email: str + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list[~azure.mgmt.providerhub.models.ServiceTreeInfo] + :ivar resource_access_policy: The resource access policy. Known values are: "NotSpecified", + "AcisReadAllowed", and "AcisActionAllowed". + :vartype resource_access_policy: str or ~azure.mgmt.providerhub.models.ResourceAccessPolicy + :ivar resource_access_roles: The resource access roles. + :vartype resource_access_roles: list[~azure.mgmt.providerhub.models.ResourceAccessRole] + :ivar expedited_rollout_submitters: List of expedited rollout submitters. + :vartype expedited_rollout_submitters: list[str] + :ivar error_response_message_options: Options for error response messages. + :vartype error_response_message_options: + ~azure.mgmt.providerhub.models.ResourceProviderManagementErrorResponseMessageOptions + :ivar expedited_rollout_metadata: Metadata for expedited rollout. + :vartype expedited_rollout_metadata: + ~azure.mgmt.providerhub.models.ResourceProviderManagementExpeditedRolloutMetadata + :ivar canary_manifest_owners: List of manifest owners for canary. + :vartype canary_manifest_owners: list[str] + :ivar pc_code: The profit center code for the subscription. + :vartype pc_code: str + :ivar profit_center_program_id: The profit center program id for the subscription. + :vartype profit_center_program_id: str + """ + + @overload + def __init__( + self, + *, + schema_owners: Optional[list[str]] = None, + manifest_owners: Optional[list[str]] = None, + authorization_owners: Optional[list[str]] = None, + incident_routing_service: Optional[str] = None, + incident_routing_team: Optional[str] = None, + incident_contact_email: Optional[str] = None, + service_tree_infos: Optional[list["_models.ServiceTreeInfo"]] = None, + resource_access_policy: Optional[Union[str, "_models.ResourceAccessPolicy"]] = None, + resource_access_roles: Optional[list["_models.ResourceAccessRole"]] = None, + expedited_rollout_submitters: Optional[list[str]] = None, + error_response_message_options: Optional[ + "_models.ResourceProviderManagementErrorResponseMessageOptions" + ] = None, + expedited_rollout_metadata: Optional["_models.ResourceProviderManagementExpeditedRolloutMetadata"] = None, + canary_manifest_owners: Optional[list[str]] = None, + pc_code: Optional[str] = None, + profit_center_program_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 ResourceProviderManifestPropertiesDstsConfiguration(DstsConfiguration): # pylint: disable=name-too-long + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + @overload + def __init__( + self, + *, + service_name: str, + service_dns_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 ResourceProviderManifestPropertiesFeaturesRule(FeaturesRule): # pylint: disable=name-too-long + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: str or ~azure.mgmt.providerhub.models.FeaturesPolicy + """ + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, "_models.FeaturesPolicy"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifestPropertiesManagement(ResourceProviderManagement): # pylint: disable=name-too-long + """The resource provider management. + + :ivar schema_owners: The schema owners. + :vartype schema_owners: list[str] + :ivar manifest_owners: The manifest owners. + :vartype manifest_owners: list[str] + :ivar authorization_owners: The authorization owners. + :vartype authorization_owners: list[str] + :ivar incident_routing_service: The incident routing service. + :vartype incident_routing_service: str + :ivar incident_routing_team: The incident routing team. + :vartype incident_routing_team: str + :ivar incident_contact_email: The incident contact email. + :vartype incident_contact_email: str + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list[~azure.mgmt.providerhub.models.ServiceTreeInfo] + :ivar resource_access_policy: The resource access policy. Known values are: "NotSpecified", + "AcisReadAllowed", and "AcisActionAllowed". + :vartype resource_access_policy: str or ~azure.mgmt.providerhub.models.ResourceAccessPolicy + :ivar resource_access_roles: The resource access roles. + :vartype resource_access_roles: list[~azure.mgmt.providerhub.models.ResourceAccessRole] + :ivar expedited_rollout_submitters: List of expedited rollout submitters. + :vartype expedited_rollout_submitters: list[str] + :ivar error_response_message_options: Options for error response messages. + :vartype error_response_message_options: + ~azure.mgmt.providerhub.models.ResourceProviderManagementErrorResponseMessageOptions + :ivar expedited_rollout_metadata: Metadata for expedited rollout. + :vartype expedited_rollout_metadata: + ~azure.mgmt.providerhub.models.ResourceProviderManagementExpeditedRolloutMetadata + :ivar canary_manifest_owners: List of manifest owners for canary. + :vartype canary_manifest_owners: list[str] + :ivar pc_code: The profit center code for the subscription. + :vartype pc_code: str + :ivar profit_center_program_id: The profit center program id for the subscription. + :vartype profit_center_program_id: str + """ + + @overload + def __init__( + self, + *, + schema_owners: Optional[list[str]] = None, + manifest_owners: Optional[list[str]] = None, + authorization_owners: Optional[list[str]] = None, + incident_routing_service: Optional[str] = None, + incident_routing_team: Optional[str] = None, + incident_contact_email: Optional[str] = None, + service_tree_infos: Optional[list["_models.ServiceTreeInfo"]] = None, + resource_access_policy: Optional[Union[str, "_models.ResourceAccessPolicy"]] = None, + resource_access_roles: Optional[list["_models.ResourceAccessRole"]] = None, + expedited_rollout_submitters: Optional[list[str]] = None, + error_response_message_options: Optional[ + "_models.ResourceProviderManagementErrorResponseMessageOptions" + ] = None, + expedited_rollout_metadata: Optional["_models.ResourceProviderManagementExpeditedRolloutMetadata"] = None, + canary_manifest_owners: Optional[list[str]] = None, + pc_code: Optional[str] = None, + profit_center_program_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 ResourceProviderManifestPropertiesNotificationSettings(_Model): # pylint: disable=name-too-long + """Notification settings. + + :ivar subscriber_settings: + :vartype subscriber_settings: list[~azure.mgmt.providerhub.models.SubscriberSetting] + """ + + subscriber_settings: Optional[list["_models.SubscriberSetting"]] = rest_field( + name="subscriberSettings", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + subscriber_settings: Optional[list["_models.SubscriberSetting"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifestPropertiesProviderAuthentication( + ResourceProviderAuthentication +): # pylint: disable=name-too-long + """The provider authentication. + + :ivar allowed_audiences: The allowed audiences. Required. + :vartype allowed_audiences: list[str] + """ + + @overload + def __init__( + self, + *, + allowed_audiences: 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 ResourceProviderManifestPropertiesRequestHeaderOptions(RequestHeaderOptions): # pylint: disable=name-too-long + """The request header options. + + :ivar opt_in_headers: The opt in headers. Known values are: "NotSpecified", "SignedUserToken", + "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership", + "PrivateLinkId", "PrivateLinkResourceId", "ManagementGroupAncestorsEncoded", + "PrivateLinkVnetTrafficTag", "ResourceGroupLocation", "ClientPrincipalNameEncoded", and + "MSIResourceIdEncoded". + :vartype opt_in_headers: str or ~azure.mgmt.providerhub.models.OptInHeaderType + :ivar opt_out_headers: The opt out headers. Known values are: "NotSpecified" and + "SystemDataCreatedByLastModifiedBy". + :vartype opt_out_headers: str or ~azure.mgmt.providerhub.models.OptOutHeaderType + """ + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, "_models.OptInHeaderType"]] = None, + opt_out_headers: Optional[Union[str, "_models.OptOutHeaderType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove(_Model): # pylint: disable=name-too-long + """Resource group lock option during move. + + :ivar block_action_verb: The action verb that will be blocked when the resource group is locked + during move. Known values are: "NotSpecified", "Read", "Write", "Action", "Delete", and + "Unrecognized". + :vartype block_action_verb: str or ~azure.mgmt.providerhub.models.BlockActionVerb + """ + + block_action_verb: Optional[Union[str, "_models.BlockActionVerb"]] = rest_field( + name="blockActionVerb", visibility=["read", "create", "update", "delete", "query"] + ) + """The action verb that will be blocked when the resource group is locked during move. Known + values are: \"NotSpecified\", \"Read\", \"Write\", \"Action\", \"Delete\", and + \"Unrecognized\".""" + + @overload + def __init__( + self, + *, + block_action_verb: Optional[Union[str, "_models.BlockActionVerb"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifestPropertiesResponseOptions(_Model): # pylint: disable=name-too-long + """Response options. + + :ivar service_client_options_type: Known values are: "NotSpecified" and + "DisableAutomaticDecompression". + :vartype service_client_options_type: str or + ~azure.mgmt.providerhub.models.ServiceClientOptionsType + """ + + service_client_options_type: Optional[Union[str, "_models.ServiceClientOptionsType"]] = rest_field( + name="serviceClientOptionsType", visibility=["read", "create", "update", "delete", "query"] + ) + """Known values are: \"NotSpecified\" and \"DisableAutomaticDecompression\".""" + + @overload + def __init__( + self, + *, + service_client_options_type: Optional[Union[str, "_models.ServiceClientOptionsType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TemplateDeploymentOptions(_Model): + """TemplateDeploymentOptions. + + :ivar preflight_supported: Whether preflight is supported. + :vartype preflight_supported: bool + :ivar preflight_options: The preflight options. + :vartype preflight_options: list[str or ~azure.mgmt.providerhub.models.PreflightOption] + """ + + preflight_supported: Optional[bool] = rest_field( + name="preflightSupported", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether preflight is supported.""" + preflight_options: Optional[list[Union[str, "_models.PreflightOption"]]] = rest_field( + name="preflightOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The preflight options.""" + + @overload + def __init__( + self, + *, + preflight_supported: Optional[bool] = None, + preflight_options: Optional[list[Union[str, "_models.PreflightOption"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifestPropertiesTemplateDeploymentOptions( + TemplateDeploymentOptions +): # pylint: disable=name-too-long + """The template deployment options. + + :ivar preflight_supported: Whether preflight is supported. + :vartype preflight_supported: bool + :ivar preflight_options: The preflight options. + :vartype preflight_options: list[str or ~azure.mgmt.providerhub.models.PreflightOption] + """ + + @overload + def __init__( + self, + *, + preflight_supported: Optional[bool] = None, + preflight_options: Optional[list[Union[str, "_models.PreflightOption"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifestProviderAuthentication(ResourceProviderAuthentication): # pylint: disable=name-too-long + """The provider authentication. + + :ivar allowed_audiences: The allowed audiences. Required. + :vartype allowed_audiences: list[str] + """ + + @overload + def __init__( + self, + *, + allowed_audiences: 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 ResourceProviderManifestRequestHeaderOptions(RequestHeaderOptions): # pylint: disable=name-too-long + """The request header options. + + :ivar opt_in_headers: The opt in headers. Known values are: "NotSpecified", "SignedUserToken", + "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership", + "PrivateLinkId", "PrivateLinkResourceId", "ManagementGroupAncestorsEncoded", + "PrivateLinkVnetTrafficTag", "ResourceGroupLocation", "ClientPrincipalNameEncoded", and + "MSIResourceIdEncoded". + :vartype opt_in_headers: str or ~azure.mgmt.providerhub.models.OptInHeaderType + :ivar opt_out_headers: The opt out headers. Known values are: "NotSpecified" and + "SystemDataCreatedByLastModifiedBy". + :vartype opt_out_headers: str or ~azure.mgmt.providerhub.models.OptOutHeaderType + """ + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, "_models.OptInHeaderType"]] = None, + opt_out_headers: Optional[Union[str, "_models.OptOutHeaderType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProviderManifestReRegisterSubscriptionMetadata( + ReRegisterSubscriptionMetadata +): # pylint: disable=name-too-long + """The re-register subscription metadata. + + :ivar enabled: Whether it's enabled or not. Required. + :vartype enabled: bool + :ivar concurrency_limit: The concurrency limit. + :vartype concurrency_limit: int + """ + + @overload + def __init__( + self, + *, + enabled: bool, + concurrency_limit: 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 ResourceProviderService(_Model): + """Resource provider service. + + :ivar service_name: The service name. + :vartype service_name: str + :ivar status: The status. Known values are: "Active" and "Inactive". + :vartype status: str or ~azure.mgmt.providerhub.models.ServiceStatus + """ + + service_name: Optional[str] = rest_field( + name="serviceName", visibility=["read", "create", "update", "delete", "query"] + ) + """The service name.""" + status: Optional[Union[str, "_models.ServiceStatus"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The status. Known values are: \"Active\" and \"Inactive\".""" + + @overload + def __init__( + self, + *, + service_name: Optional[str] = None, + status: Optional[Union[str, "_models.ServiceStatus"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceType(_Model): + """ResourceType. + + :ivar name: The resource type name. + :vartype name: str + :ivar routing_type: The resource routing type. Known values are: "Default", "ProxyOnly", + "HostBased", "Extension", "Tenant", "Fanout", "LocationBased", "Failover", "CascadeExtension", + "ChildFanout", "CascadeAuthorizedExtension", "BypassEndpointSelectionOptimization", + "LocationMapping", and "ServiceFanout". + :vartype routing_type: str or ~azure.mgmt.providerhub.models.RoutingType + :ivar additional_options: The additional options. Known values are: + "ProtectedAsyncOperationPolling" and "ProtectedAsyncOperationPollingAuditOnly". + :vartype additional_options: str or ~azure.mgmt.providerhub.models.AdditionalOptions + :ivar cross_tenant_token_validation: The cross tenant token validation. Known values are: + "EnsureSecureValidation" and "PassthroughInsecureToken". + :vartype cross_tenant_token_validation: str or + ~azure.mgmt.providerhub.models.CrossTenantTokenValidation + :ivar resource_validation: The resource validation. Known values are: "NotSpecified", + "ReservedWords", and "ProfaneWords". + :vartype resource_validation: str or ~azure.mgmt.providerhub.models.ResourceValidation + :ivar allowed_unauthorized_actions: The allowed unauthorized actions. + :vartype allowed_unauthorized_actions: list[str] + :ivar allowed_unauthorized_actions_extensions: The allowed unauthorized actions extensions. + :vartype allowed_unauthorized_actions_extensions: + list[~azure.mgmt.providerhub.models.AllowedUnauthorizedActionsExtension] + :ivar authorization_action_mappings: The authorization action mappings. + :vartype authorization_action_mappings: + list[~azure.mgmt.providerhub.models.AuthorizationActionMapping] + :ivar linked_access_checks: The linked access checks. + :vartype linked_access_checks: list[~azure.mgmt.providerhub.models.LinkedAccessCheck] + :ivar default_api_version: The default api version. + :vartype default_api_version: str + :ivar logging_rules: The logging rules. + :vartype logging_rules: list[~azure.mgmt.providerhub.models.LoggingRule] + :ivar throttling_rules: The throttling rules. + :vartype throttling_rules: list[~azure.mgmt.providerhub.models.ThrottlingRule] + :ivar endpoints: The endpoints. + :vartype endpoints: list[~azure.mgmt.providerhub.models.ResourceProviderEndpoint] + :ivar marketplace_type: The marketplace type. Known values are: "NotSpecified", "AddOn", + "Bypass", and "Store". + :vartype marketplace_type: str or ~azure.mgmt.providerhub.models.MarketplaceType + :ivar identity_management: The identity management. + :vartype identity_management: ~azure.mgmt.providerhub.models.ResourceTypeIdentityManagement + :ivar metadata: The metadata. + :vartype metadata: any + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: ~azure.mgmt.providerhub.models.ResourceTypeFeaturesRule + :ivar subscription_state_rules: The subscription state rules. + :vartype subscription_state_rules: list[~azure.mgmt.providerhub.models.SubscriptionStateRule] + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list[~azure.mgmt.providerhub.models.ServiceTreeInfo] + :ivar request_header_options: The request header options. + :vartype request_header_options: + ~azure.mgmt.providerhub.models.ResourceTypeRequestHeaderOptions + :ivar sku_link: The sku link. + :vartype sku_link: str + :ivar disallowed_action_verbs: The disallowed action verbs. + :vartype disallowed_action_verbs: list[str] + :ivar template_deployment_policy: The template deployment policy. + :vartype template_deployment_policy: + ~azure.mgmt.providerhub.models.ResourceTypeTemplateDeploymentPolicy + :ivar extended_locations: The extended locations. + :vartype extended_locations: list[~azure.mgmt.providerhub.models.ExtendedLocationOptions] + :ivar linked_operation_rules: The linked operation rules. + :vartype linked_operation_rules: list[~azure.mgmt.providerhub.models.LinkedOperationRule] + :ivar resource_deletion_policy: The resource deletion policy. Known values are: "NotSpecified", + "Cascade", and "Force". + :vartype resource_deletion_policy: str or + ~azure.mgmt.providerhub.models.ManifestResourceDeletionPolicy + :ivar quota_rule: The quota rule. + :vartype quota_rule: ~azure.mgmt.providerhub.models.QuotaRule + :ivar notifications: The notifications. + :vartype notifications: list[~azure.mgmt.providerhub.models.Notification] + :ivar linked_notification_rules: The linked notification rules. + :vartype linked_notification_rules: list[~azure.mgmt.providerhub.models.LinkedNotificationRule] + :ivar resource_provider_authorization_rules: The resource provider authorization rules. + :vartype resource_provider_authorization_rules: + ~azure.mgmt.providerhub.models.ResourceProviderAuthorizationRules + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resource type name.""" + routing_type: Optional[Union[str, "_models.RoutingType"]] = rest_field( + name="routingType", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource routing type. Known values are: \"Default\", \"ProxyOnly\", \"HostBased\", + \"Extension\", \"Tenant\", \"Fanout\", \"LocationBased\", \"Failover\", \"CascadeExtension\", + \"ChildFanout\", \"CascadeAuthorizedExtension\", \"BypassEndpointSelectionOptimization\", + \"LocationMapping\", and \"ServiceFanout\".""" + additional_options: Optional[Union[str, "_models.AdditionalOptions"]] = rest_field( + name="additionalOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The additional options. Known values are: \"ProtectedAsyncOperationPolling\" and + \"ProtectedAsyncOperationPollingAuditOnly\".""" + cross_tenant_token_validation: Optional[Union[str, "_models.CrossTenantTokenValidation"]] = rest_field( + name="crossTenantTokenValidation", visibility=["read", "create", "update", "delete", "query"] + ) + """The cross tenant token validation. Known values are: \"EnsureSecureValidation\" and + \"PassthroughInsecureToken\".""" + resource_validation: Optional[Union[str, "_models.ResourceValidation"]] = rest_field( + name="resourceValidation", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource validation. Known values are: \"NotSpecified\", \"ReservedWords\", and + \"ProfaneWords\".""" + allowed_unauthorized_actions: Optional[list[str]] = rest_field( + name="allowedUnauthorizedActions", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed unauthorized actions.""" + allowed_unauthorized_actions_extensions: Optional[list["_models.AllowedUnauthorizedActionsExtension"]] = rest_field( + name="allowedUnauthorizedActionsExtensions", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed unauthorized actions extensions.""" + authorization_action_mappings: Optional[list["_models.AuthorizationActionMapping"]] = rest_field( + name="authorizationActionMappings", visibility=["read", "create", "update", "delete", "query"] + ) + """The authorization action mappings.""" + linked_access_checks: Optional[list["_models.LinkedAccessCheck"]] = rest_field( + name="linkedAccessChecks", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked access checks.""" + default_api_version: Optional[str] = rest_field( + name="defaultApiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The default api version.""" + logging_rules: Optional[list["_models.LoggingRule"]] = rest_field( + name="loggingRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The logging rules.""" + throttling_rules: Optional[list["_models.ThrottlingRule"]] = rest_field( + name="throttlingRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The throttling rules.""" + endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoints.""" + marketplace_type: Optional[Union[str, "_models.MarketplaceType"]] = rest_field( + name="marketplaceType", visibility=["read", "create", "update", "delete", "query"] + ) + """The marketplace type. Known values are: \"NotSpecified\", \"AddOn\", \"Bypass\", and \"Store\".""" + identity_management: Optional["_models.ResourceTypeIdentityManagement"] = rest_field( + name="identityManagement", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity management.""" + metadata: Optional[Any] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The metadata.""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + features_rule: Optional["_models.ResourceTypeFeaturesRule"] = rest_field( + name="featuresRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The features rule.""" + subscription_state_rules: Optional[list["_models.SubscriptionStateRule"]] = rest_field( + name="subscriptionStateRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription state rules.""" + service_tree_infos: Optional[list["_models.ServiceTreeInfo"]] = rest_field( + name="serviceTreeInfos", visibility=["read", "create", "update", "delete", "query"] + ) + """The service tree infos.""" + request_header_options: Optional["_models.ResourceTypeRequestHeaderOptions"] = rest_field( + name="requestHeaderOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The request header options.""" + sku_link: Optional[str] = rest_field(name="skuLink", visibility=["read", "create", "update", "delete", "query"]) + """The sku link.""" + disallowed_action_verbs: Optional[list[str]] = rest_field( + name="disallowedActionVerbs", visibility=["read", "create", "update", "delete", "query"] + ) + """The disallowed action verbs.""" + template_deployment_policy: Optional["_models.ResourceTypeTemplateDeploymentPolicy"] = rest_field( + name="templateDeploymentPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The template deployment policy.""" + extended_locations: Optional[list["_models.ExtendedLocationOptions"]] = rest_field( + name="extendedLocations", visibility=["read", "create", "update", "delete", "query"] + ) + """The extended locations.""" + linked_operation_rules: Optional[list["_models.LinkedOperationRule"]] = rest_field( + name="linkedOperationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked operation rules.""" + resource_deletion_policy: Optional[Union[str, "_models.ManifestResourceDeletionPolicy"]] = rest_field( + name="resourceDeletionPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource deletion policy. Known values are: \"NotSpecified\", \"Cascade\", and \"Force\".""" + quota_rule: Optional["_models.QuotaRule"] = rest_field( + name="quotaRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The quota rule.""" + notifications: Optional[list["_models.Notification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The notifications.""" + linked_notification_rules: Optional[list["_models.LinkedNotificationRule"]] = rest_field( + name="linkedNotificationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked notification rules.""" + resource_provider_authorization_rules: Optional["_models.ResourceProviderAuthorizationRules"] = rest_field( + name="resourceProviderAuthorizationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource provider authorization rules.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + name: Optional[str] = None, + routing_type: Optional[Union[str, "_models.RoutingType"]] = None, + additional_options: Optional[Union[str, "_models.AdditionalOptions"]] = None, + cross_tenant_token_validation: Optional[Union[str, "_models.CrossTenantTokenValidation"]] = None, + resource_validation: Optional[Union[str, "_models.ResourceValidation"]] = None, + allowed_unauthorized_actions: Optional[list[str]] = None, + allowed_unauthorized_actions_extensions: Optional[list["_models.AllowedUnauthorizedActionsExtension"]] = None, + authorization_action_mappings: Optional[list["_models.AuthorizationActionMapping"]] = None, + linked_access_checks: Optional[list["_models.LinkedAccessCheck"]] = None, + default_api_version: Optional[str] = None, + logging_rules: Optional[list["_models.LoggingRule"]] = None, + throttling_rules: Optional[list["_models.ThrottlingRule"]] = None, + endpoints: Optional[list["_models.ResourceProviderEndpoint"]] = None, + marketplace_type: Optional[Union[str, "_models.MarketplaceType"]] = None, + identity_management: Optional["_models.ResourceTypeIdentityManagement"] = None, + metadata: Optional[Any] = None, + required_features: Optional[list[str]] = None, + features_rule: Optional["_models.ResourceTypeFeaturesRule"] = None, + subscription_state_rules: Optional[list["_models.SubscriptionStateRule"]] = None, + service_tree_infos: Optional[list["_models.ServiceTreeInfo"]] = None, + request_header_options: Optional["_models.ResourceTypeRequestHeaderOptions"] = None, + sku_link: Optional[str] = None, + disallowed_action_verbs: Optional[list[str]] = None, + template_deployment_policy: Optional["_models.ResourceTypeTemplateDeploymentPolicy"] = None, + extended_locations: Optional[list["_models.ExtendedLocationOptions"]] = None, + linked_operation_rules: Optional[list["_models.LinkedOperationRule"]] = None, + resource_deletion_policy: Optional[Union[str, "_models.ManifestResourceDeletionPolicy"]] = None, + quota_rule: Optional["_models.QuotaRule"] = None, + notifications: Optional[list["_models.Notification"]] = None, + linked_notification_rules: Optional[list["_models.LinkedNotificationRule"]] = None, + resource_provider_authorization_rules: Optional["_models.ResourceProviderAuthorizationRules"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeEndpoint(_Model): + """ResourceTypeEndpoint. + + :ivar kind: Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to + render different UX experiences for resources of the same type. Known values are: "Managed" and + "Direct". + :vartype kind: str or ~azure.mgmt.providerhub.models.ResourceTypeEndpointKind + :ivar enabled: Whether the endpoint is enabled. + :vartype enabled: bool + :ivar api_versions: The api versions. + :vartype api_versions: list[str] + :ivar locations: The locations. + :vartype locations: list[str] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: ~azure.mgmt.providerhub.models.ResourceTypeEndpointFeaturesRule + :ivar extensions: The extensions. + :vartype extensions: list[~azure.mgmt.providerhub.models.ResourceTypeExtension] + :ivar timeout: The timeout. + :vartype timeout: ~datetime.timedelta + :ivar endpoint_type: The endpoint type. Known values are: "NotSpecified", "Canary", + "Production", and "TestInProduction". + :vartype endpoint_type: str or ~azure.mgmt.providerhub.models.EndpointTypeResourceType + :ivar token_auth_configuration: The token auth configuration. + :vartype token_auth_configuration: ~azure.mgmt.providerhub.models.TokenAuthConfiguration + :ivar sku_link: The sku link. + :vartype sku_link: str + :ivar endpoint_uri: The endpoint uri. + :vartype endpoint_uri: str + :ivar api_version: Api version. + :vartype api_version: str + :ivar zones: List of zones. + :vartype zones: list[str] + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: + ~azure.mgmt.providerhub.models.ResourceTypeEndpointDstsConfiguration + :ivar data_boundary: The data boundary. Known values are: "NotDefined", "Global", "EU", and + "US". + :vartype data_boundary: str or ~azure.mgmt.providerhub.models.DataBoundary + """ + + kind: Optional[Union[str, "_models.ResourceTypeEndpointKind"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render + different UX experiences for resources of the same type. Known values are: \"Managed\" and + \"Direct\".""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether the endpoint is enabled.""" + api_versions: Optional[list[str]] = rest_field( + name="apiVersions", visibility=["read", "create", "update", "delete", "query"] + ) + """The api versions.""" + locations: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The locations.""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + features_rule: Optional["_models.ResourceTypeEndpointFeaturesRule"] = rest_field( + name="featuresRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The features rule.""" + extensions: Optional[list["_models.ResourceTypeExtension"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The extensions.""" + timeout: Optional[datetime.timedelta] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The timeout.""" + endpoint_type: Optional[Union[str, "_models.EndpointTypeResourceType"]] = rest_field( + name="endpointType", visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoint type. Known values are: \"NotSpecified\", \"Canary\", \"Production\", and + \"TestInProduction\".""" + token_auth_configuration: Optional["_models.TokenAuthConfiguration"] = rest_field( + name="tokenAuthConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The token auth configuration.""" + sku_link: Optional[str] = rest_field(name="skuLink", visibility=["read", "create", "update", "delete", "query"]) + """The sku link.""" + endpoint_uri: Optional[str] = rest_field( + name="endpointUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoint uri.""" + api_version: Optional[str] = rest_field( + name="apiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Api version.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of zones.""" + dsts_configuration: Optional["_models.ResourceTypeEndpointDstsConfiguration"] = rest_field( + name="dstsConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The dsts configuration.""" + data_boundary: Optional[Union[str, "_models.DataBoundary"]] = rest_field( + name="dataBoundary", visibility=["read", "create", "update", "delete", "query"] + ) + """The data boundary. Known values are: \"NotDefined\", \"Global\", \"EU\", and \"US\".""" + + @overload + def __init__( + self, + *, + kind: Optional[Union[str, "_models.ResourceTypeEndpointKind"]] = None, + enabled: Optional[bool] = None, + api_versions: Optional[list[str]] = None, + locations: Optional[list[str]] = None, + required_features: Optional[list[str]] = None, + features_rule: Optional["_models.ResourceTypeEndpointFeaturesRule"] = None, + extensions: Optional[list["_models.ResourceTypeExtension"]] = None, + timeout: Optional[datetime.timedelta] = None, + endpoint_type: Optional[Union[str, "_models.EndpointTypeResourceType"]] = None, + token_auth_configuration: Optional["_models.TokenAuthConfiguration"] = None, + sku_link: Optional[str] = None, + endpoint_uri: Optional[str] = None, + api_version: Optional[str] = None, + zones: Optional[list[str]] = None, + dsts_configuration: Optional["_models.ResourceTypeEndpointDstsConfiguration"] = None, + data_boundary: Optional[Union[str, "_models.DataBoundary"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeEndpointBaseDstsConfiguration(DstsConfiguration): # pylint: disable=name-too-long + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + @overload + def __init__( + self, + *, + service_name: str, + service_dns_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 ResourceTypeEndpointBaseFeaturesRule(FeaturesRule): + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: str or ~azure.mgmt.providerhub.models.FeaturesPolicy + """ + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, "_models.FeaturesPolicy"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeEndpointDstsConfiguration(DstsConfiguration): + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + @overload + def __init__( + self, + *, + service_name: str, + service_dns_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 ResourceTypeEndpointFeaturesRule(FeaturesRule): + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: str or ~azure.mgmt.providerhub.models.FeaturesPolicy + """ + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, "_models.FeaturesPolicy"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeExtension(_Model): + """ResourceTypeExtension. + + :ivar endpoint_uri: The endpoint uri. + :vartype endpoint_uri: str + :ivar extension_categories: The extension categories. + :vartype extension_categories: list[str or ~azure.mgmt.providerhub.models.ExtensionCategory] + :ivar timeout: The timeout. + :vartype timeout: ~datetime.timedelta + """ + + endpoint_uri: Optional[str] = rest_field( + name="endpointUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The endpoint uri.""" + extension_categories: Optional[list[Union[str, "_models.ExtensionCategory"]]] = rest_field( + name="extensionCategories", visibility=["read", "create", "update", "delete", "query"] + ) + """The extension categories.""" + timeout: Optional[datetime.timedelta] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The timeout.""" + + @overload + def __init__( + self, + *, + endpoint_uri: Optional[str] = None, + extension_categories: Optional[list[Union[str, "_models.ExtensionCategory"]]] = None, + timeout: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeExtensionOptions(_Model): + """ResourceTypeExtensionOptions. + + :ivar resource_creation_begin: Resource creation begin. + :vartype resource_creation_begin: + ~azure.mgmt.providerhub.models.ResourceTypeExtensionOptionsResourceCreationBegin + """ + + resource_creation_begin: Optional["_models.ResourceTypeExtensionOptionsResourceCreationBegin"] = rest_field( + name="resourceCreationBegin", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource creation begin.""" + + @overload + def __init__( + self, + *, + resource_creation_begin: Optional["_models.ResourceTypeExtensionOptionsResourceCreationBegin"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeExtensionOptionsResourceCreationBegin(ExtensionOptions): # pylint: disable=name-too-long + """Resource creation begin. + + :ivar request: The request. + :vartype request: list[str or ~azure.mgmt.providerhub.models.ExtensionOptionType] + :ivar response: The response. + :vartype response: list[str or ~azure.mgmt.providerhub.models.ExtensionOptionType] + """ + + @overload + def __init__( + self, + *, + request: Optional[list[Union[str, "_models.ExtensionOptionType"]]] = None, + response: Optional[list[Union[str, "_models.ExtensionOptionType"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeFeaturesRule(FeaturesRule): + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: str or ~azure.mgmt.providerhub.models.FeaturesPolicy + """ + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, "_models.FeaturesPolicy"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeIdentityManagement(IdentityManagement): + """The identity management. + + :ivar type: The type. Known values are: "NotSpecified", "SystemAssigned", "UserAssigned", + "Actor", and "DelegatedResourceIdentity". + :vartype type: str or ~azure.mgmt.providerhub.models.IdentityManagementTypes + """ + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.IdentityManagementTypes"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeOnBehalfOfToken(_Model): + """ResourceTypeOnBehalfOfToken. + + :ivar action_name: The action name. + :vartype action_name: str + :ivar life_time: This is a TimeSpan property. + :vartype life_time: str + """ + + action_name: Optional[str] = rest_field( + name="actionName", visibility=["read", "create", "update", "delete", "query"] + ) + """The action name.""" + life_time: Optional[str] = rest_field(name="lifeTime", visibility=["read", "create", "update", "delete", "query"]) + """This is a TimeSpan property.""" + + @overload + def __init__( + self, + *, + action_name: Optional[str] = None, + life_time: 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 ResourceTypeRegistration(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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.providerhub.models.SystemData + :ivar properties: + :vartype properties: ~azure.mgmt.providerhub.models.ResourceTypeRegistrationProperties + :ivar kind: Resource type registration kind. This Metadata is also used by portal/tooling/etc + to render different UX experiences for resources of the same type. Known values are: "Managed", + "Hybrid", and "Direct". + :vartype kind: str or ~azure.mgmt.providerhub.models.ResourceTypeRegistrationKind + """ + + properties: Optional["_models.ResourceTypeRegistrationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + kind: Optional[Union[str, "_models.ResourceTypeRegistrationKind"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Resource type registration kind. This Metadata is also used by portal/tooling/etc to render + different UX experiences for resources of the same type. Known values are: \"Managed\", + \"Hybrid\", and \"Direct\".""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.ResourceTypeRegistrationProperties"] = None, + kind: Optional[Union[str, "_models.ResourceTypeRegistrationKind"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationProperties(_Model): + """ResourceTypeRegistrationProperties. + + :ivar routing_type: The resource routing type. Known values are: "Default", "ProxyOnly", + "HostBased", "Extension", "Tenant", "Fanout", "LocationBased", "Failover", "CascadeExtension", + "ChildFanout", "CascadeAuthorizedExtension", "BypassEndpointSelectionOptimization", + "LocationMapping", and "ServiceFanout". + :vartype routing_type: str or ~azure.mgmt.providerhub.models.RoutingType + :ivar additional_options: The additional options. Known values are: + "ProtectedAsyncOperationPolling" and "ProtectedAsyncOperationPollingAuditOnly". + :vartype additional_options: str or + ~azure.mgmt.providerhub.models.AdditionalOptionsResourceTypeRegistration + :ivar cross_tenant_token_validation: The cross tenant token validation. Known values are: + "EnsureSecureValidation" and "PassthroughInsecureToken". + :vartype cross_tenant_token_validation: str or + ~azure.mgmt.providerhub.models.CrossTenantTokenValidation + :ivar regionality: The regionality. Known values are: "NotSpecified", "Global", and "Regional". + :vartype regionality: str or ~azure.mgmt.providerhub.models.Regionality + :ivar endpoints: The extensions. + :vartype endpoints: list[~azure.mgmt.providerhub.models.ResourceTypeEndpoint] + :ivar extension_options: The extension options. + :vartype extension_options: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesExtensionOptions + :ivar marketplace_type: The marketplace type. Known values are: "NotSpecified", "AddOn", + "Bypass", and "Store". + :vartype marketplace_type: str or ~azure.mgmt.providerhub.models.MarketplaceType + :ivar swagger_specifications: The swagger specifications. + :vartype swagger_specifications: list[~azure.mgmt.providerhub.models.SwaggerSpecification] + :ivar allowed_unauthorized_actions: The allowed unauthorized actions. + :vartype allowed_unauthorized_actions: list[str] + :ivar allowed_unauthorized_actions_extensions: The allowed unauthorized actions extensions. + :vartype allowed_unauthorized_actions_extensions: + list[~azure.mgmt.providerhub.models.AllowedUnauthorizedActionsExtension] + :ivar authorization_action_mappings: The authorization action mappings. + :vartype authorization_action_mappings: + list[~azure.mgmt.providerhub.models.AuthorizationActionMapping] + :ivar linked_access_checks: The linked access checks. + :vartype linked_access_checks: list[~azure.mgmt.providerhub.models.LinkedAccessCheck] + :ivar default_api_version: The default api version. + :vartype default_api_version: str + :ivar logging_rules: The logging rules. + :vartype logging_rules: list[~azure.mgmt.providerhub.models.LoggingRule] + :ivar throttling_rules: The throttling rules. + :vartype throttling_rules: list[~azure.mgmt.providerhub.models.ThrottlingRule] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesFeaturesRule + :ivar enable_async_operation: Whether async operation is enabled. + :vartype enable_async_operation: bool + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: str or ~azure.mgmt.providerhub.models.ProvisioningState + :ivar enable_third_party_s2_s: Whether third party S2S is enabled. + :vartype enable_third_party_s2_s: bool + :ivar subscription_lifecycle_notification_specifications: The subscription lifecycle + notification specifications. + :vartype subscription_lifecycle_notification_specifications: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications + :ivar is_pure_proxy: Whether it is pure proxy. + :vartype is_pure_proxy: bool + :ivar identity_management: The identity management. + :vartype identity_management: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesIdentityManagement + :ivar check_name_availability_specifications: The check name availability specifications. + :vartype check_name_availability_specifications: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications + :ivar disallowed_action_verbs: The disallowed action verbs. + :vartype disallowed_action_verbs: list[str] + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list[~azure.mgmt.providerhub.models.ServiceTreeInfo] + :ivar request_header_options: The request header options. + :vartype request_header_options: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesRequestHeaderOptions + :ivar subscription_state_rules: The subscription state rules. + :vartype subscription_state_rules: list[~azure.mgmt.providerhub.models.SubscriptionStateRule] + :ivar template_deployment_options: The template deployment options. + :vartype template_deployment_options: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesTemplateDeploymentOptions + :ivar extended_locations: The extended locations. + :vartype extended_locations: list[~azure.mgmt.providerhub.models.ExtendedLocationOptions] + :ivar resource_move_policy: The resource move policy. + :vartype resource_move_policy: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceMovePolicy + :ivar resource_deletion_policy: The resource deletion policy. Known values are: "NotSpecified", + "CascadeDeleteAll", and "CascadeDeleteProxyOnlyChildren". + :vartype resource_deletion_policy: str or ~azure.mgmt.providerhub.models.ResourceDeletionPolicy + :ivar resource_concurrency_control_options: The resource concurrency control options. + :vartype resource_concurrency_control_options: dict[str, + ~azure.mgmt.providerhub.models.ResourceConcurrencyControlOption] + :ivar resource_graph_configuration: The resource graph configuration. + :vartype resource_graph_configuration: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceGraphConfiguration + :ivar management: The resource provider management. + :vartype management: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesManagement + :ivar open_api_configuration: The open api configuration. + :vartype open_api_configuration: ~azure.mgmt.providerhub.models.OpenApiConfiguration + :ivar on_behalf_of_tokens: The on behalf of tokens. + :vartype on_behalf_of_tokens: ~azure.mgmt.providerhub.models.ResourceTypeOnBehalfOfToken + :ivar category: The category. Known values are: "None", "FreeForm", "Internal", and + "PureProxy". + :vartype category: str or ~azure.mgmt.providerhub.models.ResourceTypeCategory + :ivar resource_validation: The resource validation. Known values are: "NotSpecified", + "ReservedWords", and "ProfaneWords". + :vartype resource_validation: str or ~azure.mgmt.providerhub.models.ResourceValidation + :ivar disallowed_end_user_operations: The disallowed end user operations. + :vartype disallowed_end_user_operations: list[str] + :ivar metadata: The metadata. + :vartype metadata: dict[str, any] + :ivar sku_link: The sku link. + :vartype sku_link: str + :ivar quota_rule: The quota rule. + :vartype quota_rule: ~azure.mgmt.providerhub.models.QuotaRule + :ivar notifications: The notifications. + :vartype notifications: list[~azure.mgmt.providerhub.models.Notification] + :ivar linked_notification_rules: The linked notification rules. + :vartype linked_notification_rules: list[~azure.mgmt.providerhub.models.LinkedNotificationRule] + :ivar resource_provider_authorization_rules: The resource provider authorization rules. + :vartype resource_provider_authorization_rules: + ~azure.mgmt.providerhub.models.ResourceProviderAuthorizationRules + :ivar token_auth_configuration: The token auth configuration. + :vartype token_auth_configuration: ~azure.mgmt.providerhub.models.TokenAuthConfiguration + :ivar template_deployment_policy: The template deployment policy. + :vartype template_deployment_policy: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy + :ivar allow_empty_role_assignments: The allow empty role assignments. + :vartype allow_empty_role_assignments: bool + :ivar policy_execution_type: The policy execution type. Known values are: "NotSpecified", + "ExecutePolicies", "BypassPolicies", and "ExpectPartialPutRequests". + :vartype policy_execution_type: str or ~azure.mgmt.providerhub.models.PolicyExecutionType + :ivar availability_zone_rule: The availability zone rule. + :vartype availability_zone_rule: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesAvailabilityZoneRule + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesDstsConfiguration + :ivar async_timeout_rules: Async timeout rules. + :vartype async_timeout_rules: list[~azure.mgmt.providerhub.models.AsyncTimeoutRule] + :ivar common_api_versions: Common API versions for the resource type. + :vartype common_api_versions: list[str] + :ivar api_profiles: The api profiles. + :vartype api_profiles: list[~azure.mgmt.providerhub.models.ApiProfile] + :ivar linked_operation_rules: The linked operation rules. + :vartype linked_operation_rules: list[~azure.mgmt.providerhub.models.LinkedOperationRule] + :ivar legacy_name: The legacy name. + :vartype legacy_name: str + :ivar legacy_names: The legacy names. + :vartype legacy_names: list[str] + :ivar allowed_template_deployment_reference_actions: Allowed template deployment reference + actions. + :vartype allowed_template_deployment_reference_actions: list[str] + :ivar legacy_policy: The legacy policy. + :vartype legacy_policy: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesLegacyPolicy + :ivar manifest_link: Manifest link. + :vartype manifest_link: str + :ivar capacity_rule: Capacity rule. + :vartype capacity_rule: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesCapacityRule + :ivar marketplace_options: Marketplace options. + :vartype marketplace_options: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesMarketplaceOptions + :ivar allowed_resource_names: The allowed resource names. + :vartype allowed_resource_names: list[~azure.mgmt.providerhub.models.AllowedResourceName] + :ivar resource_cache: Resource cache options. + :vartype resource_cache: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceCache + :ivar resource_query_management: Resource query management options. + :vartype resource_query_management: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceQueryManagement + :ivar supports_tags: Whether tags are supported. + :vartype supports_tags: bool + :ivar resource_management_options: Resource management options. + :vartype resource_management_options: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptions + :ivar grouping_tag: Grouping tag. + :vartype grouping_tag: str + :ivar add_resource_list_target_locations: Add resource list target locations?. + :vartype add_resource_list_target_locations: bool + :ivar resource_type_common_attribute_management: Resource type common attribute management. + :vartype resource_type_common_attribute_management: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement + :ivar routing_rule: Routing rule. + :vartype routing_rule: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesRoutingRule + :ivar frontdoor_request_mode: The frontdoor request mode. Known values are: "NotSpecified" and + "UseManifest". + :vartype frontdoor_request_mode: str or ~azure.mgmt.providerhub.models.FrontdoorRequestMode + :ivar resource_sub_type: The resource sub type. Known values are: "NotSpecified" and + "AsyncOperation". + :vartype resource_sub_type: str or ~azure.mgmt.providerhub.models.ResourceSubType + :ivar async_operation_resource_type_name: The async operation resource type name. + :vartype async_operation_resource_type_name: str + """ + + routing_type: Optional[Union[str, "_models.RoutingType"]] = rest_field( + name="routingType", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource routing type. Known values are: \"Default\", \"ProxyOnly\", \"HostBased\", + \"Extension\", \"Tenant\", \"Fanout\", \"LocationBased\", \"Failover\", \"CascadeExtension\", + \"ChildFanout\", \"CascadeAuthorizedExtension\", \"BypassEndpointSelectionOptimization\", + \"LocationMapping\", and \"ServiceFanout\".""" + additional_options: Optional[Union[str, "_models.AdditionalOptionsResourceTypeRegistration"]] = rest_field( + name="additionalOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The additional options. Known values are: \"ProtectedAsyncOperationPolling\" and + \"ProtectedAsyncOperationPollingAuditOnly\".""" + cross_tenant_token_validation: Optional[Union[str, "_models.CrossTenantTokenValidation"]] = rest_field( + name="crossTenantTokenValidation", visibility=["read", "create", "update", "delete", "query"] + ) + """The cross tenant token validation. Known values are: \"EnsureSecureValidation\" and + \"PassthroughInsecureToken\".""" + regionality: Optional[Union[str, "_models.Regionality"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The regionality. Known values are: \"NotSpecified\", \"Global\", and \"Regional\".""" + endpoints: Optional[list["_models.ResourceTypeEndpoint"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The extensions.""" + extension_options: Optional["_models.ResourceTypeRegistrationPropertiesExtensionOptions"] = rest_field( + name="extensionOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The extension options.""" + marketplace_type: Optional[Union[str, "_models.MarketplaceType"]] = rest_field( + name="marketplaceType", visibility=["read", "create", "update", "delete", "query"] + ) + """The marketplace type. Known values are: \"NotSpecified\", \"AddOn\", \"Bypass\", and \"Store\".""" + swagger_specifications: Optional[list["_models.SwaggerSpecification"]] = rest_field( + name="swaggerSpecifications", visibility=["read", "create", "update", "delete", "query"] + ) + """The swagger specifications.""" + allowed_unauthorized_actions: Optional[list[str]] = rest_field( + name="allowedUnauthorizedActions", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed unauthorized actions.""" + allowed_unauthorized_actions_extensions: Optional[list["_models.AllowedUnauthorizedActionsExtension"]] = rest_field( + name="allowedUnauthorizedActionsExtensions", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed unauthorized actions extensions.""" + authorization_action_mappings: Optional[list["_models.AuthorizationActionMapping"]] = rest_field( + name="authorizationActionMappings", visibility=["read", "create", "update", "delete", "query"] + ) + """The authorization action mappings.""" + linked_access_checks: Optional[list["_models.LinkedAccessCheck"]] = rest_field( + name="linkedAccessChecks", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked access checks.""" + default_api_version: Optional[str] = rest_field( + name="defaultApiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """The default api version.""" + logging_rules: Optional[list["_models.LoggingRule"]] = rest_field( + name="loggingRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The logging rules.""" + throttling_rules: Optional[list["_models.ThrottlingRule"]] = rest_field( + name="throttlingRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The throttling rules.""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + features_rule: Optional["_models.ResourceTypeRegistrationPropertiesFeaturesRule"] = rest_field( + name="featuresRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The features rule.""" + enable_async_operation: Optional[bool] = rest_field( + name="enableAsyncOperation", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether async operation is enabled.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + enable_third_party_s2_s: Optional[bool] = rest_field( + name="enableThirdPartyS2S", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether third party S2S is enabled.""" + subscription_lifecycle_notification_specifications: Optional[ + "_models.ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications" + ] = rest_field( + name="subscriptionLifecycleNotificationSpecifications", + visibility=["read", "create", "update", "delete", "query"], + ) + """The subscription lifecycle notification specifications.""" + is_pure_proxy: Optional[bool] = rest_field( + name="isPureProxy", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether it is pure proxy.""" + identity_management: Optional["_models.ResourceTypeRegistrationPropertiesIdentityManagement"] = rest_field( + name="identityManagement", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity management.""" + check_name_availability_specifications: Optional[ + "_models.ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications" + ] = rest_field( + name="checkNameAvailabilitySpecifications", visibility=["read", "create", "update", "delete", "query"] + ) + """The check name availability specifications.""" + disallowed_action_verbs: Optional[list[str]] = rest_field( + name="disallowedActionVerbs", visibility=["read", "create", "update", "delete", "query"] + ) + """The disallowed action verbs.""" + service_tree_infos: Optional[list["_models.ServiceTreeInfo"]] = rest_field( + name="serviceTreeInfos", visibility=["read", "create", "update", "delete", "query"] + ) + """The service tree infos.""" + request_header_options: Optional["_models.ResourceTypeRegistrationPropertiesRequestHeaderOptions"] = rest_field( + name="requestHeaderOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The request header options.""" + subscription_state_rules: Optional[list["_models.SubscriptionStateRule"]] = rest_field( + name="subscriptionStateRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription state rules.""" + template_deployment_options: Optional["_models.ResourceTypeRegistrationPropertiesTemplateDeploymentOptions"] = ( + rest_field(name="templateDeploymentOptions", visibility=["read", "create", "update", "delete", "query"]) + ) + """The template deployment options.""" + extended_locations: Optional[list["_models.ExtendedLocationOptions"]] = rest_field( + name="extendedLocations", visibility=["read", "create", "update", "delete", "query"] + ) + """The extended locations.""" + resource_move_policy: Optional["_models.ResourceTypeRegistrationPropertiesResourceMovePolicy"] = rest_field( + name="resourceMovePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource move policy.""" + resource_deletion_policy: Optional[Union[str, "_models.ResourceDeletionPolicy"]] = rest_field( + name="resourceDeletionPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource deletion policy. Known values are: \"NotSpecified\", \"CascadeDeleteAll\", and + \"CascadeDeleteProxyOnlyChildren\".""" + resource_concurrency_control_options: Optional[dict[str, "_models.ResourceConcurrencyControlOption"]] = rest_field( + name="resourceConcurrencyControlOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource concurrency control options.""" + resource_graph_configuration: Optional["_models.ResourceTypeRegistrationPropertiesResourceGraphConfiguration"] = ( + rest_field(name="resourceGraphConfiguration", visibility=["read", "create", "update", "delete", "query"]) + ) + """The resource graph configuration.""" + management: Optional["_models.ResourceTypeRegistrationPropertiesManagement"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource provider management.""" + open_api_configuration: Optional["_models.OpenApiConfiguration"] = rest_field( + name="openApiConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The open api configuration.""" + on_behalf_of_tokens: Optional["_models.ResourceTypeOnBehalfOfToken"] = rest_field( + name="onBehalfOfTokens", visibility=["read", "create", "update", "delete", "query"] + ) + """The on behalf of tokens.""" + category: Optional[Union[str, "_models.ResourceTypeCategory"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The category. Known values are: \"None\", \"FreeForm\", \"Internal\", and \"PureProxy\".""" + resource_validation: Optional[Union[str, "_models.ResourceValidation"]] = rest_field( + name="resourceValidation", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource validation. Known values are: \"NotSpecified\", \"ReservedWords\", and + \"ProfaneWords\".""" + disallowed_end_user_operations: Optional[list[str]] = rest_field( + name="disallowedEndUserOperations", visibility=["read", "create", "update", "delete", "query"] + ) + """The disallowed end user operations.""" + metadata: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The metadata.""" + sku_link: Optional[str] = rest_field(name="skuLink", visibility=["read", "create", "update", "delete", "query"]) + """The sku link.""" + quota_rule: Optional["_models.QuotaRule"] = rest_field( + name="quotaRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The quota rule.""" + notifications: Optional[list["_models.Notification"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The notifications.""" + linked_notification_rules: Optional[list["_models.LinkedNotificationRule"]] = rest_field( + name="linkedNotificationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked notification rules.""" + resource_provider_authorization_rules: Optional["_models.ResourceProviderAuthorizationRules"] = rest_field( + name="resourceProviderAuthorizationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource provider authorization rules.""" + token_auth_configuration: Optional["_models.TokenAuthConfiguration"] = rest_field( + name="tokenAuthConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The token auth configuration.""" + template_deployment_policy: Optional["_models.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy"] = ( + rest_field(name="templateDeploymentPolicy", visibility=["read", "create", "update", "delete", "query"]) + ) + """The template deployment policy.""" + allow_empty_role_assignments: Optional[bool] = rest_field( + name="allowEmptyRoleAssignments", visibility=["read", "create", "update", "delete", "query"] + ) + """The allow empty role assignments.""" + policy_execution_type: Optional[Union[str, "_models.PolicyExecutionType"]] = rest_field( + name="policyExecutionType", visibility=["read", "create", "update", "delete", "query"] + ) + """The policy execution type. Known values are: \"NotSpecified\", \"ExecutePolicies\", + \"BypassPolicies\", and \"ExpectPartialPutRequests\".""" + availability_zone_rule: Optional["_models.ResourceTypeRegistrationPropertiesAvailabilityZoneRule"] = rest_field( + name="availabilityZoneRule", visibility=["read", "create", "update", "delete", "query"] + ) + """The availability zone rule.""" + dsts_configuration: Optional["_models.ResourceTypeRegistrationPropertiesDstsConfiguration"] = rest_field( + name="dstsConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The dsts configuration.""" + async_timeout_rules: Optional[list["_models.AsyncTimeoutRule"]] = rest_field( + name="asyncTimeoutRules", visibility=["read", "create", "update", "delete", "query"] + ) + """Async timeout rules.""" + common_api_versions: Optional[list[str]] = rest_field( + name="commonApiVersions", visibility=["read", "create", "update", "delete", "query"] + ) + """Common API versions for the resource type.""" + api_profiles: Optional[list["_models.ApiProfile"]] = rest_field( + name="apiProfiles", visibility=["read", "create", "update", "delete", "query"] + ) + """The api profiles.""" + linked_operation_rules: Optional[list["_models.LinkedOperationRule"]] = rest_field( + name="linkedOperationRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The linked operation rules.""" + legacy_name: Optional[str] = rest_field( + name="legacyName", visibility=["read", "create", "update", "delete", "query"] + ) + """The legacy name.""" + legacy_names: Optional[list[str]] = rest_field( + name="legacyNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The legacy names.""" + allowed_template_deployment_reference_actions: Optional[list[str]] = rest_field( + name="allowedTemplateDeploymentReferenceActions", visibility=["read", "create", "update", "delete", "query"] + ) + """Allowed template deployment reference actions.""" + legacy_policy: Optional["_models.ResourceTypeRegistrationPropertiesLegacyPolicy"] = rest_field( + name="legacyPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The legacy policy.""" + manifest_link: Optional[str] = rest_field( + name="manifestLink", visibility=["read", "create", "update", "delete", "query"] + ) + """Manifest link.""" + capacity_rule: Optional["_models.ResourceTypeRegistrationPropertiesCapacityRule"] = rest_field( + name="capacityRule", visibility=["read", "create", "update", "delete", "query"] + ) + """Capacity rule.""" + marketplace_options: Optional["_models.ResourceTypeRegistrationPropertiesMarketplaceOptions"] = rest_field( + name="marketplaceOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """Marketplace options.""" + allowed_resource_names: Optional[list["_models.AllowedResourceName"]] = rest_field( + name="allowedResourceNames", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed resource names.""" + resource_cache: Optional["_models.ResourceTypeRegistrationPropertiesResourceCache"] = rest_field( + name="resourceCache", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource cache options.""" + resource_query_management: Optional["_models.ResourceTypeRegistrationPropertiesResourceQueryManagement"] = ( + rest_field(name="resourceQueryManagement", visibility=["read", "create", "update", "delete", "query"]) + ) + """Resource query management options.""" + supports_tags: Optional[bool] = rest_field( + name="supportsTags", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether tags are supported.""" + resource_management_options: Optional["_models.ResourceTypeRegistrationPropertiesResourceManagementOptions"] = ( + rest_field(name="resourceManagementOptions", visibility=["read", "create", "update", "delete", "query"]) + ) + """Resource management options.""" + grouping_tag: Optional[str] = rest_field( + name="groupingTag", visibility=["read", "create", "update", "delete", "query"] + ) + """Grouping tag.""" + add_resource_list_target_locations: Optional[bool] = rest_field( + name="addResourceListTargetLocations", visibility=["read", "create", "update", "delete", "query"] + ) + """Add resource list target locations?.""" + resource_type_common_attribute_management: Optional[ + "_models.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement" + ] = rest_field( + name="resourceTypeCommonAttributeManagement", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource type common attribute management.""" + routing_rule: Optional["_models.ResourceTypeRegistrationPropertiesRoutingRule"] = rest_field( + name="routingRule", visibility=["read", "create", "update", "delete", "query"] + ) + """Routing rule.""" + frontdoor_request_mode: Optional[Union[str, "_models.FrontdoorRequestMode"]] = rest_field( + name="frontdoorRequestMode", visibility=["read", "create", "update", "delete", "query"] + ) + """The frontdoor request mode. Known values are: \"NotSpecified\" and \"UseManifest\".""" + resource_sub_type: Optional[Union[str, "_models.ResourceSubType"]] = rest_field( + name="resourceSubType", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource sub type. Known values are: \"NotSpecified\" and \"AsyncOperation\".""" + async_operation_resource_type_name: Optional[str] = rest_field( + name="asyncOperationResourceTypeName", visibility=["read", "create", "update", "delete", "query"] + ) + """The async operation resource type name.""" + + @overload + def __init__( # pylint: disable=too-many-locals + self, + *, + routing_type: Optional[Union[str, "_models.RoutingType"]] = None, + additional_options: Optional[Union[str, "_models.AdditionalOptionsResourceTypeRegistration"]] = None, + cross_tenant_token_validation: Optional[Union[str, "_models.CrossTenantTokenValidation"]] = None, + regionality: Optional[Union[str, "_models.Regionality"]] = None, + endpoints: Optional[list["_models.ResourceTypeEndpoint"]] = None, + extension_options: Optional["_models.ResourceTypeRegistrationPropertiesExtensionOptions"] = None, + marketplace_type: Optional[Union[str, "_models.MarketplaceType"]] = None, + swagger_specifications: Optional[list["_models.SwaggerSpecification"]] = None, + allowed_unauthorized_actions: Optional[list[str]] = None, + allowed_unauthorized_actions_extensions: Optional[list["_models.AllowedUnauthorizedActionsExtension"]] = None, + authorization_action_mappings: Optional[list["_models.AuthorizationActionMapping"]] = None, + linked_access_checks: Optional[list["_models.LinkedAccessCheck"]] = None, + default_api_version: Optional[str] = None, + logging_rules: Optional[list["_models.LoggingRule"]] = None, + throttling_rules: Optional[list["_models.ThrottlingRule"]] = None, + required_features: Optional[list[str]] = None, + features_rule: Optional["_models.ResourceTypeRegistrationPropertiesFeaturesRule"] = None, + enable_async_operation: Optional[bool] = None, + enable_third_party_s2_s: Optional[bool] = None, + subscription_lifecycle_notification_specifications: Optional[ + "_models.ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications" + ] = None, + is_pure_proxy: Optional[bool] = None, + identity_management: Optional["_models.ResourceTypeRegistrationPropertiesIdentityManagement"] = None, + check_name_availability_specifications: Optional[ + "_models.ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications" + ] = None, + disallowed_action_verbs: Optional[list[str]] = None, + service_tree_infos: Optional[list["_models.ServiceTreeInfo"]] = None, + request_header_options: Optional["_models.ResourceTypeRegistrationPropertiesRequestHeaderOptions"] = None, + subscription_state_rules: Optional[list["_models.SubscriptionStateRule"]] = None, + template_deployment_options: Optional[ + "_models.ResourceTypeRegistrationPropertiesTemplateDeploymentOptions" + ] = None, + extended_locations: Optional[list["_models.ExtendedLocationOptions"]] = None, + resource_move_policy: Optional["_models.ResourceTypeRegistrationPropertiesResourceMovePolicy"] = None, + resource_deletion_policy: Optional[Union[str, "_models.ResourceDeletionPolicy"]] = None, + resource_concurrency_control_options: Optional[dict[str, "_models.ResourceConcurrencyControlOption"]] = None, + resource_graph_configuration: Optional[ + "_models.ResourceTypeRegistrationPropertiesResourceGraphConfiguration" + ] = None, + management: Optional["_models.ResourceTypeRegistrationPropertiesManagement"] = None, + open_api_configuration: Optional["_models.OpenApiConfiguration"] = None, + on_behalf_of_tokens: Optional["_models.ResourceTypeOnBehalfOfToken"] = None, + category: Optional[Union[str, "_models.ResourceTypeCategory"]] = None, + resource_validation: Optional[Union[str, "_models.ResourceValidation"]] = None, + disallowed_end_user_operations: Optional[list[str]] = None, + metadata: Optional[dict[str, Any]] = None, + sku_link: Optional[str] = None, + quota_rule: Optional["_models.QuotaRule"] = None, + notifications: Optional[list["_models.Notification"]] = None, + linked_notification_rules: Optional[list["_models.LinkedNotificationRule"]] = None, + resource_provider_authorization_rules: Optional["_models.ResourceProviderAuthorizationRules"] = None, + token_auth_configuration: Optional["_models.TokenAuthConfiguration"] = None, + template_deployment_policy: Optional[ + "_models.ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy" + ] = None, + allow_empty_role_assignments: Optional[bool] = None, + policy_execution_type: Optional[Union[str, "_models.PolicyExecutionType"]] = None, + availability_zone_rule: Optional["_models.ResourceTypeRegistrationPropertiesAvailabilityZoneRule"] = None, + dsts_configuration: Optional["_models.ResourceTypeRegistrationPropertiesDstsConfiguration"] = None, + async_timeout_rules: Optional[list["_models.AsyncTimeoutRule"]] = None, + common_api_versions: Optional[list[str]] = None, + api_profiles: Optional[list["_models.ApiProfile"]] = None, + linked_operation_rules: Optional[list["_models.LinkedOperationRule"]] = None, + legacy_name: Optional[str] = None, + legacy_names: Optional[list[str]] = None, + allowed_template_deployment_reference_actions: Optional[list[str]] = None, + legacy_policy: Optional["_models.ResourceTypeRegistrationPropertiesLegacyPolicy"] = None, + manifest_link: Optional[str] = None, + capacity_rule: Optional["_models.ResourceTypeRegistrationPropertiesCapacityRule"] = None, + marketplace_options: Optional["_models.ResourceTypeRegistrationPropertiesMarketplaceOptions"] = None, + allowed_resource_names: Optional[list["_models.AllowedResourceName"]] = None, + resource_cache: Optional["_models.ResourceTypeRegistrationPropertiesResourceCache"] = None, + resource_query_management: Optional["_models.ResourceTypeRegistrationPropertiesResourceQueryManagement"] = None, + supports_tags: Optional[bool] = None, + resource_management_options: Optional[ + "_models.ResourceTypeRegistrationPropertiesResourceManagementOptions" + ] = None, + grouping_tag: Optional[str] = None, + add_resource_list_target_locations: Optional[bool] = None, + resource_type_common_attribute_management: Optional[ + "_models.ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement" + ] = None, + routing_rule: Optional["_models.ResourceTypeRegistrationPropertiesRoutingRule"] = None, + frontdoor_request_mode: Optional[Union[str, "_models.FrontdoorRequestMode"]] = None, + resource_sub_type: Optional[Union[str, "_models.ResourceSubType"]] = None, + async_operation_resource_type_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 ResourceTypeRegistrationPropertiesAvailabilityZoneRule(_Model): # pylint: disable=name-too-long + """The availability zone rule. + + :ivar availability_zone_policy: Known values are: "NotSpecified", "SingleZoned", and + "MultiZoned". + :vartype availability_zone_policy: str or ~azure.mgmt.providerhub.models.AvailabilityZonePolicy + """ + + availability_zone_policy: Optional[Union[str, "_models.AvailabilityZonePolicy"]] = rest_field( + name="availabilityZonePolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Known values are: \"NotSpecified\", \"SingleZoned\", and \"MultiZoned\".""" + + @overload + def __init__( + self, + *, + availability_zone_policy: Optional[Union[str, "_models.AvailabilityZonePolicy"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesCapacityRule(_Model): # pylint: disable=name-too-long + """Capacity rule. + + :ivar capacity_policy: Capacity policy. Known values are: "Default" and "Restricted". + :vartype capacity_policy: str or ~azure.mgmt.providerhub.models.CapacityPolicy + :ivar sku_alias: Sku alias. + :vartype sku_alias: str + """ + + capacity_policy: Optional[Union[str, "_models.CapacityPolicy"]] = rest_field( + name="capacityPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Capacity policy. Known values are: \"Default\" and \"Restricted\".""" + sku_alias: Optional[str] = rest_field(name="skuAlias", visibility=["read", "create", "update", "delete", "query"]) + """Sku alias.""" + + @overload + def __init__( + self, + *, + capacity_policy: Optional[Union[str, "_models.CapacityPolicy"]] = None, + sku_alias: 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 ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications( + CheckNameAvailabilitySpecifications +): # pylint: disable=name-too-long + """The check name availability specifications. + + :ivar enable_default_validation: Whether default validation is enabled. + :vartype enable_default_validation: bool + :ivar resource_types_with_custom_validation: The resource types with custom validation. + :vartype resource_types_with_custom_validation: list[str] + """ + + @overload + def __init__( + self, + *, + enable_default_validation: Optional[bool] = None, + resource_types_with_custom_validation: 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 ResourceTypeRegistrationPropertiesDstsConfiguration(DstsConfiguration): # pylint: disable=name-too-long + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + @overload + def __init__( + self, + *, + service_name: str, + service_dns_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 ResourceTypeRegistrationPropertiesExtensionOptions(ResourceTypeExtensionOptions): # pylint: disable=name-too-long + """The extension options. + + :ivar resource_creation_begin: Resource creation begin. + :vartype resource_creation_begin: + ~azure.mgmt.providerhub.models.ResourceTypeExtensionOptionsResourceCreationBegin + """ + + @overload + def __init__( + self, + *, + resource_creation_begin: Optional["_models.ResourceTypeExtensionOptionsResourceCreationBegin"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesFeaturesRule(FeaturesRule): # pylint: disable=name-too-long + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: str or ~azure.mgmt.providerhub.models.FeaturesPolicy + """ + + @overload + def __init__( + self, + *, + required_features_policy: Union[str, "_models.FeaturesPolicy"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesIdentityManagement( + IdentityManagementProperties +): # pylint: disable=name-too-long + """The identity management. + + :ivar type: The type. Known values are: "NotSpecified", "SystemAssigned", "UserAssigned", + "Actor", and "DelegatedResourceIdentity". + :vartype type: str or ~azure.mgmt.providerhub.models.IdentityManagementTypes + :ivar application_id: The application id. + :vartype application_id: str + :ivar application_ids: The application ids. + :vartype application_ids: list[str] + :ivar delegation_app_ids: The delegation app ids. + :vartype delegation_app_ids: list[str] + """ + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.IdentityManagementTypes"]] = None, + application_id: Optional[str] = None, + application_ids: Optional[list[str]] = None, + delegation_app_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 ResourceTypeRegistrationPropertiesLegacyPolicy(_Model): # pylint: disable=name-too-long + """The legacy policy. + + :ivar disallowed_legacy_operations: + :vartype disallowed_legacy_operations: list[str or + ~azure.mgmt.providerhub.models.LegacyOperation] + :ivar disallowed_conditions: + :vartype disallowed_conditions: list[~azure.mgmt.providerhub.models.LegacyDisallowedCondition] + """ + + disallowed_legacy_operations: Optional[list[Union[str, "_models.LegacyOperation"]]] = rest_field( + name="disallowedLegacyOperations", visibility=["read", "create", "update", "delete", "query"] + ) + disallowed_conditions: Optional[list["_models.LegacyDisallowedCondition"]] = rest_field( + name="disallowedConditions", visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + disallowed_legacy_operations: Optional[list[Union[str, "_models.LegacyOperation"]]] = None, + disallowed_conditions: Optional[list["_models.LegacyDisallowedCondition"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesManagement(ResourceProviderManagement): # pylint: disable=name-too-long + """The resource provider management. + + :ivar schema_owners: The schema owners. + :vartype schema_owners: list[str] + :ivar manifest_owners: The manifest owners. + :vartype manifest_owners: list[str] + :ivar authorization_owners: The authorization owners. + :vartype authorization_owners: list[str] + :ivar incident_routing_service: The incident routing service. + :vartype incident_routing_service: str + :ivar incident_routing_team: The incident routing team. + :vartype incident_routing_team: str + :ivar incident_contact_email: The incident contact email. + :vartype incident_contact_email: str + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list[~azure.mgmt.providerhub.models.ServiceTreeInfo] + :ivar resource_access_policy: The resource access policy. Known values are: "NotSpecified", + "AcisReadAllowed", and "AcisActionAllowed". + :vartype resource_access_policy: str or ~azure.mgmt.providerhub.models.ResourceAccessPolicy + :ivar resource_access_roles: The resource access roles. + :vartype resource_access_roles: list[~azure.mgmt.providerhub.models.ResourceAccessRole] + :ivar expedited_rollout_submitters: List of expedited rollout submitters. + :vartype expedited_rollout_submitters: list[str] + :ivar error_response_message_options: Options for error response messages. + :vartype error_response_message_options: + ~azure.mgmt.providerhub.models.ResourceProviderManagementErrorResponseMessageOptions + :ivar expedited_rollout_metadata: Metadata for expedited rollout. + :vartype expedited_rollout_metadata: + ~azure.mgmt.providerhub.models.ResourceProviderManagementExpeditedRolloutMetadata + :ivar canary_manifest_owners: List of manifest owners for canary. + :vartype canary_manifest_owners: list[str] + :ivar pc_code: The profit center code for the subscription. + :vartype pc_code: str + :ivar profit_center_program_id: The profit center program id for the subscription. + :vartype profit_center_program_id: str + """ + + @overload + def __init__( + self, + *, + schema_owners: Optional[list[str]] = None, + manifest_owners: Optional[list[str]] = None, + authorization_owners: Optional[list[str]] = None, + incident_routing_service: Optional[str] = None, + incident_routing_team: Optional[str] = None, + incident_contact_email: Optional[str] = None, + service_tree_infos: Optional[list["_models.ServiceTreeInfo"]] = None, + resource_access_policy: Optional[Union[str, "_models.ResourceAccessPolicy"]] = None, + resource_access_roles: Optional[list["_models.ResourceAccessRole"]] = None, + expedited_rollout_submitters: Optional[list[str]] = None, + error_response_message_options: Optional[ + "_models.ResourceProviderManagementErrorResponseMessageOptions" + ] = None, + expedited_rollout_metadata: Optional["_models.ResourceProviderManagementExpeditedRolloutMetadata"] = None, + canary_manifest_owners: Optional[list[str]] = None, + pc_code: Optional[str] = None, + profit_center_program_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 ResourceTypeRegistrationPropertiesMarketplaceOptions(_Model): # pylint: disable=name-too-long + """Marketplace options. + + :ivar add_on_plan_conversion_allowed: Add-on plan conversion allowed. + :vartype add_on_plan_conversion_allowed: bool + """ + + add_on_plan_conversion_allowed: Optional[bool] = rest_field( + name="addOnPlanConversionAllowed", visibility=["read", "create", "update", "delete", "query"] + ) + """Add-on plan conversion allowed.""" + + @overload + def __init__( + self, + *, + add_on_plan_conversion_allowed: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesRequestHeaderOptions(RequestHeaderOptions): # pylint: disable=name-too-long + """The request header options. + + :ivar opt_in_headers: The opt in headers. Known values are: "NotSpecified", "SignedUserToken", + "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership", + "PrivateLinkId", "PrivateLinkResourceId", "ManagementGroupAncestorsEncoded", + "PrivateLinkVnetTrafficTag", "ResourceGroupLocation", "ClientPrincipalNameEncoded", and + "MSIResourceIdEncoded". + :vartype opt_in_headers: str or ~azure.mgmt.providerhub.models.OptInHeaderType + :ivar opt_out_headers: The opt out headers. Known values are: "NotSpecified" and + "SystemDataCreatedByLastModifiedBy". + :vartype opt_out_headers: str or ~azure.mgmt.providerhub.models.OptOutHeaderType + """ + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, "_models.OptInHeaderType"]] = None, + opt_out_headers: Optional[Union[str, "_models.OptOutHeaderType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesResourceCache(_Model): # pylint: disable=name-too-long + """Resource cache options. + + :ivar enable_resource_cache: Enable resource cache. + :vartype enable_resource_cache: bool + :ivar resource_cache_expiration_timespan: Resource cache expiration timespan. This is a + TimeSpan property. + :vartype resource_cache_expiration_timespan: str + """ + + enable_resource_cache: Optional[bool] = rest_field( + name="enableResourceCache", visibility=["read", "create", "update", "delete", "query"] + ) + """Enable resource cache.""" + resource_cache_expiration_timespan: Optional[str] = rest_field( + name="resourceCacheExpirationTimespan", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource cache expiration timespan. This is a TimeSpan property.""" + + @overload + def __init__( + self, + *, + enable_resource_cache: Optional[bool] = None, + resource_cache_expiration_timespan: 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 ResourceTypeRegistrationPropertiesResourceGraphConfiguration( + ResourceGraphConfiguration +): # pylint: disable=name-too-long + """The resource graph configuration. + + :ivar enabled: Whether it's enabled. + :vartype enabled: bool + :ivar api_version: The api version. + :vartype api_version: str + """ + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + api_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 ResourceTypeRegistrationPropertiesResourceManagementOptions(_Model): # pylint: disable=name-too-long + """Resource management options. + + :ivar batch_provisioning_support: Batch provisioning support. + :vartype batch_provisioning_support: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport + :ivar delete_dependencies: Delete dependencies. + :vartype delete_dependencies: list[~azure.mgmt.providerhub.models.DeleteDependency] + :ivar nested_provisioning_support: Nested provisioning support. + :vartype nested_provisioning_support: + ~azure.mgmt.providerhub.models.ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport + """ + + batch_provisioning_support: Optional[ + "_models.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport" + ] = rest_field(name="batchProvisioningSupport", visibility=["read", "create", "update", "delete", "query"]) + """Batch provisioning support.""" + delete_dependencies: Optional[list["_models.DeleteDependency"]] = rest_field( + name="deleteDependencies", visibility=["read", "create", "update", "delete", "query"] + ) + """Delete dependencies.""" + nested_provisioning_support: Optional[ + "_models.ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport" + ] = rest_field(name="nestedProvisioningSupport", visibility=["read", "create", "update", "delete", "query"]) + """Nested provisioning support.""" + + @overload + def __init__( + self, + *, + batch_provisioning_support: Optional[ + "_models.ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport" + ] = None, + delete_dependencies: Optional[list["_models.DeleteDependency"]] = None, + nested_provisioning_support: Optional[ + "_models.ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport" + ] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport( + _Model +): # pylint: disable=name-too-long + """Batch provisioning support. + + :ivar supported_operations: Supported operations. Known values are: "NotSpecified", "Get", and + "Delete". + :vartype supported_operations: str or ~azure.mgmt.providerhub.models.SupportedOperations + """ + + supported_operations: Optional[Union[str, "_models.SupportedOperations"]] = rest_field( + name="supportedOperations", visibility=["read", "create", "update", "delete", "query"] + ) + """Supported operations. Known values are: \"NotSpecified\", \"Get\", and \"Delete\".""" + + @overload + def __init__( + self, + *, + supported_operations: Optional[Union[str, "_models.SupportedOperations"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport( + _Model +): # pylint: disable=name-too-long + """Nested provisioning support. + + :ivar minimum_api_version: Minimum API version. + :vartype minimum_api_version: str + """ + + minimum_api_version: Optional[str] = rest_field( + name="minimumApiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Minimum API version.""" + + @overload + def __init__( + self, + *, + minimum_api_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 ResourceTypeRegistrationPropertiesResourceMovePolicy(ResourceMovePolicy): # pylint: disable=name-too-long + """The resource move policy. + + :ivar validation_required: Whether validation is required. + :vartype validation_required: bool + :ivar cross_resource_group_move_enabled: Whether cross resource group move is enabled. + :vartype cross_resource_group_move_enabled: bool + :ivar cross_subscription_move_enabled: Whether cross subscription move is enabled. + :vartype cross_subscription_move_enabled: bool + """ + + @overload + def __init__( + self, + *, + validation_required: Optional[bool] = None, + cross_resource_group_move_enabled: Optional[bool] = None, + cross_subscription_move_enabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesResourceQueryManagement(_Model): # pylint: disable=name-too-long + """Resource query management options. + + :ivar filter_option: Filter option. Known values are: "NotSpecified" and + "EnableSubscriptionFilterOnTenant". + :vartype filter_option: str or ~azure.mgmt.providerhub.models.FilterOption + """ + + filter_option: Optional[Union[str, "_models.FilterOption"]] = rest_field( + name="filterOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Filter option. Known values are: \"NotSpecified\" and \"EnableSubscriptionFilterOnTenant\".""" + + @overload + def __init__( + self, + *, + filter_option: Optional[Union[str, "_models.FilterOption"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement(_Model): # pylint: disable=name-too-long + """Resource type common attribute management. + + :ivar common_api_versions_merge_mode: Common api versions merge mode. Known values are: "Merge" + and "Overwrite". + :vartype common_api_versions_merge_mode: str or + ~azure.mgmt.providerhub.models.CommonApiVersionsMergeMode + """ + + common_api_versions_merge_mode: Optional[Union[str, "_models.CommonApiVersionsMergeMode"]] = rest_field( + name="commonApiVersionsMergeMode", visibility=["read", "create", "update", "delete", "query"] + ) + """Common api versions merge mode. Known values are: \"Merge\" and \"Overwrite\".""" + + @overload + def __init__( + self, + *, + common_api_versions_merge_mode: Optional[Union[str, "_models.CommonApiVersionsMergeMode"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesRoutingRule(_Model): # pylint: disable=name-too-long + """Routing rule. + + :ivar host_resource_type: Hosted resource type. + :vartype host_resource_type: str + """ + + host_resource_type: Optional[str] = rest_field( + name="hostResourceType", visibility=["read", "create", "update", "delete", "query"] + ) + """Hosted resource type.""" + + @overload + def __init__( + self, + *, + host_resource_type: 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 ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications( + SubscriptionLifecycleNotificationSpecifications +): # pylint: disable=name-too-long + """The subscription lifecycle notification specifications. + + :ivar subscription_state_override_actions: The subscription state override actions. + :vartype subscription_state_override_actions: + list[~azure.mgmt.providerhub.models.SubscriptionStateOverrideAction] + :ivar soft_delete_ttl: The soft delete TTL. + :vartype soft_delete_ttl: ~datetime.timedelta + """ + + @overload + def __init__( + self, + *, + subscription_state_override_actions: Optional[list["_models.SubscriptionStateOverrideAction"]] = None, + soft_delete_ttl: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesTemplateDeploymentOptions( + TemplateDeploymentOptions +): # pylint: disable=name-too-long + """The template deployment options. + + :ivar preflight_supported: Whether preflight is supported. + :vartype preflight_supported: bool + :ivar preflight_options: The preflight options. + :vartype preflight_options: list[str or ~azure.mgmt.providerhub.models.PreflightOption] + """ + + @overload + def __init__( + self, + *, + preflight_supported: Optional[bool] = None, + preflight_options: Optional[list[Union[str, "_models.PreflightOption"]]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TemplateDeploymentPolicy(_Model): + """TemplateDeploymentPolicy. + + :ivar capabilities: The capabilities. Required. Known values are: "Default" and "Preflight". + :vartype capabilities: str or ~azure.mgmt.providerhub.models.TemplateDeploymentCapabilities + :ivar preflight_options: The preflight options. Required. Known values are: "None", + "ValidationRequests", "DeploymentRequests", "TestOnly", and "RegisteredOnly". + :vartype preflight_options: str or + ~azure.mgmt.providerhub.models.TemplateDeploymentPreflightOptions + :ivar preflight_notifications: The preflight notifications. Known values are: "None" and + "UnregisteredSubscriptions". + :vartype preflight_notifications: str or + ~azure.mgmt.providerhub.models.TemplateDeploymentPreflightNotifications + """ + + capabilities: Union[str, "_models.TemplateDeploymentCapabilities"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The capabilities. Required. Known values are: \"Default\" and \"Preflight\".""" + preflight_options: Union[str, "_models.TemplateDeploymentPreflightOptions"] = rest_field( + name="preflightOptions", visibility=["read", "create", "update", "delete", "query"] + ) + """The preflight options. Required. Known values are: \"None\", \"ValidationRequests\", + \"DeploymentRequests\", \"TestOnly\", and \"RegisteredOnly\".""" + preflight_notifications: Optional[Union[str, "_models.TemplateDeploymentPreflightNotifications"]] = rest_field( + name="preflightNotifications", visibility=["read", "create", "update", "delete", "query"] + ) + """The preflight notifications. Known values are: \"None\" and \"UnregisteredSubscriptions\".""" + + @overload + def __init__( + self, + *, + capabilities: Union[str, "_models.TemplateDeploymentCapabilities"], + preflight_options: Union[str, "_models.TemplateDeploymentPreflightOptions"], + preflight_notifications: Optional[Union[str, "_models.TemplateDeploymentPreflightNotifications"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy( + TemplateDeploymentPolicy +): # pylint: disable=name-too-long + """The template deployment policy. + + :ivar capabilities: The capabilities. Required. Known values are: "Default" and "Preflight". + :vartype capabilities: str or ~azure.mgmt.providerhub.models.TemplateDeploymentCapabilities + :ivar preflight_options: The preflight options. Required. Known values are: "None", + "ValidationRequests", "DeploymentRequests", "TestOnly", and "RegisteredOnly". + :vartype preflight_options: str or + ~azure.mgmt.providerhub.models.TemplateDeploymentPreflightOptions + :ivar preflight_notifications: The preflight notifications. Known values are: "None" and + "UnregisteredSubscriptions". + :vartype preflight_notifications: str or + ~azure.mgmt.providerhub.models.TemplateDeploymentPreflightNotifications + """ + + @overload + def __init__( + self, + *, + capabilities: Union[str, "_models.TemplateDeploymentCapabilities"], + preflight_options: Union[str, "_models.TemplateDeploymentPreflightOptions"], + preflight_notifications: Optional[Union[str, "_models.TemplateDeploymentPreflightNotifications"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeRequestHeaderOptions(RequestHeaderOptions): + """The request header options. + + :ivar opt_in_headers: The opt in headers. Known values are: "NotSpecified", "SignedUserToken", + "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership", + "PrivateLinkId", "PrivateLinkResourceId", "ManagementGroupAncestorsEncoded", + "PrivateLinkVnetTrafficTag", "ResourceGroupLocation", "ClientPrincipalNameEncoded", and + "MSIResourceIdEncoded". + :vartype opt_in_headers: str or ~azure.mgmt.providerhub.models.OptInHeaderType + :ivar opt_out_headers: The opt out headers. Known values are: "NotSpecified" and + "SystemDataCreatedByLastModifiedBy". + :vartype opt_out_headers: str or ~azure.mgmt.providerhub.models.OptOutHeaderType + """ + + @overload + def __init__( + self, + *, + opt_in_headers: Optional[Union[str, "_models.OptInHeaderType"]] = None, + opt_out_headers: Optional[Union[str, "_models.OptOutHeaderType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeSku(_Model): + """ResourceTypeSku. + + :ivar sku_settings: The sku settings. Required. + :vartype sku_settings: list[~azure.mgmt.providerhub.models.SkuSetting] + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: str or ~azure.mgmt.providerhub.models.ProvisioningState + """ + + sku_settings: list["_models.SkuSetting"] = rest_field( + name="skuSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The sku settings. Required.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + + @overload + def __init__( + self, + *, + sku_settings: list["_models.SkuSetting"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceTypeTemplateDeploymentPolicy(TemplateDeploymentPolicy): + """The template deployment policy. + + :ivar capabilities: The capabilities. Required. Known values are: "Default" and "Preflight". + :vartype capabilities: str or ~azure.mgmt.providerhub.models.TemplateDeploymentCapabilities + :ivar preflight_options: The preflight options. Required. Known values are: "None", + "ValidationRequests", "DeploymentRequests", "TestOnly", and "RegisteredOnly". + :vartype preflight_options: str or + ~azure.mgmt.providerhub.models.TemplateDeploymentPreflightOptions + :ivar preflight_notifications: The preflight notifications. Known values are: "None" and + "UnregisteredSubscriptions". + :vartype preflight_notifications: str or + ~azure.mgmt.providerhub.models.TemplateDeploymentPreflightNotifications + """ + + @overload + def __init__( + self, + *, + capabilities: Union[str, "_models.TemplateDeploymentCapabilities"], + preflight_options: Union[str, "_models.TemplateDeploymentPreflightOptions"], + preflight_notifications: Optional[Union[str, "_models.TemplateDeploymentPreflightNotifications"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ServiceTreeInfo(_Model): + """ServiceTreeInfo. + + :ivar service_id: The service id. + :vartype service_id: str + :ivar component_id: The component id. + :vartype component_id: str + :ivar readiness: The readiness. Known values are: "ClosingDown", "Deprecated", "GA", + "InDevelopment", "InternalOnly", "PrivatePreview", "PublicPreview", "RemovedFromARM", and + "Retired". + :vartype readiness: str or ~azure.mgmt.providerhub.models.Readiness + """ + + service_id: Optional[str] = rest_field(name="serviceId", visibility=["read", "create", "update", "delete", "query"]) + """The service id.""" + component_id: Optional[str] = rest_field( + name="componentId", visibility=["read", "create", "update", "delete", "query"] + ) + """The component id.""" + readiness: Optional[Union[str, "_models.Readiness"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The readiness. Known values are: \"ClosingDown\", \"Deprecated\", \"GA\", \"InDevelopment\", + \"InternalOnly\", \"PrivatePreview\", \"PublicPreview\", \"RemovedFromARM\", and \"Retired\".""" + + @overload + def __init__( + self, + *, + service_id: Optional[str] = None, + component_id: Optional[str] = None, + readiness: Optional[Union[str, "_models.Readiness"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SkuCapability(_Model): + """SkuCapability. + + :ivar name: The name. Required. + :vartype name: str + :ivar value: The value. Required. + :vartype value: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name. Required.""" + value: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The value. Required.""" + + @overload + def __init__( + self, + *, + name: str, + value: 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 SkuCapacity(_Model): + """SkuCapacity. + + :ivar minimum: The minimum. Required. + :vartype minimum: int + :ivar maximum: The maximum. + :vartype maximum: int + :ivar default: The default. + :vartype default: int + :ivar scale_type: The scale type. Known values are: "None", "Manual", and "Automatic". + :vartype scale_type: str or ~azure.mgmt.providerhub.models.SkuScaleType + """ + + minimum: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The minimum. Required.""" + maximum: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The maximum.""" + default: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The default.""" + scale_type: Optional[Union[str, "_models.SkuScaleType"]] = rest_field( + name="scaleType", visibility=["read", "create", "update", "delete", "query"] + ) + """The scale type. Known values are: \"None\", \"Manual\", and \"Automatic\".""" + + @overload + def __init__( + self, + *, + minimum: int, + maximum: Optional[int] = None, + default: Optional[int] = None, + scale_type: Optional[Union[str, "_models.SkuScaleType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SkuCost(_Model): + """SkuCost. + + :ivar meter_id: The meter id. Required. + :vartype meter_id: str + :ivar quantity: The quantity. + :vartype quantity: int + :ivar extended_unit: The extended unit. + :vartype extended_unit: str + """ + + meter_id: str = rest_field(name="meterId", visibility=["read", "create", "update", "delete", "query"]) + """The meter id. Required.""" + quantity: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The quantity.""" + extended_unit: Optional[str] = rest_field( + name="extendedUnit", visibility=["read", "create", "update", "delete", "query"] + ) + """The extended unit.""" + + @overload + def __init__( + self, + *, + meter_id: str, + quantity: Optional[int] = None, + extended_unit: 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 SkuLocationInfo(_Model): + """SkuLocationInfo. + + :ivar location: The location. Required. + :vartype location: str + :ivar zones: The zones. + :vartype zones: list[str] + :ivar zone_details: The zone details. + :vartype zone_details: list[~azure.mgmt.providerhub.models.SkuZoneDetail] + :ivar extended_locations: The extended locations. + :vartype extended_locations: list[str] + :ivar type: The type. Known values are: "NotSpecified", "CustomLocation", "EdgeZone", and + "ArcZone". + :vartype type: str or ~azure.mgmt.providerhub.models.ExtendedLocationType + """ + + location: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The location. Required.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The zones.""" + zone_details: Optional[list["_models.SkuZoneDetail"]] = rest_field( + name="zoneDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """The zone details.""" + extended_locations: Optional[list[str]] = rest_field( + name="extendedLocations", visibility=["read", "create", "update", "delete", "query"] + ) + """The extended locations.""" + type: Optional[Union[str, "_models.ExtendedLocationType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type. Known values are: \"NotSpecified\", \"CustomLocation\", \"EdgeZone\", and + \"ArcZone\".""" + + @overload + def __init__( + self, + *, + location: str, + zones: Optional[list[str]] = None, + zone_details: Optional[list["_models.SkuZoneDetail"]] = None, + extended_locations: Optional[list[str]] = None, + type: Optional[Union[str, "_models.ExtendedLocationType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SkuResource(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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.providerhub.models.SystemData + :ivar properties: + :vartype properties: ~azure.mgmt.providerhub.models.SkuResourceProperties + """ + + properties: Optional["_models.SkuResourceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + + @overload + def __init__( + self, + *, + properties: Optional["_models.SkuResourceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SkuResourceProperties(ResourceTypeSku): + """SkuResourceProperties. + + :ivar sku_settings: The sku settings. Required. + :vartype sku_settings: list[~azure.mgmt.providerhub.models.SkuSetting] + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: str or ~azure.mgmt.providerhub.models.ProvisioningState + """ + + @overload + def __init__( + self, + *, + sku_settings: list["_models.SkuSetting"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SkuSetting(_Model): + """SkuSetting. + + :ivar name: The name. Required. + :vartype name: str + :ivar tier: The tier. + :vartype tier: str + :ivar size: The size. + :vartype size: str + :ivar family: The family. + :vartype family: str + :ivar kind: The kind. + :vartype kind: str + :ivar locations: The locations. + :vartype locations: list[str] + :ivar location_info: The location info. + :vartype location_info: list[~azure.mgmt.providerhub.models.SkuLocationInfo] + :ivar required_quota_ids: The required quota ids. + :vartype required_quota_ids: list[str] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar capacity: The capacity. + :vartype capacity: ~azure.mgmt.providerhub.models.SkuSettingCapacity + :ivar costs: The costs. + :vartype costs: list[~azure.mgmt.providerhub.models.SkuCost] + :ivar capabilities: The capabilities. + :vartype capabilities: list[~azure.mgmt.providerhub.models.SkuCapability] + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name. Required.""" + tier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The tier.""" + size: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The size.""" + family: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The family.""" + kind: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The kind.""" + locations: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The locations.""" + location_info: Optional[list["_models.SkuLocationInfo"]] = rest_field( + name="locationInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """The location info.""" + required_quota_ids: Optional[list[str]] = rest_field( + name="requiredQuotaIds", visibility=["read", "create", "update", "delete", "query"] + ) + """The required quota ids.""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + capacity: Optional["_models.SkuSettingCapacity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The capacity.""" + costs: Optional[list["_models.SkuCost"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The costs.""" + capabilities: Optional[list["_models.SkuCapability"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The capabilities.""" + + @overload + def __init__( + self, + *, + name: str, + tier: Optional[str] = None, + size: Optional[str] = None, + family: Optional[str] = None, + kind: Optional[str] = None, + locations: Optional[list[str]] = None, + location_info: Optional[list["_models.SkuLocationInfo"]] = None, + required_quota_ids: Optional[list[str]] = None, + required_features: Optional[list[str]] = None, + capacity: Optional["_models.SkuSettingCapacity"] = None, + costs: Optional[list["_models.SkuCost"]] = None, + capabilities: Optional[list["_models.SkuCapability"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SkuSettingCapacity(SkuCapacity): + """The capacity. + + :ivar minimum: The minimum. Required. + :vartype minimum: int + :ivar maximum: The maximum. + :vartype maximum: int + :ivar default: The default. + :vartype default: int + :ivar scale_type: The scale type. Known values are: "None", "Manual", and "Automatic". + :vartype scale_type: str or ~azure.mgmt.providerhub.models.SkuScaleType + """ + + @overload + def __init__( + self, + *, + minimum: int, + maximum: Optional[int] = None, + default: Optional[int] = None, + scale_type: Optional[Union[str, "_models.SkuScaleType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SkuZoneDetail(_Model): + """SkuZoneDetail. + + :ivar name: The name. + :vartype name: list[str] + :ivar capabilities: The capabilities. + :vartype capabilities: list[~azure.mgmt.providerhub.models.SkuCapability] + """ + + name: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name.""" + capabilities: Optional[list["_models.SkuCapability"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The capabilities.""" + + @overload + def __init__( + self, + *, + name: Optional[list[str]] = None, + capabilities: Optional[list["_models.SkuCapability"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriberSetting(_Model): + """SubscriberSetting. + + :ivar filter_rules: The filter rules. + :vartype filter_rules: list[~azure.mgmt.providerhub.models.FilterRule] + """ + + filter_rules: Optional[list["_models.FilterRule"]] = rest_field( + name="filterRules", visibility=["read", "create", "update", "delete", "query"] + ) + """The filter rules.""" + + @overload + def __init__( + self, + *, + filter_rules: Optional[list["_models.FilterRule"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionStateOverrideAction(_Model): + """SubscriptionStateOverrideAction. + + :ivar state: The state. Required. Known values are: "Registered", "Unregistered", "Warned", + "Suspended", "Deleted", "WarnedToRegistered", "WarnedToSuspended", "WarnedToDeleted", + "WarnedToUnregistered", "SuspendedToRegistered", "SuspendedToWarned", "SuspendedToDeleted", and + "SuspendedToUnregistered". + :vartype state: str or ~azure.mgmt.providerhub.models.SubscriptionTransitioningState + :ivar action: The action. Required. Known values are: "NotDefined", "DeleteAllResources", + "SoftDeleteAllResources", "NoOp", "BillingCancellation", and "UndoSoftDelete". + :vartype action: str or ~azure.mgmt.providerhub.models.SubscriptionNotificationOperation + """ + + state: Union[str, "_models.SubscriptionTransitioningState"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The state. Required. Known values are: \"Registered\", \"Unregistered\", \"Warned\", + \"Suspended\", \"Deleted\", \"WarnedToRegistered\", \"WarnedToSuspended\", \"WarnedToDeleted\", + \"WarnedToUnregistered\", \"SuspendedToRegistered\", \"SuspendedToWarned\", + \"SuspendedToDeleted\", and \"SuspendedToUnregistered\".""" + action: Union[str, "_models.SubscriptionNotificationOperation"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The action. Required. Known values are: \"NotDefined\", \"DeleteAllResources\", + \"SoftDeleteAllResources\", \"NoOp\", \"BillingCancellation\", and \"UndoSoftDelete\".""" + + @overload + def __init__( + self, + *, + state: Union[str, "_models.SubscriptionTransitioningState"], + action: Union[str, "_models.SubscriptionNotificationOperation"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubscriptionStateRule(_Model): + """SubscriptionStateRule. + + :ivar state: The subscription state. Known values are: "NotDefined", "Enabled", "Warned", + "PastDue", "Disabled", and "Deleted". + :vartype state: str or ~azure.mgmt.providerhub.models.SubscriptionState + :ivar allowed_actions: The allowed actions. + :vartype allowed_actions: list[str] + """ + + state: Optional[Union[str, "_models.SubscriptionState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The subscription state. Known values are: \"NotDefined\", \"Enabled\", \"Warned\", \"PastDue\", + \"Disabled\", and \"Deleted\".""" + allowed_actions: Optional[list[str]] = rest_field( + name="allowedActions", visibility=["read", "create", "update", "delete", "query"] + ) + """The allowed actions.""" + + @overload + def __init__( + self, + *, + state: Optional[Union[str, "_models.SubscriptionState"]] = None, + allowed_actions: 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 SwaggerSpecification(_Model): + """SwaggerSpecification. + + :ivar api_versions: The api versions. + :vartype api_versions: list[str] + :ivar swagger_spec_folder_uri: The swagger spec folder uri. + :vartype swagger_spec_folder_uri: str + """ + + api_versions: Optional[list[str]] = rest_field( + name="apiVersions", visibility=["read", "create", "update", "delete", "query"] + ) + """The api versions.""" + swagger_spec_folder_uri: Optional[str] = rest_field( + name="swaggerSpecFolderUri", visibility=["read", "create", "update", "delete", "query"] + ) + """The swagger spec folder uri.""" + + @overload + def __init__( + self, + *, + api_versions: Optional[list[str]] = None, + swagger_spec_folder_uri: 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 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.providerhub.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.providerhub.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 ThirdPartyExtension(_Model): + """ThirdPartyExtension. + + :ivar name: Name of third party extension. + :vartype name: str + """ + + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Name of third party extension.""" + + @overload + def __init__( + self, + *, + 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 ThrottlingMetric(_Model): + """ThrottlingMetric. + + :ivar type: The throttling metric type. Required. Known values are: "NotSpecified", + "NumberOfRequests", and "NumberOfResources". + :vartype type: str or ~azure.mgmt.providerhub.models.ThrottlingMetricType + :ivar limit: The limit. Required. + :vartype limit: int + :ivar interval: The interval. + :vartype interval: ~datetime.timedelta + """ + + type: Union[str, "_models.ThrottlingMetricType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The throttling metric type. Required. Known values are: \"NotSpecified\", \"NumberOfRequests\", + and \"NumberOfResources\".""" + limit: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The limit. Required.""" + interval: Optional[datetime.timedelta] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The interval.""" + + @overload + def __init__( + self, + *, + type: Union[str, "_models.ThrottlingMetricType"], + limit: int, + interval: Optional[datetime.timedelta] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ThrottlingRule(_Model): + """ThrottlingRule. + + :ivar action: The action. Required. + :vartype action: str + :ivar metrics: The metrics. Required. + :vartype metrics: list[~azure.mgmt.providerhub.models.ThrottlingMetric] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar application_id: The application id. + :vartype application_id: list[str] + """ + + action: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The action. Required.""" + metrics: list["_models.ThrottlingMetric"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The metrics. Required.""" + required_features: Optional[list[str]] = rest_field( + name="requiredFeatures", visibility=["read", "create", "update", "delete", "query"] + ) + """The required features.""" + application_id: Optional[list[str]] = rest_field( + name="applicationId", visibility=["read", "create", "update", "delete", "query"] + ) + """The application id.""" + + @overload + def __init__( + self, + *, + action: str, + metrics: list["_models.ThrottlingMetric"], + required_features: Optional[list[str]] = None, + application_id: 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 TokenAuthConfiguration(_Model): + """TokenAuthConfiguration. + + :ivar authentication_scheme: The authentication scheme. Known values are: "PoP" and "Bearer". + :vartype authentication_scheme: str or ~azure.mgmt.providerhub.models.AuthenticationScheme + :ivar signed_request_scope: The signed request scope. Known values are: "ResourceUri" and + "Endpoint". + :vartype signed_request_scope: str or ~azure.mgmt.providerhub.models.SignedRequestScope + :ivar disable_certificate_authentication_fallback: Whether certification authentication + fallback is disabled. + :vartype disable_certificate_authentication_fallback: bool + """ + + authentication_scheme: Optional[Union[str, "_models.AuthenticationScheme"]] = rest_field( + name="authenticationScheme", visibility=["read", "create", "update", "delete", "query"] + ) + """The authentication scheme. Known values are: \"PoP\" and \"Bearer\".""" + signed_request_scope: Optional[Union[str, "_models.SignedRequestScope"]] = rest_field( + name="signedRequestScope", visibility=["read", "create", "update", "delete", "query"] + ) + """The signed request scope. Known values are: \"ResourceUri\" and \"Endpoint\".""" + disable_certificate_authentication_fallback: Optional[bool] = rest_field( + name="disableCertificateAuthenticationFallback", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether certification authentication fallback is disabled.""" + + @overload + def __init__( + self, + *, + authentication_scheme: Optional[Union[str, "_models.AuthenticationScheme"]] = None, + signed_request_scope: Optional[Union[str, "_models.SignedRequestScope"]] = None, + disable_certificate_authentication_fallback: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TypedErrorInfo(_Model): + """Error information. + + :ivar type: The type of the error. Required. + :vartype type: str + :ivar info: The error information. + :vartype info: any + """ + + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of the error. Required.""" + info: Optional[Any] = rest_field(visibility=["read"]) + """The error information.""" + + @overload + def __init__( + self, + *, + type: 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) diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_patch.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_patch.py new file mode 100644 index 000000000000..87676c65a8f0 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/models/_patch.py @@ -0,0 +1,21 @@ +# coding=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 +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/__init__.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/__init__.py new file mode 100644 index 000000000000..b01ddac43f54 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/__init__.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. +# -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._operations import CustomRolloutsOperations # type: ignore +from ._operations import NewRegionFrontloadReleaseOperations # type: ignore +from ._operations import ProviderRegistrationsOperations # type: ignore +from ._operations import DefaultRolloutsOperations # type: ignore +from ._operations import NotificationRegistrationsOperations # type: ignore +from ._operations import ResourceTypeRegistrationsOperations # type: ignore +from ._operations import SkusOperations # type: ignore +from ._operations import AuthorizedApplicationsOperations # type: ignore +from ._operations import ProviderMonitorSettingsOperations # type: ignore +from ._operations import ResourceActionsOperations # type: ignore +from ._operations import _ProviderHubMgmtClientOperationsMixin # type: ignore # pylint: disable=unused-import + +from ._patch import __all__ as _patch_all +from ._patch import * +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "Operations", + "CustomRolloutsOperations", + "NewRegionFrontloadReleaseOperations", + "ProviderRegistrationsOperations", + "DefaultRolloutsOperations", + "NotificationRegistrationsOperations", + "ResourceTypeRegistrationsOperations", + "SkusOperations", + "AuthorizedApplicationsOperations", + "ProviderMonitorSettingsOperations", + "ResourceActionsOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore +_patch_sdk() diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/_operations.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/_operations.py new file mode 100644 index 000000000000..9a1efc6c9a60 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/_operations.py @@ -0,0 +1,8717 @@ +# 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. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +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 +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, types as _types +from .._configuration import ProviderHubMgmtClientConfiguration +from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._utils.serialization import Deserializer, Serializer +from .._utils.utils import ClientMixinABC + +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_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/providers/Microsoft.ProviderHub/operations" + + # 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_operations_list_by_provider_registration_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/operations/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_operations_create_or_update_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/operations/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_operations_delete_request(provider_namespace: 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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/operations/default" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_custom_rollouts_get_request( + provider_namespace: str, rollout_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "rolloutName": _SERIALIZER.url("rollout_name", rollout_name, "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_custom_rollouts_create_or_update_request( # pylint: disable=name-too-long + provider_namespace: str, rollout_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "rolloutName": _SERIALIZER.url("rollout_name", rollout_name, "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_custom_rollouts_delete_request( + provider_namespace: str, rollout_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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "rolloutName": _SERIALIZER.url("rollout_name", rollout_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_custom_rollouts_list_by_provider_registration_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_custom_rollouts_stop_request( + provider_namespace: str, rollout_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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/customRollouts/{rolloutName}/stop" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "rolloutName": _SERIALIZER.url("rollout_name", rollout_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="POST", url=_url, params=_params, **kwargs) + + +def build_new_region_frontload_release_get_request( # pylint: disable=name-too-long + provider_namespace: str, release_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "releaseName": _SERIALIZER.url("release_name", release_name, "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_new_region_frontload_release_create_or_update_request( # pylint: disable=name-too-long + provider_namespace: str, release_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "releaseName": _SERIALIZER.url("release_name", release_name, "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_new_region_frontload_release_stop_request( # pylint: disable=name-too-long + provider_namespace: str, release_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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/newRegionFrontloadRelease/{releaseName}/stop" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "releaseName": _SERIALIZER.url("release_name", release_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="POST", url=_url, params=_params, **kwargs) + + +def build_new_region_frontload_release_generate_manifest_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/generateNewRegionFrontloadManifest" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_provider_registrations_get_request( + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_provider_registrations_create_or_update_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_provider_registrations_delete_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_provider_registrations_list_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations" + 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_provider_registrations_generate_operations_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/generateOperations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_default_rollouts_get_request( + provider_namespace: str, rollout_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/defaultRollouts/{rolloutName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "rolloutName": _SERIALIZER.url("rollout_name", rollout_name, "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_default_rollouts_create_or_update_request( # pylint: disable=name-too-long + provider_namespace: str, rollout_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/defaultRollouts/{rolloutName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "rolloutName": _SERIALIZER.url("rollout_name", rollout_name, "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_default_rollouts_delete_request( + provider_namespace: str, rollout_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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/defaultRollouts/{rolloutName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "rolloutName": _SERIALIZER.url("rollout_name", rollout_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_default_rollouts_list_by_provider_registration_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/defaultRollouts" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_default_rollouts_stop_request( + provider_namespace: str, rollout_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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/defaultRollouts/{rolloutName}/stop" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "rolloutName": _SERIALIZER.url("rollout_name", rollout_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="POST", url=_url, params=_params, **kwargs) + + +def build_notification_registrations_get_request( # pylint: disable=name-too-long + provider_namespace: str, notification_registration_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/notificationRegistrations/{notificationRegistrationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "notificationRegistrationName": _SERIALIZER.url( + "notification_registration_name", notification_registration_name, "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_notification_registrations_create_or_update_request( # pylint: disable=name-too-long + provider_namespace: str, notification_registration_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/notificationRegistrations/{notificationRegistrationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "notificationRegistrationName": _SERIALIZER.url( + "notification_registration_name", notification_registration_name, "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_notification_registrations_delete_request( # pylint: disable=name-too-long + provider_namespace: str, notification_registration_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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/notificationRegistrations/{notificationRegistrationName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "notificationRegistrationName": _SERIALIZER.url( + "notification_registration_name", notification_registration_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_notification_registrations_list_by_provider_registration_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/notificationRegistrations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_resource_type_registrations_get_request( # pylint: disable=name-too-long + provider_namespace: str, resource_type: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "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_resource_type_registrations_create_or_update_request( # pylint: disable=name-too-long + provider_namespace: str, resource_type: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "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_resource_type_registrations_delete_request( # pylint: disable=name-too-long + provider_namespace: str, resource_type: 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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "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_resource_type_registrations_list_by_provider_registration_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_skus_get_nested_resource_type_first_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_create_or_update_nested_resource_type_first_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_delete_nested_resource_type_first_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: 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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_list_by_resource_type_registrations_nested_resource_type_first_request( # pylint: disable=name-too-long + provider_namespace: str, resource_type: str, nested_resource_type_first: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "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_skus_get_request( + provider_namespace: str, resource_type: str, sku: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_create_or_update_request( + provider_namespace: str, resource_type: str, sku: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_delete_request( + provider_namespace: str, resource_type: str, sku: 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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_list_by_resource_type_registrations_request( # pylint: disable=name-too-long + provider_namespace: str, resource_type: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "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_skus_get_nested_resource_type_second_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "nestedResourceTypeSecond": _SERIALIZER.url("nested_resource_type_second", nested_resource_type_second, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_create_or_update_nested_resource_type_second_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "nestedResourceTypeSecond": _SERIALIZER.url("nested_resource_type_second", nested_resource_type_second, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_delete_nested_resource_type_second_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: 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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "nestedResourceTypeSecond": _SERIALIZER.url("nested_resource_type_second", nested_resource_type_second, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_list_by_resource_type_registrations_nested_resource_type_second_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "nestedResourceTypeSecond": _SERIALIZER.url("nested_resource_type_second", nested_resource_type_second, "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_skus_get_nested_resource_type_third_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "nestedResourceTypeSecond": _SERIALIZER.url("nested_resource_type_second", nested_resource_type_second, "str"), + "nestedResourceTypeThird": _SERIALIZER.url("nested_resource_type_third", nested_resource_type_third, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_create_or_update_nested_resource_type_third_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "nestedResourceTypeSecond": _SERIALIZER.url("nested_resource_type_second", nested_resource_type_second, "str"), + "nestedResourceTypeThird": _SERIALIZER.url("nested_resource_type_third", nested_resource_type_third, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_delete_nested_resource_type_third_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: 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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus/{sku}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "nestedResourceTypeSecond": _SERIALIZER.url("nested_resource_type_second", nested_resource_type_second, "str"), + "nestedResourceTypeThird": _SERIALIZER.url("nested_resource_type_third", nested_resource_type_third, "str"), + "sku": _SERIALIZER.url("sku", sku, "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_skus_list_by_resource_type_registrations_nested_resource_type_third_request( # pylint: disable=name-too-long + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourcetypeRegistrations/{resourceType}/resourcetypeRegistrations/{nestedResourceTypeFirst}/resourcetypeRegistrations/{nestedResourceTypeSecond}/resourcetypeRegistrations/{nestedResourceTypeThird}/skus" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "nestedResourceTypeFirst": _SERIALIZER.url("nested_resource_type_first", nested_resource_type_first, "str"), + "nestedResourceTypeSecond": _SERIALIZER.url("nested_resource_type_second", nested_resource_type_second, "str"), + "nestedResourceTypeThird": _SERIALIZER.url("nested_resource_type_third", nested_resource_type_third, "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_authorized_applications_get_request( # pylint: disable=name-too-long + provider_namespace: str, application_id: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "applicationId": _SERIALIZER.url("application_id", application_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_authorized_applications_create_or_update_request( # pylint: disable=name-too-long + provider_namespace: str, application_id: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "applicationId": _SERIALIZER.url("application_id", application_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 + 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_authorized_applications_delete_request( # pylint: disable=name-too-long + provider_namespace: str, application_id: 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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications/{applicationId}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "applicationId": _SERIALIZER.url("application_id", application_id, "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_authorized_applications_list_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/authorizedApplications" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_provider_monitor_settings_get_request( # pylint: disable=name-too-long + resource_group_name: str, provider_monitor_setting_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "providerMonitorSettingName": _SERIALIZER.url( + "provider_monitor_setting_name", provider_monitor_setting_name, "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_provider_monitor_settings_create_request( # pylint: disable=name-too-long + resource_group_name: str, provider_monitor_setting_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "providerMonitorSettingName": _SERIALIZER.url( + "provider_monitor_setting_name", provider_monitor_setting_name, "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_provider_monitor_settings_update_request( # pylint: disable=name-too-long + resource_group_name: str, provider_monitor_setting_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "providerMonitorSettingName": _SERIALIZER.url( + "provider_monitor_setting_name", provider_monitor_setting_name, "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="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_provider_monitor_settings_delete_request( # pylint: disable=name-too-long + resource_group_name: str, provider_monitor_setting_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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings/{providerMonitorSettingName}" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "providerMonitorSettingName": _SERIALIZER.url( + "provider_monitor_setting_name", provider_monitor_setting_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_provider_monitor_settings_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProviderHub/providerMonitorSettings" + 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_provider_monitor_settings_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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerMonitorSettings" + 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_resource_actions_delete_resources_request( # pylint: disable=name-too-long + provider_namespace: str, resource_action_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", "2024-09-01")) + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/resourceActions/{resourceActionName}/deleteResources" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "str"), + "resourceActionName": _SERIALIZER.url("resource_action_name", resource_action_name, "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") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_provider_hub_mgmt_generate_manifest_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/generateManifest" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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_provider_hub_mgmt_checkin_manifest_request( # pylint: disable=name-too-long + provider_namespace: 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", "2024-09-01")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ProviderHub/providerRegistrations/{providerNamespace}/checkinManifest" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "providerNamespace": _SERIALIZER.url("provider_namespace", provider_namespace, "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:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :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: ProviderHubMgmtClientConfiguration = 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.OperationsDefinition"]: + """List the operations for the provider. + + :return: An iterator like instance of OperationsDefinition + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.OperationsDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.OperationsDefinition]] = 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.OperationsDefinition], + 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_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> List[_models.OperationsDefinition]: + """Gets the operations supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: list of OperationsDefinition + :rtype: list[~azure.mgmt.providerhub.models.OperationsDefinition] + :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[List[_models.OperationsDefinition]] = kwargs.pop("cls", None) + + _request = build_operations_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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(List[_models.OperationsDefinition], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + provider_namespace: str, + operations_put_content: _models.OperationsPutContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationsPutContent: + """Creates or updates the operation supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param operations_put_content: The operations content properties supplied to the CreateOrUpdate + operation. Required. + :type operations_put_content: ~azure.mgmt.providerhub.models.OperationsPutContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationsPutContent. The OperationsPutContent is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.OperationsPutContent + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + provider_namespace: str, + operations_put_content: _types.OperationsPutContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationsPutContent: + """Creates or updates the operation supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param operations_put_content: The operations content properties supplied to the CreateOrUpdate + operation. Required. + :type operations_put_content: ~azure.mgmt.providerhub.types.OperationsPutContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationsPutContent. The OperationsPutContent is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.OperationsPutContent + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + provider_namespace: str, + operations_put_content: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.OperationsPutContent: + """Creates or updates the operation supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param operations_put_content: The operations content properties supplied to the CreateOrUpdate + operation. Required. + :type operations_put_content: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: OperationsPutContent. The OperationsPutContent is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.OperationsPutContent + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + provider_namespace: str, + operations_put_content: Union[_models.OperationsPutContent, _types.OperationsPutContent, IO[bytes]], + **kwargs: Any + ) -> _models.OperationsPutContent: + """Creates or updates the operation supported by the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param operations_put_content: The operations content properties supplied to the CreateOrUpdate + operation. Is either a OperationsPutContent type or a IO[bytes] type. Required. + :type operations_put_content: ~azure.mgmt.providerhub.models.OperationsPutContent or + ~azure.mgmt.providerhub.types.OperationsPutContent or IO[bytes] + :return: OperationsPutContent. The OperationsPutContent is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.OperationsPutContent + :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 = case_insensitive_dict(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.OperationsPutContent] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(operations_put_content, (IOBase, bytes)): + _content = operations_put_content + else: + _content = json.dumps(operations_put_content, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_operations_create_or_update_request( + provider_namespace=provider_namespace, + 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 = 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.OperationsPutContent, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete(self, provider_namespace: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Deletes an operation. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_operations_delete_request( + provider_namespace=provider_namespace, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class CustomRolloutsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`custom_rollouts` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, rollout_name: str, **kwargs: Any) -> _models.CustomRollout: + """Gets the custom rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: CustomRollout. The CustomRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CustomRollout + :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.CustomRollout] = kwargs.pop("cls", None) + + _request = build_custom_rollouts_get_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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.CustomRollout, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + provider_namespace: str, + rollout_name: str, + properties: Union[_models.CustomRollout, _types.CustomRollout, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_custom_rollouts_create_or_update_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: _models.CustomRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CustomRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The custom rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.CustomRollout + :keyword content_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 CustomRollout. The CustomRollout is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.CustomRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: _types.CustomRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CustomRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The custom rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.CustomRollout + :keyword content_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 CustomRollout. The CustomRollout is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.CustomRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.CustomRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The custom rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: IO[bytes] + :keyword content_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 CustomRollout. The CustomRollout is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.CustomRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: Union[_models.CustomRollout, _types.CustomRollout, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.CustomRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The custom rollout properties supplied to the CreateOrUpdate operation. Is + either a CustomRollout type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.CustomRollout or + ~azure.mgmt.providerhub.types.CustomRollout or IO[bytes] + :return: An instance of LROPoller that returns CustomRollout. The CustomRollout is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.CustomRollout] + :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.CustomRollout] = 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_or_update_initial( + provider_namespace=provider_namespace, + rollout_name=rollout_name, + properties=properties, + 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.CustomRollout, 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.CustomRollout].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.CustomRollout]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, provider_namespace: str, rollout_name: str, **kwargs: Any + ) -> None: + """Deletes the custom rollout resource. Custom rollout must be in terminal state. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_custom_rollouts_delete_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> ItemPaged["_models.CustomRollout"]: + """Gets the list of the custom rollouts for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of CustomRollout + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.CustomRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.CustomRollout]] = 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_custom_rollouts_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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.CustomRollout], + 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 stop( # pylint: disable=inconsistent-return-statements + self, provider_namespace: str, rollout_name: str, **kwargs: Any + ) -> None: + """Stops or cancels the custom rollout, if in progress. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_custom_rollouts_stop_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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) + + _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) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class NewRegionFrontloadReleaseOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`new_region_frontload_release` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, release_name: str, **kwargs: Any) -> _models.DefaultRollout: + """Gets a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :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.DefaultRollout] = kwargs.pop("cls", None) + + _request = build_new_region_frontload_release_get_request( + provider_namespace=provider_namespace, + release_name=release_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.DefaultRollout, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: _models.FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DefaultRollout: + """Creates or updates a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :param properties: Required. + :type properties: ~azure.mgmt.providerhub.models.FrontloadPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: _types.FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DefaultRollout: + """Creates or updates a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :param properties: Required. + :type properties: ~azure.mgmt.providerhub.types.FrontloadPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.DefaultRollout: + """Creates or updates a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :param properties: Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + provider_namespace: str, + release_name: str, + properties: Union[_models.FrontloadPayload, _types.FrontloadPayload, IO[bytes]], + **kwargs: Any + ) -> _models.DefaultRollout: + """Creates or updates a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :param properties: Is either a FrontloadPayload type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.FrontloadPayload or + ~azure.mgmt.providerhub.types.FrontloadPayload or IO[bytes] + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :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 = case_insensitive_dict(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.DefaultRollout] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_new_region_frontload_release_create_or_update_request( + provider_namespace=provider_namespace, + release_name=release_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 = 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, 201]: + 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.DefaultRollout, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def stop( # pylint: disable=inconsistent-return-statements + self, provider_namespace: str, release_name: str, **kwargs: Any + ) -> None: + """Stops a new region frontload release. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param release_name: The name of the release. Required. + :type release_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_new_region_frontload_release_stop_request( + provider_namespace=provider_namespace, + release_name=release_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) + + _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) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + @overload + def generate_manifest( + self, + provider_namespace: str, + properties: _models.FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceProviderManifest: + """Generates the new region frontload manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: Required. + :type properties: ~azure.mgmt.providerhub.models.FrontloadPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def generate_manifest( + self, + provider_namespace: str, + properties: _types.FrontloadPayload, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.ResourceProviderManifest: + """Generates the new region frontload manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: Required. + :type properties: ~azure.mgmt.providerhub.types.FrontloadPayload + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def generate_manifest( + self, provider_namespace: str, properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.ResourceProviderManifest: + """Generates the new region frontload manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def generate_manifest( + self, + provider_namespace: str, + properties: Union[_models.FrontloadPayload, _types.FrontloadPayload, IO[bytes]], + **kwargs: Any + ) -> _models.ResourceProviderManifest: + """Generates the new region frontload manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: Is either a FrontloadPayload type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.FrontloadPayload or + ~azure.mgmt.providerhub.types.FrontloadPayload or IO[bytes] + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :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 = case_insensitive_dict(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.ResourceProviderManifest] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_new_region_frontload_release_generate_manifest_request( + provider_namespace=provider_namespace, + 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 = 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.ResourceProviderManifest, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class ProviderRegistrationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`provider_registrations` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, **kwargs: Any) -> _models.ProviderRegistration: + """Gets the provider registration details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: ProviderRegistration. The ProviderRegistration is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ProviderRegistration + :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.ProviderRegistration] = kwargs.pop("cls", None) + + _request = build_provider_registrations_get_request( + provider_namespace=provider_namespace, + 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.ProviderRegistration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + provider_namespace: str, + properties: Union[_models.ProviderRegistration, _types.ProviderRegistration, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_provider_registrations_create_or_update_request( + provider_namespace=provider_namespace, + 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_or_update( + self, + provider_namespace: str, + properties: _models.ProviderRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ProviderRegistration]: + """Creates or updates the provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: The provider registration properties supplied to the CreateOrUpdate + operation. Required. + :type properties: ~azure.mgmt.providerhub.models.ProviderRegistration + :keyword content_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 ProviderRegistration. The ProviderRegistration + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ProviderRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + properties: _types.ProviderRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ProviderRegistration]: + """Creates or updates the provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: The provider registration properties supplied to the CreateOrUpdate + operation. Required. + :type properties: ~azure.mgmt.providerhub.types.ProviderRegistration + :keyword content_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 ProviderRegistration. The ProviderRegistration + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ProviderRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, provider_namespace: str, properties: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.ProviderRegistration]: + """Creates or updates the provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: The provider registration properties supplied to the CreateOrUpdate + operation. Required. + :type properties: IO[bytes] + :keyword content_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 ProviderRegistration. The ProviderRegistration + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ProviderRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + provider_namespace: str, + properties: Union[_models.ProviderRegistration, _types.ProviderRegistration, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ProviderRegistration]: + """Creates or updates the provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param properties: The provider registration properties supplied to the CreateOrUpdate + operation. Is either a ProviderRegistration type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.ProviderRegistration or + ~azure.mgmt.providerhub.types.ProviderRegistration or IO[bytes] + :return: An instance of LROPoller that returns ProviderRegistration. The ProviderRegistration + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ProviderRegistration] + :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.ProviderRegistration] = 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_or_update_initial( + provider_namespace=provider_namespace, + properties=properties, + 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.ProviderRegistration, 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.ProviderRegistration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ProviderRegistration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete(self, provider_namespace: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Deletes a provider registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_provider_registrations_delete_request( + provider_namespace=provider_namespace, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.ProviderRegistration"]: + """Gets the list of the provider registrations in the subscription. + + :return: An iterator like instance of ProviderRegistration + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.ProviderRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProviderRegistration]] = 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_provider_registrations_list_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.ProviderRegistration], + 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 generate_operations(self, provider_namespace: str, **kwargs: Any) -> List[_models.OperationsDefinition]: + """Generates the operations api for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: list of OperationsDefinition + :rtype: list[~azure.mgmt.providerhub.models.OperationsDefinition] + :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[List[_models.OperationsDefinition]] = kwargs.pop("cls", None) + + _request = build_provider_registrations_generate_operations_request( + provider_namespace=provider_namespace, + 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(List[_models.OperationsDefinition], response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class DefaultRolloutsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`default_rollouts` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, rollout_name: str, **kwargs: Any) -> _models.DefaultRollout: + """Gets the default rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: DefaultRollout. The DefaultRollout is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.DefaultRollout + :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.DefaultRollout] = kwargs.pop("cls", None) + + _request = build_default_rollouts_get_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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.DefaultRollout, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + provider_namespace: str, + rollout_name: str, + properties: Union[_models.DefaultRollout, _types.DefaultRollout, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_default_rollouts_create_or_update_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: _models.DefaultRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DefaultRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The Default rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.DefaultRollout + :keyword content_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 DefaultRollout. The DefaultRollout is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.DefaultRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: _types.DefaultRollout, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DefaultRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The Default rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.DefaultRollout + :keyword content_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 DefaultRollout. The DefaultRollout is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.DefaultRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DefaultRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The Default rollout properties supplied to the CreateOrUpdate operation. + Required. + :type properties: IO[bytes] + :keyword content_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 DefaultRollout. The DefaultRollout is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.DefaultRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + provider_namespace: str, + rollout_name: str, + properties: Union[_models.DefaultRollout, _types.DefaultRollout, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.DefaultRollout]: + """Creates or updates the rollout details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :param properties: The Default rollout properties supplied to the CreateOrUpdate operation. Is + either a DefaultRollout type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.DefaultRollout or + ~azure.mgmt.providerhub.types.DefaultRollout or IO[bytes] + :return: An instance of LROPoller that returns DefaultRollout. The DefaultRollout is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.DefaultRollout] + :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.DefaultRollout] = 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_or_update_initial( + provider_namespace=provider_namespace, + rollout_name=rollout_name, + properties=properties, + 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.DefaultRollout, 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.DefaultRollout].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.DefaultRollout]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, provider_namespace: str, rollout_name: str, **kwargs: Any + ) -> None: + """Deletes the rollout resource. Rollout must be in terminal state. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_default_rollouts_delete_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> ItemPaged["_models.DefaultRollout"]: + """Gets the list of the rollouts for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of DefaultRollout + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.DefaultRollout] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.DefaultRollout]] = 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_default_rollouts_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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.DefaultRollout], + 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 stop( # pylint: disable=inconsistent-return-statements + self, provider_namespace: str, rollout_name: str, **kwargs: Any + ) -> None: + """Stops or cancels the rollout, if in progress. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param rollout_name: The rollout name. Required. + :type rollout_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_default_rollouts_stop_request( + provider_namespace=provider_namespace, + rollout_name=rollout_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) + + _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) + + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + +class NotificationRegistrationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`notification_registrations` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, notification_registration_name: str, **kwargs: Any + ) -> _models.NotificationRegistration: + """Gets the notification registration details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :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.NotificationRegistration] = kwargs.pop("cls", None) + + _request = build_notification_registrations_get_request( + provider_namespace=provider_namespace, + notification_registration_name=notification_registration_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.NotificationRegistration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: _models.NotificationRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NotificationRegistration: + """Creates or updates a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :param properties: The required body parameters supplied to the notification registration + operation. Required. + :type properties: ~azure.mgmt.providerhub.models.NotificationRegistration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: _types.NotificationRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NotificationRegistration: + """Creates or updates a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :param properties: The required body parameters supplied to the notification registration + operation. Required. + :type properties: ~azure.mgmt.providerhub.types.NotificationRegistration + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.NotificationRegistration: + """Creates or updates a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :param properties: The required body parameters supplied to the notification registration + operation. Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + provider_namespace: str, + notification_registration_name: str, + properties: Union[_models.NotificationRegistration, _types.NotificationRegistration, IO[bytes]], + **kwargs: Any + ) -> _models.NotificationRegistration: + """Creates or updates a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :param properties: The required body parameters supplied to the notification registration + operation. Is either a NotificationRegistration type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.NotificationRegistration or + ~azure.mgmt.providerhub.types.NotificationRegistration or IO[bytes] + :return: NotificationRegistration. The NotificationRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.NotificationRegistration + :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 = case_insensitive_dict(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.NotificationRegistration] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_notification_registrations_create_or_update_request( + provider_namespace=provider_namespace, + notification_registration_name=notification_registration_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 = 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.NotificationRegistration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, provider_namespace: str, notification_registration_name: str, **kwargs: Any + ) -> None: + """Deletes a notification registration. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param notification_registration_name: The notification registration. Required. + :type notification_registration_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_notification_registrations_delete_request( + provider_namespace=provider_namespace, + notification_registration_name=notification_registration_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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> ItemPaged["_models.NotificationRegistration"]: + """Gets the list of the notification registrations for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of NotificationRegistration + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.NotificationRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.NotificationRegistration]] = 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_notification_registrations_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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.NotificationRegistration], + 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 ResourceTypeRegistrationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`resource_type_registrations` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, resource_type: str, **kwargs: Any) -> _models.ResourceTypeRegistration: + """Gets a resource type details in the given subscription and provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :return: ResourceTypeRegistration. The ResourceTypeRegistration is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceTypeRegistration + :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.ResourceTypeRegistration] = kwargs.pop("cls", None) + + _request = build_resource_type_registrations_get_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + 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.ResourceTypeRegistration, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + provider_namespace: str, + resource_type: str, + properties: Union[_models.ResourceTypeRegistration, _types.ResourceTypeRegistration, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_resource_type_registrations_create_or_update_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + 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_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: _models.ResourceTypeRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ResourceTypeRegistration]: + """Creates or updates a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param properties: The required request body parameters supplied to the resource type + registration CreateOrUpdate operation. Required. + :type properties: ~azure.mgmt.providerhub.models.ResourceTypeRegistration + :keyword content_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 ResourceTypeRegistration. The + ResourceTypeRegistration is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: _types.ResourceTypeRegistration, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ResourceTypeRegistration]: + """Creates or updates a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param properties: The required request body parameters supplied to the resource type + registration CreateOrUpdate operation. Required. + :type properties: ~azure.mgmt.providerhub.types.ResourceTypeRegistration + :keyword content_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 ResourceTypeRegistration. The + ResourceTypeRegistration is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ResourceTypeRegistration]: + """Creates or updates a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param properties: The required request body parameters supplied to the resource type + registration CreateOrUpdate operation. Required. + :type properties: IO[bytes] + :keyword content_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 ResourceTypeRegistration. The + ResourceTypeRegistration is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + provider_namespace: str, + resource_type: str, + properties: Union[_models.ResourceTypeRegistration, _types.ResourceTypeRegistration, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ResourceTypeRegistration]: + """Creates or updates a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param properties: The required request body parameters supplied to the resource type + registration CreateOrUpdate operation. Is either a ResourceTypeRegistration type or a IO[bytes] + type. Required. + :type properties: ~azure.mgmt.providerhub.models.ResourceTypeRegistration or + ~azure.mgmt.providerhub.types.ResourceTypeRegistration or IO[bytes] + :return: An instance of LROPoller that returns ResourceTypeRegistration. The + ResourceTypeRegistration is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :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.ResourceTypeRegistration] = 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_or_update_initial( + provider_namespace=provider_namespace, + resource_type=resource_type, + properties=properties, + 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.ResourceTypeRegistration, 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.ResourceTypeRegistration].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ResourceTypeRegistration]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial(self, provider_namespace: str, resource_type: 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_resource_type_registrations_delete_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + 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, provider_namespace: str, resource_type: str, **kwargs: Any) -> LROPoller[None]: + """Deletes a resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: 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( + provider_namespace=provider_namespace, + resource_type=resource_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): # 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_provider_registration( + self, provider_namespace: str, **kwargs: Any + ) -> ItemPaged["_models.ResourceTypeRegistration"]: + """Gets the list of the resource types for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of ResourceTypeRegistration + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.ResourceTypeRegistration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ResourceTypeRegistration]] = 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_resource_type_registrations_list_by_provider_registration_request( + provider_namespace=provider_namespace, + 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.ResourceTypeRegistration], + 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 SkusOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`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: ProviderHubMgmtClientConfiguration = 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_nested_resource_type_first( + self, provider_namespace: str, resource_type: str, nested_resource_type_first: str, sku: str, **kwargs: Any + ) -> _models.SkuResource: + """Gets the sku details for the given resource type and sku name. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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.SkuResource] = kwargs.pop("cls", None) + + _request = build_skus_get_nested_resource_type_first_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + sku=sku, + 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update_nested_resource_type_first( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: _models.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_nested_resource_type_first( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: _types.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_nested_resource_type_first( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update_nested_resource_type_first( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + sku: str, + properties: Union[_models.SkuResource, _types.SkuResource, IO[bytes]], + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. Is + either a SkuResource type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource or + ~azure.mgmt.providerhub.types.SkuResource or IO[bytes] + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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 = case_insensitive_dict(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.SkuResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_skus_create_or_update_nested_resource_type_first_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + sku=sku, + 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 = 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete_nested_resource_type_first( # pylint: disable=inconsistent-return-statements + self, provider_namespace: str, resource_type: str, nested_resource_type_first: str, sku: str, **kwargs: Any + ) -> None: + """Deletes a resource type sku. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param sku: The SKU. Required. + :type sku: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_skus_delete_nested_resource_type_first_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + sku=sku, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_first( # pylint: disable=name-too-long + self, provider_namespace: str, resource_type: str, nested_resource_type_first: str, **kwargs: Any + ) -> ItemPaged["_models.SkuResource"]: + """Gets the list of skus for the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :return: An iterator like instance of SkuResource + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.SkuResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuResource]] = 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_skus_list_by_resource_type_registrations_nested_resource_type_first_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + 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.SkuResource], + 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 get(self, provider_namespace: str, resource_type: str, sku: str, **kwargs: Any) -> _models.SkuResource: + """Gets the sku details for the given resource type and sku name. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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.SkuResource] = kwargs.pop("cls", None) + + _request = build_skus_get_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + sku=sku, + 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: _models.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: _types.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update( + self, + provider_namespace: str, + resource_type: str, + sku: str, + properties: Union[_models.SkuResource, _types.SkuResource, IO[bytes]], + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. Is + either a SkuResource type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource or + ~azure.mgmt.providerhub.types.SkuResource or IO[bytes] + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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 = case_insensitive_dict(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.SkuResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_skus_create_or_update_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + sku=sku, + 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 = 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, provider_namespace: str, resource_type: str, sku: str, **kwargs: Any + ) -> None: + """Deletes a resource type sku. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param sku: The SKU. Required. + :type sku: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_skus_delete_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + sku=sku, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_type_registrations( + self, provider_namespace: str, resource_type: str, **kwargs: Any + ) -> ItemPaged["_models.SkuResource"]: + """Gets the list of skus for the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :return: An iterator like instance of SkuResource + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.SkuResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuResource]] = 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_skus_list_by_resource_type_registrations_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + 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.SkuResource], + 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 get_nested_resource_type_second( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + **kwargs: Any + ) -> _models.SkuResource: + """Gets the sku details for the given resource type and sku name. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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.SkuResource] = kwargs.pop("cls", None) + + _request = build_skus_get_nested_resource_type_second_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + sku=sku, + 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: _models.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: _types.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + properties: Union[_models.SkuResource, _types.SkuResource, IO[bytes]], + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. Is + either a SkuResource type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource or + ~azure.mgmt.providerhub.types.SkuResource or IO[bytes] + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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 = case_insensitive_dict(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.SkuResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_skus_create_or_update_nested_resource_type_second_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + sku=sku, + 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 = 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete_nested_resource_type_second( # pylint: disable=inconsistent-return-statements + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + sku: str, + **kwargs: Any + ) -> None: + """Deletes a resource type sku. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param sku: The SKU. Required. + :type sku: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_skus_delete_nested_resource_type_second_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + sku=sku, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_second( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + **kwargs: Any + ) -> ItemPaged["_models.SkuResource"]: + """Gets the list of skus for the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :return: An iterator like instance of SkuResource + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.SkuResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuResource]] = 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_skus_list_by_resource_type_registrations_nested_resource_type_second_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + 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.SkuResource], + 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 get_nested_resource_type_third( + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + **kwargs: Any + ) -> _models.SkuResource: + """Gets the sku details for the given resource type and sku name. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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.SkuResource] = kwargs.pop("cls", None) + + _request = build_skus_get_nested_resource_type_third_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + nested_resource_type_third=nested_resource_type_third, + sku=sku, + 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def create_or_update_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: _models.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: _types.SkuResource, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.SkuResource + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. + Required. + :type properties: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def create_or_update_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + properties: Union[_models.SkuResource, _types.SkuResource, IO[bytes]], + **kwargs: Any + ) -> _models.SkuResource: + """Creates or updates the resource type skus in the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :param properties: The required body parameters supplied to the resource sku operation. Is + either a SkuResource type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.SkuResource or + ~azure.mgmt.providerhub.types.SkuResource or IO[bytes] + :return: SkuResource. The SkuResource is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.SkuResource + :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 = case_insensitive_dict(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.SkuResource] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_skus_create_or_update_nested_resource_type_third_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + nested_resource_type_third=nested_resource_type_third, + sku=sku, + 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 = 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.SkuResource, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete_nested_resource_type_third( # pylint: disable=inconsistent-return-statements + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + sku: str, + **kwargs: Any + ) -> None: + """Deletes a resource type sku. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :param sku: The SKU. Required. + :type sku: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_skus_delete_nested_resource_type_third_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + nested_resource_type_third=nested_resource_type_third, + sku=sku, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_type_registrations_nested_resource_type_third( # pylint: disable=name-too-long + self, + provider_namespace: str, + resource_type: str, + nested_resource_type_first: str, + nested_resource_type_second: str, + nested_resource_type_third: str, + **kwargs: Any + ) -> ItemPaged["_models.SkuResource"]: + """Gets the list of skus for the given resource type. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_type: The resource type. Required. + :type resource_type: str + :param nested_resource_type_first: The first child resource type. Required. + :type nested_resource_type_first: str + :param nested_resource_type_second: The second child resource type. Required. + :type nested_resource_type_second: str + :param nested_resource_type_third: The third child resource type. Required. + :type nested_resource_type_third: str + :return: An iterator like instance of SkuResource + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.SkuResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.SkuResource]] = 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_skus_list_by_resource_type_registrations_nested_resource_type_third_request( + provider_namespace=provider_namespace, + resource_type=resource_type, + nested_resource_type_first=nested_resource_type_first, + nested_resource_type_second=nested_resource_type_second, + nested_resource_type_third=nested_resource_type_third, + 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.SkuResource], + 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 AuthorizedApplicationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`authorized_applications` 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: ProviderHubMgmtClientConfiguration = 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, provider_namespace: str, application_id: str, **kwargs: Any) -> _models.AuthorizedApplication: + """Gets the authorized application details. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :return: AuthorizedApplication. The AuthorizedApplication is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.AuthorizedApplication + :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.AuthorizedApplication] = kwargs.pop("cls", None) + + _request = build_authorized_applications_get_request( + provider_namespace=provider_namespace, + application_id=application_id, + 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.AuthorizedApplication, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_or_update_initial( + self, + provider_namespace: str, + application_id: str, + properties: Union[_models.AuthorizedApplication, _types.AuthorizedApplication, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_authorized_applications_create_or_update_request( + provider_namespace=provider_namespace, + application_id=application_id, + 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_or_update( + self, + provider_namespace: str, + application_id: str, + properties: _models.AuthorizedApplication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AuthorizedApplication]: + """Creates or updates the authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :param properties: The authorized application properties supplied to the CreateOrUpdate + operation. Required. + :type properties: ~azure.mgmt.providerhub.models.AuthorizedApplication + :keyword content_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 AuthorizedApplication. The AuthorizedApplication + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.AuthorizedApplication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: _types.AuthorizedApplication, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AuthorizedApplication]: + """Creates or updates the authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :param properties: The authorized application properties supplied to the CreateOrUpdate + operation. Required. + :type properties: ~azure.mgmt.providerhub.types.AuthorizedApplication + :keyword content_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 AuthorizedApplication. The AuthorizedApplication + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.AuthorizedApplication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.AuthorizedApplication]: + """Creates or updates the authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :param properties: The authorized application properties supplied to the CreateOrUpdate + operation. Required. + :type properties: IO[bytes] + :keyword content_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 AuthorizedApplication. The AuthorizedApplication + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.AuthorizedApplication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + provider_namespace: str, + application_id: str, + properties: Union[_models.AuthorizedApplication, _types.AuthorizedApplication, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.AuthorizedApplication]: + """Creates or updates the authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :param properties: The authorized application properties supplied to the CreateOrUpdate + operation. Is either a AuthorizedApplication type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.AuthorizedApplication or + ~azure.mgmt.providerhub.types.AuthorizedApplication or IO[bytes] + :return: An instance of LROPoller that returns AuthorizedApplication. The AuthorizedApplication + is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.AuthorizedApplication] + :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.AuthorizedApplication] = 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_or_update_initial( + provider_namespace=provider_namespace, + application_id=application_id, + properties=properties, + 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.AuthorizedApplication, 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.AuthorizedApplication].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AuthorizedApplication]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, provider_namespace: str, application_id: str, **kwargs: Any + ) -> None: + """Deletes an authorized application. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param application_id: The application ID. Required. + :type application_id: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_authorized_applications_delete_request( + provider_namespace=provider_namespace, + application_id=application_id, + 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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list(self, provider_namespace: str, **kwargs: Any) -> ItemPaged["_models.AuthorizedApplication"]: + """Gets the list of the authorized applications in the provider namespace. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: An iterator like instance of AuthorizedApplication + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.AuthorizedApplication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.AuthorizedApplication]] = 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_authorized_applications_list_request( + provider_namespace=provider_namespace, + 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.AuthorizedApplication], + 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 ProviderMonitorSettingsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`provider_monitor_settings` 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: ProviderHubMgmtClientConfiguration = 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, provider_monitor_setting_name: str, **kwargs: Any + ) -> _models.ProviderMonitorSetting: + """Gets the provider monitor setting details. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :return: ProviderMonitorSetting. The ProviderMonitorSetting is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ProviderMonitorSetting + :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.ProviderMonitorSetting] = kwargs.pop("cls", None) + + _request = build_provider_monitor_settings_get_request( + resource_group_name=resource_group_name, + provider_monitor_setting_name=provider_monitor_setting_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.ProviderMonitorSetting, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + def _create_initial( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: Union[_models.ProviderMonitorSetting, _types.ProviderMonitorSetting, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_provider_monitor_settings_create_request( + resource_group_name=resource_group_name, + provider_monitor_setting_name=provider_monitor_setting_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, + provider_monitor_setting_name: str, + properties: _models.ProviderMonitorSetting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ProviderMonitorSetting]: + """Creates the provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :param properties: The provider monitor setting properties supplied to the create operation. + Required. + :type properties: ~azure.mgmt.providerhub.models.ProviderMonitorSetting + :keyword content_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 ProviderMonitorSetting. The + ProviderMonitorSetting is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: _types.ProviderMonitorSetting, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ProviderMonitorSetting]: + """Creates the provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :param properties: The provider monitor setting properties supplied to the create operation. + Required. + :type properties: ~azure.mgmt.providerhub.types.ProviderMonitorSetting + :keyword content_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 ProviderMonitorSetting. The + ProviderMonitorSetting is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.ProviderMonitorSetting]: + """Creates the provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :param properties: The provider monitor setting properties supplied to the create operation. + Required. + :type properties: IO[bytes] + :keyword content_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 ProviderMonitorSetting. The + ProviderMonitorSetting is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create( + self, + resource_group_name: str, + provider_monitor_setting_name: str, + properties: Union[_models.ProviderMonitorSetting, _types.ProviderMonitorSetting, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.ProviderMonitorSetting]: + """Creates the provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :param properties: The provider monitor setting properties supplied to the create operation. Is + either a ProviderMonitorSetting type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.ProviderMonitorSetting or + ~azure.mgmt.providerhub.types.ProviderMonitorSetting or IO[bytes] + :return: An instance of LROPoller that returns ProviderMonitorSetting. The + ProviderMonitorSetting is compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :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.ProviderMonitorSetting] = 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, + provider_monitor_setting_name=provider_monitor_setting_name, + properties=properties, + 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.ProviderMonitorSetting, 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.ProviderMonitorSetting].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ProviderMonitorSetting]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @distributed_trace + def update( + self, resource_group_name: str, provider_monitor_setting_name: str, **kwargs: Any + ) -> _models.ProviderMonitorSetting: + """Updates the provider monitor setting properties as specified in the request body. Update fails + if the specified provider monitor setting does not already exist. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :return: ProviderMonitorSetting. The ProviderMonitorSetting is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ProviderMonitorSetting + :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.ProviderMonitorSetting] = kwargs.pop("cls", None) + + _request = build_provider_monitor_settings_update_request( + resource_group_name=resource_group_name, + provider_monitor_setting_name=provider_monitor_setting_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.ProviderMonitorSetting, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, provider_monitor_setting_name: str, **kwargs: Any + ) -> None: + """Deletes a provider monitor setting. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param provider_monitor_setting_name: The name of the provider monitor setting. Required. + :type provider_monitor_setting_name: str + :return: None + :rtype: None + :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[None] = kwargs.pop("cls", None) + + _request = build_provider_monitor_settings_delete_request( + resource_group_name=resource_group_name, + provider_monitor_setting_name=provider_monitor_setting_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) + + _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, 204]: + map_error(status_code=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 cls: + return cls(pipeline_response, None, {}) # type: ignore + + @distributed_trace + def list_by_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> ItemPaged["_models.ProviderMonitorSetting"]: + """Gets the list of the provider monitor settings 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 ProviderMonitorSetting + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProviderMonitorSetting]] = 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_provider_monitor_settings_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.ProviderMonitorSetting], + 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.ProviderMonitorSetting"]: + """Gets the list of the provider monitor settings in the subscription. + + :return: An iterator like instance of ProviderMonitorSetting + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.providerhub.models.ProviderMonitorSetting] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ProviderMonitorSetting]] = 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_provider_monitor_settings_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.ProviderMonitorSetting], + 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 ResourceActionsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.providerhub.ProviderHubMgmtClient`'s + :attr:`resource_actions` 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: ProviderHubMgmtClientConfiguration = 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 _delete_resources_initial( + self, + provider_namespace: str, + resource_action_name: str, + properties: Union[_models.ResourceManagementAction, _types.ResourceManagementAction, 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(properties, (IOBase, bytes)): + _content = properties + else: + _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_resource_actions_delete_resources_request( + provider_namespace=provider_namespace, + resource_action_name=resource_action_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 [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 = {} + 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_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: _models.ResourceManagementAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes resources. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_action_name: The resource action name. Required. + :type resource_action_name: str + :param properties: The properties supplied to the DeleteResources operation. Required. + :type properties: ~azure.mgmt.providerhub.models.ResourceManagementAction + :keyword content_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 None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: _types.ResourceManagementAction, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes resources. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_action_name: The resource action name. Required. + :type resource_action_name: str + :param properties: The properties supplied to the DeleteResources operation. Required. + :type properties: ~azure.mgmt.providerhub.types.ResourceManagementAction + :keyword content_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 None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes resources. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_action_name: The resource action name. Required. + :type resource_action_name: str + :param properties: The properties supplied to the DeleteResources operation. Required. + :type properties: IO[bytes] + :keyword content_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 None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_delete_resources( + self, + provider_namespace: str, + resource_action_name: str, + properties: Union[_models.ResourceManagementAction, _types.ResourceManagementAction, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Deletes resources. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param resource_action_name: The resource action name. Required. + :type resource_action_name: str + :param properties: The properties supplied to the DeleteResources operation. Is either a + ResourceManagementAction type or a IO[bytes] type. Required. + :type properties: ~azure.mgmt.providerhub.models.ResourceManagementAction or + ~azure.mgmt.providerhub.types.ResourceManagementAction or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :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[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_resources_initial( + provider_namespace=provider_namespace, + resource_action_name=resource_action_name, + properties=properties, + 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): # 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 + + +class _ProviderHubMgmtClientOperationsMixin( + ClientMixinABC[PipelineClient[HttpRequest, HttpResponse], ProviderHubMgmtClientConfiguration] +): + + @distributed_trace + def generate_manifest(self, provider_namespace: str, **kwargs: Any) -> _models.ResourceProviderManifest: + """Generates the manifest for the given provider. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :return: ResourceProviderManifest. The ResourceProviderManifest is compatible with + MutableMapping + :rtype: ~azure.mgmt.providerhub.models.ResourceProviderManifest + :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.ResourceProviderManifest] = kwargs.pop("cls", None) + + _request = build_provider_hub_mgmt_generate_manifest_request( + provider_namespace=provider_namespace, + 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.ResourceProviderManifest, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @overload + def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: _models.CheckinManifestParams, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckinManifestInfo: + """Checkin the manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param checkin_manifest_params: The required body parameters supplied to the checkin manifest + operation. Required. + :type checkin_manifest_params: ~azure.mgmt.providerhub.models.CheckinManifestParams + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckinManifestInfo. The CheckinManifestInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CheckinManifestInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: _types.CheckinManifestParams, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckinManifestInfo: + """Checkin the manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param checkin_manifest_params: The required body parameters supplied to the checkin manifest + operation. Required. + :type checkin_manifest_params: ~azure.mgmt.providerhub.types.CheckinManifestParams + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckinManifestInfo. The CheckinManifestInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CheckinManifestInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CheckinManifestInfo: + """Checkin the manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param checkin_manifest_params: The required body parameters supplied to the checkin manifest + operation. Required. + :type checkin_manifest_params: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CheckinManifestInfo. The CheckinManifestInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CheckinManifestInfo + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def checkin_manifest( + self, + provider_namespace: str, + checkin_manifest_params: Union[_models.CheckinManifestParams, _types.CheckinManifestParams, IO[bytes]], + **kwargs: Any + ) -> _models.CheckinManifestInfo: + """Checkin the manifest. + + :param provider_namespace: The name of the resource provider hosted within ProviderHub. + Required. + :type provider_namespace: str + :param checkin_manifest_params: The required body parameters supplied to the checkin manifest + operation. Is either a CheckinManifestParams type or a IO[bytes] type. Required. + :type checkin_manifest_params: ~azure.mgmt.providerhub.models.CheckinManifestParams or + ~azure.mgmt.providerhub.types.CheckinManifestParams or IO[bytes] + :return: CheckinManifestInfo. The CheckinManifestInfo is compatible with MutableMapping + :rtype: ~azure.mgmt.providerhub.models.CheckinManifestInfo + :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 = case_insensitive_dict(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.CheckinManifestInfo] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(checkin_manifest_params, (IOBase, bytes)): + _content = checkin_manifest_params + else: + _content = json.dumps(checkin_manifest_params, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_provider_hub_mgmt_checkin_manifest_request( + provider_namespace=provider_namespace, + 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 = 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.CheckinManifestInfo, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/_patch.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/_patch.py new file mode 100644 index 000000000000..87676c65a8f0 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/operations/_patch.py @@ -0,0 +1,21 @@ +# coding=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 +""" + + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/py.typed b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/types.py b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/types.py new file mode 100644 index 000000000000..dfd233d25165 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/azure/mgmt/providerhub/types.py @@ -0,0 +1,4435 @@ +# 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. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING, Union +from typing_extensions import Required, TypedDict + +if TYPE_CHECKING: + from .models import ( + AdditionalOptionsAsyncOperation, + AdditionalOptionsResourceTypeRegistration, + AuthenticationScheme, + AvailabilityZonePolicy, + AvailableCheckInManifestEnvironment, + BlockActionVerb, + CapacityPolicy, + CommonApiVersionsMergeMode, + CreatedByType, + CrossTenantTokenValidation, + DataBoundary, + EndpointType, + EndpointTypeResourceType, + ExpeditedRolloutIntent, + ExtendedLocationType, + ExtensionCategory, + ExtensionOptionType, + FeaturesPolicy, + FilterOption, + FrontdoorRequestMode, + IdentityManagementTypes, + Intent, + LegacyOperation, + LinkedAction, + LinkedOperation, + LoggingDetails, + LoggingDirections, + MarketplaceType, + MessageScope, + NotificationEndpointType, + NotificationMode, + NotificationOptions, + NotificationType, + OperationActionType, + OperationOrigins, + OptInHeaderType, + OptOutHeaderType, + Policy, + PolicyExecutionType, + PreflightOption, + ProviderRegistrationKind, + ProvisioningState, + QuotaPolicy, + Readiness, + Regionality, + ResourceAccessPolicy, + ResourceDeletionPolicy, + ResourceProviderCapabilitiesEffect, + ResourceProviderType, + ResourceSubType, + ResourceTypeCategory, + ResourceTypeEndpointKind, + ResourceTypeExtendedLocationPolicy, + ResourceTypeRegistrationKind, + ResourceValidation, + Role, + RoutingType, + ServerFailureResponseMessageType, + ServiceClientOptionsType, + ServiceFeatureFlagAction, + ServiceStatus, + SignedRequestScope, + SkipNotifications, + SkuScaleType, + SubscriptionNotificationOperation, + SubscriptionReregistrationResult, + SubscriptionState, + SubscriptionTransitioningState, + SupportedOperations, + TemplateDeploymentCapabilities, + TemplateDeploymentPreflightNotifications, + TemplateDeploymentPreflightOptions, + ThrottlingMetricType, + TrafficRegionCategory, + ) + + +class AdditionalAuthorization(TypedDict, total=False): + """AdditionalAuthorization. + + :ivar application_id: + :vartype application_id: str + :ivar role_definition_id: + :vartype role_definition_id: str + """ + + applicationId: str + roleDefinitionId: str + + +class AllowedResourceName(TypedDict, total=False): + """AllowedResourceName. + + :ivar name: Resource name. + :vartype name: str + :ivar get_action_verb: Get action verb. + :vartype get_action_verb: str + """ + + name: str + """Resource name.""" + getActionVerb: str + """Get action verb.""" + + +class AllowedUnauthorizedActionsExtension(TypedDict, total=False): + """AllowedUnauthorizedActionsExtension. + + :ivar action: The action. + :vartype action: str + :ivar intent: The intent. Known values are: "NOT_SPECIFIED", "LOW_PRIVILEGE", + "DEFERRED_ACCESS_CHECK", and "RP_CONTRACT". + :vartype intent: Union[str, "Intent"] + """ + + action: str + """The action.""" + intent: Union[str, "Intent"] + """The intent. Known values are: \"NOT_SPECIFIED\", \"LOW_PRIVILEGE\", \"DEFERRED_ACCESS_CHECK\", + and \"RP_CONTRACT\".""" + + +class ApiProfile(TypedDict, total=False): + """ApiProfile. + + :ivar profile_version: Profile version. + :vartype profile_version: str + :ivar api_version: Api version. + :vartype api_version: str + """ + + profileVersion: str + """Profile version.""" + apiVersion: str + """Api version.""" + + +class ApplicationDataAuthorization(TypedDict, total=False): + """ApplicationDataAuthorization. + + :ivar role: The ownership role the application has on the resource types. The service owner + role gives the application owner permissions. The limited owner role gives elevated permissions + but does not allow all the permissions of a service owner, such as read/write on internal + metadata. Required. Known values are: "ServiceOwner" and "LimitedOwner". + :vartype role: Union[str, "Role"] + :ivar resource_types: The resource types from the defined resource types in the provider + namespace that the application can access. If no resource types are specified and the role is + service owner, the default is * which is all resource types. + :vartype resource_types: list[str] + """ + + role: Required[Union[str, "Role"]] + """The ownership role the application has on the resource types. The service owner role gives the + application owner permissions. The limited owner role gives elevated permissions but does not + allow all the permissions of a service owner, such as read/write on internal metadata. + Required. Known values are: \"ServiceOwner\" and \"LimitedOwner\".""" + resourceTypes: list[str] + """The resource types from the defined resource types in the provider namespace that the + application can access. If no resource types are specified and the role is service owner, the + default is * which is all resource types.""" + + +class ApplicationProviderAuthorization(TypedDict, total=False): + """ApplicationProviderAuthorization. + + :ivar role_definition_id: The role definition ID for the application. + :vartype role_definition_id: str + :ivar managed_by_role_definition_id: The managed by role definition ID for the application. + :vartype managed_by_role_definition_id: str + """ + + roleDefinitionId: str + """The role definition ID for the application.""" + managedByRoleDefinitionId: str + """The managed by role definition ID for the application.""" + + +class AsyncOperationPollingRules(TypedDict, total=False): + """AsyncOperationPollingRules. + + :ivar authorization_actions: The authorization actions. + :vartype authorization_actions: list[str] + :ivar additional_options: The additional options. Known values are: + "ProtectedAsyncOperationPolling" and "ProtectedAsyncOperationPollingAuditOnly". + :vartype additional_options: Union[str, "AdditionalOptionsAsyncOperation"] + """ + + authorizationActions: list[str] + """The authorization actions.""" + additionalOptions: Union[str, "AdditionalOptionsAsyncOperation"] + """The additional options. Known values are: \"ProtectedAsyncOperationPolling\" and + \"ProtectedAsyncOperationPollingAuditOnly\".""" + + +class AsyncTimeoutRule(TypedDict, total=False): + """AsyncTimeoutRule. + + :ivar action_name: + :vartype action_name: str + :ivar timeout: This is a TimeSpan property. + :vartype timeout: str + """ + + actionName: str + timeout: str + """This is a TimeSpan property.""" + + +class AuthorizationActionMapping(TypedDict, total=False): + """AuthorizationActionMapping. + + :ivar original: The original action name. + :vartype original: str + :ivar desired: The desired action name. + :vartype desired: str + """ + + original: str + """The original action name.""" + desired: str + """The desired action name.""" + + +class Resource(TypedDict, total=False): + """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: "SystemData" + """ + + id: str + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: str + """The name of the resource.""" + type: str + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + systemData: "SystemData" + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +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: "SystemData" + """ + + +class AuthorizedApplication(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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: "SystemData" + :ivar properties: + :vartype properties: "AuthorizedApplicationProperties" + """ + + properties: "AuthorizedApplicationProperties" + + +class AuthorizedApplicationProperties(TypedDict, total=False): + """AuthorizedApplicationProperties. + + :ivar provider_authorization: + :vartype provider_authorization: "ApplicationProviderAuthorization" + :ivar data_authorizations: The authorizations that determine the level of data access + permissions on the specified resource types. + :vartype data_authorizations: list["ApplicationDataAuthorization"] + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: Union[str, "ProvisioningState"] + """ + + providerAuthorization: "ApplicationProviderAuthorization" + dataAuthorizations: list["ApplicationDataAuthorization"] + """The authorizations that determine the level of data access permissions on the specified + resource types.""" + provisioningState: Union[str, "ProvisioningState"] + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + + +class CanaryTrafficRegionRolloutConfiguration(TypedDict, total=False): + """CanaryTrafficRegionRolloutConfiguration. + + :ivar skip_regions: The skip regions. + :vartype skip_regions: list[str] + :ivar regions: The regions. + :vartype regions: list[str] + """ + + skipRegions: list[str] + """The skip regions.""" + regions: list[str] + """The regions.""" + + +class CheckinManifestInfo(TypedDict, total=False): + """CheckinManifestInfo. + + :ivar is_checked_in: Whether the manifest is checked in. Required. + :vartype is_checked_in: bool + :ivar status_message: The status message. Required. + :vartype status_message: str + :ivar pull_request: The pull request. + :vartype pull_request: str + :ivar commit_id: The commit id. + :vartype commit_id: str + """ + + isCheckedIn: Required[bool] + """Whether the manifest is checked in. Required.""" + statusMessage: Required[str] + """The status message. Required.""" + pullRequest: str + """The pull request.""" + commitId: str + """The commit id.""" + + +class CheckinManifestParams(TypedDict, total=False): + """CheckinManifestParams. + + :ivar environment: The environment supplied to the checkin manifest operation. Required. + :vartype environment: str + :ivar baseline_arm_manifest_location: The baseline ARM manifest location supplied to the + checkin manifest operation. Required. + :vartype baseline_arm_manifest_location: str + """ + + environment: Required[str] + """The environment supplied to the checkin manifest operation. Required.""" + baselineArmManifestLocation: Required[str] + """The baseline ARM manifest location supplied to the checkin manifest operation. Required.""" + + +class CheckNameAvailabilitySpecifications(TypedDict, total=False): + """CheckNameAvailabilitySpecifications. + + :ivar enable_default_validation: Whether default validation is enabled. + :vartype enable_default_validation: bool + :ivar resource_types_with_custom_validation: The resource types with custom validation. + :vartype resource_types_with_custom_validation: list[str] + """ + + enableDefaultValidation: bool + """Whether default validation is enabled.""" + resourceTypesWithCustomValidation: list[str] + """The resource types with custom validation.""" + + +class CustomRollout(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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: "SystemData" + :ivar properties: Properties of the rollout. Required. + :vartype properties: "CustomRolloutProperties" + """ + + properties: Required["CustomRolloutProperties"] + """Properties of the rollout. Required.""" + + +class CustomRolloutProperties(TypedDict, total=False): + """CustomRolloutProperties. + + :ivar provisioning_state: The provisioned state of the resource. Known values are: + "NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", + "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", and + "RolloutInProgress". + :vartype provisioning_state: Union[str, "ProvisioningState"] + :ivar specification: The specification. Required. + :vartype specification: "CustomRolloutPropertiesSpecification" + :ivar status: The status. + :vartype status: "CustomRolloutPropertiesStatus" + """ + + provisioningState: Union[str, "ProvisioningState"] + """The provisioned state of the resource. Known values are: \"NotSpecified\", \"Accepted\", + \"Running\", \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", + \"Succeeded\", \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + specification: Required["CustomRolloutPropertiesSpecification"] + """The specification. Required.""" + status: "CustomRolloutPropertiesStatus" + """The status.""" + + +class CustomRolloutSpecification(TypedDict, total=False): + """CustomRolloutSpecification. + + :ivar auto_provision_config: The auto provisioning configuration. + :vartype auto_provision_config: "CustomRolloutSpecificationAutoProvisionConfig" + :ivar canary: The canary region configuration. + :vartype canary: "CustomRolloutSpecificationCanary" + :ivar release_scopes: The list of ARM regions scoped for the release. + :vartype release_scopes: list[str] + :ivar refresh_subscription_registration: Whether refreshing subscription registration is + enabled or disabled. + :vartype refresh_subscription_registration: bool + :ivar skip_release_scope_validation: Whether release scope validation should be skipped. + :vartype skip_release_scope_validation: bool + :ivar provider_registration: The provider registration. + :vartype provider_registration: "CustomRolloutSpecificationProviderRegistration" + :ivar resource_type_registrations: The resource type registrations. + :vartype resource_type_registrations: list["ResourceTypeRegistration"] + """ + + autoProvisionConfig: "CustomRolloutSpecificationAutoProvisionConfig" + """The auto provisioning configuration.""" + canary: "CustomRolloutSpecificationCanary" + """The canary region configuration.""" + releaseScopes: list[str] + """The list of ARM regions scoped for the release.""" + refreshSubscriptionRegistration: bool + """Whether refreshing subscription registration is enabled or disabled.""" + skipReleaseScopeValidation: bool + """Whether release scope validation should be skipped.""" + providerRegistration: "CustomRolloutSpecificationProviderRegistration" + """The provider registration.""" + resourceTypeRegistrations: list["ResourceTypeRegistration"] + """The resource type registrations.""" + + +class CustomRolloutPropertiesSpecification(CustomRolloutSpecification): + """The specification. + + :ivar auto_provision_config: The auto provisioning configuration. + :vartype auto_provision_config: "CustomRolloutSpecificationAutoProvisionConfig" + :ivar canary: The canary region configuration. + :vartype canary: "CustomRolloutSpecificationCanary" + :ivar release_scopes: The list of ARM regions scoped for the release. + :vartype release_scopes: list[str] + :ivar refresh_subscription_registration: Whether refreshing subscription registration is + enabled or disabled. + :vartype refresh_subscription_registration: bool + :ivar skip_release_scope_validation: Whether release scope validation should be skipped. + :vartype skip_release_scope_validation: bool + :ivar provider_registration: The provider registration. + :vartype provider_registration: "CustomRolloutSpecificationProviderRegistration" + :ivar resource_type_registrations: The resource type registrations. + :vartype resource_type_registrations: list["ResourceTypeRegistration"] + """ + + +class CustomRolloutStatus(TypedDict, total=False): + """CustomRolloutStatus. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, "ExtendedErrorInfo"] + :ivar manifest_checkin_status: The manifest checkin status. + :vartype manifest_checkin_status: "CustomRolloutStatusManifestCheckinStatus" + """ + + completedRegions: list[str] + """The completed regions.""" + failedOrSkippedRegions: dict[str, "ExtendedErrorInfo"] + """The failed or skipped regions.""" + manifestCheckinStatus: "CustomRolloutStatusManifestCheckinStatus" + """The manifest checkin status.""" + + +class CustomRolloutPropertiesStatus(CustomRolloutStatus): + """The status. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, "ExtendedErrorInfo"] + :ivar manifest_checkin_status: The manifest checkin status. + :vartype manifest_checkin_status: "CustomRolloutStatusManifestCheckinStatus" + """ + + +class CustomRolloutSpecificationAutoProvisionConfig(TypedDict, total=False): # pylint: disable=name-too-long + """The auto provisioning configuration. + + :ivar storage: + :vartype storage: bool + :ivar resource_graph: + :vartype resource_graph: bool + """ + + storage: bool + resourceGraph: bool + + +class TrafficRegions(TypedDict, total=False): + """TrafficRegions. + + :ivar regions: + :vartype regions: list[str] + """ + + regions: list[str] + + +class CustomRolloutSpecificationCanary(TrafficRegions): + """The canary region configuration. + + :ivar regions: + :vartype regions: list[str] + """ + + +class ProviderRegistration(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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: "SystemData" + :ivar properties: + :vartype properties: "ProviderRegistrationProperties" + :ivar kind: Provider registration kind. This Metadata is also used by portal/tooling/etc to + render different UX experiences for resources of the same type. Known values are: "Managed", + "Hybrid", and "Direct". + :vartype kind: Union[str, "ProviderRegistrationKind"] + """ + + properties: "ProviderRegistrationProperties" + kind: Union[str, "ProviderRegistrationKind"] + """Provider registration kind. This Metadata is also used by portal/tooling/etc to render + different UX experiences for resources of the same type. Known values are: \"Managed\", + \"Hybrid\", and \"Direct\".""" + + +class CustomRolloutSpecificationProviderRegistration(ProviderRegistration): # pylint: disable=name-too-long + """The provider registration. + + :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: "SystemData" + :ivar properties: + :vartype properties: "ProviderRegistrationProperties" + :ivar kind: Provider registration kind. This Metadata is also used by portal/tooling/etc to + render different UX experiences for resources of the same type. Known values are: "Managed", + "Hybrid", and "Direct". + :vartype kind: Union[str, "ProviderRegistrationKind"] + """ + + +class CustomRolloutStatusManifestCheckinStatus(CheckinManifestInfo): + """The manifest checkin status. + + :ivar is_checked_in: Whether the manifest is checked in. Required. + :vartype is_checked_in: bool + :ivar status_message: The status message. Required. + :vartype status_message: str + :ivar pull_request: The pull request. + :vartype pull_request: str + :ivar commit_id: The commit id. + :vartype commit_id: str + """ + + +class DefaultRollout(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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: "SystemData" + :ivar properties: Properties of the rollout. + :vartype properties: "DefaultRolloutProperties" + """ + + properties: "DefaultRolloutProperties" + """Properties of the rollout.""" + + +class DefaultRolloutProperties(TypedDict, total=False): + """DefaultRolloutProperties. + + :ivar provisioning_state: The provisioned state of the resource. Known values are: + "NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", + "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", and + "RolloutInProgress". + :vartype provisioning_state: Union[str, "ProvisioningState"] + :ivar specification: The default rollout specification. + :vartype specification: "DefaultRolloutPropertiesSpecification" + :ivar status: The default rollout status. + :vartype status: "DefaultRolloutPropertiesStatus" + """ + + provisioningState: Union[str, "ProvisioningState"] + """The provisioned state of the resource. Known values are: \"NotSpecified\", \"Accepted\", + \"Running\", \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", + \"Succeeded\", \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + specification: "DefaultRolloutPropertiesSpecification" + """The default rollout specification.""" + status: "DefaultRolloutPropertiesStatus" + """The default rollout status.""" + + +class DefaultRolloutSpecification(TypedDict, total=False): + """DefaultRolloutSpecification. + + :ivar expedited_rollout: The expedited rollout definition. + :vartype expedited_rollout: "DefaultRolloutSpecificationExpeditedRollout" + :ivar canary: The canary traffic region configuration. + :vartype canary: "DefaultRolloutSpecificationCanary" + :ivar low_traffic: The low traffic region configuration. + :vartype low_traffic: "DefaultRolloutSpecificationLowTraffic" + :ivar medium_traffic: The medium traffic region configuration. + :vartype medium_traffic: "DefaultRolloutSpecificationMediumTraffic" + :ivar high_traffic: The high traffic region configuration. + :vartype high_traffic: "DefaultRolloutSpecificationHighTraffic" + :ivar rest_of_the_world_group_one: The rest of the world group one region configuration. + :vartype rest_of_the_world_group_one: "DefaultRolloutSpecificationRestOfTheWorldGroupOne" + :ivar rest_of_the_world_group_two: The rest of the world group two region configuration. + :vartype rest_of_the_world_group_two: "DefaultRolloutSpecificationRestOfTheWorldGroupTwo" + :ivar provider_registration: The provider registration. + :vartype provider_registration: "DefaultRolloutSpecificationProviderRegistration" + :ivar resource_type_registrations: The resource type registrations. + :vartype resource_type_registrations: list["ResourceTypeRegistration"] + :ivar auto_provision_config: The auto provisioning config. + :vartype auto_provision_config: "DefaultRolloutSpecificationAutoProvisionConfig" + """ + + expeditedRollout: "DefaultRolloutSpecificationExpeditedRollout" + """The expedited rollout definition.""" + canary: "DefaultRolloutSpecificationCanary" + """The canary traffic region configuration.""" + lowTraffic: "DefaultRolloutSpecificationLowTraffic" + """The low traffic region configuration.""" + mediumTraffic: "DefaultRolloutSpecificationMediumTraffic" + """The medium traffic region configuration.""" + highTraffic: "DefaultRolloutSpecificationHighTraffic" + """The high traffic region configuration.""" + restOfTheWorldGroupOne: "DefaultRolloutSpecificationRestOfTheWorldGroupOne" + """The rest of the world group one region configuration.""" + restOfTheWorldGroupTwo: "DefaultRolloutSpecificationRestOfTheWorldGroupTwo" + """The rest of the world group two region configuration.""" + providerRegistration: "DefaultRolloutSpecificationProviderRegistration" + """The provider registration.""" + resourceTypeRegistrations: list["ResourceTypeRegistration"] + """The resource type registrations.""" + autoProvisionConfig: "DefaultRolloutSpecificationAutoProvisionConfig" + """The auto provisioning config.""" + + +class DefaultRolloutPropertiesSpecification(DefaultRolloutSpecification): + """The default rollout specification. + + :ivar expedited_rollout: The expedited rollout definition. + :vartype expedited_rollout: "DefaultRolloutSpecificationExpeditedRollout" + :ivar canary: The canary traffic region configuration. + :vartype canary: "DefaultRolloutSpecificationCanary" + :ivar low_traffic: The low traffic region configuration. + :vartype low_traffic: "DefaultRolloutSpecificationLowTraffic" + :ivar medium_traffic: The medium traffic region configuration. + :vartype medium_traffic: "DefaultRolloutSpecificationMediumTraffic" + :ivar high_traffic: The high traffic region configuration. + :vartype high_traffic: "DefaultRolloutSpecificationHighTraffic" + :ivar rest_of_the_world_group_one: The rest of the world group one region configuration. + :vartype rest_of_the_world_group_one: "DefaultRolloutSpecificationRestOfTheWorldGroupOne" + :ivar rest_of_the_world_group_two: The rest of the world group two region configuration. + :vartype rest_of_the_world_group_two: "DefaultRolloutSpecificationRestOfTheWorldGroupTwo" + :ivar provider_registration: The provider registration. + :vartype provider_registration: "DefaultRolloutSpecificationProviderRegistration" + :ivar resource_type_registrations: The resource type registrations. + :vartype resource_type_registrations: list["ResourceTypeRegistration"] + :ivar auto_provision_config: The auto provisioning config. + :vartype auto_provision_config: "DefaultRolloutSpecificationAutoProvisionConfig" + """ + + +class RolloutStatusBase(TypedDict, total=False): + """RolloutStatusBase. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, "ExtendedErrorInfo"] + """ + + completedRegions: list[str] + """The completed regions.""" + failedOrSkippedRegions: dict[str, "ExtendedErrorInfo"] + """The failed or skipped regions.""" + + +class DefaultRolloutStatus(RolloutStatusBase): + """DefaultRolloutStatus. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, "ExtendedErrorInfo"] + :ivar next_traffic_region: The next traffic region. Known values are: "NotSpecified", "Canary", + "LowTraffic", "MediumTraffic", "HighTraffic", "None", "RestOfTheWorldGroupOne", and + "RestOfTheWorldGroupTwo". + :vartype next_traffic_region: Union[str, "TrafficRegionCategory"] + :ivar next_traffic_region_scheduled_time: The next traffic region scheduled time. + :vartype next_traffic_region_scheduled_time: str + :ivar subscription_reregistration_result: The subscription reregistration result. Known values + are: "NotApplicable", "ConditionalUpdate", "ForcedUpdate", and "Failed". + :vartype subscription_reregistration_result: Union[str, "SubscriptionReregistrationResult"] + :ivar manifest_checkin_status: The manifest checkin status. + :vartype manifest_checkin_status: "DefaultRolloutStatusManifestCheckinStatus" + """ + + nextTrafficRegion: Union[str, "TrafficRegionCategory"] + """The next traffic region. Known values are: \"NotSpecified\", \"Canary\", \"LowTraffic\", + \"MediumTraffic\", \"HighTraffic\", \"None\", \"RestOfTheWorldGroupOne\", and + \"RestOfTheWorldGroupTwo\".""" + nextTrafficRegionScheduledTime: str + """The next traffic region scheduled time.""" + subscriptionReregistrationResult: Union[str, "SubscriptionReregistrationResult"] + """The subscription reregistration result. Known values are: \"NotApplicable\", + \"ConditionalUpdate\", \"ForcedUpdate\", and \"Failed\".""" + manifestCheckinStatus: "DefaultRolloutStatusManifestCheckinStatus" + """The manifest checkin status.""" + + +class DefaultRolloutPropertiesStatus(DefaultRolloutStatus): + """The default rollout status. + + :ivar completed_regions: The completed regions. + :vartype completed_regions: list[str] + :ivar failed_or_skipped_regions: The failed or skipped regions. + :vartype failed_or_skipped_regions: dict[str, "ExtendedErrorInfo"] + :ivar next_traffic_region: The next traffic region. Known values are: "NotSpecified", "Canary", + "LowTraffic", "MediumTraffic", "HighTraffic", "None", "RestOfTheWorldGroupOne", and + "RestOfTheWorldGroupTwo". + :vartype next_traffic_region: Union[str, "TrafficRegionCategory"] + :ivar next_traffic_region_scheduled_time: The next traffic region scheduled time. + :vartype next_traffic_region_scheduled_time: str + :ivar subscription_reregistration_result: The subscription reregistration result. Known values + are: "NotApplicable", "ConditionalUpdate", "ForcedUpdate", and "Failed". + :vartype subscription_reregistration_result: Union[str, "SubscriptionReregistrationResult"] + :ivar manifest_checkin_status: The manifest checkin status. + :vartype manifest_checkin_status: "DefaultRolloutStatusManifestCheckinStatus" + """ + + +class DefaultRolloutSpecificationAutoProvisionConfig(TypedDict, total=False): # pylint: disable=name-too-long + """The auto provisioning config. + + :ivar storage: Whether auto provisioning for storage is enabled. + :vartype storage: bool + :ivar resource_graph: Whether auto provisioning for resource graph is enabled. + :vartype resource_graph: bool + """ + + storage: bool + """Whether auto provisioning for storage is enabled.""" + resourceGraph: bool + """Whether auto provisioning for resource graph is enabled.""" + + +class DefaultRolloutSpecificationCanary(CanaryTrafficRegionRolloutConfiguration): + """The canary traffic region configuration. + + :ivar skip_regions: The skip regions. + :vartype skip_regions: list[str] + :ivar regions: The regions. + :vartype regions: list[str] + """ + + +class ExpeditedRolloutDefinition(TypedDict, total=False): + """ExpeditedRolloutDefinition. + + :ivar enabled: Indicates whether expedited rollout is enabled/disabled. + :vartype enabled: bool + """ + + enabled: bool + """Indicates whether expedited rollout is enabled/disabled.""" + + +class DefaultRolloutSpecificationExpeditedRollout(ExpeditedRolloutDefinition): # pylint: disable=name-too-long + """The expedited rollout definition. + + :ivar enabled: Indicates whether expedited rollout is enabled/disabled. + :vartype enabled: bool + """ + + +class TrafficRegionRolloutConfiguration(TrafficRegions): + """TrafficRegionRolloutConfiguration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: str + """ + + waitDuration: str + """The wait duration.""" + + +class DefaultRolloutSpecificationHighTraffic(TrafficRegionRolloutConfiguration): + """The high traffic region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: str + """ + + +class DefaultRolloutSpecificationLowTraffic(TrafficRegionRolloutConfiguration): + """The low traffic region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: str + """ + + +class DefaultRolloutSpecificationMediumTraffic(TrafficRegionRolloutConfiguration): + """The medium traffic region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: str + """ + + +class DefaultRolloutSpecificationProviderRegistration(ProviderRegistration): # pylint: disable=name-too-long + """The provider registration. + + :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: "SystemData" + :ivar properties: + :vartype properties: "ProviderRegistrationProperties" + :ivar kind: Provider registration kind. This Metadata is also used by portal/tooling/etc to + render different UX experiences for resources of the same type. Known values are: "Managed", + "Hybrid", and "Direct". + :vartype kind: Union[str, "ProviderRegistrationKind"] + """ + + +class DefaultRolloutSpecificationRestOfTheWorldGroupOne( + TrafficRegionRolloutConfiguration +): # pylint: disable=name-too-long + """The rest of the world group one region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: str + """ + + +class DefaultRolloutSpecificationRestOfTheWorldGroupTwo( + TrafficRegionRolloutConfiguration +): # pylint: disable=name-too-long + """The rest of the world group two region configuration. + + :ivar regions: + :vartype regions: list[str] + :ivar wait_duration: The wait duration. + :vartype wait_duration: str + """ + + +class DefaultRolloutStatusManifestCheckinStatus(CheckinManifestInfo): # pylint: disable=name-too-long + """The manifest checkin status. + + :ivar is_checked_in: Whether the manifest is checked in. Required. + :vartype is_checked_in: bool + :ivar status_message: The status message. Required. + :vartype status_message: str + :ivar pull_request: The pull request. + :vartype pull_request: str + :ivar commit_id: The commit id. + :vartype commit_id: str + """ + + +class DeleteDependency(TypedDict, total=False): + """DeleteDependency. + + :ivar required_features: Required features. + :vartype required_features: list[str] + :ivar linked_property: Linked property. + :vartype linked_property: str + :ivar linked_type: Linked type. + :vartype linked_type: str + """ + + requiredFeatures: list[str] + """Required features.""" + linkedProperty: str + """Linked property.""" + linkedType: str + """Linked type.""" + + +class DstsConfiguration(TypedDict, total=False): + """DstsConfiguration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + serviceName: Required[str] + """The service name. Required.""" + serviceDnsName: str + """This is a URI property.""" + + +class EndpointInformation(TypedDict, total=False): + """EndpointInformation. + + :ivar endpoint: The endpoint. + :vartype endpoint: str + :ivar endpoint_type: The endpoint type. Known values are: "Webhook" and "Eventhub". + :vartype endpoint_type: Union[str, "NotificationEndpointType"] + :ivar schema_version: The schema version. + :vartype schema_version: str + """ + + endpoint: str + """The endpoint.""" + endpointType: Union[str, "NotificationEndpointType"] + """The endpoint type. Known values are: \"Webhook\" and \"Eventhub\".""" + schemaVersion: str + """The schema version.""" + + +class ExtendedErrorInfo(TypedDict, total=False): + """Error information. + + :ivar code: The error code. + :vartype code: str + :ivar target: The target of the error. + :vartype target: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: list["ExtendedErrorInfo"] + :ivar additional_info: The additional error information. + :vartype additional_info: list["TypedErrorInfo"] + """ + + code: str + """The error code.""" + target: str + """The target of the error.""" + message: str + """The error message.""" + details: list["ExtendedErrorInfo"] + """The error details.""" + additionalInfo: list["TypedErrorInfo"] + """The additional error information.""" + + +class ExtendedLocationOptions(TypedDict, total=False): + """ExtendedLocationOptions. + + :ivar type: The type. Known values are: "NotSpecified", "CustomLocation", "EdgeZone", and + "ArcZone". + :vartype type: Union[str, "ExtendedLocationType"] + :ivar supported_policy: Known values are: "NotSpecified" and "All". + :vartype supported_policy: Union[str, "ResourceTypeExtendedLocationPolicy"] + """ + + type: Union[str, "ExtendedLocationType"] + """The type. Known values are: \"NotSpecified\", \"CustomLocation\", \"EdgeZone\", and + \"ArcZone\".""" + supportedPolicy: Union[str, "ResourceTypeExtendedLocationPolicy"] + """Known values are: \"NotSpecified\" and \"All\".""" + + +class ExtensionOptions(TypedDict, total=False): + """ExtensionOptions. + + :ivar request: The request. + :vartype request: list[Union[str, "ExtensionOptionType"]] + :ivar response: The response. + :vartype response: list[Union[str, "ExtensionOptionType"]] + """ + + request: list[Union[str, "ExtensionOptionType"]] + """The request.""" + response: list[Union[str, "ExtensionOptionType"]] + """The response.""" + + +class FanoutLinkedNotificationRule(TypedDict, total=False): + """FanoutLinkedNotificationRule. + + :ivar token_auth_configuration: The token auth configuration. + :vartype token_auth_configuration: "TokenAuthConfiguration" + :ivar actions: The actions. + :vartype actions: list[str] + :ivar endpoints: The endpoints. + :vartype endpoints: list["ResourceProviderEndpoint"] + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: "FanoutLinkedNotificationRuleDstsConfiguration" + """ + + tokenAuthConfiguration: "TokenAuthConfiguration" + """The token auth configuration.""" + actions: list[str] + """The actions.""" + endpoints: list["ResourceProviderEndpoint"] + """The endpoints.""" + dstsConfiguration: "FanoutLinkedNotificationRuleDstsConfiguration" + """The dsts configuration.""" + + +class FanoutLinkedNotificationRuleDstsConfiguration(DstsConfiguration): # pylint: disable=name-too-long + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + +class FeaturesRule(TypedDict, total=False): + """FeaturesRule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: Union[str, "FeaturesPolicy"] + """ + + requiredFeaturesPolicy: Required[Union[str, "FeaturesPolicy"]] + """The required feature policy. Required. Known values are: \"Any\" and \"All\".""" + + +class FilterRule(TypedDict, total=False): + """FilterRule. + + :ivar filter_query: The filter query. + :vartype filter_query: str + :ivar endpoint_information: The endpoint information. + :vartype endpoint_information: list["EndpointInformation"] + """ + + filterQuery: str + """The filter query.""" + endpointInformation: list["EndpointInformation"] + """The endpoint information.""" + + +class FrontloadPayload(TypedDict, total=False): + """FrontloadPayload. + + :ivar properties: Properties of the frontload payload. Required. + :vartype properties: "FrontloadPayloadProperties" + """ + + properties: Required["FrontloadPayloadProperties"] + """Properties of the frontload payload. Required.""" + + +class FrontloadPayloadProperties(TypedDict, total=False): + """FrontloadPayloadProperties. + + :ivar operation_type: The operation type. Required. + :vartype operation_type: str + :ivar provider_namespace: The provider namespace. Required. + :vartype provider_namespace: str + :ivar frontload_location: The frontload location. Required. + :vartype frontload_location: str + :ivar copy_from_location: The copy from location. Required. + :vartype copy_from_location: str + :ivar environment_type: The environment type. Required. Known values are: "NotSpecified", + "Canary", "Prod", "All", "Mooncake", and "Fairfax". + :vartype environment_type: Union[str, "AvailableCheckInManifestEnvironment"] + :ivar service_feature_flag: The service feature flag. Required. Known values are: "DoNotCreate" + and "Create". + :vartype service_feature_flag: Union[str, "ServiceFeatureFlagAction"] + :ivar include_resource_types: The resource types to include. Required. + :vartype include_resource_types: list[str] + :ivar exclude_resource_types: The resource types to exclude. Required. + :vartype exclude_resource_types: list[str] + :ivar override_manifest_level_fields: The manifest level fields to override. Required. + :vartype override_manifest_level_fields: + "FrontloadPayloadPropertiesOverrideManifestLevelFields" + :ivar override_endpoint_level_fields: The endpoint level fields to override. Required. + :vartype override_endpoint_level_fields: + "FrontloadPayloadPropertiesOverrideEndpointLevelFields" + :ivar ignore_fields: The fields to ignore. Required. + :vartype ignore_fields: list[str] + """ + + operationType: Required[str] + """The operation type. Required.""" + providerNamespace: Required[str] + """The provider namespace. Required.""" + frontloadLocation: Required[str] + """The frontload location. Required.""" + copyFromLocation: Required[str] + """The copy from location. Required.""" + environmentType: Required[Union[str, "AvailableCheckInManifestEnvironment"]] + """The environment type. Required. Known values are: \"NotSpecified\", \"Canary\", \"Prod\", + \"All\", \"Mooncake\", and \"Fairfax\".""" + serviceFeatureFlag: Required[Union[str, "ServiceFeatureFlagAction"]] + """The service feature flag. Required. Known values are: \"DoNotCreate\" and \"Create\".""" + includeResourceTypes: Required[list[str]] + """The resource types to include. Required.""" + excludeResourceTypes: Required[list[str]] + """The resource types to exclude. Required.""" + overrideManifestLevelFields: Required["FrontloadPayloadPropertiesOverrideManifestLevelFields"] + """The manifest level fields to override. Required.""" + overrideEndpointLevelFields: Required["FrontloadPayloadPropertiesOverrideEndpointLevelFields"] + """The endpoint level fields to override. Required.""" + ignoreFields: Required[list[str]] + """The fields to ignore. Required.""" + + +class ResourceTypeEndpointBase(TypedDict, total=False): + """ResourceTypeEndpointBase. + + :ivar enabled: Whether it's enabled. Required. + :vartype enabled: bool + :ivar api_versions: The api versions. Required. + :vartype api_versions: list[str] + :ivar endpoint_uri: The endpoint uri. Required. + :vartype endpoint_uri: str + :ivar locations: The locations. Required. + :vartype locations: list[str] + :ivar required_features: The required features. Required. + :vartype required_features: list[str] + :ivar features_rule: The features rule. Required. + :vartype features_rule: "ResourceTypeEndpointBaseFeaturesRule" + :ivar timeout: This is a TimeSpan property. Required. + :vartype timeout: str + :ivar endpoint_type: The endpoint type. Required. Known values are: "NotSpecified", "Canary", + "Production", and "TestInProduction". + :vartype endpoint_type: Union[str, "EndpointType"] + :ivar dsts_configuration: The dsts configuration. Required. + :vartype dsts_configuration: "ResourceTypeEndpointBaseDstsConfiguration" + :ivar sku_link: The sku link. Required. + :vartype sku_link: str + :ivar api_version: The api version. Required. + :vartype api_version: str + :ivar zones: The zones. Required. + :vartype zones: list[str] + """ + + enabled: Required[bool] + """Whether it's enabled. Required.""" + apiVersions: Required[list[str]] + """The api versions. Required.""" + endpointUri: Required[str] + """The endpoint uri. Required.""" + locations: Required[list[str]] + """The locations. Required.""" + requiredFeatures: Required[list[str]] + """The required features. Required.""" + featuresRule: Required["ResourceTypeEndpointBaseFeaturesRule"] + """The features rule. Required.""" + timeout: Required[str] + """This is a TimeSpan property. Required.""" + endpointType: Required[Union[str, "EndpointType"]] + """The endpoint type. Required. Known values are: \"NotSpecified\", \"Canary\", \"Production\", + and \"TestInProduction\".""" + dstsConfiguration: Required["ResourceTypeEndpointBaseDstsConfiguration"] + """The dsts configuration. Required.""" + skuLink: Required[str] + """The sku link. Required.""" + apiVersion: Required[str] + """The api version. Required.""" + zones: Required[list[str]] + """The zones. Required.""" + + +class FrontloadPayloadPropertiesOverrideEndpointLevelFields(ResourceTypeEndpointBase): # pylint: disable=name-too-long + """The endpoint level fields to override. + + :ivar enabled: Whether it's enabled. Required. + :vartype enabled: bool + :ivar api_versions: The api versions. Required. + :vartype api_versions: list[str] + :ivar endpoint_uri: The endpoint uri. Required. + :vartype endpoint_uri: str + :ivar locations: The locations. Required. + :vartype locations: list[str] + :ivar required_features: The required features. Required. + :vartype required_features: list[str] + :ivar features_rule: The features rule. Required. + :vartype features_rule: "ResourceTypeEndpointBaseFeaturesRule" + :ivar timeout: This is a TimeSpan property. Required. + :vartype timeout: str + :ivar endpoint_type: The endpoint type. Required. Known values are: "NotSpecified", "Canary", + "Production", and "TestInProduction". + :vartype endpoint_type: Union[str, "EndpointType"] + :ivar dsts_configuration: The dsts configuration. Required. + :vartype dsts_configuration: "ResourceTypeEndpointBaseDstsConfiguration" + :ivar sku_link: The sku link. Required. + :vartype sku_link: str + :ivar api_version: The api version. Required. + :vartype api_version: str + :ivar zones: The zones. Required. + :vartype zones: list[str] + """ + + +class ManifestLevelPropertyBag(TypedDict, total=False): + """ManifestLevelPropertyBag. + + :ivar resource_hydration_accounts: The resource hydration accounts. + :vartype resource_hydration_accounts: list["ResourceHydrationAccount"] + """ + + resourceHydrationAccounts: list["ResourceHydrationAccount"] + """The resource hydration accounts.""" + + +class FrontloadPayloadPropertiesOverrideManifestLevelFields(ManifestLevelPropertyBag): # pylint: disable=name-too-long + """The manifest level fields to override. + + :ivar resource_hydration_accounts: The resource hydration accounts. + :vartype resource_hydration_accounts: list["ResourceHydrationAccount"] + """ + + +class IdentityManagementProperties(TypedDict, total=False): + """IdentityManagementProperties. + + :ivar type: The type. Known values are: "NotSpecified", "SystemAssigned", "UserAssigned", + "Actor", and "DelegatedResourceIdentity". + :vartype type: Union[str, "IdentityManagementTypes"] + :ivar application_id: The application id. + :vartype application_id: str + :ivar application_ids: The application ids. + :vartype application_ids: list[str] + :ivar delegation_app_ids: The delegation app ids. + :vartype delegation_app_ids: list[str] + """ + + type: Union[str, "IdentityManagementTypes"] + """The type. Known values are: \"NotSpecified\", \"SystemAssigned\", \"UserAssigned\", \"Actor\", + and \"DelegatedResourceIdentity\".""" + applicationId: str + """The application id.""" + applicationIds: list[str] + """The application ids.""" + delegationAppIds: list[str] + """The delegation app ids.""" + + +class LegacyDisallowedCondition(TypedDict, total=False): + """LegacyDisallowedCondition. + + :ivar disallowed_legacy_operations: The disallowed legacy operations. + :vartype disallowed_legacy_operations: list[Union[str, "LegacyOperation"]] + :ivar feature: Feature string. + :vartype feature: str + """ + + disallowedLegacyOperations: list[Union[str, "LegacyOperation"]] + """The disallowed legacy operations.""" + feature: str + """Feature string.""" + + +class LightHouseAuthorization(TypedDict, total=False): + """LightHouseAuthorization. + + :ivar principal_id: The principal id. Required. + :vartype principal_id: str + :ivar role_definition_id: The role definition id. Required. + :vartype role_definition_id: str + """ + + principalId: Required[str] + """The principal id. Required.""" + roleDefinitionId: Required[str] + """The role definition id. Required.""" + + +class LinkedAccessCheck(TypedDict, total=False): + """LinkedAccessCheck. + + :ivar action_name: The action name. + :vartype action_name: str + :ivar linked_property: The linked property. + :vartype linked_property: str + :ivar linked_action: The linked action. + :vartype linked_action: str + :ivar linked_action_verb: The linked action verb. + :vartype linked_action_verb: str + :ivar linked_type: The linked type. + :vartype linked_type: str + """ + + actionName: str + """The action name.""" + linkedProperty: str + """The linked property.""" + linkedAction: str + """The linked action.""" + linkedActionVerb: str + """The linked action verb.""" + linkedType: str + """The linked type.""" + + +class LinkedNotificationRule(TypedDict, total=False): + """LinkedNotificationRule. + + :ivar actions: The actions. + :vartype actions: list[str] + :ivar actions_on_failed_operation: The actions on failed operation. + :vartype actions_on_failed_operation: list[str] + :ivar fast_path_actions: The fast path actions. + :vartype fast_path_actions: list[str] + :ivar fast_path_actions_on_failed_operation: The fast path action on failed operation. + :vartype fast_path_actions_on_failed_operation: list[str] + :ivar linked_notification_timeout: This is a TimeSpan property. + :vartype linked_notification_timeout: str + """ + + actions: list[str] + """The actions.""" + actionsOnFailedOperation: list[str] + """The actions on failed operation.""" + fastPathActions: list[str] + """The fast path actions.""" + fastPathActionsOnFailedOperation: list[str] + """The fast path action on failed operation.""" + linkedNotificationTimeout: str + """This is a TimeSpan property.""" + + +class LinkedOperationRule(TypedDict, total=False): + """LinkedOperationRule. + + :ivar linked_operation: The linked operation. Required. Known values are: "None", + "CrossResourceGroupResourceMove", and "CrossSubscriptionResourceMove". + :vartype linked_operation: Union[str, "LinkedOperation"] + :ivar linked_action: The linked action. Required. Known values are: "NotSpecified", "Blocked", + "Validate", and "Enabled". + :vartype linked_action: Union[str, "LinkedAction"] + :ivar depends_on_types: Depends on types. + :vartype depends_on_types: list[str] + """ + + linkedOperation: Required[Union[str, "LinkedOperation"]] + """The linked operation. Required. Known values are: \"None\", \"CrossResourceGroupResourceMove\", + and \"CrossSubscriptionResourceMove\".""" + linkedAction: Required[Union[str, "LinkedAction"]] + """The linked action. Required. Known values are: \"NotSpecified\", \"Blocked\", \"Validate\", and + \"Enabled\".""" + dependsOnTypes: list[str] + """Depends on types.""" + + +class LocalizedOperationDefinition(TypedDict, total=False): + """LocalizedOperationDefinition. + + :ivar name: Name of the operation. Required. + :vartype name: str + :ivar is_data_action: Indicates whether the operation applies to data-plane. + :vartype is_data_action: bool + :ivar origin: The origin. Known values are: "NotSpecified", "User", and "System". + :vartype origin: Union[str, "OperationOrigins"] + :ivar display: Display information of the operation. Required. + :vartype display: "LocalizedOperationDefinitionDisplay" + :ivar action_type: The action type. Known values are: "NotSpecified" and "Internal". + :vartype action_type: Union[str, "OperationActionType"] + """ + + name: Required[str] + """Name of the operation. Required.""" + isDataAction: bool + """Indicates whether the operation applies to data-plane.""" + origin: Union[str, "OperationOrigins"] + """The origin. Known values are: \"NotSpecified\", \"User\", and \"System\".""" + display: Required["LocalizedOperationDefinitionDisplay"] + """Display information of the operation. Required.""" + actionType: Union[str, "OperationActionType"] + """The action type. Known values are: \"NotSpecified\" and \"Internal\".""" + + +class LocalizedOperationDisplayDefinition(TypedDict, total=False): + """LocalizedOperationDisplayDefinition. + + :ivar default: Display information of the operation. Required. + :vartype default: "LocalizedOperationDisplayDefinitionDefault" + :ivar en: Display information of the operation for en locale. + :vartype en: "LocalizedOperationDisplayDefinitionEn" + :ivar cs: Display information of the operation for cs locale. + :vartype cs: "LocalizedOperationDisplayDefinitionCs" + :ivar de: Display information of the operation for de locale. + :vartype de: "LocalizedOperationDisplayDefinitionDe" + :ivar es: Display information of the operation for es locale. + :vartype es: "LocalizedOperationDisplayDefinitionEs" + :ivar fr: Display information of the operation for fr locale. + :vartype fr: "LocalizedOperationDisplayDefinitionFr" + :ivar hu: Display information of the operation for hu locale. + :vartype hu: "LocalizedOperationDisplayDefinitionHu" + :ivar it: Display information of the operation for it locale. + :vartype it: "LocalizedOperationDisplayDefinitionIt" + :ivar ja: Display information of the operation for ja locale. + :vartype ja: "LocalizedOperationDisplayDefinitionJa" + :ivar ko: Display information of the operation for ko locale. + :vartype ko: "LocalizedOperationDisplayDefinitionKo" + :ivar nl: Display information of the operation for nl locale. + :vartype nl: "LocalizedOperationDisplayDefinitionNl" + :ivar pl: Display information of the operation for pl locale. + :vartype pl: "LocalizedOperationDisplayDefinitionPl" + :ivar pt_br: Display information of the operation for pt-BR locale. + :vartype pt_br: "LocalizedOperationDisplayDefinitionPtBR" + :ivar pt_pt: Display information of the operation for pt-PT locale. + :vartype pt_pt: "LocalizedOperationDisplayDefinitionPtPT" + :ivar ru: Display information of the operation for ru locale. + :vartype ru: "LocalizedOperationDisplayDefinitionRu" + :ivar sv: Display information of the operation for sv locale. + :vartype sv: "LocalizedOperationDisplayDefinitionSv" + :ivar zh_hans: Display information of the operation for zh-Hans locale. + :vartype zh_hans: "LocalizedOperationDisplayDefinitionZhHans" + :ivar zh_hant: Display information of the operation for zh-Hant locale. + :vartype zh_hant: "LocalizedOperationDisplayDefinitionZhHant" + """ + + default: Required["LocalizedOperationDisplayDefinitionDefault"] + """Display information of the operation. Required.""" + en: "LocalizedOperationDisplayDefinitionEn" + """Display information of the operation for en locale.""" + cs: "LocalizedOperationDisplayDefinitionCs" + """Display information of the operation for cs locale.""" + de: "LocalizedOperationDisplayDefinitionDe" + """Display information of the operation for de locale.""" + es: "LocalizedOperationDisplayDefinitionEs" + """Display information of the operation for es locale.""" + fr: "LocalizedOperationDisplayDefinitionFr" + """Display information of the operation for fr locale.""" + hu: "LocalizedOperationDisplayDefinitionHu" + """Display information of the operation for hu locale.""" + it: "LocalizedOperationDisplayDefinitionIt" + """Display information of the operation for it locale.""" + ja: "LocalizedOperationDisplayDefinitionJa" + """Display information of the operation for ja locale.""" + ko: "LocalizedOperationDisplayDefinitionKo" + """Display information of the operation for ko locale.""" + nl: "LocalizedOperationDisplayDefinitionNl" + """Display information of the operation for nl locale.""" + pl: "LocalizedOperationDisplayDefinitionPl" + """Display information of the operation for pl locale.""" + ptBR: "LocalizedOperationDisplayDefinitionPtBR" + """Display information of the operation for pt-BR locale.""" + ptPT: "LocalizedOperationDisplayDefinitionPtPT" + """Display information of the operation for pt-PT locale.""" + ru: "LocalizedOperationDisplayDefinitionRu" + """Display information of the operation for ru locale.""" + sv: "LocalizedOperationDisplayDefinitionSv" + """Display information of the operation for sv locale.""" + zhHans: "LocalizedOperationDisplayDefinitionZhHans" + """Display information of the operation for zh-Hans locale.""" + zhHant: "LocalizedOperationDisplayDefinitionZhHant" + """Display information of the operation for zh-Hant locale.""" + + +class LocalizedOperationDefinitionDisplay(LocalizedOperationDisplayDefinition): + """Display information of the operation. + + :ivar default: Display information of the operation. Required. + :vartype default: "LocalizedOperationDisplayDefinitionDefault" + :ivar en: Display information of the operation for en locale. + :vartype en: "LocalizedOperationDisplayDefinitionEn" + :ivar cs: Display information of the operation for cs locale. + :vartype cs: "LocalizedOperationDisplayDefinitionCs" + :ivar de: Display information of the operation for de locale. + :vartype de: "LocalizedOperationDisplayDefinitionDe" + :ivar es: Display information of the operation for es locale. + :vartype es: "LocalizedOperationDisplayDefinitionEs" + :ivar fr: Display information of the operation for fr locale. + :vartype fr: "LocalizedOperationDisplayDefinitionFr" + :ivar hu: Display information of the operation for hu locale. + :vartype hu: "LocalizedOperationDisplayDefinitionHu" + :ivar it: Display information of the operation for it locale. + :vartype it: "LocalizedOperationDisplayDefinitionIt" + :ivar ja: Display information of the operation for ja locale. + :vartype ja: "LocalizedOperationDisplayDefinitionJa" + :ivar ko: Display information of the operation for ko locale. + :vartype ko: "LocalizedOperationDisplayDefinitionKo" + :ivar nl: Display information of the operation for nl locale. + :vartype nl: "LocalizedOperationDisplayDefinitionNl" + :ivar pl: Display information of the operation for pl locale. + :vartype pl: "LocalizedOperationDisplayDefinitionPl" + :ivar pt_br: Display information of the operation for pt-BR locale. + :vartype pt_br: "LocalizedOperationDisplayDefinitionPtBR" + :ivar pt_pt: Display information of the operation for pt-PT locale. + :vartype pt_pt: "LocalizedOperationDisplayDefinitionPtPT" + :ivar ru: Display information of the operation for ru locale. + :vartype ru: "LocalizedOperationDisplayDefinitionRu" + :ivar sv: Display information of the operation for sv locale. + :vartype sv: "LocalizedOperationDisplayDefinitionSv" + :ivar zh_hans: Display information of the operation for zh-Hans locale. + :vartype zh_hans: "LocalizedOperationDisplayDefinitionZhHans" + :ivar zh_hant: Display information of the operation for zh-Hant locale. + :vartype zh_hant: "LocalizedOperationDisplayDefinitionZhHant" + """ + + +class OperationsDisplayDefinition(TypedDict, total=False): + """OperationsDisplayDefinition. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + provider: Required[str] + """The provider. Required.""" + resource: Required[str] + """The resource. Required.""" + operation: Required[str] + """The operation. Required.""" + description: Required[str] + """The description. Required.""" + + +class LocalizedOperationDisplayDefinitionCs(OperationsDisplayDefinition): + """Display information of the operation for cs locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionDe(OperationsDisplayDefinition): + """Display information of the operation for de locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionDefault(OperationsDisplayDefinition): # pylint: disable=name-too-long + """Display information of the operation. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionEn(OperationsDisplayDefinition): + """Display information of the operation for en locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionEs(OperationsDisplayDefinition): + """Display information of the operation for es locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionFr(OperationsDisplayDefinition): + """Display information of the operation for fr locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionHu(OperationsDisplayDefinition): + """Display information of the operation for hu locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionIt(OperationsDisplayDefinition): + """Display information of the operation for it locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionJa(OperationsDisplayDefinition): + """Display information of the operation for ja locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionKo(OperationsDisplayDefinition): + """Display information of the operation for ko locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionNl(OperationsDisplayDefinition): + """Display information of the operation for nl locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionPl(OperationsDisplayDefinition): + """Display information of the operation for pl locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionPtBR(OperationsDisplayDefinition): + """Display information of the operation for pt-BR locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionPtPT(OperationsDisplayDefinition): + """Display information of the operation for pt-PT locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionRu(OperationsDisplayDefinition): + """Display information of the operation for ru locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionSv(OperationsDisplayDefinition): + """Display information of the operation for sv locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionZhHans(OperationsDisplayDefinition): # pylint: disable=name-too-long + """Display information of the operation for zh-Hans locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocalizedOperationDisplayDefinitionZhHant(OperationsDisplayDefinition): # pylint: disable=name-too-long + """Display information of the operation for zh-Hant locale. + + :ivar provider: The provider. Required. + :vartype provider: str + :ivar resource: The resource. Required. + :vartype resource: str + :ivar operation: The operation. Required. + :vartype operation: str + :ivar description: The description. Required. + :vartype description: str + """ + + +class LocationQuotaRule(TypedDict, total=False): + """LocationQuotaRule. + + :ivar policy: The policy. Known values are: "Default", "None", and "Restricted". + :vartype policy: Union[str, "QuotaPolicy"] + :ivar quota_id: The quota id. + :vartype quota_id: str + :ivar location: The location. + :vartype location: str + """ + + policy: Union[str, "QuotaPolicy"] + """The policy. Known values are: \"Default\", \"None\", and \"Restricted\".""" + quotaId: str + """The quota id.""" + location: str + """The location.""" + + +class LoggingHiddenPropertyPath(TypedDict, total=False): + """LoggingHiddenPropertyPath. + + :ivar hidden_paths_on_request: The hidden paths on request. + :vartype hidden_paths_on_request: list[str] + :ivar hidden_paths_on_response: The hidden paths on response. + :vartype hidden_paths_on_response: list[str] + """ + + hiddenPathsOnRequest: list[str] + """The hidden paths on request.""" + hiddenPathsOnResponse: list[str] + """The hidden paths on response.""" + + +class LoggingRule(TypedDict, total=False): + """LoggingRule. + + :ivar action: The action. Required. + :vartype action: str + :ivar direction: The direction. Required. Known values are: "None", "Request", and "Response". + :vartype direction: Union[str, "LoggingDirections"] + :ivar detail_level: The detail level. Required. Known values are: "None" and "Body". + :vartype detail_level: Union[str, "LoggingDetails"] + :ivar hidden_property_paths: The hidden property paths. + :vartype hidden_property_paths: "LoggingRuleHiddenPropertyPaths" + """ + + action: Required[str] + """The action. Required.""" + direction: Required[Union[str, "LoggingDirections"]] + """The direction. Required. Known values are: \"None\", \"Request\", and \"Response\".""" + detailLevel: Required[Union[str, "LoggingDetails"]] + """The detail level. Required. Known values are: \"None\" and \"Body\".""" + hiddenPropertyPaths: "LoggingRuleHiddenPropertyPaths" + """The hidden property paths.""" + + +class LoggingRuleHiddenPropertyPaths(LoggingHiddenPropertyPath): + """The hidden property paths. + + :ivar hidden_paths_on_request: The hidden paths on request. + :vartype hidden_paths_on_request: list[str] + :ivar hidden_paths_on_response: The hidden paths on response. + :vartype hidden_paths_on_response: list[str] + """ + + +class Notification(TypedDict, total=False): + """Notification. + + :ivar notification_type: The notification type. Known values are: "Unspecified" and + "SubscriptionNotification". + :vartype notification_type: Union[str, "NotificationType"] + :ivar skip_notifications: Whether notifications should be skipped. Known values are: + "Unspecified", "Enabled", and "Disabled". + :vartype skip_notifications: Union[str, "SkipNotifications"] + """ + + notificationType: Union[str, "NotificationType"] + """The notification type. Known values are: \"Unspecified\" and \"SubscriptionNotification\".""" + skipNotifications: Union[str, "SkipNotifications"] + """Whether notifications should be skipped. Known values are: \"Unspecified\", \"Enabled\", and + \"Disabled\".""" + + +class NotificationEndpoint(TypedDict, total=False): + """NotificationEndpoint. + + :ivar notification_destination: The notification destination. + :vartype notification_destination: str + :ivar locations: The locations. + :vartype locations: list[str] + """ + + notificationDestination: str + """The notification destination.""" + locations: list[str] + """The locations.""" + + +class NotificationRegistration(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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: "SystemData" + :ivar properties: + :vartype properties: "NotificationRegistrationProperties" + """ + + properties: "NotificationRegistrationProperties" + + +class NotificationRegistrationProperties(TypedDict, total=False): + """NotificationRegistrationProperties. + + :ivar notification_mode: The notification mode. Known values are: "NotSpecified", "EventHub", + and "WebHook". + :vartype notification_mode: Union[str, "NotificationMode"] + :ivar message_scope: The message scope. Known values are: "NotSpecified" and + "RegisteredSubscriptions". + :vartype message_scope: Union[str, "MessageScope"] + :ivar included_events: The included events. + :vartype included_events: list[str] + :ivar notification_endpoints: The notification endpoints. + :vartype notification_endpoints: list["NotificationEndpoint"] + :ivar provisioning_state: The provisioned state of the resource. Known values are: + "NotSpecified", "Accepted", "Running", "Creating", "Created", "Deleting", "Deleted", + "Canceled", "Failed", "Succeeded", "MovingResources", "TransientFailure", and + "RolloutInProgress". + :vartype provisioning_state: Union[str, "ProvisioningState"] + """ + + notificationMode: Union[str, "NotificationMode"] + """The notification mode. Known values are: \"NotSpecified\", \"EventHub\", and \"WebHook\".""" + messageScope: Union[str, "MessageScope"] + """The message scope. Known values are: \"NotSpecified\" and \"RegisteredSubscriptions\".""" + includedEvents: list[str] + """The included events.""" + notificationEndpoints: list["NotificationEndpoint"] + """The notification endpoints.""" + provisioningState: Union[str, "ProvisioningState"] + """The provisioned state of the resource. Known values are: \"NotSpecified\", \"Accepted\", + \"Running\", \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", + \"Succeeded\", \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + + +class OpenApiConfiguration(TypedDict, total=False): + """OpenApiConfiguration. + + :ivar validation: The open api validation. + :vartype validation: "OpenApiValidation" + """ + + validation: "OpenApiValidation" + """The open api validation.""" + + +class OpenApiValidation(TypedDict, total=False): + """OpenApiValidation. + + :ivar allow_noncompliant_collection_response: Indicates whether a non compliance response is + allowed for a LIST call. + :vartype allow_noncompliant_collection_response: bool + """ + + allowNoncompliantCollectionResponse: bool + """Indicates whether a non compliance response is allowed for a LIST call.""" + + +class OperationsContentProperties(TypedDict, total=False): + """OperationsContentProperties. + + :ivar contents: Operations content. + :vartype contents: list["LocalizedOperationDefinition"] + """ + + contents: list["LocalizedOperationDefinition"] + """Operations content.""" + + +class OperationsPutContent(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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: "SystemData" + :ivar properties: + :vartype properties: "OperationsPutContentProperties" + """ + + properties: "OperationsPutContentProperties" + + +class OperationsPutContentProperties(OperationsContentProperties): + """OperationsPutContentProperties. + + :ivar contents: Operations content. + :vartype contents: list["LocalizedOperationDefinition"] + """ + + +class PrivateResourceProviderConfiguration(TypedDict, total=False): + """PrivateResourceProviderConfiguration. + + :ivar allowed_subscriptions: The allowed subscriptions. + :vartype allowed_subscriptions: list[str] + """ + + allowedSubscriptions: list[str] + """The allowed subscriptions.""" + + +class ProviderHubMetadata(TypedDict, total=False): + """ProviderHubMetadata. + + :ivar provider_authorizations: The provider authorizations. + :vartype provider_authorizations: list["ResourceProviderAuthorization"] + :ivar provider_authentication: The provider authentication. + :vartype provider_authentication: "ProviderHubMetadataProviderAuthentication" + :ivar third_party_provider_authorization: The third party provider authorization. + :vartype third_party_provider_authorization: + "ProviderHubMetadataThirdPartyProviderAuthorization" + :ivar direct_rp_role_definition_id: The direct RP role definition id. + :vartype direct_rp_role_definition_id: str + :ivar regional_async_operation_resource_type_name: The regional async operation resource type + name. + :vartype regional_async_operation_resource_type_name: str + :ivar global_async_operation_resource_type_name: The global async operation resource type name. + :vartype global_async_operation_resource_type_name: str + """ + + providerAuthorizations: list["ResourceProviderAuthorization"] + """The provider authorizations.""" + providerAuthentication: "ProviderHubMetadataProviderAuthentication" + """The provider authentication.""" + thirdPartyProviderAuthorization: "ProviderHubMetadataThirdPartyProviderAuthorization" + """The third party provider authorization.""" + directRpRoleDefinitionId: str + """The direct RP role definition id.""" + regionalAsyncOperationResourceTypeName: str + """The regional async operation resource type name.""" + globalAsyncOperationResourceTypeName: str + """The global async operation resource type name.""" + + +class ResourceProviderAuthentication(TypedDict, total=False): + """ResourceProviderAuthentication. + + :ivar allowed_audiences: The allowed audiences. Required. + :vartype allowed_audiences: list[str] + """ + + allowedAudiences: Required[list[str]] + """The allowed audiences. Required.""" + + +class ProviderHubMetadataProviderAuthentication(ResourceProviderAuthentication): # pylint: disable=name-too-long + """The provider authentication. + + :ivar allowed_audiences: The allowed audiences. Required. + :vartype allowed_audiences: list[str] + """ + + +class ThirdPartyProviderAuthorization(TypedDict, total=False): + """ThirdPartyProviderAuthorization. + + :ivar authorizations: The authorizations. + :vartype authorizations: list["LightHouseAuthorization"] + :ivar managed_by_tenant_id: The managed by tenant id. + :vartype managed_by_tenant_id: str + """ + + authorizations: list["LightHouseAuthorization"] + """The authorizations.""" + managedByTenantId: str + """The managed by tenant id.""" + + +class ProviderHubMetadataThirdPartyProviderAuthorization( + ThirdPartyProviderAuthorization +): # pylint: disable=name-too-long + """The third party provider authorization. + + :ivar authorizations: The authorizations. + :vartype authorizations: list["LightHouseAuthorization"] + :ivar managed_by_tenant_id: The managed by tenant id. + :vartype managed_by_tenant_id: str + """ + + +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: "SystemData" + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: dict[str, str] + """Resource tags.""" + location: Required[str] + """The geo-location where the resource lives. Required.""" + + +class ProviderMonitorSetting(TrackedResource): + """Concrete tracked resource types can be created by aliasing this type using a specific property + type. + + :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: "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: + :vartype properties: "ProviderMonitorSettingProperties" + """ + + properties: "ProviderMonitorSettingProperties" + + +class ProviderMonitorSettingProperties(TypedDict, total=False): + """ProviderMonitorSettingProperties. + + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: Union[str, "ProvisioningState"] + """ + + provisioningState: Union[str, "ProvisioningState"] + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + + +class ResourceProviderManifestProperties(TypedDict, total=False): + """ResourceProviderManifestProperties. + + :ivar provider_authentication: The provider authentication. + :vartype provider_authentication: "ResourceProviderManifestPropertiesProviderAuthentication" + :ivar provider_authorizations: The provider authorizations. + :vartype provider_authorizations: list["ResourceProviderAuthorization"] + :ivar namespace: The namespace. + :vartype namespace: str + :ivar services: The services. + :vartype services: list["ResourceProviderService"] + :ivar service_name: The service name. + :vartype service_name: str + :ivar provider_version: The provider version. + :vartype provider_version: str + :ivar provider_type: The provider type. Known values are: "NotSpecified", "Internal", + "External", "Hidden", "RegistrationFree", "LegacyRegistrationRequired", "TenantOnly", and + "AuthorizationFree". + :vartype provider_type: Union[str, "ResourceProviderType"] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: "ResourceProviderManifestPropertiesFeaturesRule" + :ivar request_header_options: The request header options. + :vartype request_header_options: "ResourceProviderManifestPropertiesRequestHeaderOptions" + :ivar management: The resource provider management. + :vartype management: "ResourceProviderManifestPropertiesManagement" + :ivar capabilities: The capabilities. + :vartype capabilities: list["ResourceProviderCapabilities"] + :ivar cross_tenant_token_validation: The cross tenant token validation. Known values are: + "EnsureSecureValidation" and "PassthroughInsecureToken". + :vartype cross_tenant_token_validation: Union[str, "CrossTenantTokenValidation"] + :ivar metadata: The metadata. + :vartype metadata: Any + :ivar template_deployment_options: The template deployment options. + :vartype template_deployment_options: + "ResourceProviderManifestPropertiesTemplateDeploymentOptions" + :ivar global_notification_endpoints: The global notification endpoints. + :vartype global_notification_endpoints: list["ResourceProviderEndpoint"] + :ivar enable_tenant_linked_notification: The enable tenant linked notification. + :vartype enable_tenant_linked_notification: bool + :ivar notifications: The notifications. + :vartype notifications: list["Notification"] + :ivar linked_notification_rules: The linked notification rules. + :vartype linked_notification_rules: list["FanoutLinkedNotificationRule"] + :ivar resource_provider_authorization_rules: The resource provider authorization rules. + :vartype resource_provider_authorization_rules: "ResourceProviderAuthorizationRules" + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: "ResourceProviderManifestPropertiesDstsConfiguration" + :ivar notification_options: Notification options. Known values are: "NotSpecified", "None", and + "EmitSpendingLimit". + :vartype notification_options: Union[str, "NotificationOptions"] + :ivar resource_hydration_accounts: resource hydration accounts. + :vartype resource_hydration_accounts: list["ResourceHydrationAccount"] + :ivar notification_settings: Notification settings. + :vartype notification_settings: "ResourceProviderManifestPropertiesNotificationSettings" + :ivar management_group_global_notification_endpoints: Management groups global notification + endpoints. + :vartype management_group_global_notification_endpoints: list["ResourceProviderEndpoint"] + :ivar optional_features: Optional features. + :vartype optional_features: list[str] + :ivar resource_group_lock_option_during_move: Resource group lock option during move. + :vartype resource_group_lock_option_during_move: + "ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove" + :ivar response_options: Response options. + :vartype response_options: "ResourceProviderManifestPropertiesResponseOptions" + :ivar legacy_namespace: Legacy namespace. + :vartype legacy_namespace: str + :ivar legacy_registrations: Legacy registrations. + :vartype legacy_registrations: list[str] + :ivar custom_manifest_version: Custom manifest version. + :vartype custom_manifest_version: str + """ + + providerAuthentication: "ResourceProviderManifestPropertiesProviderAuthentication" + """The provider authentication.""" + providerAuthorizations: list["ResourceProviderAuthorization"] + """The provider authorizations.""" + namespace: str + """The namespace.""" + services: list["ResourceProviderService"] + """The services.""" + serviceName: str + """The service name.""" + providerVersion: str + """The provider version.""" + providerType: Union[str, "ResourceProviderType"] + """The provider type. Known values are: \"NotSpecified\", \"Internal\", \"External\", \"Hidden\", + \"RegistrationFree\", \"LegacyRegistrationRequired\", \"TenantOnly\", and + \"AuthorizationFree\".""" + requiredFeatures: list[str] + """The required features.""" + featuresRule: "ResourceProviderManifestPropertiesFeaturesRule" + """The features rule.""" + requestHeaderOptions: "ResourceProviderManifestPropertiesRequestHeaderOptions" + """The request header options.""" + management: "ResourceProviderManifestPropertiesManagement" + """The resource provider management.""" + capabilities: list["ResourceProviderCapabilities"] + """The capabilities.""" + crossTenantTokenValidation: Union[str, "CrossTenantTokenValidation"] + """The cross tenant token validation. Known values are: \"EnsureSecureValidation\" and + \"PassthroughInsecureToken\".""" + metadata: Any + """The metadata.""" + templateDeploymentOptions: "ResourceProviderManifestPropertiesTemplateDeploymentOptions" + """The template deployment options.""" + globalNotificationEndpoints: list["ResourceProviderEndpoint"] + """The global notification endpoints.""" + enableTenantLinkedNotification: Optional[bool] + """The enable tenant linked notification.""" + notifications: list["Notification"] + """The notifications.""" + linkedNotificationRules: list["FanoutLinkedNotificationRule"] + """The linked notification rules.""" + resourceProviderAuthorizationRules: "ResourceProviderAuthorizationRules" + """The resource provider authorization rules.""" + dstsConfiguration: "ResourceProviderManifestPropertiesDstsConfiguration" + """The dsts configuration.""" + notificationOptions: Union[str, "NotificationOptions"] + """Notification options. Known values are: \"NotSpecified\", \"None\", and \"EmitSpendingLimit\".""" + resourceHydrationAccounts: list["ResourceHydrationAccount"] + """resource hydration accounts.""" + notificationSettings: "ResourceProviderManifestPropertiesNotificationSettings" + """Notification settings.""" + managementGroupGlobalNotificationEndpoints: list["ResourceProviderEndpoint"] + """Management groups global notification endpoints.""" + optionalFeatures: list[str] + """Optional features.""" + resourceGroupLockOptionDuringMove: "ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove" + """Resource group lock option during move.""" + responseOptions: "ResourceProviderManifestPropertiesResponseOptions" + """Response options.""" + legacyNamespace: str + """Legacy namespace.""" + legacyRegistrations: list[str] + """Legacy registrations.""" + customManifestVersion: str + """Custom manifest version.""" + + +class ProviderRegistrationProperties(ResourceProviderManifestProperties): + """ProviderRegistrationProperties. + + :ivar provider_authentication: The provider authentication. + :vartype provider_authentication: "ResourceProviderManifestPropertiesProviderAuthentication" + :ivar provider_authorizations: The provider authorizations. + :vartype provider_authorizations: list["ResourceProviderAuthorization"] + :ivar namespace: The namespace. + :vartype namespace: str + :ivar services: The services. + :vartype services: list["ResourceProviderService"] + :ivar service_name: The service name. + :vartype service_name: str + :ivar provider_version: The provider version. + :vartype provider_version: str + :ivar provider_type: The provider type. Known values are: "NotSpecified", "Internal", + "External", "Hidden", "RegistrationFree", "LegacyRegistrationRequired", "TenantOnly", and + "AuthorizationFree". + :vartype provider_type: Union[str, "ResourceProviderType"] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: "ResourceProviderManifestPropertiesFeaturesRule" + :ivar request_header_options: The request header options. + :vartype request_header_options: "ResourceProviderManifestPropertiesRequestHeaderOptions" + :ivar management: The resource provider management. + :vartype management: "ResourceProviderManifestPropertiesManagement" + :ivar capabilities: The capabilities. + :vartype capabilities: list["ResourceProviderCapabilities"] + :ivar cross_tenant_token_validation: The cross tenant token validation. Known values are: + "EnsureSecureValidation" and "PassthroughInsecureToken". + :vartype cross_tenant_token_validation: Union[str, "CrossTenantTokenValidation"] + :ivar metadata: The metadata. + :vartype metadata: Any + :ivar template_deployment_options: The template deployment options. + :vartype template_deployment_options: + "ResourceProviderManifestPropertiesTemplateDeploymentOptions" + :ivar global_notification_endpoints: The global notification endpoints. + :vartype global_notification_endpoints: list["ResourceProviderEndpoint"] + :ivar enable_tenant_linked_notification: The enable tenant linked notification. + :vartype enable_tenant_linked_notification: bool + :ivar notifications: The notifications. + :vartype notifications: list["Notification"] + :ivar linked_notification_rules: The linked notification rules. + :vartype linked_notification_rules: list["FanoutLinkedNotificationRule"] + :ivar resource_provider_authorization_rules: The resource provider authorization rules. + :vartype resource_provider_authorization_rules: "ResourceProviderAuthorizationRules" + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: "ResourceProviderManifestPropertiesDstsConfiguration" + :ivar notification_options: Notification options. Known values are: "NotSpecified", "None", and + "EmitSpendingLimit". + :vartype notification_options: Union[str, "NotificationOptions"] + :ivar resource_hydration_accounts: resource hydration accounts. + :vartype resource_hydration_accounts: list["ResourceHydrationAccount"] + :ivar notification_settings: Notification settings. + :vartype notification_settings: "ResourceProviderManifestPropertiesNotificationSettings" + :ivar management_group_global_notification_endpoints: Management groups global notification + endpoints. + :vartype management_group_global_notification_endpoints: list["ResourceProviderEndpoint"] + :ivar optional_features: Optional features. + :vartype optional_features: list[str] + :ivar resource_group_lock_option_during_move: Resource group lock option during move. + :vartype resource_group_lock_option_during_move: + "ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove" + :ivar response_options: Response options. + :vartype response_options: "ResourceProviderManifestPropertiesResponseOptions" + :ivar legacy_namespace: Legacy namespace. + :vartype legacy_namespace: str + :ivar legacy_registrations: Legacy registrations. + :vartype legacy_registrations: list[str] + :ivar custom_manifest_version: Custom manifest version. + :vartype custom_manifest_version: str + :ivar provider_hub_metadata: The provider hub metadata. + :vartype provider_hub_metadata: "ProviderRegistrationPropertiesProviderHubMetadata" + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: Union[str, "ProvisioningState"] + :ivar subscription_lifecycle_notification_specifications: The subscription lifecycle + notification specifications. + :vartype subscription_lifecycle_notification_specifications: + "ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications" + :ivar private_resource_provider_configuration: The private resource provider configuration. + :vartype private_resource_provider_configuration: + "ProviderRegistrationPropertiesPrivateResourceProviderConfiguration" + :ivar token_auth_configuration: The token auth configuration. + :vartype token_auth_configuration: "TokenAuthConfiguration" + """ + + providerHubMetadata: "ProviderRegistrationPropertiesProviderHubMetadata" + """The provider hub metadata.""" + provisioningState: Union[str, "ProvisioningState"] + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + subscriptionLifecycleNotificationSpecifications: ( + "ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications" + ) + """The subscription lifecycle notification specifications.""" + privateResourceProviderConfiguration: "ProviderRegistrationPropertiesPrivateResourceProviderConfiguration" + """The private resource provider configuration.""" + tokenAuthConfiguration: "TokenAuthConfiguration" + """The token auth configuration.""" + + +class ProviderRegistrationPropertiesPrivateResourceProviderConfiguration( + PrivateResourceProviderConfiguration +): # pylint: disable=name-too-long + """The private resource provider configuration. + + :ivar allowed_subscriptions: The allowed subscriptions. + :vartype allowed_subscriptions: list[str] + """ + + +class ProviderRegistrationPropertiesProviderHubMetadata(ProviderHubMetadata): # pylint: disable=name-too-long + """The provider hub metadata. + + :ivar provider_authorizations: The provider authorizations. + :vartype provider_authorizations: list["ResourceProviderAuthorization"] + :ivar provider_authentication: The provider authentication. + :vartype provider_authentication: "ProviderHubMetadataProviderAuthentication" + :ivar third_party_provider_authorization: The third party provider authorization. + :vartype third_party_provider_authorization: + "ProviderHubMetadataThirdPartyProviderAuthorization" + :ivar direct_rp_role_definition_id: The direct RP role definition id. + :vartype direct_rp_role_definition_id: str + :ivar regional_async_operation_resource_type_name: The regional async operation resource type + name. + :vartype regional_async_operation_resource_type_name: str + :ivar global_async_operation_resource_type_name: The global async operation resource type name. + :vartype global_async_operation_resource_type_name: str + """ + + +class SubscriptionLifecycleNotificationSpecifications(TypedDict, total=False): # pylint: disable=name-too-long + """SubscriptionLifecycleNotificationSpecifications. + + :ivar subscription_state_override_actions: The subscription state override actions. + :vartype subscription_state_override_actions: list["SubscriptionStateOverrideAction"] + :ivar soft_delete_ttl: The soft delete TTL. + :vartype soft_delete_ttl: str + """ + + subscriptionStateOverrideActions: list["SubscriptionStateOverrideAction"] + """The subscription state override actions.""" + softDeleteTTL: str + """The soft delete TTL.""" + + +class ProviderRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications( + SubscriptionLifecycleNotificationSpecifications +): # pylint: disable=name-too-long + """The subscription lifecycle notification specifications. + + :ivar subscription_state_override_actions: The subscription state override actions. + :vartype subscription_state_override_actions: list["SubscriptionStateOverrideAction"] + :ivar soft_delete_ttl: The soft delete TTL. + :vartype soft_delete_ttl: str + """ + + +class QuotaRule(TypedDict, total=False): + """QuotaRule. + + :ivar quota_policy: The quota policy. Known values are: "Default", "None", and "Restricted". + :vartype quota_policy: Union[str, "QuotaPolicy"] + :ivar location_rules: The location rules. + :vartype location_rules: list["LocationQuotaRule"] + :ivar required_features: The required features. + :vartype required_features: list[str] + """ + + quotaPolicy: Union[str, "QuotaPolicy"] + """The quota policy. Known values are: \"Default\", \"None\", and \"Restricted\".""" + locationRules: list["LocationQuotaRule"] + """The location rules.""" + requiredFeatures: list[str] + """The required features.""" + + +class RequestHeaderOptions(TypedDict, total=False): + """RequestHeaderOptions. + + :ivar opt_in_headers: The opt in headers. Known values are: "NotSpecified", "SignedUserToken", + "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership", + "PrivateLinkId", "PrivateLinkResourceId", "ManagementGroupAncestorsEncoded", + "PrivateLinkVnetTrafficTag", "ResourceGroupLocation", "ClientPrincipalNameEncoded", and + "MSIResourceIdEncoded". + :vartype opt_in_headers: Union[str, "OptInHeaderType"] + :ivar opt_out_headers: The opt out headers. Known values are: "NotSpecified" and + "SystemDataCreatedByLastModifiedBy". + :vartype opt_out_headers: Union[str, "OptOutHeaderType"] + """ + + optInHeaders: Union[str, "OptInHeaderType"] + """The opt in headers. Known values are: \"NotSpecified\", \"SignedUserToken\", + \"ClientGroupMembership\", \"SignedAuxiliaryTokens\", \"UnboundedClientGroupMembership\", + \"PrivateLinkId\", \"PrivateLinkResourceId\", \"ManagementGroupAncestorsEncoded\", + \"PrivateLinkVnetTrafficTag\", \"ResourceGroupLocation\", \"ClientPrincipalNameEncoded\", and + \"MSIResourceIdEncoded\".""" + optOutHeaders: Union[str, "OptOutHeaderType"] + """The opt out headers. Known values are: \"NotSpecified\" and + \"SystemDataCreatedByLastModifiedBy\".""" + + +class ResourceAccessRole(TypedDict, total=False): + """ResourceAccessRole. + + :ivar allowed_group_claims: The allowed group claims. + :vartype allowed_group_claims: list[str] + :ivar actions: The actions. + :vartype actions: list[str] + """ + + allowedGroupClaims: list[str] + """The allowed group claims.""" + actions: list[str] + """The actions.""" + + +class ResourceConcurrencyControlOption(TypedDict, total=False): + """ResourceConcurrencyControlOption. + + :ivar policy: The policy. Known values are: "NotSpecified" and "SynchronizeBeginExtension". + :vartype policy: Union[str, "Policy"] + """ + + policy: Union[str, "Policy"] + """The policy. Known values are: \"NotSpecified\" and \"SynchronizeBeginExtension\".""" + + +class ResourceGraphConfiguration(TypedDict, total=False): + """ResourceGraphConfiguration. + + :ivar enabled: Whether it's enabled. + :vartype enabled: bool + :ivar api_version: The api version. + :vartype api_version: str + """ + + enabled: bool + """Whether it's enabled.""" + apiVersion: str + """The api version.""" + + +class ResourceHydrationAccount(TypedDict, total=False): + """ResourceHydrationAccount. + + :ivar max_child_resource_consistency_job_limit: The max child resource consistency job limit. + :vartype max_child_resource_consistency_job_limit: int + :ivar encrypted_key: The encrypted key. + :vartype encrypted_key: str + :ivar account_name: The account name. + :vartype account_name: str + :ivar subscription_id: The subscription id. + :vartype subscription_id: str + """ + + maxChildResourceConsistencyJobLimit: int + """The max child resource consistency job limit.""" + encryptedKey: str + """The encrypted key.""" + accountName: str + """The account name.""" + subscriptionId: str + """The subscription id.""" + + +class ResourceManagementAction(TypedDict, total=False): + """ResourceManagementAction. + + :ivar resources: resource management action content. + :vartype resources: list["ResourceManagementEntity"] + """ + + resources: list["ResourceManagementEntity"] + """resource management action content.""" + + +class ResourceManagementEntity(TypedDict, total=False): + """ResourceManagementEntity. + + :ivar resource_id: The resource id. Required. + :vartype resource_id: str + :ivar home_tenant_id: The home tenant id. + :vartype home_tenant_id: str + :ivar location: The location. + :vartype location: str + :ivar status: The operation status. + :vartype status: str + """ + + resourceId: Required[str] + """The resource id. Required.""" + homeTenantId: str + """The home tenant id.""" + location: str + """The location.""" + status: str + """The operation status.""" + + +class ResourceMovePolicy(TypedDict, total=False): + """ResourceMovePolicy. + + :ivar validation_required: Whether validation is required. + :vartype validation_required: bool + :ivar cross_resource_group_move_enabled: Whether cross resource group move is enabled. + :vartype cross_resource_group_move_enabled: bool + :ivar cross_subscription_move_enabled: Whether cross subscription move is enabled. + :vartype cross_subscription_move_enabled: bool + """ + + validationRequired: bool + """Whether validation is required.""" + crossResourceGroupMoveEnabled: bool + """Whether cross resource group move is enabled.""" + crossSubscriptionMoveEnabled: bool + """Whether cross subscription move is enabled.""" + + +class ResourceProviderAuthorization(TypedDict, total=False): + """ResourceProviderAuthorization. + + :ivar application_id: The application id. + :vartype application_id: str + :ivar role_definition_id: The role definition id. + :vartype role_definition_id: str + :ivar managed_by_role_definition_id: The managed by role definition id. + :vartype managed_by_role_definition_id: str + :ivar managed_by_authorization: Managed by authorization. + :vartype managed_by_authorization: "ResourceProviderAuthorizationManagedByAuthorization" + :ivar allowed_third_party_extensions: The allowed third party extensions. + :vartype allowed_third_party_extensions: list["ThirdPartyExtension"] + :ivar grouping_tag: The grouping tag. + :vartype grouping_tag: str + """ + + applicationId: str + """The application id.""" + roleDefinitionId: str + """The role definition id.""" + managedByRoleDefinitionId: str + """The managed by role definition id.""" + managedByAuthorization: "ResourceProviderAuthorizationManagedByAuthorization" + """Managed by authorization.""" + allowedThirdPartyExtensions: list["ThirdPartyExtension"] + """The allowed third party extensions.""" + groupingTag: str + """The grouping tag.""" + + +class ResourceProviderAuthorizationManagedByAuthorization(TypedDict, total=False): # pylint: disable=name-too-long + """Managed by authorization. + + :ivar additional_authorizations: + :vartype additional_authorizations: list["AdditionalAuthorization"] + :ivar managed_by_resource_role_definition_id: The managed by resource role definition ID for + the application. + :vartype managed_by_resource_role_definition_id: str + :ivar allow_managed_by_inheritance: Indicates whether the managed by resource role definition + ID should be inherited. + :vartype allow_managed_by_inheritance: bool + """ + + additionalAuthorizations: list["AdditionalAuthorization"] + managedByResourceRoleDefinitionId: str + """The managed by resource role definition ID for the application.""" + allowManagedByInheritance: bool + """Indicates whether the managed by resource role definition ID should be inherited.""" + + +class ResourceProviderAuthorizationRules(TypedDict, total=False): + """ResourceProviderAuthorizationRules. + + :ivar async_operation_polling_rules: The async operation polling rules. + :vartype async_operation_polling_rules: "AsyncOperationPollingRules" + """ + + asyncOperationPollingRules: "AsyncOperationPollingRules" + """The async operation polling rules.""" + + +class ResourceProviderCapabilities(TypedDict, total=False): + """ResourceProviderCapabilities. + + :ivar quota_id: The quota id. Required. + :vartype quota_id: str + :ivar effect: The effect. Required. Known values are: "NotSpecified", "Allow", and "Disallow". + :vartype effect: Union[str, "ResourceProviderCapabilitiesEffect"] + :ivar required_features: The required features. + :vartype required_features: list[str] + """ + + quotaId: Required[str] + """The quota id. Required.""" + effect: Required[Union[str, "ResourceProviderCapabilitiesEffect"]] + """The effect. Required. Known values are: \"NotSpecified\", \"Allow\", and \"Disallow\".""" + requiredFeatures: list[str] + """The required features.""" + + +class ResourceProviderEndpoint(TypedDict, total=False): + """ResourceProviderEndpoint. + + :ivar enabled: Whether the endpoint is enabled. + :vartype enabled: bool + :ivar api_versions: The api versions. + :vartype api_versions: list[str] + :ivar endpoint_uri: The endpoint uri. + :vartype endpoint_uri: str + :ivar locations: The locations. + :vartype locations: list[str] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The feature rules. + :vartype features_rule: "ResourceProviderEndpointFeaturesRule" + :ivar timeout: The timeout. + :vartype timeout: str + :ivar endpoint_type: The endpoint type. Known values are: "NotSpecified", "Canary", + "Production", and "TestInProduction". + :vartype endpoint_type: Union[str, "EndpointType"] + :ivar sku_link: The sku link. + :vartype sku_link: str + """ + + enabled: bool + """Whether the endpoint is enabled.""" + apiVersions: list[str] + """The api versions.""" + endpointUri: str + """The endpoint uri.""" + locations: list[str] + """The locations.""" + requiredFeatures: list[str] + """The required features.""" + featuresRule: "ResourceProviderEndpointFeaturesRule" + """The feature rules.""" + timeout: str + """The timeout.""" + endpointType: Union[str, "EndpointType"] + """The endpoint type. Known values are: \"NotSpecified\", \"Canary\", \"Production\", and + \"TestInProduction\".""" + skuLink: str + """The sku link.""" + + +class ResourceProviderEndpointFeaturesRule(FeaturesRule): + """The feature rules. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: Union[str, "FeaturesPolicy"] + """ + + +class ResourceProviderManagement(TypedDict, total=False): + """ResourceProviderManagement. + + :ivar schema_owners: The schema owners. + :vartype schema_owners: list[str] + :ivar manifest_owners: The manifest owners. + :vartype manifest_owners: list[str] + :ivar authorization_owners: The authorization owners. + :vartype authorization_owners: list[str] + :ivar incident_routing_service: The incident routing service. + :vartype incident_routing_service: str + :ivar incident_routing_team: The incident routing team. + :vartype incident_routing_team: str + :ivar incident_contact_email: The incident contact email. + :vartype incident_contact_email: str + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list["ServiceTreeInfo"] + :ivar resource_access_policy: The resource access policy. Known values are: "NotSpecified", + "AcisReadAllowed", and "AcisActionAllowed". + :vartype resource_access_policy: Union[str, "ResourceAccessPolicy"] + :ivar resource_access_roles: The resource access roles. + :vartype resource_access_roles: list["ResourceAccessRole"] + :ivar expedited_rollout_submitters: List of expedited rollout submitters. + :vartype expedited_rollout_submitters: list[str] + :ivar error_response_message_options: Options for error response messages. + :vartype error_response_message_options: + "ResourceProviderManagementErrorResponseMessageOptions" + :ivar expedited_rollout_metadata: Metadata for expedited rollout. + :vartype expedited_rollout_metadata: "ResourceProviderManagementExpeditedRolloutMetadata" + :ivar canary_manifest_owners: List of manifest owners for canary. + :vartype canary_manifest_owners: list[str] + :ivar pc_code: The profit center code for the subscription. + :vartype pc_code: str + :ivar profit_center_program_id: The profit center program id for the subscription. + :vartype profit_center_program_id: str + """ + + schemaOwners: list[str] + """The schema owners.""" + manifestOwners: list[str] + """The manifest owners.""" + authorizationOwners: list[str] + """The authorization owners.""" + incidentRoutingService: str + """The incident routing service.""" + incidentRoutingTeam: str + """The incident routing team.""" + incidentContactEmail: str + """The incident contact email.""" + serviceTreeInfos: list["ServiceTreeInfo"] + """The service tree infos.""" + resourceAccessPolicy: Union[str, "ResourceAccessPolicy"] + """The resource access policy. Known values are: \"NotSpecified\", \"AcisReadAllowed\", and + \"AcisActionAllowed\".""" + resourceAccessRoles: list["ResourceAccessRole"] + """The resource access roles.""" + expeditedRolloutSubmitters: list[str] + """List of expedited rollout submitters.""" + errorResponseMessageOptions: "ResourceProviderManagementErrorResponseMessageOptions" + """Options for error response messages.""" + expeditedRolloutMetadata: "ResourceProviderManagementExpeditedRolloutMetadata" + """Metadata for expedited rollout.""" + canaryManifestOwners: list[str] + """List of manifest owners for canary.""" + pcCode: str + """The profit center code for the subscription.""" + profitCenterProgramId: str + """The profit center program id for the subscription.""" + + +class ResourceProviderManagementErrorResponseMessageOptions(TypedDict, total=False): # pylint: disable=name-too-long + """Options for error response messages. + + :ivar server_failure_response_message_type: Type of server failure response message. Known + values are: "NotSpecified" and "OutageReporting". + :vartype server_failure_response_message_type: Union[str, "ServerFailureResponseMessageType"] + """ + + serverFailureResponseMessageType: Union[str, "ServerFailureResponseMessageType"] + """Type of server failure response message. Known values are: \"NotSpecified\" and + \"OutageReporting\".""" + + +class ResourceProviderManagementExpeditedRolloutMetadata(TypedDict, total=False): # pylint: disable=name-too-long + """Metadata for expedited rollout. + + :ivar enabled: Expedited rollout enabled?. + :vartype enabled: bool + :ivar expedited_rollout_intent: Expedited rollout intent. Known values are: "NotSpecified" and + "Hotfix". + :vartype expedited_rollout_intent: Union[str, "ExpeditedRolloutIntent"] + """ + + enabled: bool + """Expedited rollout enabled?.""" + expeditedRolloutIntent: Union[str, "ExpeditedRolloutIntent"] + """Expedited rollout intent. Known values are: \"NotSpecified\" and \"Hotfix\".""" + + +class ResourceProviderManifestPropertiesDstsConfiguration(DstsConfiguration): # pylint: disable=name-too-long + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + +class ResourceProviderManifestPropertiesFeaturesRule(FeaturesRule): # pylint: disable=name-too-long + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: Union[str, "FeaturesPolicy"] + """ + + +class ResourceProviderManifestPropertiesManagement(ResourceProviderManagement): # pylint: disable=name-too-long + """The resource provider management. + + :ivar schema_owners: The schema owners. + :vartype schema_owners: list[str] + :ivar manifest_owners: The manifest owners. + :vartype manifest_owners: list[str] + :ivar authorization_owners: The authorization owners. + :vartype authorization_owners: list[str] + :ivar incident_routing_service: The incident routing service. + :vartype incident_routing_service: str + :ivar incident_routing_team: The incident routing team. + :vartype incident_routing_team: str + :ivar incident_contact_email: The incident contact email. + :vartype incident_contact_email: str + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list["ServiceTreeInfo"] + :ivar resource_access_policy: The resource access policy. Known values are: "NotSpecified", + "AcisReadAllowed", and "AcisActionAllowed". + :vartype resource_access_policy: Union[str, "ResourceAccessPolicy"] + :ivar resource_access_roles: The resource access roles. + :vartype resource_access_roles: list["ResourceAccessRole"] + :ivar expedited_rollout_submitters: List of expedited rollout submitters. + :vartype expedited_rollout_submitters: list[str] + :ivar error_response_message_options: Options for error response messages. + :vartype error_response_message_options: + "ResourceProviderManagementErrorResponseMessageOptions" + :ivar expedited_rollout_metadata: Metadata for expedited rollout. + :vartype expedited_rollout_metadata: "ResourceProviderManagementExpeditedRolloutMetadata" + :ivar canary_manifest_owners: List of manifest owners for canary. + :vartype canary_manifest_owners: list[str] + :ivar pc_code: The profit center code for the subscription. + :vartype pc_code: str + :ivar profit_center_program_id: The profit center program id for the subscription. + :vartype profit_center_program_id: str + """ + + +class ResourceProviderManifestPropertiesNotificationSettings(TypedDict, total=False): # pylint: disable=name-too-long + """Notification settings. + + :ivar subscriber_settings: + :vartype subscriber_settings: list["SubscriberSetting"] + """ + + subscriberSettings: list["SubscriberSetting"] + + +class ResourceProviderManifestPropertiesProviderAuthentication( + ResourceProviderAuthentication +): # pylint: disable=name-too-long + """The provider authentication. + + :ivar allowed_audiences: The allowed audiences. Required. + :vartype allowed_audiences: list[str] + """ + + +class ResourceProviderManifestPropertiesRequestHeaderOptions(RequestHeaderOptions): # pylint: disable=name-too-long + """The request header options. + + :ivar opt_in_headers: The opt in headers. Known values are: "NotSpecified", "SignedUserToken", + "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership", + "PrivateLinkId", "PrivateLinkResourceId", "ManagementGroupAncestorsEncoded", + "PrivateLinkVnetTrafficTag", "ResourceGroupLocation", "ClientPrincipalNameEncoded", and + "MSIResourceIdEncoded". + :vartype opt_in_headers: Union[str, "OptInHeaderType"] + :ivar opt_out_headers: The opt out headers. Known values are: "NotSpecified" and + "SystemDataCreatedByLastModifiedBy". + :vartype opt_out_headers: Union[str, "OptOutHeaderType"] + """ + + +class ResourceProviderManifestPropertiesResourceGroupLockOptionDuringMove( + TypedDict, total=False +): # pylint: disable=name-too-long + """Resource group lock option during move. + + :ivar block_action_verb: The action verb that will be blocked when the resource group is locked + during move. Known values are: "NotSpecified", "Read", "Write", "Action", "Delete", and + "Unrecognized". + :vartype block_action_verb: Union[str, "BlockActionVerb"] + """ + + blockActionVerb: Union[str, "BlockActionVerb"] + """The action verb that will be blocked when the resource group is locked during move. Known + values are: \"NotSpecified\", \"Read\", \"Write\", \"Action\", \"Delete\", and + \"Unrecognized\".""" + + +class ResourceProviderManifestPropertiesResponseOptions(TypedDict, total=False): # pylint: disable=name-too-long + """Response options. + + :ivar service_client_options_type: Known values are: "NotSpecified" and + "DisableAutomaticDecompression". + :vartype service_client_options_type: Union[str, "ServiceClientOptionsType"] + """ + + serviceClientOptionsType: Union[str, "ServiceClientOptionsType"] + """Known values are: \"NotSpecified\" and \"DisableAutomaticDecompression\".""" + + +class TemplateDeploymentOptions(TypedDict, total=False): + """TemplateDeploymentOptions. + + :ivar preflight_supported: Whether preflight is supported. + :vartype preflight_supported: bool + :ivar preflight_options: The preflight options. + :vartype preflight_options: list[Union[str, "PreflightOption"]] + """ + + preflightSupported: bool + """Whether preflight is supported.""" + preflightOptions: list[Union[str, "PreflightOption"]] + """The preflight options.""" + + +class ResourceProviderManifestPropertiesTemplateDeploymentOptions( + TemplateDeploymentOptions +): # pylint: disable=name-too-long + """The template deployment options. + + :ivar preflight_supported: Whether preflight is supported. + :vartype preflight_supported: bool + :ivar preflight_options: The preflight options. + :vartype preflight_options: list[Union[str, "PreflightOption"]] + """ + + +class ResourceProviderService(TypedDict, total=False): + """Resource provider service. + + :ivar service_name: The service name. + :vartype service_name: str + :ivar status: The status. Known values are: "Active" and "Inactive". + :vartype status: Union[str, "ServiceStatus"] + """ + + serviceName: str + """The service name.""" + status: Union[str, "ServiceStatus"] + """The status. Known values are: \"Active\" and \"Inactive\".""" + + +class ResourceTypeEndpoint(TypedDict, total=False): + """ResourceTypeEndpoint. + + :ivar kind: Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to + render different UX experiences for resources of the same type. Known values are: "Managed" and + "Direct". + :vartype kind: Union[str, "ResourceTypeEndpointKind"] + :ivar enabled: Whether the endpoint is enabled. + :vartype enabled: bool + :ivar api_versions: The api versions. + :vartype api_versions: list[str] + :ivar locations: The locations. + :vartype locations: list[str] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: "ResourceTypeEndpointFeaturesRule" + :ivar extensions: The extensions. + :vartype extensions: list["ResourceTypeExtension"] + :ivar timeout: The timeout. + :vartype timeout: str + :ivar endpoint_type: The endpoint type. Known values are: "NotSpecified", "Canary", + "Production", and "TestInProduction". + :vartype endpoint_type: Union[str, "EndpointTypeResourceType"] + :ivar token_auth_configuration: The token auth configuration. + :vartype token_auth_configuration: "TokenAuthConfiguration" + :ivar sku_link: The sku link. + :vartype sku_link: str + :ivar endpoint_uri: The endpoint uri. + :vartype endpoint_uri: str + :ivar api_version: Api version. + :vartype api_version: str + :ivar zones: List of zones. + :vartype zones: list[str] + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: "ResourceTypeEndpointDstsConfiguration" + :ivar data_boundary: The data boundary. Known values are: "NotDefined", "Global", "EU", and + "US". + :vartype data_boundary: Union[str, "DataBoundary"] + """ + + kind: Union[str, "ResourceTypeEndpointKind"] + """Resource type endpoint kind. This Metadata is also used by portal/tooling/etc to render + different UX experiences for resources of the same type. Known values are: \"Managed\" and + \"Direct\".""" + enabled: bool + """Whether the endpoint is enabled.""" + apiVersions: list[str] + """The api versions.""" + locations: list[str] + """The locations.""" + requiredFeatures: list[str] + """The required features.""" + featuresRule: "ResourceTypeEndpointFeaturesRule" + """The features rule.""" + extensions: list["ResourceTypeExtension"] + """The extensions.""" + timeout: str + """The timeout.""" + endpointType: Union[str, "EndpointTypeResourceType"] + """The endpoint type. Known values are: \"NotSpecified\", \"Canary\", \"Production\", and + \"TestInProduction\".""" + tokenAuthConfiguration: "TokenAuthConfiguration" + """The token auth configuration.""" + skuLink: str + """The sku link.""" + endpointUri: str + """The endpoint uri.""" + apiVersion: str + """Api version.""" + zones: list[str] + """List of zones.""" + dstsConfiguration: "ResourceTypeEndpointDstsConfiguration" + """The dsts configuration.""" + dataBoundary: Union[str, "DataBoundary"] + """The data boundary. Known values are: \"NotDefined\", \"Global\", \"EU\", and \"US\".""" + + +class ResourceTypeEndpointBaseDstsConfiguration(DstsConfiguration): # pylint: disable=name-too-long + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + +class ResourceTypeEndpointBaseFeaturesRule(FeaturesRule): + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: Union[str, "FeaturesPolicy"] + """ + + +class ResourceTypeEndpointDstsConfiguration(DstsConfiguration): + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + +class ResourceTypeEndpointFeaturesRule(FeaturesRule): + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: Union[str, "FeaturesPolicy"] + """ + + +class ResourceTypeExtension(TypedDict, total=False): + """ResourceTypeExtension. + + :ivar endpoint_uri: The endpoint uri. + :vartype endpoint_uri: str + :ivar extension_categories: The extension categories. + :vartype extension_categories: list[Union[str, "ExtensionCategory"]] + :ivar timeout: The timeout. + :vartype timeout: str + """ + + endpointUri: str + """The endpoint uri.""" + extensionCategories: list[Union[str, "ExtensionCategory"]] + """The extension categories.""" + timeout: str + """The timeout.""" + + +class ResourceTypeExtensionOptions(TypedDict, total=False): + """ResourceTypeExtensionOptions. + + :ivar resource_creation_begin: Resource creation begin. + :vartype resource_creation_begin: "ResourceTypeExtensionOptionsResourceCreationBegin" + """ + + resourceCreationBegin: "ResourceTypeExtensionOptionsResourceCreationBegin" + """Resource creation begin.""" + + +class ResourceTypeExtensionOptionsResourceCreationBegin(ExtensionOptions): # pylint: disable=name-too-long + """Resource creation begin. + + :ivar request: The request. + :vartype request: list[Union[str, "ExtensionOptionType"]] + :ivar response: The response. + :vartype response: list[Union[str, "ExtensionOptionType"]] + """ + + +class ResourceTypeOnBehalfOfToken(TypedDict, total=False): + """ResourceTypeOnBehalfOfToken. + + :ivar action_name: The action name. + :vartype action_name: str + :ivar life_time: This is a TimeSpan property. + :vartype life_time: str + """ + + actionName: str + """The action name.""" + lifeTime: str + """This is a TimeSpan property.""" + + +class ResourceTypeRegistration(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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: "SystemData" + :ivar properties: + :vartype properties: "ResourceTypeRegistrationProperties" + :ivar kind: Resource type registration kind. This Metadata is also used by portal/tooling/etc + to render different UX experiences for resources of the same type. Known values are: "Managed", + "Hybrid", and "Direct". + :vartype kind: Union[str, "ResourceTypeRegistrationKind"] + """ + + properties: "ResourceTypeRegistrationProperties" + kind: Union[str, "ResourceTypeRegistrationKind"] + """Resource type registration kind. This Metadata is also used by portal/tooling/etc to render + different UX experiences for resources of the same type. Known values are: \"Managed\", + \"Hybrid\", and \"Direct\".""" + + +class ResourceTypeRegistrationProperties(TypedDict, total=False): + """ResourceTypeRegistrationProperties. + + :ivar routing_type: The resource routing type. Known values are: "Default", "ProxyOnly", + "HostBased", "Extension", "Tenant", "Fanout", "LocationBased", "Failover", "CascadeExtension", + "ChildFanout", "CascadeAuthorizedExtension", "BypassEndpointSelectionOptimization", + "LocationMapping", and "ServiceFanout". + :vartype routing_type: Union[str, "RoutingType"] + :ivar additional_options: The additional options. Known values are: + "ProtectedAsyncOperationPolling" and "ProtectedAsyncOperationPollingAuditOnly". + :vartype additional_options: Union[str, "AdditionalOptionsResourceTypeRegistration"] + :ivar cross_tenant_token_validation: The cross tenant token validation. Known values are: + "EnsureSecureValidation" and "PassthroughInsecureToken". + :vartype cross_tenant_token_validation: Union[str, "CrossTenantTokenValidation"] + :ivar regionality: The regionality. Known values are: "NotSpecified", "Global", and "Regional". + :vartype regionality: Union[str, "Regionality"] + :ivar endpoints: The extensions. + :vartype endpoints: list["ResourceTypeEndpoint"] + :ivar extension_options: The extension options. + :vartype extension_options: "ResourceTypeRegistrationPropertiesExtensionOptions" + :ivar marketplace_type: The marketplace type. Known values are: "NotSpecified", "AddOn", + "Bypass", and "Store". + :vartype marketplace_type: Union[str, "MarketplaceType"] + :ivar swagger_specifications: The swagger specifications. + :vartype swagger_specifications: list["SwaggerSpecification"] + :ivar allowed_unauthorized_actions: The allowed unauthorized actions. + :vartype allowed_unauthorized_actions: list[str] + :ivar allowed_unauthorized_actions_extensions: The allowed unauthorized actions extensions. + :vartype allowed_unauthorized_actions_extensions: list["AllowedUnauthorizedActionsExtension"] + :ivar authorization_action_mappings: The authorization action mappings. + :vartype authorization_action_mappings: list["AuthorizationActionMapping"] + :ivar linked_access_checks: The linked access checks. + :vartype linked_access_checks: list["LinkedAccessCheck"] + :ivar default_api_version: The default api version. + :vartype default_api_version: str + :ivar logging_rules: The logging rules. + :vartype logging_rules: list["LoggingRule"] + :ivar throttling_rules: The throttling rules. + :vartype throttling_rules: list["ThrottlingRule"] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar features_rule: The features rule. + :vartype features_rule: "ResourceTypeRegistrationPropertiesFeaturesRule" + :ivar enable_async_operation: Whether async operation is enabled. + :vartype enable_async_operation: bool + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: Union[str, "ProvisioningState"] + :ivar enable_third_party_s2_s: Whether third party S2S is enabled. + :vartype enable_third_party_s2_s: bool + :ivar subscription_lifecycle_notification_specifications: The subscription lifecycle + notification specifications. + :vartype subscription_lifecycle_notification_specifications: + "ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications" + :ivar is_pure_proxy: Whether it is pure proxy. + :vartype is_pure_proxy: bool + :ivar identity_management: The identity management. + :vartype identity_management: "ResourceTypeRegistrationPropertiesIdentityManagement" + :ivar check_name_availability_specifications: The check name availability specifications. + :vartype check_name_availability_specifications: + "ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications" + :ivar disallowed_action_verbs: The disallowed action verbs. + :vartype disallowed_action_verbs: list[str] + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list["ServiceTreeInfo"] + :ivar request_header_options: The request header options. + :vartype request_header_options: "ResourceTypeRegistrationPropertiesRequestHeaderOptions" + :ivar subscription_state_rules: The subscription state rules. + :vartype subscription_state_rules: list["SubscriptionStateRule"] + :ivar template_deployment_options: The template deployment options. + :vartype template_deployment_options: + "ResourceTypeRegistrationPropertiesTemplateDeploymentOptions" + :ivar extended_locations: The extended locations. + :vartype extended_locations: list["ExtendedLocationOptions"] + :ivar resource_move_policy: The resource move policy. + :vartype resource_move_policy: "ResourceTypeRegistrationPropertiesResourceMovePolicy" + :ivar resource_deletion_policy: The resource deletion policy. Known values are: "NotSpecified", + "CascadeDeleteAll", and "CascadeDeleteProxyOnlyChildren". + :vartype resource_deletion_policy: Union[str, "ResourceDeletionPolicy"] + :ivar resource_concurrency_control_options: The resource concurrency control options. + :vartype resource_concurrency_control_options: dict[str, "ResourceConcurrencyControlOption"] + :ivar resource_graph_configuration: The resource graph configuration. + :vartype resource_graph_configuration: + "ResourceTypeRegistrationPropertiesResourceGraphConfiguration" + :ivar management: The resource provider management. + :vartype management: "ResourceTypeRegistrationPropertiesManagement" + :ivar open_api_configuration: The open api configuration. + :vartype open_api_configuration: "OpenApiConfiguration" + :ivar on_behalf_of_tokens: The on behalf of tokens. + :vartype on_behalf_of_tokens: "ResourceTypeOnBehalfOfToken" + :ivar category: The category. Known values are: "None", "FreeForm", "Internal", and + "PureProxy". + :vartype category: Union[str, "ResourceTypeCategory"] + :ivar resource_validation: The resource validation. Known values are: "NotSpecified", + "ReservedWords", and "ProfaneWords". + :vartype resource_validation: Union[str, "ResourceValidation"] + :ivar disallowed_end_user_operations: The disallowed end user operations. + :vartype disallowed_end_user_operations: list[str] + :ivar metadata: The metadata. + :vartype metadata: dict[str, Any] + :ivar sku_link: The sku link. + :vartype sku_link: str + :ivar quota_rule: The quota rule. + :vartype quota_rule: "QuotaRule" + :ivar notifications: The notifications. + :vartype notifications: list["Notification"] + :ivar linked_notification_rules: The linked notification rules. + :vartype linked_notification_rules: list["LinkedNotificationRule"] + :ivar resource_provider_authorization_rules: The resource provider authorization rules. + :vartype resource_provider_authorization_rules: "ResourceProviderAuthorizationRules" + :ivar token_auth_configuration: The token auth configuration. + :vartype token_auth_configuration: "TokenAuthConfiguration" + :ivar template_deployment_policy: The template deployment policy. + :vartype template_deployment_policy: + "ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy" + :ivar allow_empty_role_assignments: The allow empty role assignments. + :vartype allow_empty_role_assignments: bool + :ivar policy_execution_type: The policy execution type. Known values are: "NotSpecified", + "ExecutePolicies", "BypassPolicies", and "ExpectPartialPutRequests". + :vartype policy_execution_type: Union[str, "PolicyExecutionType"] + :ivar availability_zone_rule: The availability zone rule. + :vartype availability_zone_rule: "ResourceTypeRegistrationPropertiesAvailabilityZoneRule" + :ivar dsts_configuration: The dsts configuration. + :vartype dsts_configuration: "ResourceTypeRegistrationPropertiesDstsConfiguration" + :ivar async_timeout_rules: Async timeout rules. + :vartype async_timeout_rules: list["AsyncTimeoutRule"] + :ivar common_api_versions: Common API versions for the resource type. + :vartype common_api_versions: list[str] + :ivar api_profiles: The api profiles. + :vartype api_profiles: list["ApiProfile"] + :ivar linked_operation_rules: The linked operation rules. + :vartype linked_operation_rules: list["LinkedOperationRule"] + :ivar legacy_name: The legacy name. + :vartype legacy_name: str + :ivar legacy_names: The legacy names. + :vartype legacy_names: list[str] + :ivar allowed_template_deployment_reference_actions: Allowed template deployment reference + actions. + :vartype allowed_template_deployment_reference_actions: list[str] + :ivar legacy_policy: The legacy policy. + :vartype legacy_policy: "ResourceTypeRegistrationPropertiesLegacyPolicy" + :ivar manifest_link: Manifest link. + :vartype manifest_link: str + :ivar capacity_rule: Capacity rule. + :vartype capacity_rule: "ResourceTypeRegistrationPropertiesCapacityRule" + :ivar marketplace_options: Marketplace options. + :vartype marketplace_options: "ResourceTypeRegistrationPropertiesMarketplaceOptions" + :ivar allowed_resource_names: The allowed resource names. + :vartype allowed_resource_names: list["AllowedResourceName"] + :ivar resource_cache: Resource cache options. + :vartype resource_cache: "ResourceTypeRegistrationPropertiesResourceCache" + :ivar resource_query_management: Resource query management options. + :vartype resource_query_management: "ResourceTypeRegistrationPropertiesResourceQueryManagement" + :ivar supports_tags: Whether tags are supported. + :vartype supports_tags: bool + :ivar resource_management_options: Resource management options. + :vartype resource_management_options: + "ResourceTypeRegistrationPropertiesResourceManagementOptions" + :ivar grouping_tag: Grouping tag. + :vartype grouping_tag: str + :ivar add_resource_list_target_locations: Add resource list target locations?. + :vartype add_resource_list_target_locations: bool + :ivar resource_type_common_attribute_management: Resource type common attribute management. + :vartype resource_type_common_attribute_management: + "ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement" + :ivar routing_rule: Routing rule. + :vartype routing_rule: "ResourceTypeRegistrationPropertiesRoutingRule" + :ivar frontdoor_request_mode: The frontdoor request mode. Known values are: "NotSpecified" and + "UseManifest". + :vartype frontdoor_request_mode: Union[str, "FrontdoorRequestMode"] + :ivar resource_sub_type: The resource sub type. Known values are: "NotSpecified" and + "AsyncOperation". + :vartype resource_sub_type: Union[str, "ResourceSubType"] + :ivar async_operation_resource_type_name: The async operation resource type name. + :vartype async_operation_resource_type_name: str + """ + + routingType: Union[str, "RoutingType"] + """The resource routing type. Known values are: \"Default\", \"ProxyOnly\", \"HostBased\", + \"Extension\", \"Tenant\", \"Fanout\", \"LocationBased\", \"Failover\", \"CascadeExtension\", + \"ChildFanout\", \"CascadeAuthorizedExtension\", \"BypassEndpointSelectionOptimization\", + \"LocationMapping\", and \"ServiceFanout\".""" + additionalOptions: Union[str, "AdditionalOptionsResourceTypeRegistration"] + """The additional options. Known values are: \"ProtectedAsyncOperationPolling\" and + \"ProtectedAsyncOperationPollingAuditOnly\".""" + crossTenantTokenValidation: Union[str, "CrossTenantTokenValidation"] + """The cross tenant token validation. Known values are: \"EnsureSecureValidation\" and + \"PassthroughInsecureToken\".""" + regionality: Union[str, "Regionality"] + """The regionality. Known values are: \"NotSpecified\", \"Global\", and \"Regional\".""" + endpoints: list["ResourceTypeEndpoint"] + """The extensions.""" + extensionOptions: "ResourceTypeRegistrationPropertiesExtensionOptions" + """The extension options.""" + marketplaceType: Union[str, "MarketplaceType"] + """The marketplace type. Known values are: \"NotSpecified\", \"AddOn\", \"Bypass\", and \"Store\".""" + swaggerSpecifications: list["SwaggerSpecification"] + """The swagger specifications.""" + allowedUnauthorizedActions: list[str] + """The allowed unauthorized actions.""" + allowedUnauthorizedActionsExtensions: list["AllowedUnauthorizedActionsExtension"] + """The allowed unauthorized actions extensions.""" + authorizationActionMappings: list["AuthorizationActionMapping"] + """The authorization action mappings.""" + linkedAccessChecks: list["LinkedAccessCheck"] + """The linked access checks.""" + defaultApiVersion: str + """The default api version.""" + loggingRules: list["LoggingRule"] + """The logging rules.""" + throttlingRules: list["ThrottlingRule"] + """The throttling rules.""" + requiredFeatures: list[str] + """The required features.""" + featuresRule: "ResourceTypeRegistrationPropertiesFeaturesRule" + """The features rule.""" + enableAsyncOperation: bool + """Whether async operation is enabled.""" + provisioningState: Union[str, "ProvisioningState"] + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + enableThirdPartyS2S: bool + """Whether third party S2S is enabled.""" + subscriptionLifecycleNotificationSpecifications: ( + "ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications" + ) + """The subscription lifecycle notification specifications.""" + isPureProxy: bool + """Whether it is pure proxy.""" + identityManagement: "ResourceTypeRegistrationPropertiesIdentityManagement" + """The identity management.""" + checkNameAvailabilitySpecifications: "ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications" + """The check name availability specifications.""" + disallowedActionVerbs: list[str] + """The disallowed action verbs.""" + serviceTreeInfos: list["ServiceTreeInfo"] + """The service tree infos.""" + requestHeaderOptions: "ResourceTypeRegistrationPropertiesRequestHeaderOptions" + """The request header options.""" + subscriptionStateRules: list["SubscriptionStateRule"] + """The subscription state rules.""" + templateDeploymentOptions: "ResourceTypeRegistrationPropertiesTemplateDeploymentOptions" + """The template deployment options.""" + extendedLocations: list["ExtendedLocationOptions"] + """The extended locations.""" + resourceMovePolicy: "ResourceTypeRegistrationPropertiesResourceMovePolicy" + """The resource move policy.""" + resourceDeletionPolicy: Union[str, "ResourceDeletionPolicy"] + """The resource deletion policy. Known values are: \"NotSpecified\", \"CascadeDeleteAll\", and + \"CascadeDeleteProxyOnlyChildren\".""" + resourceConcurrencyControlOptions: dict[str, "ResourceConcurrencyControlOption"] + """The resource concurrency control options.""" + resourceGraphConfiguration: "ResourceTypeRegistrationPropertiesResourceGraphConfiguration" + """The resource graph configuration.""" + management: "ResourceTypeRegistrationPropertiesManagement" + """The resource provider management.""" + openApiConfiguration: "OpenApiConfiguration" + """The open api configuration.""" + onBehalfOfTokens: "ResourceTypeOnBehalfOfToken" + """The on behalf of tokens.""" + category: Union[str, "ResourceTypeCategory"] + """The category. Known values are: \"None\", \"FreeForm\", \"Internal\", and \"PureProxy\".""" + resourceValidation: Union[str, "ResourceValidation"] + """The resource validation. Known values are: \"NotSpecified\", \"ReservedWords\", and + \"ProfaneWords\".""" + disallowedEndUserOperations: list[str] + """The disallowed end user operations.""" + metadata: dict[str, Any] + """The metadata.""" + skuLink: str + """The sku link.""" + quotaRule: "QuotaRule" + """The quota rule.""" + notifications: list["Notification"] + """The notifications.""" + linkedNotificationRules: list["LinkedNotificationRule"] + """The linked notification rules.""" + resourceProviderAuthorizationRules: "ResourceProviderAuthorizationRules" + """The resource provider authorization rules.""" + tokenAuthConfiguration: "TokenAuthConfiguration" + """The token auth configuration.""" + templateDeploymentPolicy: "ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy" + """The template deployment policy.""" + allowEmptyRoleAssignments: bool + """The allow empty role assignments.""" + policyExecutionType: Union[str, "PolicyExecutionType"] + """The policy execution type. Known values are: \"NotSpecified\", \"ExecutePolicies\", + \"BypassPolicies\", and \"ExpectPartialPutRequests\".""" + availabilityZoneRule: "ResourceTypeRegistrationPropertiesAvailabilityZoneRule" + """The availability zone rule.""" + dstsConfiguration: "ResourceTypeRegistrationPropertiesDstsConfiguration" + """The dsts configuration.""" + asyncTimeoutRules: list["AsyncTimeoutRule"] + """Async timeout rules.""" + commonApiVersions: list[str] + """Common API versions for the resource type.""" + apiProfiles: list["ApiProfile"] + """The api profiles.""" + linkedOperationRules: list["LinkedOperationRule"] + """The linked operation rules.""" + legacyName: str + """The legacy name.""" + legacyNames: list[str] + """The legacy names.""" + allowedTemplateDeploymentReferenceActions: list[str] + """Allowed template deployment reference actions.""" + legacyPolicy: "ResourceTypeRegistrationPropertiesLegacyPolicy" + """The legacy policy.""" + manifestLink: str + """Manifest link.""" + capacityRule: "ResourceTypeRegistrationPropertiesCapacityRule" + """Capacity rule.""" + marketplaceOptions: "ResourceTypeRegistrationPropertiesMarketplaceOptions" + """Marketplace options.""" + allowedResourceNames: list["AllowedResourceName"] + """The allowed resource names.""" + resourceCache: "ResourceTypeRegistrationPropertiesResourceCache" + """Resource cache options.""" + resourceQueryManagement: "ResourceTypeRegistrationPropertiesResourceQueryManagement" + """Resource query management options.""" + supportsTags: bool + """Whether tags are supported.""" + resourceManagementOptions: "ResourceTypeRegistrationPropertiesResourceManagementOptions" + """Resource management options.""" + groupingTag: str + """Grouping tag.""" + addResourceListTargetLocations: bool + """Add resource list target locations?.""" + resourceTypeCommonAttributeManagement: "ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement" + """Resource type common attribute management.""" + routingRule: "ResourceTypeRegistrationPropertiesRoutingRule" + """Routing rule.""" + frontdoorRequestMode: Union[str, "FrontdoorRequestMode"] + """The frontdoor request mode. Known values are: \"NotSpecified\" and \"UseManifest\".""" + resourceSubType: Union[str, "ResourceSubType"] + """The resource sub type. Known values are: \"NotSpecified\" and \"AsyncOperation\".""" + asyncOperationResourceTypeName: str + """The async operation resource type name.""" + + +class ResourceTypeRegistrationPropertiesAvailabilityZoneRule(TypedDict, total=False): # pylint: disable=name-too-long + """The availability zone rule. + + :ivar availability_zone_policy: Known values are: "NotSpecified", "SingleZoned", and + "MultiZoned". + :vartype availability_zone_policy: Union[str, "AvailabilityZonePolicy"] + """ + + availabilityZonePolicy: Union[str, "AvailabilityZonePolicy"] + """Known values are: \"NotSpecified\", \"SingleZoned\", and \"MultiZoned\".""" + + +class ResourceTypeRegistrationPropertiesCapacityRule(TypedDict, total=False): # pylint: disable=name-too-long + """Capacity rule. + + :ivar capacity_policy: Capacity policy. Known values are: "Default" and "Restricted". + :vartype capacity_policy: Union[str, "CapacityPolicy"] + :ivar sku_alias: Sku alias. + :vartype sku_alias: str + """ + + capacityPolicy: Union[str, "CapacityPolicy"] + """Capacity policy. Known values are: \"Default\" and \"Restricted\".""" + skuAlias: str + """Sku alias.""" + + +class ResourceTypeRegistrationPropertiesCheckNameAvailabilitySpecifications( + CheckNameAvailabilitySpecifications +): # pylint: disable=name-too-long + """The check name availability specifications. + + :ivar enable_default_validation: Whether default validation is enabled. + :vartype enable_default_validation: bool + :ivar resource_types_with_custom_validation: The resource types with custom validation. + :vartype resource_types_with_custom_validation: list[str] + """ + + +class ResourceTypeRegistrationPropertiesDstsConfiguration(DstsConfiguration): # pylint: disable=name-too-long + """The dsts configuration. + + :ivar service_name: The service name. Required. + :vartype service_name: str + :ivar service_dns_name: This is a URI property. + :vartype service_dns_name: str + """ + + +class ResourceTypeRegistrationPropertiesExtensionOptions(ResourceTypeExtensionOptions): # pylint: disable=name-too-long + """The extension options. + + :ivar resource_creation_begin: Resource creation begin. + :vartype resource_creation_begin: "ResourceTypeExtensionOptionsResourceCreationBegin" + """ + + +class ResourceTypeRegistrationPropertiesFeaturesRule(FeaturesRule): # pylint: disable=name-too-long + """The features rule. + + :ivar required_features_policy: The required feature policy. Required. Known values are: "Any" + and "All". + :vartype required_features_policy: Union[str, "FeaturesPolicy"] + """ + + +class ResourceTypeRegistrationPropertiesIdentityManagement( + IdentityManagementProperties +): # pylint: disable=name-too-long + """The identity management. + + :ivar type: The type. Known values are: "NotSpecified", "SystemAssigned", "UserAssigned", + "Actor", and "DelegatedResourceIdentity". + :vartype type: Union[str, "IdentityManagementTypes"] + :ivar application_id: The application id. + :vartype application_id: str + :ivar application_ids: The application ids. + :vartype application_ids: list[str] + :ivar delegation_app_ids: The delegation app ids. + :vartype delegation_app_ids: list[str] + """ + + +class ResourceTypeRegistrationPropertiesLegacyPolicy(TypedDict, total=False): # pylint: disable=name-too-long + """The legacy policy. + + :ivar disallowed_legacy_operations: + :vartype disallowed_legacy_operations: list[Union[str, "LegacyOperation"]] + :ivar disallowed_conditions: + :vartype disallowed_conditions: list["LegacyDisallowedCondition"] + """ + + disallowedLegacyOperations: list[Union[str, "LegacyOperation"]] + disallowedConditions: list["LegacyDisallowedCondition"] + + +class ResourceTypeRegistrationPropertiesManagement(ResourceProviderManagement): # pylint: disable=name-too-long + """The resource provider management. + + :ivar schema_owners: The schema owners. + :vartype schema_owners: list[str] + :ivar manifest_owners: The manifest owners. + :vartype manifest_owners: list[str] + :ivar authorization_owners: The authorization owners. + :vartype authorization_owners: list[str] + :ivar incident_routing_service: The incident routing service. + :vartype incident_routing_service: str + :ivar incident_routing_team: The incident routing team. + :vartype incident_routing_team: str + :ivar incident_contact_email: The incident contact email. + :vartype incident_contact_email: str + :ivar service_tree_infos: The service tree infos. + :vartype service_tree_infos: list["ServiceTreeInfo"] + :ivar resource_access_policy: The resource access policy. Known values are: "NotSpecified", + "AcisReadAllowed", and "AcisActionAllowed". + :vartype resource_access_policy: Union[str, "ResourceAccessPolicy"] + :ivar resource_access_roles: The resource access roles. + :vartype resource_access_roles: list["ResourceAccessRole"] + :ivar expedited_rollout_submitters: List of expedited rollout submitters. + :vartype expedited_rollout_submitters: list[str] + :ivar error_response_message_options: Options for error response messages. + :vartype error_response_message_options: + "ResourceProviderManagementErrorResponseMessageOptions" + :ivar expedited_rollout_metadata: Metadata for expedited rollout. + :vartype expedited_rollout_metadata: "ResourceProviderManagementExpeditedRolloutMetadata" + :ivar canary_manifest_owners: List of manifest owners for canary. + :vartype canary_manifest_owners: list[str] + :ivar pc_code: The profit center code for the subscription. + :vartype pc_code: str + :ivar profit_center_program_id: The profit center program id for the subscription. + :vartype profit_center_program_id: str + """ + + +class ResourceTypeRegistrationPropertiesMarketplaceOptions(TypedDict, total=False): # pylint: disable=name-too-long + """Marketplace options. + + :ivar add_on_plan_conversion_allowed: Add-on plan conversion allowed. + :vartype add_on_plan_conversion_allowed: bool + """ + + addOnPlanConversionAllowed: bool + """Add-on plan conversion allowed.""" + + +class ResourceTypeRegistrationPropertiesRequestHeaderOptions(RequestHeaderOptions): # pylint: disable=name-too-long + """The request header options. + + :ivar opt_in_headers: The opt in headers. Known values are: "NotSpecified", "SignedUserToken", + "ClientGroupMembership", "SignedAuxiliaryTokens", "UnboundedClientGroupMembership", + "PrivateLinkId", "PrivateLinkResourceId", "ManagementGroupAncestorsEncoded", + "PrivateLinkVnetTrafficTag", "ResourceGroupLocation", "ClientPrincipalNameEncoded", and + "MSIResourceIdEncoded". + :vartype opt_in_headers: Union[str, "OptInHeaderType"] + :ivar opt_out_headers: The opt out headers. Known values are: "NotSpecified" and + "SystemDataCreatedByLastModifiedBy". + :vartype opt_out_headers: Union[str, "OptOutHeaderType"] + """ + + +class ResourceTypeRegistrationPropertiesResourceCache(TypedDict, total=False): # pylint: disable=name-too-long + """Resource cache options. + + :ivar enable_resource_cache: Enable resource cache. + :vartype enable_resource_cache: bool + :ivar resource_cache_expiration_timespan: Resource cache expiration timespan. This is a + TimeSpan property. + :vartype resource_cache_expiration_timespan: str + """ + + enableResourceCache: bool + """Enable resource cache.""" + resourceCacheExpirationTimespan: str + """Resource cache expiration timespan. This is a TimeSpan property.""" + + +class ResourceTypeRegistrationPropertiesResourceGraphConfiguration( + ResourceGraphConfiguration +): # pylint: disable=name-too-long + """The resource graph configuration. + + :ivar enabled: Whether it's enabled. + :vartype enabled: bool + :ivar api_version: The api version. + :vartype api_version: str + """ + + +class ResourceTypeRegistrationPropertiesResourceManagementOptions( + TypedDict, total=False +): # pylint: disable=name-too-long + """Resource management options. + + :ivar batch_provisioning_support: Batch provisioning support. + :vartype batch_provisioning_support: + "ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport" + :ivar delete_dependencies: Delete dependencies. + :vartype delete_dependencies: list["DeleteDependency"] + :ivar nested_provisioning_support: Nested provisioning support. + :vartype nested_provisioning_support: + "ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport" + """ + + batchProvisioningSupport: "ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport" + """Batch provisioning support.""" + deleteDependencies: list["DeleteDependency"] + """Delete dependencies.""" + nestedProvisioningSupport: "ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport" + """Nested provisioning support.""" + + +class ResourceTypeRegistrationPropertiesResourceManagementOptionsBatchProvisioningSupport( + TypedDict, total=False +): # pylint: disable=name-too-long + """Batch provisioning support. + + :ivar supported_operations: Supported operations. Known values are: "NotSpecified", "Get", and + "Delete". + :vartype supported_operations: Union[str, "SupportedOperations"] + """ + + supportedOperations: Union[str, "SupportedOperations"] + """Supported operations. Known values are: \"NotSpecified\", \"Get\", and \"Delete\".""" + + +class ResourceTypeRegistrationPropertiesResourceManagementOptionsNestedProvisioningSupport( + TypedDict, total=False +): # pylint: disable=name-too-long + """Nested provisioning support. + + :ivar minimum_api_version: Minimum API version. + :vartype minimum_api_version: str + """ + + minimumApiVersion: str + """Minimum API version.""" + + +class ResourceTypeRegistrationPropertiesResourceMovePolicy(ResourceMovePolicy): # pylint: disable=name-too-long + """The resource move policy. + + :ivar validation_required: Whether validation is required. + :vartype validation_required: bool + :ivar cross_resource_group_move_enabled: Whether cross resource group move is enabled. + :vartype cross_resource_group_move_enabled: bool + :ivar cross_subscription_move_enabled: Whether cross subscription move is enabled. + :vartype cross_subscription_move_enabled: bool + """ + + +class ResourceTypeRegistrationPropertiesResourceQueryManagement( + TypedDict, total=False +): # pylint: disable=name-too-long + """Resource query management options. + + :ivar filter_option: Filter option. Known values are: "NotSpecified" and + "EnableSubscriptionFilterOnTenant". + :vartype filter_option: Union[str, "FilterOption"] + """ + + filterOption: Union[str, "FilterOption"] + """Filter option. Known values are: \"NotSpecified\" and \"EnableSubscriptionFilterOnTenant\".""" + + +class ResourceTypeRegistrationPropertiesResourceTypeCommonAttributeManagement( + TypedDict, total=False +): # pylint: disable=name-too-long + """Resource type common attribute management. + + :ivar common_api_versions_merge_mode: Common api versions merge mode. Known values are: "Merge" + and "Overwrite". + :vartype common_api_versions_merge_mode: Union[str, "CommonApiVersionsMergeMode"] + """ + + commonApiVersionsMergeMode: Union[str, "CommonApiVersionsMergeMode"] + """Common api versions merge mode. Known values are: \"Merge\" and \"Overwrite\".""" + + +class ResourceTypeRegistrationPropertiesRoutingRule(TypedDict, total=False): # pylint: disable=name-too-long + """Routing rule. + + :ivar host_resource_type: Hosted resource type. + :vartype host_resource_type: str + """ + + hostResourceType: str + """Hosted resource type.""" + + +class ResourceTypeRegistrationPropertiesSubscriptionLifecycleNotificationSpecifications( + SubscriptionLifecycleNotificationSpecifications +): # pylint: disable=name-too-long + """The subscription lifecycle notification specifications. + + :ivar subscription_state_override_actions: The subscription state override actions. + :vartype subscription_state_override_actions: list["SubscriptionStateOverrideAction"] + :ivar soft_delete_ttl: The soft delete TTL. + :vartype soft_delete_ttl: str + """ + + +class ResourceTypeRegistrationPropertiesTemplateDeploymentOptions( + TemplateDeploymentOptions +): # pylint: disable=name-too-long + """The template deployment options. + + :ivar preflight_supported: Whether preflight is supported. + :vartype preflight_supported: bool + :ivar preflight_options: The preflight options. + :vartype preflight_options: list[Union[str, "PreflightOption"]] + """ + + +class TemplateDeploymentPolicy(TypedDict, total=False): + """TemplateDeploymentPolicy. + + :ivar capabilities: The capabilities. Required. Known values are: "Default" and "Preflight". + :vartype capabilities: Union[str, "TemplateDeploymentCapabilities"] + :ivar preflight_options: The preflight options. Required. Known values are: "None", + "ValidationRequests", "DeploymentRequests", "TestOnly", and "RegisteredOnly". + :vartype preflight_options: Union[str, "TemplateDeploymentPreflightOptions"] + :ivar preflight_notifications: The preflight notifications. Known values are: "None" and + "UnregisteredSubscriptions". + :vartype preflight_notifications: Union[str, "TemplateDeploymentPreflightNotifications"] + """ + + capabilities: Required[Union[str, "TemplateDeploymentCapabilities"]] + """The capabilities. Required. Known values are: \"Default\" and \"Preflight\".""" + preflightOptions: Required[Union[str, "TemplateDeploymentPreflightOptions"]] + """The preflight options. Required. Known values are: \"None\", \"ValidationRequests\", + \"DeploymentRequests\", \"TestOnly\", and \"RegisteredOnly\".""" + preflightNotifications: Union[str, "TemplateDeploymentPreflightNotifications"] + """The preflight notifications. Known values are: \"None\" and \"UnregisteredSubscriptions\".""" + + +class ResourceTypeRegistrationPropertiesTemplateDeploymentPolicy( + TemplateDeploymentPolicy +): # pylint: disable=name-too-long + """The template deployment policy. + + :ivar capabilities: The capabilities. Required. Known values are: "Default" and "Preflight". + :vartype capabilities: Union[str, "TemplateDeploymentCapabilities"] + :ivar preflight_options: The preflight options. Required. Known values are: "None", + "ValidationRequests", "DeploymentRequests", "TestOnly", and "RegisteredOnly". + :vartype preflight_options: Union[str, "TemplateDeploymentPreflightOptions"] + :ivar preflight_notifications: The preflight notifications. Known values are: "None" and + "UnregisteredSubscriptions". + :vartype preflight_notifications: Union[str, "TemplateDeploymentPreflightNotifications"] + """ + + +class ResourceTypeSku(TypedDict, total=False): + """ResourceTypeSku. + + :ivar sku_settings: The sku settings. Required. + :vartype sku_settings: list["SkuSetting"] + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: Union[str, "ProvisioningState"] + """ + + skuSettings: Required[list["SkuSetting"]] + """The sku settings. Required.""" + provisioningState: Union[str, "ProvisioningState"] + """The provisioning state. Known values are: \"NotSpecified\", \"Accepted\", \"Running\", + \"Creating\", \"Created\", \"Deleting\", \"Deleted\", \"Canceled\", \"Failed\", \"Succeeded\", + \"MovingResources\", \"TransientFailure\", and \"RolloutInProgress\".""" + + +class ServiceTreeInfo(TypedDict, total=False): + """ServiceTreeInfo. + + :ivar service_id: The service id. + :vartype service_id: str + :ivar component_id: The component id. + :vartype component_id: str + :ivar readiness: The readiness. Known values are: "ClosingDown", "Deprecated", "GA", + "InDevelopment", "InternalOnly", "PrivatePreview", "PublicPreview", "RemovedFromARM", and + "Retired". + :vartype readiness: Union[str, "Readiness"] + """ + + serviceId: str + """The service id.""" + componentId: str + """The component id.""" + readiness: Union[str, "Readiness"] + """The readiness. Known values are: \"ClosingDown\", \"Deprecated\", \"GA\", \"InDevelopment\", + \"InternalOnly\", \"PrivatePreview\", \"PublicPreview\", \"RemovedFromARM\", and \"Retired\".""" + + +class SkuCapability(TypedDict, total=False): + """SkuCapability. + + :ivar name: The name. Required. + :vartype name: str + :ivar value: The value. Required. + :vartype value: str + """ + + name: Required[str] + """The name. Required.""" + value: Required[str] + """The value. Required.""" + + +class SkuCapacity(TypedDict, total=False): + """SkuCapacity. + + :ivar minimum: The minimum. Required. + :vartype minimum: int + :ivar maximum: The maximum. + :vartype maximum: int + :ivar default: The default. + :vartype default: int + :ivar scale_type: The scale type. Known values are: "None", "Manual", and "Automatic". + :vartype scale_type: Union[str, "SkuScaleType"] + """ + + minimum: Required[int] + """The minimum. Required.""" + maximum: int + """The maximum.""" + default: int + """The default.""" + scaleType: Union[str, "SkuScaleType"] + """The scale type. Known values are: \"None\", \"Manual\", and \"Automatic\".""" + + +class SkuCost(TypedDict, total=False): + """SkuCost. + + :ivar meter_id: The meter id. Required. + :vartype meter_id: str + :ivar quantity: The quantity. + :vartype quantity: int + :ivar extended_unit: The extended unit. + :vartype extended_unit: str + """ + + meterId: Required[str] + """The meter id. Required.""" + quantity: int + """The quantity.""" + extendedUnit: str + """The extended unit.""" + + +class SkuLocationInfo(TypedDict, total=False): + """SkuLocationInfo. + + :ivar location: The location. Required. + :vartype location: str + :ivar zones: The zones. + :vartype zones: list[str] + :ivar zone_details: The zone details. + :vartype zone_details: list["SkuZoneDetail"] + :ivar extended_locations: The extended locations. + :vartype extended_locations: list[str] + :ivar type: The type. Known values are: "NotSpecified", "CustomLocation", "EdgeZone", and + "ArcZone". + :vartype type: Union[str, "ExtendedLocationType"] + """ + + location: Required[str] + """The location. Required.""" + zones: list[str] + """The zones.""" + zoneDetails: list["SkuZoneDetail"] + """The zone details.""" + extendedLocations: list[str] + """The extended locations.""" + type: Union[str, "ExtendedLocationType"] + """The type. Known values are: \"NotSpecified\", \"CustomLocation\", \"EdgeZone\", and + \"ArcZone\".""" + + +class SkuResource(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :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: "SystemData" + :ivar properties: + :vartype properties: "SkuResourceProperties" + """ + + properties: "SkuResourceProperties" + + +class SkuResourceProperties(ResourceTypeSku): + """SkuResourceProperties. + + :ivar sku_settings: The sku settings. Required. + :vartype sku_settings: list["SkuSetting"] + :ivar provisioning_state: The provisioning state. Known values are: "NotSpecified", "Accepted", + "Running", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", + "MovingResources", "TransientFailure", and "RolloutInProgress". + :vartype provisioning_state: Union[str, "ProvisioningState"] + """ + + +class SkuSetting(TypedDict, total=False): + """SkuSetting. + + :ivar name: The name. Required. + :vartype name: str + :ivar tier: The tier. + :vartype tier: str + :ivar size: The size. + :vartype size: str + :ivar family: The family. + :vartype family: str + :ivar kind: The kind. + :vartype kind: str + :ivar locations: The locations. + :vartype locations: list[str] + :ivar location_info: The location info. + :vartype location_info: list["SkuLocationInfo"] + :ivar required_quota_ids: The required quota ids. + :vartype required_quota_ids: list[str] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar capacity: The capacity. + :vartype capacity: "SkuSettingCapacity" + :ivar costs: The costs. + :vartype costs: list["SkuCost"] + :ivar capabilities: The capabilities. + :vartype capabilities: list["SkuCapability"] + """ + + name: Required[str] + """The name. Required.""" + tier: str + """The tier.""" + size: str + """The size.""" + family: str + """The family.""" + kind: str + """The kind.""" + locations: list[str] + """The locations.""" + locationInfo: list["SkuLocationInfo"] + """The location info.""" + requiredQuotaIds: list[str] + """The required quota ids.""" + requiredFeatures: list[str] + """The required features.""" + capacity: "SkuSettingCapacity" + """The capacity.""" + costs: list["SkuCost"] + """The costs.""" + capabilities: list["SkuCapability"] + """The capabilities.""" + + +class SkuSettingCapacity(SkuCapacity): + """The capacity. + + :ivar minimum: The minimum. Required. + :vartype minimum: int + :ivar maximum: The maximum. + :vartype maximum: int + :ivar default: The default. + :vartype default: int + :ivar scale_type: The scale type. Known values are: "None", "Manual", and "Automatic". + :vartype scale_type: Union[str, "SkuScaleType"] + """ + + +class SkuZoneDetail(TypedDict, total=False): + """SkuZoneDetail. + + :ivar name: The name. + :vartype name: list[str] + :ivar capabilities: The capabilities. + :vartype capabilities: list["SkuCapability"] + """ + + name: list[str] + """The name.""" + capabilities: list["SkuCapability"] + """The capabilities.""" + + +class SubscriberSetting(TypedDict, total=False): + """SubscriberSetting. + + :ivar filter_rules: The filter rules. + :vartype filter_rules: list["FilterRule"] + """ + + filterRules: list["FilterRule"] + """The filter rules.""" + + +class SubscriptionStateOverrideAction(TypedDict, total=False): + """SubscriptionStateOverrideAction. + + :ivar state: The state. Required. Known values are: "Registered", "Unregistered", "Warned", + "Suspended", "Deleted", "WarnedToRegistered", "WarnedToSuspended", "WarnedToDeleted", + "WarnedToUnregistered", "SuspendedToRegistered", "SuspendedToWarned", "SuspendedToDeleted", and + "SuspendedToUnregistered". + :vartype state: Union[str, "SubscriptionTransitioningState"] + :ivar action: The action. Required. Known values are: "NotDefined", "DeleteAllResources", + "SoftDeleteAllResources", "NoOp", "BillingCancellation", and "UndoSoftDelete". + :vartype action: Union[str, "SubscriptionNotificationOperation"] + """ + + state: Required[Union[str, "SubscriptionTransitioningState"]] + """The state. Required. Known values are: \"Registered\", \"Unregistered\", \"Warned\", + \"Suspended\", \"Deleted\", \"WarnedToRegistered\", \"WarnedToSuspended\", \"WarnedToDeleted\", + \"WarnedToUnregistered\", \"SuspendedToRegistered\", \"SuspendedToWarned\", + \"SuspendedToDeleted\", and \"SuspendedToUnregistered\".""" + action: Required[Union[str, "SubscriptionNotificationOperation"]] + """The action. Required. Known values are: \"NotDefined\", \"DeleteAllResources\", + \"SoftDeleteAllResources\", \"NoOp\", \"BillingCancellation\", and \"UndoSoftDelete\".""" + + +class SubscriptionStateRule(TypedDict, total=False): + """SubscriptionStateRule. + + :ivar state: The subscription state. Known values are: "NotDefined", "Enabled", "Warned", + "PastDue", "Disabled", and "Deleted". + :vartype state: Union[str, "SubscriptionState"] + :ivar allowed_actions: The allowed actions. + :vartype allowed_actions: list[str] + """ + + state: Union[str, "SubscriptionState"] + """The subscription state. Known values are: \"NotDefined\", \"Enabled\", \"Warned\", \"PastDue\", + \"Disabled\", and \"Deleted\".""" + allowedActions: list[str] + """The allowed actions.""" + + +class SwaggerSpecification(TypedDict, total=False): + """SwaggerSpecification. + + :ivar api_versions: The api versions. + :vartype api_versions: list[str] + :ivar swagger_spec_folder_uri: The swagger spec folder uri. + :vartype swagger_spec_folder_uri: str + """ + + apiVersions: list[str] + """The api versions.""" + swaggerSpecFolderUri: str + """The swagger spec folder uri.""" + + +class SystemData(TypedDict, total=False): + """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: Union[str, "CreatedByType"] + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: str + :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: Union[str, "CreatedByType"] + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: str + """ + + createdBy: str + """The identity that created the resource.""" + createdByType: Union[str, "CreatedByType"] + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + createdAt: str + """The timestamp of resource creation (UTC).""" + lastModifiedBy: str + """The identity that last modified the resource.""" + lastModifiedByType: Union[str, "CreatedByType"] + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + lastModifiedAt: str + """The timestamp of resource last modification (UTC).""" + + +class ThirdPartyExtension(TypedDict, total=False): + """ThirdPartyExtension. + + :ivar name: Name of third party extension. + :vartype name: str + """ + + name: str + """Name of third party extension.""" + + +class ThrottlingMetric(TypedDict, total=False): + """ThrottlingMetric. + + :ivar type: The throttling metric type. Required. Known values are: "NotSpecified", + "NumberOfRequests", and "NumberOfResources". + :vartype type: Union[str, "ThrottlingMetricType"] + :ivar limit: The limit. Required. + :vartype limit: int + :ivar interval: The interval. + :vartype interval: str + """ + + type: Required[Union[str, "ThrottlingMetricType"]] + """The throttling metric type. Required. Known values are: \"NotSpecified\", \"NumberOfRequests\", + and \"NumberOfResources\".""" + limit: Required[int] + """The limit. Required.""" + interval: str + """The interval.""" + + +class ThrottlingRule(TypedDict, total=False): + """ThrottlingRule. + + :ivar action: The action. Required. + :vartype action: str + :ivar metrics: The metrics. Required. + :vartype metrics: list["ThrottlingMetric"] + :ivar required_features: The required features. + :vartype required_features: list[str] + :ivar application_id: The application id. + :vartype application_id: list[str] + """ + + action: Required[str] + """The action. Required.""" + metrics: Required[list["ThrottlingMetric"]] + """The metrics. Required.""" + requiredFeatures: list[str] + """The required features.""" + applicationId: list[str] + """The application id.""" + + +class TokenAuthConfiguration(TypedDict, total=False): + """TokenAuthConfiguration. + + :ivar authentication_scheme: The authentication scheme. Known values are: "PoP" and "Bearer". + :vartype authentication_scheme: Union[str, "AuthenticationScheme"] + :ivar signed_request_scope: The signed request scope. Known values are: "ResourceUri" and + "Endpoint". + :vartype signed_request_scope: Union[str, "SignedRequestScope"] + :ivar disable_certificate_authentication_fallback: Whether certification authentication + fallback is disabled. + :vartype disable_certificate_authentication_fallback: bool + """ + + authenticationScheme: Union[str, "AuthenticationScheme"] + """The authentication scheme. Known values are: \"PoP\" and \"Bearer\".""" + signedRequestScope: Union[str, "SignedRequestScope"] + """The signed request scope. Known values are: \"ResourceUri\" and \"Endpoint\".""" + disableCertificateAuthenticationFallback: bool + """Whether certification authentication fallback is disabled.""" + + +class TypedErrorInfo(TypedDict, total=False): + """Error information. + + :ivar type: The type of the error. Required. + :vartype type: str + :ivar info: The error information. + :vartype info: Any + """ + + type: Required[str] + """The type of the error. Required.""" + info: Any + """The error information.""" diff --git a/sdk/providerhub/azure-mgmt-providerhub/dev_requirements.txt b/sdk/providerhub/azure-mgmt-providerhub/dev_requirements.txt new file mode 100644 index 000000000000..ece056fe0984 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/dev_requirements.txt @@ -0,0 +1,5 @@ +-e ../../../eng/tools/azure-sdk-tools +../../core/azure-core +../../identity/azure-identity +../../core/azure-mgmt-core +aiohttp \ No newline at end of file diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_create_or_update.py new file mode 100644 index 000000000000..206c8d91c55e --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_create_or_update.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python authorized_applications_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.authorized_applications.begin_create_or_update( + provider_namespace="Microsoft.Contoso", + application_id="760505bf-dcfa-4311-b890-18da392a00b2", + properties={ + "properties": { + "dataAuthorizations": [{"resourceTypes": ["*"], "role": "ServiceOwner"}], + "providerAuthorization": { + "managedByRoleDefinitionId": "1a3b5c7d-8e9f-10g1-1h12-i13j14k1", + "roleDefinitionId": "123456bf-gkur-2098-b890-98da392a00b2", + }, + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2024-09-01/AuthorizedApplications_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_delete.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_delete.py new file mode 100644 index 000000000000..07c52548f9d8 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python authorized_applications_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.authorized_applications.delete( + provider_namespace="Microsoft.Contoso", + application_id="760505bf-dcfa-4311-b890-18da392a00b2", + ) + + +# x-ms-original-file: 2024-09-01/AuthorizedApplications_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_get.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_get.py new file mode 100644 index 000000000000..63fe1683b021 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python authorized_applications_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.authorized_applications.get( + provider_namespace="Microsoft.Contoso", + application_id="760505bf-dcfa-4311-b890-18da392a00b2", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/AuthorizedApplications_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_list.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_list.py new file mode 100644 index 000000000000..f99dbf8c059c --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/authorized_applications_list.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python authorized_applications_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, + 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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.authorized_applications.list( + provider_namespace="Microsoft.Contoso", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/AuthorizedApplications_List.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/checkin_manifest.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/checkin_manifest.py new file mode 100644 index 000000000000..2debd4da684b --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/checkin_manifest.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python checkin_manifest.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.checkin_manifest( + provider_namespace="Microsoft.Contoso", + checkin_manifest_params={"baselineArmManifestLocation": "EastUS2EUAP", "environment": "Prod"}, + ) + print(response) + + +# x-ms-original-file: 2024-09-01/CheckinManifest.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_create_or_update.py new file mode 100644 index 000000000000..9aa49fce3582 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_create_or_update.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python custom_rollouts_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.custom_rollouts.begin_create_or_update( + provider_namespace="Microsoft.Contoso", + rollout_name="brazilUsShoeBoxTesting", + properties={ + "properties": { + "specification": { + "autoProvisionConfig": {"resourceGraph": True, "storage": True}, + "canary": {"regions": ["brazilus"]}, + "refreshSubscriptionRegistration": True, + } + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2024-09-01/CustomRollouts_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_delete.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_delete.py new file mode 100644 index 000000000000..ab20b6f3fd84 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python custom_rollouts_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.custom_rollouts.delete( + provider_namespace="Microsoft.Contoso", + rollout_name="2020week10", + ) + + +# x-ms-original-file: 2024-09-01/CustomRollouts_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_get.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_get.py new file mode 100644 index 000000000000..91d3d5f37b6b --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python custom_rollouts_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.custom_rollouts.get( + provider_namespace="Microsoft.Contoso", + rollout_name="canaryTesting99", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/CustomRollouts_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_list_by_provider_registration.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_list_by_provider_registration.py new file mode 100644 index 000000000000..aec9d3b3d0b4 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_list_by_provider_registration.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python custom_rollouts_list_by_provider_registration.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.custom_rollouts.list_by_provider_registration( + provider_namespace="Microsoft.Contoso", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/CustomRollouts_ListByProviderRegistration.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_stop.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_stop.py new file mode 100644 index 000000000000..2cb84b0c47c7 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/custom_rollouts_stop.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python custom_rollouts_stop.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.custom_rollouts.stop( + provider_namespace="Microsoft.Contoso", + rollout_name="2020week10", + ) + + +# x-ms-original-file: 2024-09-01/CustomRollouts_Stop.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_create_or_update.py new file mode 100644 index 000000000000..39bf8e40a181 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_create_or_update.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python default_rollouts_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.default_rollouts.begin_create_or_update( + provider_namespace="Microsoft.Contoso", + rollout_name="2020week10", + properties={ + "properties": { + "specification": { + "canary": {"skipRegions": ["eastus2euap"]}, + "expeditedRollout": {"enabled": True}, + "restOfTheWorldGroupTwo": {"waitDuration": "PT4H"}, + } + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2024-09-01/DefaultRollouts_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_delete.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_delete.py new file mode 100644 index 000000000000..7d48233c6795 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python default_rollouts_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.default_rollouts.delete( + provider_namespace="Microsoft.Contoso", + rollout_name="2020week10", + ) + + +# x-ms-original-file: 2024-09-01/DefaultRollouts_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_get.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_get.py new file mode 100644 index 000000000000..819647058a97 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python default_rollouts_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.default_rollouts.get( + provider_namespace="Microsoft.Contoso", + rollout_name="2020week10", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/DefaultRollouts_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_list_by_provider_registration.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_list_by_provider_registration.py new file mode 100644 index 000000000000..97da63a15930 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_list_by_provider_registration.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python default_rollouts_list_by_provider_registration.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.default_rollouts.list_by_provider_registration( + provider_namespace="Microsoft.Contoso", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/DefaultRollouts_ListByProviderRegistration.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_stop.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_stop.py new file mode 100644 index 000000000000..0dcd5407c28f --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/default_rollouts_stop.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python default_rollouts_stop.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.default_rollouts.stop( + provider_namespace="Microsoft.Contoso", + rollout_name="2020week10", + ) + + +# x-ms-original-file: 2024-09-01/DefaultRollouts_Stop.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/direct_provider_registrations_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/direct_provider_registrations_create_or_update.py new file mode 100644 index 000000000000..8f354093f2eb --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/direct_provider_registrations_create_or_update.py @@ -0,0 +1,111 @@ +# 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python direct_provider_registrations_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_registrations.begin_create_or_update( + provider_namespace="Microsoft.Contoso", + properties={ + "kind": "Direct", + "properties": { + "capabilities": [ + {"effect": "Allow", "quotaId": "CSP_2015-05-01"}, + {"effect": "Allow", "quotaId": "CSP_MG_2017-12-01"}, + ], + "customManifestVersion": "2.0", + "dstsConfiguration": {"serviceDnsName": "prds.sparta.azure.com", "serviceName": "prds-shim"}, + "legacyNamespace": "legacyNamespace", + "legacyRegistrations": ["legacyRegistration"], + "management": { + "incidentContactEmail": "helpme@contoso.com", + "incidentRoutingService": "Contoso Resource Provider", + "incidentRoutingTeam": "Contoso Triage", + "serviceTreeInfos": [ + { + "componentId": "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", + "readiness": "InDevelopment", + "serviceId": "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", + } + ], + }, + "managementGroupGlobalNotificationEndpoints": [ + {"endpointUri": "{your_management_group_notification_endpoint}"} + ], + "notificationOptions": "EmitSpendingLimit", + "notificationSettings": { + "subscriberSettings": [ + { + "filterRules": [ + { + "endpointInformation": [ + { + "endpoint": "https://userrp.azure.com/arnnotify", + "endpointType": "Webhook", + "schemaVersion": "3.0", + }, + { + "endpoint": "https://userrp.azure.com/arnnotify", + "endpointType": "Eventhub", + "schemaVersion": "3.0", + }, + ], + "filterQuery": "Resources | where event.eventType in ('Microsoft.Network/IpAddresses/write', 'Microsoft.KeyVault/vaults/move/action')", + } + ] + } + ] + }, + "optionalFeatures": ["Microsoft.Resources/PlatformSubscription"], + "providerType": "Internal", + "providerVersion": "2.0", + "resourceGroupLockOptionDuringMove": {"blockActionVerb": "Action"}, + "resourceHydrationAccounts": [ + { + "accountName": "classichydrationprodsn01", + "subscriptionId": "e4eae963-2d15-43e6-a097-98bd75b33edd", + }, + { + "accountName": "classichydrationprodch01", + "subscriptionId": "69e69ecb-e69c-41d4-99b8-87dd12781067", + }, + ], + "responseOptions": {"serviceClientOptionsType": "DisableAutomaticDecompression"}, + "serviceName": "root", + "services": [{"serviceName": "tags", "status": "Inactive"}], + }, + }, + ).result() + print(response) + + +# x-ms-original-file: 2024-09-01/DirectProviderRegistrations_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/direct_resource_type_registrations_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/direct_resource_type_registrations_create_or_update.py new file mode 100644 index 000000000000..cfeb704dff47 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/direct_resource_type_registrations_create_or_update.py @@ -0,0 +1,134 @@ +# 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python direct_resource_type_registrations_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.resource_type_registrations.begin_create_or_update( + provider_namespace="Microsoft.Contoso", + resource_type="employees", + properties={ + "properties": { + "addResourceListTargetLocations": True, + "additionalOptions": "ProtectedAsyncOperationPolling", + "allowEmptyRoleAssignments": False, + "allowedResourceNames": [{"getActionVerb": "list", "name": "name1"}, {"name": "name2"}], + "allowedTemplateDeploymentReferenceActions": ["ListKeys", "ListSAS"], + "apiProfiles": [ + {"apiVersion": "2018-02-01", "profileVersion": "2018-03-01-hybrid"}, + {"apiVersion": "2016-06-01", "profileVersion": "2019-03-01-hybrid"}, + ], + "asyncTimeoutRules": [{"actionName": "Microsoft.ClassicCompute/domainNames/write", "timeout": "PT12H"}], + "availabilityZoneRule": {"availabilityZonePolicy": "MultiZoned"}, + "capacityRule": {"capacityPolicy": "Restricted", "skuAlias": "incorrectAlias"}, + "commonApiVersions": ["2021-01-01"], + "dstsConfiguration": {"serviceDnsName": "prds.sparta.azure.com", "serviceName": "prds-shim"}, + "endpoints": [ + { + "apiVersions": ["2020-06-01-preview"], + "locations": ["West US", "East US", "North Europe"], + "requiredFeatures": [""], + } + ], + "groupingTag": "groupingTag", + "legacyName": "legacyName", + "legacyNames": ["legacyName"], + "legacyPolicy": { + "disallowedConditions": [ + { + "disallowedLegacyOperations": ["Create", "Delete"], + "feature": "Microsoft.RP/ArmOnlyJobCollections", + } + ], + "disallowedLegacyOperations": ["Create"], + }, + "linkedOperationRules": [ + {"linkedAction": "Blocked", "linkedOperation": "CrossSubscriptionResourceMove"}, + {"linkedAction": "Validate", "linkedOperation": "CrossResourceGroupResourceMove"}, + ], + "management": { + "authorizationOwners": ["RPAAS-PlatformServiceAdministrator"], + "incidentContactEmail": "helpme@contoso.com", + "incidentRoutingService": "", + "incidentRoutingTeam": "", + "manifestOwners": ["SPARTA-PlatformServiceAdministrator"], + "resourceAccessPolicy": "NotSpecified", + "serviceTreeInfos": [ + { + "componentId": "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", + "readiness": "InDevelopment", + "serviceId": "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", + } + ], + }, + "manifestLink": "https://azure.com", + "marketplaceOptions": {"addOnPlanConversionAllowed": True}, + "metadata": {}, + "notifications": [{"notificationType": "SubscriptionNotification", "skipNotifications": "Disabled"}], + "openApiConfiguration": {"validation": {"allowNoncompliantCollectionResponse": True}}, + "policyExecutionType": "BypassPolicies", + "regionality": "Regional", + "requestHeaderOptions": {"optOutHeaders": "SystemDataCreatedByLastModifiedBy"}, + "resourceCache": {"enableResourceCache": True, "resourceCacheExpirationTimespan": "PT2M"}, + "resourceConcurrencyControlOptions": { + "patch": {"policy": "SynchronizeBeginExtension"}, + "post": {"policy": "SynchronizeBeginExtension"}, + "put": {"policy": "SynchronizeBeginExtension"}, + }, + "resourceGraphConfiguration": {"apiVersion": "2019-01-01", "enabled": True}, + "resourceManagementOptions": { + "batchProvisioningSupport": {"supportedOperations": "Get, Delete"}, + "deleteDependencies": [{"linkedProperty": "properties.edgeProfile.subscription.id"}], + }, + "resourceQueryManagement": {"filterOption": "EnableSubscriptionFilterOnTenant"}, + "resourceTypeCommonAttributeManagement": {"commonApiVersionsMergeMode": "Merge"}, + "routingRule": {"hostResourceType": "servers/databases"}, + "routingType": "Default", + "supportsTags": True, + "swaggerSpecifications": [ + { + "apiVersions": ["2020-06-01-preview"], + "swaggerSpecFolderUri": "https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/", + } + ], + "templateDeploymentPolicy": { + "capabilities": "Preflight", + "preflightNotifications": "None", + "preflightOptions": "ValidationRequests, DeploymentRequests", + }, + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2024-09-01/DirectResourceTypeRegistrations_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/generate_manifest.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/generate_manifest.py new file mode 100644 index 000000000000..e7ca55d5696e --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/generate_manifest.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python generate_manifest.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.generate_manifest( + provider_namespace="Microsoft.Contoso", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/GenerateManifest.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_create_or_update.py new file mode 100644 index 000000000000..439e2712004e --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_create_or_update.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python new_region_frontload_release_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.new_region_frontload_release.create_or_update( + provider_namespace="Microsoft.Contoso", + release_name="2020week10", + properties={ + "properties": { + "copyFromLocation": "eastus", + "environmentType": "Prod", + "excludeResourceTypes": ["monitors"], + "frontloadLocation": "Israel Central", + "ignoreFields": ["apiversion"], + "includeResourceTypes": ["servers"], + "operationType": "Rollout", + "overrideEndpointLevelFields": { + "apiVersion": "2024-04-01-preview", + "apiVersions": ["2024-04-01-preview"], + "dstsConfiguration": { + "serviceDnsName": "messaging.azure-ppe.net", + "serviceName": "resourceprovider", + }, + "enabled": True, + "endpointType": "Production", + "endpointUri": "https://resource-endpoint.com/", + "featuresRule": {"requiredFeaturesPolicy": "Any"}, + "locations": ["East US"], + "requiredFeatures": [""], + "skuLink": "http://endpointuri/westus/skus", + "timeout": "PT20S", + "zones": ["zone1"], + }, + "overrideManifestLevelFields": { + "resourceHydrationAccounts": [ + { + "accountName": "classichydrationprodsn01", + "subscriptionId": "e4eae963-2d15-43e6-a097-98bd75b33edd", + } + ] + }, + "providerNamespace": "Microsoft.Contoso", + "serviceFeatureFlag": "DoNotCreate", + } + }, + ) + print(response) + + +# x-ms-original-file: 2024-09-01/NewRegionFrontloadRelease_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_generate_manifest.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_generate_manifest.py new file mode 100644 index 000000000000..a9a98af039dc --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_generate_manifest.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python new_region_frontload_release_generate_manifest.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.new_region_frontload_release.generate_manifest( + provider_namespace="Microsoft.Contoso", + properties={ + "properties": { + "copyFromLocation": "eastus", + "environmentType": "Prod", + "excludeResourceTypes": ["monitors"], + "frontloadLocation": "Israel Central", + "ignoreFields": ["apiversion"], + "includeResourceTypes": ["servers"], + "operationType": "Rollout", + "overrideEndpointLevelFields": { + "apiVersion": "2024-04-01-preview", + "apiVersions": ["2024-04-01-preview"], + "dstsConfiguration": { + "serviceDnsName": "messaging.azure-ppe.net", + "serviceName": "resourceprovider", + }, + "enabled": True, + "endpointType": "Production", + "endpointUri": "https://resource-endpoint.com/", + "featuresRule": {"requiredFeaturesPolicy": "Any"}, + "locations": ["East US"], + "requiredFeatures": [""], + "skuLink": "http://endpointuri/westus/skus", + "timeout": "PT20S", + "zones": ["zone1"], + }, + "overrideManifestLevelFields": { + "resourceHydrationAccounts": [ + { + "accountName": "classichydrationprodsn01", + "subscriptionId": "e4eae963-2d15-43e6-a097-98bd75b33edd", + } + ] + }, + "providerNamespace": "Microsoft.Contoso", + "serviceFeatureFlag": "DoNotCreate", + } + }, + ) + print(response) + + +# x-ms-original-file: 2024-09-01/NewRegionFrontloadRelease_GenerateManifest.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_get.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_get.py new file mode 100644 index 000000000000..31ae04ed1ae6 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python new_region_frontload_release_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.new_region_frontload_release.get( + provider_namespace="Microsoft.Contoso", + release_name="2020week10", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/NewRegionFrontloadRelease_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_stop.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_stop.py new file mode 100644 index 000000000000..161cbeb90cf0 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/new_region_frontload_release_stop.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python new_region_frontload_release_stop.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.new_region_frontload_release.stop( + provider_namespace="Microsoft.Contoso", + release_name="2020week10", + ) + + +# x-ms-original-file: 2024-09-01/NewRegionFrontloadRelease_Stop.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_create_or_update.py new file mode 100644 index 000000000000..04c09d3d2d75 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_create_or_update.py @@ -0,0 +1,60 @@ +# 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python notification_registrations_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.notification_registrations.create_or_update( + provider_namespace="Microsoft.Contoso", + notification_registration_name="fooNotificationRegistration", + properties={ + "properties": { + "includedEvents": ["*/write", "Microsoft.Contoso/employees/delete"], + "messageScope": "RegisteredSubscriptions", + "notificationEndpoints": [ + { + "locations": ["", "East US"], + "notificationDestination": "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications", + }, + { + "locations": ["North Europe"], + "notificationDestination": "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications", + }, + ], + "notificationMode": "EventHub", + } + }, + ) + print(response) + + +# x-ms-original-file: 2024-09-01/NotificationRegistrations_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_delete.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_delete.py new file mode 100644 index 000000000000..5023251831fc --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python notification_registrations_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.notification_registrations.delete( + provider_namespace="Microsoft.Contoso", + notification_registration_name="fooNotificationRegistration", + ) + + +# x-ms-original-file: 2024-09-01/NotificationRegistrations_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_get.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_get.py new file mode 100644 index 000000000000..eff3e73fd662 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python notification_registrations_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.notification_registrations.get( + provider_namespace="Microsoft.Contoso", + notification_registration_name="fooNotificationRegistration", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/NotificationRegistrations_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_list_by_provider_registration.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_list_by_provider_registration.py new file mode 100644 index 000000000000..3daf2c9790b9 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/notification_registrations_list_by_provider_registration.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python notification_registrations_list_by_provider_registration.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.notification_registrations.list_by_provider_registration( + provider_namespace="Microsoft.Contoso", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/NotificationRegistrations_ListByProviderRegistration.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_create_or_update.py new file mode 100644 index 000000000000..e18d87989f5c --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_create_or_update.py @@ -0,0 +1,80 @@ +# 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python operations_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.operations.create_or_update( + provider_namespace="Microsoft.Contoso", + operations_put_content={ + "properties": { + "contents": [ + { + "actionType": "Internal", + "display": { + "default": { + "description": "Registers the subscription for the RP.69C09791 resource provider and enables the creation of RP.69C09791.", + "operation": "Registers the RP.69C09791 Resource Provider", + "provider": "RP.69C09791", + "resource": "Register", + } + }, + "isDataAction": True, + "name": "RP.69C09791/register/action", + }, + { + "display": { + "default": { + "description": "Unregisters the subscription for the RP.69C09791 resource provider and enables the creation of RP.69C09791.", + "operation": "Unregisters the RP.69C09791 Resource Provider", + "provider": "RP.69C09791", + "resource": "Unregister", + }, + "en": { + "description": "ece249f5-b5b9-492d-ac68-b4e1be1677bc", + "operation": "d31623d6-8765-42fb-aca2-5a58303e52dd", + "provider": "RP.69C09791", + "resource": "2e1803d4-417f-492c-b305-148da38b211e", + }, + }, + "isDataAction": False, + "name": "RP.69C09791/unregister/action", + "origin": "System", + }, + ] + } + }, + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Operations_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_delete.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_delete.py new file mode 100644 index 000000000000..38875b28ff99 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_delete.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python operations_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.operations.delete( + provider_namespace="Microsoft.Contoso", + ) + + +# x-ms-original-file: 2024-09-01/Operations_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_list.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_list.py new file mode 100644 index 000000000000..ec247e343d84 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_list.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + 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, + 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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.operations.list() + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/Operations_List.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_list_by_provider_registration.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_list_by_provider_registration.py new file mode 100644 index 000000000000..f7225754c726 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/operations_list_by_provider_registration.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python operations_list_by_provider_registration.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.operations.list_by_provider_registration( + provider_namespace="Microsoft.Contoso", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Operations_ListByProviderRegistration.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_create.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_create.py new file mode 100644 index 000000000000..e79a40d83843 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_create.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_monitor_settings_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_monitor_settings.begin_create( + resource_group_name="default", + provider_monitor_setting_name="ContosoMonitorSetting", + properties={"location": "eastus"}, + ).result() + print(response) + + +# x-ms-original-file: 2024-09-01/ProviderMonitorSettings_Create.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_delete.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_delete.py new file mode 100644 index 000000000000..54d0b5656b83 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_monitor_settings_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.provider_monitor_settings.delete( + resource_group_name="default", + provider_monitor_setting_name="ContosoMonitorSetting", + ) + + +# x-ms-original-file: 2024-09-01/ProviderMonitorSettings_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_get.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_get.py new file mode 100644 index 000000000000..c9ba04f80208 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_monitor_settings_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_monitor_settings.get( + resource_group_name="default", + provider_monitor_setting_name="ContosoMonitorSetting", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/ProviderMonitorSettings_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_list_by_resource_group.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_list_by_resource_group.py new file mode 100644 index 000000000000..32020b64fd06 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_monitor_settings_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_monitor_settings.list_by_resource_group( + resource_group_name="default", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/ProviderMonitorSettings_ListByResourceGroup.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_list_by_subscription.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_list_by_subscription.py new file mode 100644 index 000000000000..f908aa976893 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_monitor_settings_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_monitor_settings.list_by_subscription() + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/ProviderMonitorSettings_ListBySubscription.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_update.py new file mode 100644 index 000000000000..87082877c933 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_monitor_settings_update.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_monitor_settings_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_monitor_settings.update( + resource_group_name="default", + provider_monitor_setting_name="ContosoMonitorSetting", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/ProviderMonitorSettings_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_create_or_update.py new file mode 100644 index 000000000000..87be158554ef --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_create_or_update.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_registrations_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_registrations.begin_create_or_update( + provider_namespace="Microsoft.Contoso", + properties={ + "properties": { + "capabilities": [ + {"effect": "Allow", "quotaId": "CSP_2015-05-01"}, + {"effect": "Allow", "quotaId": "CSP_MG_2017-12-01"}, + ], + "crossTenantTokenValidation": "EnsureSecureValidation", + "management": { + "canaryManifestOwners": ["SPARTA-PlatformServiceAdmin"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "OutageReporting"}, + "expeditedRolloutMetadata": {"enabled": False, "expeditedRolloutIntent": "Hotfix"}, + "expeditedRolloutSubmitters": ["SPARTA-PlatformServiceOperator"], + "incidentContactEmail": "helpme@contoso.com", + "incidentRoutingService": "Contoso Resource Provider", + "incidentRoutingTeam": "Contoso Triage", + "pcCode": "P1234", + "profitCenterProgramId": "1234", + "serviceTreeInfos": [ + { + "componentId": "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", + "readiness": "InDevelopment", + "serviceId": "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", + } + ], + }, + "providerType": "Internal", + "providerVersion": "2.0", + "serviceName": "root", + "services": [{"serviceName": "tags", "status": "Inactive"}], + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2024-09-01/ProviderRegistrations_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_delete.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_delete.py new file mode 100644 index 000000000000..79930c56a5de --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_delete.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_registrations_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.provider_registrations.delete( + provider_namespace="Microsoft.Contoso", + ) + + +# x-ms-original-file: 2024-09-01/ProviderRegistrations_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_generate_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_generate_operations.py new file mode 100644 index 000000000000..0867a11c508f --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_generate_operations.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_registrations_generate_operations.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_registrations.generate_operations( + provider_namespace="Microsoft.Contoso", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/ProviderRegistrations_GenerateOperations.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_get.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_get.py new file mode 100644 index 000000000000..bc1968cadf11 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_get.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_registrations_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_registrations.get( + provider_namespace="Microsoft.Contoso", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/ProviderRegistrations_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_list.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_list.py new file mode 100644 index 000000000000..0d5c3b13ba70 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/provider_registrations_list.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python provider_registrations_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, + 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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.provider_registrations.list() + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/ProviderRegistrations_List.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_actions_delete_resources.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_actions_delete_resources.py new file mode 100644 index 000000000000..9ef1f7bad54d --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_actions_delete_resources.py @@ -0,0 +1,51 @@ +# 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python resource_actions_delete_resources.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.resource_actions.begin_delete_resources( + provider_namespace="Microsoft.Contoso", + resource_action_name="default", + properties={ + "resources": [ + { + "homeTenantId": "11111111-f7ef-471a-a2f4-d0ebbf494f77", + "location": "southeastasia", + "resourceId": "/subscriptions/ab7a8701-f7ef-471a-a2f4-d0ebbf494f77/providers/Microsoft.Contoso/employee/test", + } + ] + }, + ).result() + + +# x-ms-original-file: 2024-09-01/ResourceActions_DeleteResources.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_create_or_update.py new file mode 100644 index 000000000000..8096887f087d --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_create_or_update.py @@ -0,0 +1,88 @@ +# 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python resource_type_registrations_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.resource_type_registrations.begin_create_or_update( + provider_namespace="Microsoft.Contoso", + resource_type="employees", + properties={ + "properties": { + "crossTenantTokenValidation": "EnsureSecureValidation", + "endpoints": [ + { + "apiVersions": ["2020-06-01-preview"], + "locations": ["West US", "East US", "North Europe"], + "requiredFeatures": [""], + } + ], + "management": { + "authorizationOwners": ["RPAAS-PlatformServiceAdministrator"], + "incidentContactEmail": "helpme@contoso.com", + "incidentRoutingService": "", + "incidentRoutingTeam": "", + "manifestOwners": ["SPARTA-PlatformServiceAdministrator"], + "resourceAccessPolicy": "NotSpecified", + "serviceTreeInfos": [ + { + "componentId": "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", + "readiness": "InDevelopment", + "serviceId": "d1b7d8ba-05e2-48e6-90d6-d781b99c6e69", + } + ], + }, + "metadata": {}, + "notifications": [{"notificationType": "SubscriptionNotification", "skipNotifications": "Disabled"}], + "openApiConfiguration": {"validation": {"allowNoncompliantCollectionResponse": True}}, + "regionality": "Regional", + "requestHeaderOptions": {"optOutHeaders": "SystemDataCreatedByLastModifiedBy"}, + "resourceConcurrencyControlOptions": { + "patch": {"policy": "SynchronizeBeginExtension"}, + "post": {"policy": "SynchronizeBeginExtension"}, + "put": {"policy": "SynchronizeBeginExtension"}, + }, + "resourceGraphConfiguration": {"apiVersion": "2019-01-01", "enabled": True}, + "routingType": "Default", + "swaggerSpecifications": [ + { + "apiVersions": ["2020-06-01-preview"], + "swaggerSpecFolderUri": "https://github.com/Azure/azure-rest-api-specs/blob/feature/azure/contoso/specification/contoso/resource-manager/Microsoft.SampleRP/", + } + ], + } + }, + ).result() + print(response) + + +# x-ms-original-file: 2024-09-01/ResourceTypeRegistrations_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_delete.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_delete.py new file mode 100644 index 000000000000..f5b6ded9b660 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python resource_type_registrations_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.resource_type_registrations.begin_delete( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + ).result() + + +# x-ms-original-file: 2024-09-01/ResourceTypeRegistrations_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_get.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_get.py new file mode 100644 index 000000000000..e46005e9f89b --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python resource_type_registrations_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.resource_type_registrations.get( + provider_namespace="Microsoft.Contoso", + resource_type="employees", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/ResourceTypeRegistrations_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_list_by_provider_registration.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_list_by_provider_registration.py new file mode 100644 index 000000000000..bd79f93cb3f2 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/resource_type_registrations_list_by_provider_registration.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python resource_type_registrations_list_by_provider_registration.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.resource_type_registrations.list_by_provider_registration( + provider_namespace="Microsoft.Contoso", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/ResourceTypeRegistrations_ListByProviderRegistration.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update.py new file mode 100644 index 000000000000..90350d792543 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_create_or_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.create_or_update( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + sku="testSku", + properties={ + "properties": { + "skuSettings": [ + {"kind": "Standard", "name": "freeSku", "tier": "Tier1"}, + {"costs": [{"meterId": "xxx"}], "kind": "Premium", "name": "premiumSku", "tier": "Tier2"}, + ] + } + }, + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Skus_CreateOrUpdate.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_first.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_first.py new file mode 100644 index 000000000000..5cf4d5031c72 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_first.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_create_or_update_nested_resource_type_first.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.create_or_update_nested_resource_type_first( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + sku="testSku", + properties={ + "properties": { + "skuSettings": [ + {"kind": "Standard", "name": "freeSku", "tier": "Tier1"}, + {"costs": [{"meterId": "xxx"}], "kind": "Premium", "name": "premiumSku", "tier": "Tier2"}, + ] + } + }, + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Skus_CreateOrUpdateNestedResourceTypeFirst.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_second.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_second.py new file mode 100644 index 000000000000..96f0171dc4c1 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_second.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_create_or_update_nested_resource_type_second.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.create_or_update_nested_resource_type_second( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + nested_resource_type_second="nestedResourceTypeSecond", + sku="testSku", + properties={ + "properties": { + "skuSettings": [ + {"kind": "Standard", "name": "freeSku", "tier": "Tier1"}, + {"costs": [{"meterId": "xxx"}], "kind": "Premium", "name": "premiumSku", "tier": "Tier2"}, + ] + } + }, + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Skus_CreateOrUpdateNestedResourceTypeSecond.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_third.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_third.py new file mode 100644 index 000000000000..59d82f9d9640 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_create_or_update_nested_resource_type_third.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_create_or_update_nested_resource_type_third.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.create_or_update_nested_resource_type_third( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + nested_resource_type_second="nestedResourceTypeSecond", + nested_resource_type_third="nestedResourceTypeThird", + sku="testSku", + properties={ + "properties": { + "skuSettings": [ + {"kind": "Standard", "name": "freeSku", "tier": "Tier1"}, + {"costs": [{"meterId": "xxx"}], "kind": "Premium", "name": "premiumSku", "tier": "Tier2"}, + ] + } + }, + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Skus_CreateOrUpdateNestedResourceTypeThird.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete.py new file mode 100644 index 000000000000..6c0deac11a4a --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.skus.delete( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + sku="testSku", + ) + + +# x-ms-original-file: 2024-09-01/Skus_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_first.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_first.py new file mode 100644 index 000000000000..d1421da00b5a --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_first.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_delete_nested_resource_type_first.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.skus.delete_nested_resource_type_first( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + sku="testSku", + ) + + +# x-ms-original-file: 2024-09-01/Skus_DeleteNestedResourceTypeFirst.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_second.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_second.py new file mode 100644 index 000000000000..a8152e84ec03 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_second.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_delete_nested_resource_type_second.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.skus.delete_nested_resource_type_second( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + nested_resource_type_second="nestedResourceTypeSecond", + sku="testSku", + ) + + +# x-ms-original-file: 2024-09-01/Skus_DeleteNestedResourceTypeSecond.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_third.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_third.py new file mode 100644 index 000000000000..f41cc1eb25cd --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_delete_nested_resource_type_third.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_delete_nested_resource_type_third.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + client.skus.delete_nested_resource_type_third( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + nested_resource_type_second="nestedResourceTypeSecond", + nested_resource_type_third="nestedResourceTypeThird", + sku="testSku", + ) + + +# x-ms-original-file: 2024-09-01/Skus_DeleteNestedResourceTypeThird.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get.py new file mode 100644 index 000000000000..67e047a60615 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python 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, + 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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.get( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + sku="testSku", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Skus_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_first.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_first.py new file mode 100644 index 000000000000..2b5d7b9cfab3 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_first.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_get_nested_resource_type_first.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.get_nested_resource_type_first( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + sku="testSku", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Skus_GetNestedResourceTypeFirst.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_second.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_second.py new file mode 100644 index 000000000000..6fc46167f648 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_second.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_get_nested_resource_type_second.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.get_nested_resource_type_second( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + nested_resource_type_second="nestedResourceTypeSecond", + sku="testSku", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Skus_GetNestedResourceTypeSecond.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_third.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_third.py new file mode 100644 index 000000000000..b7ad7827a840 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_get_nested_resource_type_third.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_get_nested_resource_type_third.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.get_nested_resource_type_third( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + nested_resource_type_second="nestedResourceTypeSecond", + nested_resource_type_third="nestedResourceTypeThird", + sku="testSku", + ) + print(response) + + +# x-ms-original-file: 2024-09-01/Skus_GetNestedResourceTypeThird.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations.py new file mode 100644 index 000000000000..5ce335353046 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_list_by_resource_type_registrations.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.list_by_resource_type_registrations( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/Skus_ListByResourceTypeRegistrations.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_first.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_first.py new file mode 100644 index 000000000000..81da9fe6e42d --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_first.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_list_by_resource_type_registrations_nested_resource_type_first.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.list_by_resource_type_registrations_nested_resource_type_first( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/Skus_ListByResourceTypeRegistrationsNestedResourceTypeFirst.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_second.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_second.py new file mode 100644 index 000000000000..322167c1141f --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_second.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_list_by_resource_type_registrations_nested_resource_type_second.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.list_by_resource_type_registrations_nested_resource_type_second( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + nested_resource_type_second="nestedResourceTypeSecond", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/Skus_ListByResourceTypeRegistrationsNestedResourceTypeSecond.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_third.py b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_third.py new file mode 100644 index 000000000000..f94144cc404c --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_samples/skus_list_by_resource_type_registrations_nested_resource_type_third.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.providerhub import ProviderHubMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-providerhub +# USAGE + python skus_list_by_resource_type_registrations_nested_resource_type_third.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 = ProviderHubMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.skus.list_by_resource_type_registrations_nested_resource_type_third( + provider_namespace="Microsoft.Contoso", + resource_type="testResourceType", + nested_resource_type_first="nestedResourceTypeFirst", + nested_resource_type_second="nestedResourceTypeSecond", + nested_resource_type_third="nestedResourceTypeThird", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2024-09-01/Skus_ListByResourceTypeRegistrationsNestedResourceTypeThird.json +if __name__ == "__main__": + main() diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/conftest.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/conftest.py new file mode 100644 index 000000000000..80208391aa92 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/conftest.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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 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): + providerhubmgmt_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + providerhubmgmt_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + providerhubmgmt_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + providerhubmgmt_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=providerhubmgmt_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=providerhubmgmt_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=providerhubmgmt_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=providerhubmgmt_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/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt.py new file mode 100644 index 000000000000..fc284d84d97c --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt.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. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmt(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_generate_manifest(self, resource_group): + response = self.client.generate_manifest( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_checkin_manifest(self, resource_group): + response = self.client.checkin_manifest( + provider_namespace="str", + checkin_manifest_params={"baselineArmManifestLocation": "str", "environment": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_async.py new file mode 100644 index 000000000000..d19803055980 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_generate_manifest(self, resource_group): + response = await self.client.generate_manifest( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_checkin_manifest(self, resource_group): + response = await self.client.checkin_manifest( + provider_namespace="str", + checkin_manifest_params={"baselineArmManifestLocation": "str", "environment": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_authorized_applications_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_authorized_applications_operations.py new file mode 100644 index 000000000000..9a6b31b0c92f --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_authorized_applications_operations.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtAuthorizedApplicationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_authorized_applications_get(self, resource_group): + response = self.client.authorized_applications.get( + provider_namespace="str", + application_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_authorized_applications_begin_create_or_update(self, resource_group): + response = self.client.authorized_applications.begin_create_or_update( + provider_namespace="str", + application_id="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "dataAuthorizations": [{"role": "str", "resourceTypes": ["str"]}], + "providerAuthorization": {"managedByRoleDefinitionId": "str", "roleDefinitionId": "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", + }, + ).result() # 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_authorized_applications_delete(self, resource_group): + response = self.client.authorized_applications.delete( + provider_namespace="str", + application_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_authorized_applications_list(self, resource_group): + response = self.client.authorized_applications.list( + provider_namespace="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_authorized_applications_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_authorized_applications_operations_async.py new file mode 100644 index 000000000000..80542b8b44ba --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_authorized_applications_operations_async.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtAuthorizedApplicationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_authorized_applications_get(self, resource_group): + response = await self.client.authorized_applications.get( + provider_namespace="str", + application_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_authorized_applications_begin_create_or_update(self, resource_group): + response = await ( + await self.client.authorized_applications.begin_create_or_update( + provider_namespace="str", + application_id="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "dataAuthorizations": [{"role": "str", "resourceTypes": ["str"]}], + "providerAuthorization": {"managedByRoleDefinitionId": "str", "roleDefinitionId": "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", + }, + ) + ).result() # 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_authorized_applications_delete(self, resource_group): + response = await self.client.authorized_applications.delete( + provider_namespace="str", + application_id="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_authorized_applications_list(self, resource_group): + response = self.client.authorized_applications.list( + provider_namespace="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_custom_rollouts_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_custom_rollouts_operations.py new file mode 100644 index 000000000000..cac3c7e7b238 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_custom_rollouts_operations.py @@ -0,0 +1,537 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtCustomRolloutsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_rollouts_get(self, resource_group): + response = self.client.custom_rollouts.get( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_rollouts_begin_create_or_update(self, resource_group): + response = self.client.custom_rollouts.begin_create_or_update( + provider_namespace="str", + rollout_name="str", + properties={ + "properties": { + "specification": { + "autoProvisionConfig": {"resourceGraph": bool, "storage": bool}, + "canary": {"regions": ["str"]}, + "providerRegistration": { + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "capabilities": [{"effect": "str", "quotaId": "str", "requiredFeatures": ["str"]}], + "crossTenantTokenValidation": "str", + "customManifestVersion": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableTenantLinkedNotification": bool, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "globalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "legacyNamespace": "str", + "legacyRegistrations": ["str"], + "linkedNotificationRules": [ + { + "actions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "endpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + }, + "managementGroupGlobalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "metadata": {}, + "namespace": "str", + "notificationOptions": "str", + "notificationSettings": { + "subscriberSettings": [ + { + "filterRules": [ + { + "endpointInformation": [ + { + "endpoint": "str", + "endpointType": "str", + "schemaVersion": "str", + } + ], + "filterQuery": "str", + } + ] + } + ] + }, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "optionalFeatures": ["str"], + "privateResourceProviderConfiguration": {"allowedSubscriptions": ["str"]}, + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [ + {"applicationId": "str", "roleDefinitionId": "str"} + ], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "providerHubMetadata": { + "directRpRoleDefinitionId": "str", + "globalAsyncOperationResourceTypeName": "str", + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [ + {"applicationId": "str", "roleDefinitionId": "str"} + ], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "regionalAsyncOperationResourceTypeName": "str", + "thirdPartyProviderAuthorization": { + "authorizations": [{"principalId": "str", "roleDefinitionId": "str"}], + "managedByTenantId": "str", + }, + }, + "providerType": "str", + "providerVersion": "str", + "provisioningState": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceGroupLockOptionDuringMove": {"blockActionVerb": "str"}, + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ], + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": { + "additionalOptions": "str", + "authorizationActions": ["str"], + } + }, + "responseOptions": {"serviceClientOptionsType": "str"}, + "serviceName": "str", + "services": [{"serviceName": "str", "status": "str"}], + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "templateDeploymentOptions": {"preflightOptions": ["str"], "preflightSupported": bool}, + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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", + }, + "refreshSubscriptionRegistration": bool, + "releaseScopes": ["str"], + "resourceTypeRegistrations": [ + { + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "addResourceListTargetLocations": bool, + "additionalOptions": "str", + "allowEmptyRoleAssignments": bool, + "allowedResourceNames": [{"getActionVerb": "str", "name": "str"}], + "allowedTemplateDeploymentReferenceActions": ["str"], + "allowedUnauthorizedActions": ["str"], + "allowedUnauthorizedActionsExtensions": [{"action": "str", "intent": "str"}], + "apiProfiles": [{"apiVersion": "str", "profileVersion": "str"}], + "asyncOperationResourceTypeName": "str", + "asyncTimeoutRules": [{"actionName": "str", "timeout": "str"}], + "authorizationActionMappings": [{"desired": "str", "original": "str"}], + "availabilityZoneRule": {"availabilityZonePolicy": "str"}, + "capacityRule": {"capacityPolicy": "str", "skuAlias": "str"}, + "category": "str", + "checkNameAvailabilitySpecifications": { + "enableDefaultValidation": bool, + "resourceTypesWithCustomValidation": ["str"], + }, + "commonApiVersions": ["str"], + "crossTenantTokenValidation": "str", + "defaultApiVersion": "str", + "disallowedActionVerbs": ["str"], + "disallowedEndUserOperations": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableAsyncOperation": bool, + "enableThirdPartyS2S": bool, + "endpoints": [ + { + "apiVersion": "str", + "apiVersions": ["str"], + "dataBoundary": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "extensions": [ + { + "endpointUri": "str", + "extensionCategories": ["str"], + "timeout": "1 day, 0:00:00", + } + ], + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "kind": "str", + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + "zones": ["str"], + } + ], + "extendedLocations": [{"supportedPolicy": "str", "type": "str"}], + "extensionOptions": { + "resourceCreationBegin": {"request": ["str"], "response": ["str"]} + }, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "frontdoorRequestMode": "str", + "groupingTag": "str", + "identityManagement": { + "applicationId": "str", + "applicationIds": ["str"], + "delegationAppIds": ["str"], + "type": "str", + }, + "isPureProxy": bool, + "legacyName": "str", + "legacyNames": ["str"], + "legacyPolicy": { + "disallowedConditions": [ + {"disallowedLegacyOperations": ["str"], "feature": "str"} + ], + "disallowedLegacyOperations": ["str"], + }, + "linkedAccessChecks": [ + { + "actionName": "str", + "linkedAction": "str", + "linkedActionVerb": "str", + "linkedProperty": "str", + "linkedType": "str", + } + ], + "linkedNotificationRules": [ + { + "actions": ["str"], + "actionsOnFailedOperation": ["str"], + "fastPathActions": ["str"], + "fastPathActionsOnFailedOperation": ["str"], + "linkedNotificationTimeout": "1 day, 0:00:00", + } + ], + "linkedOperationRules": [ + {"linkedAction": "str", "linkedOperation": "str", "dependsOnTypes": ["str"]} + ], + "loggingRules": [ + { + "action": "str", + "detailLevel": "str", + "direction": "str", + "hiddenPropertyPaths": { + "hiddenPathsOnRequest": ["str"], + "hiddenPathsOnResponse": ["str"], + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + }, + "manifestLink": "str", + "marketplaceOptions": {"addOnPlanConversionAllowed": bool}, + "marketplaceType": "str", + "metadata": {"str": {}}, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "onBehalfOfTokens": {"actionName": "str", "lifeTime": "str"}, + "openApiConfiguration": { + "validation": {"allowNoncompliantCollectionResponse": bool} + }, + "policyExecutionType": "str", + "provisioningState": "str", + "quotaRule": { + "locationRules": [{"location": "str", "policy": "str", "quotaId": "str"}], + "quotaPolicy": "str", + "requiredFeatures": ["str"], + }, + "regionality": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceCache": { + "enableResourceCache": bool, + "resourceCacheExpirationTimespan": "str", + }, + "resourceConcurrencyControlOptions": {"str": {"policy": "str"}}, + "resourceDeletionPolicy": "str", + "resourceGraphConfiguration": {"apiVersion": "str", "enabled": bool}, + "resourceManagementOptions": { + "batchProvisioningSupport": {"supportedOperations": "str"}, + "deleteDependencies": [ + {"linkedProperty": "str", "linkedType": "str", "requiredFeatures": ["str"]} + ], + "nestedProvisioningSupport": {"minimumApiVersion": "str"}, + }, + "resourceMovePolicy": { + "crossResourceGroupMoveEnabled": bool, + "crossSubscriptionMoveEnabled": bool, + "validationRequired": bool, + }, + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": { + "additionalOptions": "str", + "authorizationActions": ["str"], + } + }, + "resourceQueryManagement": {"filterOption": "str"}, + "resourceSubType": "str", + "resourceTypeCommonAttributeManagement": {"commonApiVersionsMergeMode": "str"}, + "resourceValidation": "str", + "routingRule": {"hostResourceType": "str"}, + "routingType": "str", + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + "skuLink": "str", + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "subscriptionStateRules": [{"allowedActions": ["str"], "state": "str"}], + "supportsTags": bool, + "swaggerSpecifications": [{"apiVersions": ["str"], "swaggerSpecFolderUri": "str"}], + "templateDeploymentOptions": { + "preflightOptions": ["str"], + "preflightSupported": bool, + }, + "templateDeploymentPolicy": { + "capabilities": "str", + "preflightOptions": "str", + "preflightNotifications": "str", + }, + "throttlingRules": [ + { + "action": "str", + "metrics": [{"limit": 0, "type": "str", "interval": "1 day, 0:00:00"}], + "applicationId": ["str"], + "requiredFeatures": ["str"], + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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", + } + ], + "skipReleaseScopeValidation": bool, + }, + "provisioningState": "str", + "status": { + "completedRegions": ["str"], + "failedOrSkippedRegions": { + "str": { + "additionalInfo": [{"type": "str", "info": {}}], + "code": "str", + "details": [...], + "message": "str", + "target": "str", + } + }, + "manifestCheckinStatus": { + "isCheckedIn": bool, + "statusMessage": "str", + "commitId": "str", + "pullRequest": "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_custom_rollouts_delete(self, resource_group): + response = self.client.custom_rollouts.delete( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_rollouts_list_by_provider_registration(self, resource_group): + response = self.client.custom_rollouts.list_by_provider_registration( + provider_namespace="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_custom_rollouts_stop(self, resource_group): + response = self.client.custom_rollouts.stop( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_custom_rollouts_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_custom_rollouts_operations_async.py new file mode 100644 index 000000000000..bfef111c244c --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_custom_rollouts_operations_async.py @@ -0,0 +1,554 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtCustomRolloutsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_rollouts_get(self, resource_group): + response = await self.client.custom_rollouts.get( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_rollouts_begin_create_or_update(self, resource_group): + response = await ( + await self.client.custom_rollouts.begin_create_or_update( + provider_namespace="str", + rollout_name="str", + properties={ + "properties": { + "specification": { + "autoProvisionConfig": {"resourceGraph": bool, "storage": bool}, + "canary": {"regions": ["str"]}, + "providerRegistration": { + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "capabilities": [{"effect": "str", "quotaId": "str", "requiredFeatures": ["str"]}], + "crossTenantTokenValidation": "str", + "customManifestVersion": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableTenantLinkedNotification": bool, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "globalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "legacyNamespace": "str", + "legacyRegistrations": ["str"], + "linkedNotificationRules": [ + { + "actions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "endpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + }, + "managementGroupGlobalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "metadata": {}, + "namespace": "str", + "notificationOptions": "str", + "notificationSettings": { + "subscriberSettings": [ + { + "filterRules": [ + { + "endpointInformation": [ + { + "endpoint": "str", + "endpointType": "str", + "schemaVersion": "str", + } + ], + "filterQuery": "str", + } + ] + } + ] + }, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "optionalFeatures": ["str"], + "privateResourceProviderConfiguration": {"allowedSubscriptions": ["str"]}, + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [ + {"applicationId": "str", "roleDefinitionId": "str"} + ], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "providerHubMetadata": { + "directRpRoleDefinitionId": "str", + "globalAsyncOperationResourceTypeName": "str", + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [ + {"applicationId": "str", "roleDefinitionId": "str"} + ], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "regionalAsyncOperationResourceTypeName": "str", + "thirdPartyProviderAuthorization": { + "authorizations": [{"principalId": "str", "roleDefinitionId": "str"}], + "managedByTenantId": "str", + }, + }, + "providerType": "str", + "providerVersion": "str", + "provisioningState": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceGroupLockOptionDuringMove": {"blockActionVerb": "str"}, + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ], + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": { + "additionalOptions": "str", + "authorizationActions": ["str"], + } + }, + "responseOptions": {"serviceClientOptionsType": "str"}, + "serviceName": "str", + "services": [{"serviceName": "str", "status": "str"}], + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "templateDeploymentOptions": { + "preflightOptions": ["str"], + "preflightSupported": bool, + }, + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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", + }, + "refreshSubscriptionRegistration": bool, + "releaseScopes": ["str"], + "resourceTypeRegistrations": [ + { + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "addResourceListTargetLocations": bool, + "additionalOptions": "str", + "allowEmptyRoleAssignments": bool, + "allowedResourceNames": [{"getActionVerb": "str", "name": "str"}], + "allowedTemplateDeploymentReferenceActions": ["str"], + "allowedUnauthorizedActions": ["str"], + "allowedUnauthorizedActionsExtensions": [{"action": "str", "intent": "str"}], + "apiProfiles": [{"apiVersion": "str", "profileVersion": "str"}], + "asyncOperationResourceTypeName": "str", + "asyncTimeoutRules": [{"actionName": "str", "timeout": "str"}], + "authorizationActionMappings": [{"desired": "str", "original": "str"}], + "availabilityZoneRule": {"availabilityZonePolicy": "str"}, + "capacityRule": {"capacityPolicy": "str", "skuAlias": "str"}, + "category": "str", + "checkNameAvailabilitySpecifications": { + "enableDefaultValidation": bool, + "resourceTypesWithCustomValidation": ["str"], + }, + "commonApiVersions": ["str"], + "crossTenantTokenValidation": "str", + "defaultApiVersion": "str", + "disallowedActionVerbs": ["str"], + "disallowedEndUserOperations": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableAsyncOperation": bool, + "enableThirdPartyS2S": bool, + "endpoints": [ + { + "apiVersion": "str", + "apiVersions": ["str"], + "dataBoundary": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "extensions": [ + { + "endpointUri": "str", + "extensionCategories": ["str"], + "timeout": "1 day, 0:00:00", + } + ], + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "kind": "str", + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + "zones": ["str"], + } + ], + "extendedLocations": [{"supportedPolicy": "str", "type": "str"}], + "extensionOptions": { + "resourceCreationBegin": {"request": ["str"], "response": ["str"]} + }, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "frontdoorRequestMode": "str", + "groupingTag": "str", + "identityManagement": { + "applicationId": "str", + "applicationIds": ["str"], + "delegationAppIds": ["str"], + "type": "str", + }, + "isPureProxy": bool, + "legacyName": "str", + "legacyNames": ["str"], + "legacyPolicy": { + "disallowedConditions": [ + {"disallowedLegacyOperations": ["str"], "feature": "str"} + ], + "disallowedLegacyOperations": ["str"], + }, + "linkedAccessChecks": [ + { + "actionName": "str", + "linkedAction": "str", + "linkedActionVerb": "str", + "linkedProperty": "str", + "linkedType": "str", + } + ], + "linkedNotificationRules": [ + { + "actions": ["str"], + "actionsOnFailedOperation": ["str"], + "fastPathActions": ["str"], + "fastPathActionsOnFailedOperation": ["str"], + "linkedNotificationTimeout": "1 day, 0:00:00", + } + ], + "linkedOperationRules": [ + {"linkedAction": "str", "linkedOperation": "str", "dependsOnTypes": ["str"]} + ], + "loggingRules": [ + { + "action": "str", + "detailLevel": "str", + "direction": "str", + "hiddenPropertyPaths": { + "hiddenPathsOnRequest": ["str"], + "hiddenPathsOnResponse": ["str"], + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": { + "enabled": bool, + "expeditedRolloutIntent": "str", + }, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [ + {"actions": ["str"], "allowedGroupClaims": ["str"]} + ], + "schemaOwners": ["str"], + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + }, + "manifestLink": "str", + "marketplaceOptions": {"addOnPlanConversionAllowed": bool}, + "marketplaceType": "str", + "metadata": {"str": {}}, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "onBehalfOfTokens": {"actionName": "str", "lifeTime": "str"}, + "openApiConfiguration": { + "validation": {"allowNoncompliantCollectionResponse": bool} + }, + "policyExecutionType": "str", + "provisioningState": "str", + "quotaRule": { + "locationRules": [{"location": "str", "policy": "str", "quotaId": "str"}], + "quotaPolicy": "str", + "requiredFeatures": ["str"], + }, + "regionality": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceCache": { + "enableResourceCache": bool, + "resourceCacheExpirationTimespan": "str", + }, + "resourceConcurrencyControlOptions": {"str": {"policy": "str"}}, + "resourceDeletionPolicy": "str", + "resourceGraphConfiguration": {"apiVersion": "str", "enabled": bool}, + "resourceManagementOptions": { + "batchProvisioningSupport": {"supportedOperations": "str"}, + "deleteDependencies": [ + { + "linkedProperty": "str", + "linkedType": "str", + "requiredFeatures": ["str"], + } + ], + "nestedProvisioningSupport": {"minimumApiVersion": "str"}, + }, + "resourceMovePolicy": { + "crossResourceGroupMoveEnabled": bool, + "crossSubscriptionMoveEnabled": bool, + "validationRequired": bool, + }, + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": { + "additionalOptions": "str", + "authorizationActions": ["str"], + } + }, + "resourceQueryManagement": {"filterOption": "str"}, + "resourceSubType": "str", + "resourceTypeCommonAttributeManagement": {"commonApiVersionsMergeMode": "str"}, + "resourceValidation": "str", + "routingRule": {"hostResourceType": "str"}, + "routingType": "str", + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + "skuLink": "str", + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "subscriptionStateRules": [{"allowedActions": ["str"], "state": "str"}], + "supportsTags": bool, + "swaggerSpecifications": [ + {"apiVersions": ["str"], "swaggerSpecFolderUri": "str"} + ], + "templateDeploymentOptions": { + "preflightOptions": ["str"], + "preflightSupported": bool, + }, + "templateDeploymentPolicy": { + "capabilities": "str", + "preflightOptions": "str", + "preflightNotifications": "str", + }, + "throttlingRules": [ + { + "action": "str", + "metrics": [{"limit": 0, "type": "str", "interval": "1 day, 0:00:00"}], + "applicationId": ["str"], + "requiredFeatures": ["str"], + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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", + } + ], + "skipReleaseScopeValidation": bool, + }, + "provisioningState": "str", + "status": { + "completedRegions": ["str"], + "failedOrSkippedRegions": { + "str": { + "additionalInfo": [{"type": "str", "info": {}}], + "code": "str", + "details": [...], + "message": "str", + "target": "str", + } + }, + "manifestCheckinStatus": { + "isCheckedIn": bool, + "statusMessage": "str", + "commitId": "str", + "pullRequest": "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_custom_rollouts_delete(self, resource_group): + response = await self.client.custom_rollouts.delete( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_custom_rollouts_list_by_provider_registration(self, resource_group): + response = self.client.custom_rollouts.list_by_provider_registration( + provider_namespace="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_custom_rollouts_stop(self, resource_group): + response = await self.client.custom_rollouts.stop( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_default_rollouts_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_default_rollouts_operations.py new file mode 100644 index 000000000000..3ee309f2df65 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_default_rollouts_operations.py @@ -0,0 +1,543 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtDefaultRolloutsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_default_rollouts_get(self, resource_group): + response = self.client.default_rollouts.get( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_default_rollouts_begin_create_or_update(self, resource_group): + response = self.client.default_rollouts.begin_create_or_update( + provider_namespace="str", + rollout_name="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "provisioningState": "str", + "specification": { + "autoProvisionConfig": {"resourceGraph": bool, "storage": bool}, + "canary": {"regions": ["str"], "skipRegions": ["str"]}, + "expeditedRollout": {"enabled": bool}, + "highTraffic": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + "lowTraffic": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + "mediumTraffic": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + "providerRegistration": { + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "capabilities": [{"effect": "str", "quotaId": "str", "requiredFeatures": ["str"]}], + "crossTenantTokenValidation": "str", + "customManifestVersion": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableTenantLinkedNotification": bool, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "globalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "legacyNamespace": "str", + "legacyRegistrations": ["str"], + "linkedNotificationRules": [ + { + "actions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "endpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + }, + "managementGroupGlobalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "metadata": {}, + "namespace": "str", + "notificationOptions": "str", + "notificationSettings": { + "subscriberSettings": [ + { + "filterRules": [ + { + "endpointInformation": [ + { + "endpoint": "str", + "endpointType": "str", + "schemaVersion": "str", + } + ], + "filterQuery": "str", + } + ] + } + ] + }, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "optionalFeatures": ["str"], + "privateResourceProviderConfiguration": {"allowedSubscriptions": ["str"]}, + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [ + {"applicationId": "str", "roleDefinitionId": "str"} + ], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "providerHubMetadata": { + "directRpRoleDefinitionId": "str", + "globalAsyncOperationResourceTypeName": "str", + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [ + {"applicationId": "str", "roleDefinitionId": "str"} + ], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "regionalAsyncOperationResourceTypeName": "str", + "thirdPartyProviderAuthorization": { + "authorizations": [{"principalId": "str", "roleDefinitionId": "str"}], + "managedByTenantId": "str", + }, + }, + "providerType": "str", + "providerVersion": "str", + "provisioningState": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceGroupLockOptionDuringMove": {"blockActionVerb": "str"}, + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ], + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": { + "additionalOptions": "str", + "authorizationActions": ["str"], + } + }, + "responseOptions": {"serviceClientOptionsType": "str"}, + "serviceName": "str", + "services": [{"serviceName": "str", "status": "str"}], + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "templateDeploymentOptions": {"preflightOptions": ["str"], "preflightSupported": bool}, + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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", + }, + "resourceTypeRegistrations": [ + { + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "addResourceListTargetLocations": bool, + "additionalOptions": "str", + "allowEmptyRoleAssignments": bool, + "allowedResourceNames": [{"getActionVerb": "str", "name": "str"}], + "allowedTemplateDeploymentReferenceActions": ["str"], + "allowedUnauthorizedActions": ["str"], + "allowedUnauthorizedActionsExtensions": [{"action": "str", "intent": "str"}], + "apiProfiles": [{"apiVersion": "str", "profileVersion": "str"}], + "asyncOperationResourceTypeName": "str", + "asyncTimeoutRules": [{"actionName": "str", "timeout": "str"}], + "authorizationActionMappings": [{"desired": "str", "original": "str"}], + "availabilityZoneRule": {"availabilityZonePolicy": "str"}, + "capacityRule": {"capacityPolicy": "str", "skuAlias": "str"}, + "category": "str", + "checkNameAvailabilitySpecifications": { + "enableDefaultValidation": bool, + "resourceTypesWithCustomValidation": ["str"], + }, + "commonApiVersions": ["str"], + "crossTenantTokenValidation": "str", + "defaultApiVersion": "str", + "disallowedActionVerbs": ["str"], + "disallowedEndUserOperations": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableAsyncOperation": bool, + "enableThirdPartyS2S": bool, + "endpoints": [ + { + "apiVersion": "str", + "apiVersions": ["str"], + "dataBoundary": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "extensions": [ + { + "endpointUri": "str", + "extensionCategories": ["str"], + "timeout": "1 day, 0:00:00", + } + ], + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "kind": "str", + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + "zones": ["str"], + } + ], + "extendedLocations": [{"supportedPolicy": "str", "type": "str"}], + "extensionOptions": { + "resourceCreationBegin": {"request": ["str"], "response": ["str"]} + }, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "frontdoorRequestMode": "str", + "groupingTag": "str", + "identityManagement": { + "applicationId": "str", + "applicationIds": ["str"], + "delegationAppIds": ["str"], + "type": "str", + }, + "isPureProxy": bool, + "legacyName": "str", + "legacyNames": ["str"], + "legacyPolicy": { + "disallowedConditions": [ + {"disallowedLegacyOperations": ["str"], "feature": "str"} + ], + "disallowedLegacyOperations": ["str"], + }, + "linkedAccessChecks": [ + { + "actionName": "str", + "linkedAction": "str", + "linkedActionVerb": "str", + "linkedProperty": "str", + "linkedType": "str", + } + ], + "linkedNotificationRules": [ + { + "actions": ["str"], + "actionsOnFailedOperation": ["str"], + "fastPathActions": ["str"], + "fastPathActionsOnFailedOperation": ["str"], + "linkedNotificationTimeout": "1 day, 0:00:00", + } + ], + "linkedOperationRules": [ + {"linkedAction": "str", "linkedOperation": "str", "dependsOnTypes": ["str"]} + ], + "loggingRules": [ + { + "action": "str", + "detailLevel": "str", + "direction": "str", + "hiddenPropertyPaths": { + "hiddenPathsOnRequest": ["str"], + "hiddenPathsOnResponse": ["str"], + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + }, + "manifestLink": "str", + "marketplaceOptions": {"addOnPlanConversionAllowed": bool}, + "marketplaceType": "str", + "metadata": {"str": {}}, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "onBehalfOfTokens": {"actionName": "str", "lifeTime": "str"}, + "openApiConfiguration": { + "validation": {"allowNoncompliantCollectionResponse": bool} + }, + "policyExecutionType": "str", + "provisioningState": "str", + "quotaRule": { + "locationRules": [{"location": "str", "policy": "str", "quotaId": "str"}], + "quotaPolicy": "str", + "requiredFeatures": ["str"], + }, + "regionality": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceCache": { + "enableResourceCache": bool, + "resourceCacheExpirationTimespan": "str", + }, + "resourceConcurrencyControlOptions": {"str": {"policy": "str"}}, + "resourceDeletionPolicy": "str", + "resourceGraphConfiguration": {"apiVersion": "str", "enabled": bool}, + "resourceManagementOptions": { + "batchProvisioningSupport": {"supportedOperations": "str"}, + "deleteDependencies": [ + {"linkedProperty": "str", "linkedType": "str", "requiredFeatures": ["str"]} + ], + "nestedProvisioningSupport": {"minimumApiVersion": "str"}, + }, + "resourceMovePolicy": { + "crossResourceGroupMoveEnabled": bool, + "crossSubscriptionMoveEnabled": bool, + "validationRequired": bool, + }, + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": { + "additionalOptions": "str", + "authorizationActions": ["str"], + } + }, + "resourceQueryManagement": {"filterOption": "str"}, + "resourceSubType": "str", + "resourceTypeCommonAttributeManagement": {"commonApiVersionsMergeMode": "str"}, + "resourceValidation": "str", + "routingRule": {"hostResourceType": "str"}, + "routingType": "str", + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + "skuLink": "str", + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "subscriptionStateRules": [{"allowedActions": ["str"], "state": "str"}], + "supportsTags": bool, + "swaggerSpecifications": [{"apiVersions": ["str"], "swaggerSpecFolderUri": "str"}], + "templateDeploymentOptions": { + "preflightOptions": ["str"], + "preflightSupported": bool, + }, + "templateDeploymentPolicy": { + "capabilities": "str", + "preflightOptions": "str", + "preflightNotifications": "str", + }, + "throttlingRules": [ + { + "action": "str", + "metrics": [{"limit": 0, "type": "str", "interval": "1 day, 0:00:00"}], + "applicationId": ["str"], + "requiredFeatures": ["str"], + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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", + } + ], + "restOfTheWorldGroupOne": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + "restOfTheWorldGroupTwo": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + }, + "status": { + "completedRegions": ["str"], + "failedOrSkippedRegions": { + "str": { + "additionalInfo": [{"type": "str", "info": {}}], + "code": "str", + "details": [...], + "message": "str", + "target": "str", + } + }, + "manifestCheckinStatus": { + "isCheckedIn": bool, + "statusMessage": "str", + "commitId": "str", + "pullRequest": "str", + }, + "nextTrafficRegion": "str", + "nextTrafficRegionScheduledTime": "2020-02-20 00:00:00", + "subscriptionReregistrationResult": "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_default_rollouts_delete(self, resource_group): + response = self.client.default_rollouts.delete( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_default_rollouts_list_by_provider_registration(self, resource_group): + response = self.client.default_rollouts.list_by_provider_registration( + provider_namespace="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_default_rollouts_stop(self, resource_group): + response = self.client.default_rollouts.stop( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_default_rollouts_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_default_rollouts_operations_async.py new file mode 100644 index 000000000000..8a564871b69e --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_default_rollouts_operations_async.py @@ -0,0 +1,560 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtDefaultRolloutsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_default_rollouts_get(self, resource_group): + response = await self.client.default_rollouts.get( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_default_rollouts_begin_create_or_update(self, resource_group): + response = await ( + await self.client.default_rollouts.begin_create_or_update( + provider_namespace="str", + rollout_name="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "provisioningState": "str", + "specification": { + "autoProvisionConfig": {"resourceGraph": bool, "storage": bool}, + "canary": {"regions": ["str"], "skipRegions": ["str"]}, + "expeditedRollout": {"enabled": bool}, + "highTraffic": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + "lowTraffic": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + "mediumTraffic": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + "providerRegistration": { + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "capabilities": [{"effect": "str", "quotaId": "str", "requiredFeatures": ["str"]}], + "crossTenantTokenValidation": "str", + "customManifestVersion": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableTenantLinkedNotification": bool, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "globalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "legacyNamespace": "str", + "legacyRegistrations": ["str"], + "linkedNotificationRules": [ + { + "actions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "endpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + }, + "managementGroupGlobalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "metadata": {}, + "namespace": "str", + "notificationOptions": "str", + "notificationSettings": { + "subscriberSettings": [ + { + "filterRules": [ + { + "endpointInformation": [ + { + "endpoint": "str", + "endpointType": "str", + "schemaVersion": "str", + } + ], + "filterQuery": "str", + } + ] + } + ] + }, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "optionalFeatures": ["str"], + "privateResourceProviderConfiguration": {"allowedSubscriptions": ["str"]}, + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [ + {"applicationId": "str", "roleDefinitionId": "str"} + ], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "providerHubMetadata": { + "directRpRoleDefinitionId": "str", + "globalAsyncOperationResourceTypeName": "str", + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [ + {"applicationId": "str", "roleDefinitionId": "str"} + ], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "regionalAsyncOperationResourceTypeName": "str", + "thirdPartyProviderAuthorization": { + "authorizations": [{"principalId": "str", "roleDefinitionId": "str"}], + "managedByTenantId": "str", + }, + }, + "providerType": "str", + "providerVersion": "str", + "provisioningState": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceGroupLockOptionDuringMove": {"blockActionVerb": "str"}, + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ], + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": { + "additionalOptions": "str", + "authorizationActions": ["str"], + } + }, + "responseOptions": {"serviceClientOptionsType": "str"}, + "serviceName": "str", + "services": [{"serviceName": "str", "status": "str"}], + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "templateDeploymentOptions": { + "preflightOptions": ["str"], + "preflightSupported": bool, + }, + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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", + }, + "resourceTypeRegistrations": [ + { + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "addResourceListTargetLocations": bool, + "additionalOptions": "str", + "allowEmptyRoleAssignments": bool, + "allowedResourceNames": [{"getActionVerb": "str", "name": "str"}], + "allowedTemplateDeploymentReferenceActions": ["str"], + "allowedUnauthorizedActions": ["str"], + "allowedUnauthorizedActionsExtensions": [{"action": "str", "intent": "str"}], + "apiProfiles": [{"apiVersion": "str", "profileVersion": "str"}], + "asyncOperationResourceTypeName": "str", + "asyncTimeoutRules": [{"actionName": "str", "timeout": "str"}], + "authorizationActionMappings": [{"desired": "str", "original": "str"}], + "availabilityZoneRule": {"availabilityZonePolicy": "str"}, + "capacityRule": {"capacityPolicy": "str", "skuAlias": "str"}, + "category": "str", + "checkNameAvailabilitySpecifications": { + "enableDefaultValidation": bool, + "resourceTypesWithCustomValidation": ["str"], + }, + "commonApiVersions": ["str"], + "crossTenantTokenValidation": "str", + "defaultApiVersion": "str", + "disallowedActionVerbs": ["str"], + "disallowedEndUserOperations": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableAsyncOperation": bool, + "enableThirdPartyS2S": bool, + "endpoints": [ + { + "apiVersion": "str", + "apiVersions": ["str"], + "dataBoundary": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "extensions": [ + { + "endpointUri": "str", + "extensionCategories": ["str"], + "timeout": "1 day, 0:00:00", + } + ], + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "kind": "str", + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + "zones": ["str"], + } + ], + "extendedLocations": [{"supportedPolicy": "str", "type": "str"}], + "extensionOptions": { + "resourceCreationBegin": {"request": ["str"], "response": ["str"]} + }, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "frontdoorRequestMode": "str", + "groupingTag": "str", + "identityManagement": { + "applicationId": "str", + "applicationIds": ["str"], + "delegationAppIds": ["str"], + "type": "str", + }, + "isPureProxy": bool, + "legacyName": "str", + "legacyNames": ["str"], + "legacyPolicy": { + "disallowedConditions": [ + {"disallowedLegacyOperations": ["str"], "feature": "str"} + ], + "disallowedLegacyOperations": ["str"], + }, + "linkedAccessChecks": [ + { + "actionName": "str", + "linkedAction": "str", + "linkedActionVerb": "str", + "linkedProperty": "str", + "linkedType": "str", + } + ], + "linkedNotificationRules": [ + { + "actions": ["str"], + "actionsOnFailedOperation": ["str"], + "fastPathActions": ["str"], + "fastPathActionsOnFailedOperation": ["str"], + "linkedNotificationTimeout": "1 day, 0:00:00", + } + ], + "linkedOperationRules": [ + {"linkedAction": "str", "linkedOperation": "str", "dependsOnTypes": ["str"]} + ], + "loggingRules": [ + { + "action": "str", + "detailLevel": "str", + "direction": "str", + "hiddenPropertyPaths": { + "hiddenPathsOnRequest": ["str"], + "hiddenPathsOnResponse": ["str"], + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": { + "enabled": bool, + "expeditedRolloutIntent": "str", + }, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [ + {"actions": ["str"], "allowedGroupClaims": ["str"]} + ], + "schemaOwners": ["str"], + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + }, + "manifestLink": "str", + "marketplaceOptions": {"addOnPlanConversionAllowed": bool}, + "marketplaceType": "str", + "metadata": {"str": {}}, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "onBehalfOfTokens": {"actionName": "str", "lifeTime": "str"}, + "openApiConfiguration": { + "validation": {"allowNoncompliantCollectionResponse": bool} + }, + "policyExecutionType": "str", + "provisioningState": "str", + "quotaRule": { + "locationRules": [{"location": "str", "policy": "str", "quotaId": "str"}], + "quotaPolicy": "str", + "requiredFeatures": ["str"], + }, + "regionality": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceCache": { + "enableResourceCache": bool, + "resourceCacheExpirationTimespan": "str", + }, + "resourceConcurrencyControlOptions": {"str": {"policy": "str"}}, + "resourceDeletionPolicy": "str", + "resourceGraphConfiguration": {"apiVersion": "str", "enabled": bool}, + "resourceManagementOptions": { + "batchProvisioningSupport": {"supportedOperations": "str"}, + "deleteDependencies": [ + { + "linkedProperty": "str", + "linkedType": "str", + "requiredFeatures": ["str"], + } + ], + "nestedProvisioningSupport": {"minimumApiVersion": "str"}, + }, + "resourceMovePolicy": { + "crossResourceGroupMoveEnabled": bool, + "crossSubscriptionMoveEnabled": bool, + "validationRequired": bool, + }, + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": { + "additionalOptions": "str", + "authorizationActions": ["str"], + } + }, + "resourceQueryManagement": {"filterOption": "str"}, + "resourceSubType": "str", + "resourceTypeCommonAttributeManagement": {"commonApiVersionsMergeMode": "str"}, + "resourceValidation": "str", + "routingRule": {"hostResourceType": "str"}, + "routingType": "str", + "serviceTreeInfos": [ + {"componentId": "str", "readiness": "str", "serviceId": "str"} + ], + "skuLink": "str", + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "subscriptionStateRules": [{"allowedActions": ["str"], "state": "str"}], + "supportsTags": bool, + "swaggerSpecifications": [ + {"apiVersions": ["str"], "swaggerSpecFolderUri": "str"} + ], + "templateDeploymentOptions": { + "preflightOptions": ["str"], + "preflightSupported": bool, + }, + "templateDeploymentPolicy": { + "capabilities": "str", + "preflightOptions": "str", + "preflightNotifications": "str", + }, + "throttlingRules": [ + { + "action": "str", + "metrics": [{"limit": 0, "type": "str", "interval": "1 day, 0:00:00"}], + "applicationId": ["str"], + "requiredFeatures": ["str"], + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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", + } + ], + "restOfTheWorldGroupOne": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + "restOfTheWorldGroupTwo": {"regions": ["str"], "waitDuration": "1 day, 0:00:00"}, + }, + "status": { + "completedRegions": ["str"], + "failedOrSkippedRegions": { + "str": { + "additionalInfo": [{"type": "str", "info": {}}], + "code": "str", + "details": [...], + "message": "str", + "target": "str", + } + }, + "manifestCheckinStatus": { + "isCheckedIn": bool, + "statusMessage": "str", + "commitId": "str", + "pullRequest": "str", + }, + "nextTrafficRegion": "str", + "nextTrafficRegionScheduledTime": "2020-02-20 00:00:00", + "subscriptionReregistrationResult": "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_default_rollouts_delete(self, resource_group): + response = await self.client.default_rollouts.delete( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_default_rollouts_list_by_provider_registration(self, resource_group): + response = self.client.default_rollouts.list_by_provider_registration( + provider_namespace="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_default_rollouts_stop(self, resource_group): + response = await self.client.default_rollouts.stop( + provider_namespace="str", + rollout_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_new_region_frontload_release_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_new_region_frontload_release_operations.py new file mode 100644 index 000000000000..657bbc32ba9b --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_new_region_frontload_release_operations.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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtNewRegionFrontloadReleaseOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_new_region_frontload_release_get(self, resource_group): + response = self.client.new_region_frontload_release.get( + provider_namespace="str", + release_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_new_region_frontload_release_create_or_update(self, resource_group): + response = self.client.new_region_frontload_release.create_or_update( + provider_namespace="str", + release_name="str", + properties={ + "properties": { + "copyFromLocation": "str", + "environmentType": "str", + "excludeResourceTypes": ["str"], + "frontloadLocation": "str", + "ignoreFields": ["str"], + "includeResourceTypes": ["str"], + "operationType": "str", + "overrideEndpointLevelFields": { + "apiVersion": "str", + "apiVersions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "zones": ["str"], + }, + "overrideManifestLevelFields": { + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ] + }, + "providerNamespace": "str", + "serviceFeatureFlag": "str", + } + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_new_region_frontload_release_stop(self, resource_group): + response = self.client.new_region_frontload_release.stop( + provider_namespace="str", + release_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_new_region_frontload_release_generate_manifest(self, resource_group): + response = self.client.new_region_frontload_release.generate_manifest( + provider_namespace="str", + properties={ + "properties": { + "copyFromLocation": "str", + "environmentType": "str", + "excludeResourceTypes": ["str"], + "frontloadLocation": "str", + "ignoreFields": ["str"], + "includeResourceTypes": ["str"], + "operationType": "str", + "overrideEndpointLevelFields": { + "apiVersion": "str", + "apiVersions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "zones": ["str"], + }, + "overrideManifestLevelFields": { + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ] + }, + "providerNamespace": "str", + "serviceFeatureFlag": "str", + } + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_new_region_frontload_release_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_new_region_frontload_release_operations_async.py new file mode 100644 index 000000000000..da696f64d5ef --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_new_region_frontload_release_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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtNewRegionFrontloadReleaseOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_new_region_frontload_release_get(self, resource_group): + response = await self.client.new_region_frontload_release.get( + provider_namespace="str", + release_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_new_region_frontload_release_create_or_update(self, resource_group): + response = await self.client.new_region_frontload_release.create_or_update( + provider_namespace="str", + release_name="str", + properties={ + "properties": { + "copyFromLocation": "str", + "environmentType": "str", + "excludeResourceTypes": ["str"], + "frontloadLocation": "str", + "ignoreFields": ["str"], + "includeResourceTypes": ["str"], + "operationType": "str", + "overrideEndpointLevelFields": { + "apiVersion": "str", + "apiVersions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "zones": ["str"], + }, + "overrideManifestLevelFields": { + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ] + }, + "providerNamespace": "str", + "serviceFeatureFlag": "str", + } + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_new_region_frontload_release_stop(self, resource_group): + response = await self.client.new_region_frontload_release.stop( + provider_namespace="str", + release_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_new_region_frontload_release_generate_manifest(self, resource_group): + response = await self.client.new_region_frontload_release.generate_manifest( + provider_namespace="str", + properties={ + "properties": { + "copyFromLocation": "str", + "environmentType": "str", + "excludeResourceTypes": ["str"], + "frontloadLocation": "str", + "ignoreFields": ["str"], + "includeResourceTypes": ["str"], + "operationType": "str", + "overrideEndpointLevelFields": { + "apiVersion": "str", + "apiVersions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "zones": ["str"], + }, + "overrideManifestLevelFields": { + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ] + }, + "providerNamespace": "str", + "serviceFeatureFlag": "str", + } + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_notification_registrations_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_notification_registrations_operations.py new file mode 100644 index 000000000000..a74582387627 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_notification_registrations_operations.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtNotificationRegistrationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_notification_registrations_get(self, resource_group): + response = self.client.notification_registrations.get( + provider_namespace="str", + notification_registration_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_notification_registrations_create_or_update(self, resource_group): + response = self.client.notification_registrations.create_or_update( + provider_namespace="str", + notification_registration_name="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "includedEvents": ["str"], + "messageScope": "str", + "notificationEndpoints": [{"locations": ["str"], "notificationDestination": "str"}], + "notificationMode": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_notification_registrations_delete(self, resource_group): + response = self.client.notification_registrations.delete( + provider_namespace="str", + notification_registration_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_notification_registrations_list_by_provider_registration(self, resource_group): + response = self.client.notification_registrations.list_by_provider_registration( + provider_namespace="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_notification_registrations_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_notification_registrations_operations_async.py new file mode 100644 index 000000000000..a3b300b30c17 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_notification_registrations_operations_async.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtNotificationRegistrationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_notification_registrations_get(self, resource_group): + response = await self.client.notification_registrations.get( + provider_namespace="str", + notification_registration_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_notification_registrations_create_or_update(self, resource_group): + response = await self.client.notification_registrations.create_or_update( + provider_namespace="str", + notification_registration_name="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "includedEvents": ["str"], + "messageScope": "str", + "notificationEndpoints": [{"locations": ["str"], "notificationDestination": "str"}], + "notificationMode": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_notification_registrations_delete(self, resource_group): + response = await self.client.notification_registrations.delete( + provider_namespace="str", + notification_registration_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_notification_registrations_list_by_provider_registration(self, resource_group): + response = self.client.notification_registrations.list_by_provider_registration( + provider_namespace="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_operations.py new file mode 100644 index 000000000000..28d3c57aff51 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_operations.py @@ -0,0 +1,125 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operations_list(self, resource_group): + response = self.client.operations.list() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operations_list_by_provider_registration(self, resource_group): + response = self.client.operations.list_by_provider_registration( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operations_create_or_update(self, resource_group): + response = self.client.operations.create_or_update( + provider_namespace="str", + operations_put_content={ + "id": "str", + "name": "str", + "properties": { + "contents": [ + { + "display": { + "default": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + "cs": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "de": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "en": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "es": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "fr": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "hu": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "it": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "ja": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "ko": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "nl": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "pl": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "ptBR": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + "ptPT": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + "ru": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "sv": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "zhHans": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + "zhHant": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + }, + "name": "str", + "actionType": "str", + "isDataAction": bool, + "origin": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operations_delete(self, resource_group): + response = self.client.operations.delete( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_operations_async.py new file mode 100644 index 000000000000..450ba7c2811d --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_operations_async.py @@ -0,0 +1,126 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operations_list(self, resource_group): + response = self.client.operations.list() + 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_operations_list_by_provider_registration(self, resource_group): + response = await self.client.operations.list_by_provider_registration( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operations_create_or_update(self, resource_group): + response = await self.client.operations.create_or_update( + provider_namespace="str", + operations_put_content={ + "id": "str", + "name": "str", + "properties": { + "contents": [ + { + "display": { + "default": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + "cs": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "de": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "en": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "es": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "fr": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "hu": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "it": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "ja": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "ko": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "nl": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "pl": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "ptBR": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + "ptPT": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + "ru": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "sv": {"description": "str", "operation": "str", "provider": "str", "resource": "str"}, + "zhHans": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + "zhHant": { + "description": "str", + "operation": "str", + "provider": "str", + "resource": "str", + }, + }, + "name": "str", + "actionType": "str", + "isDataAction": bool, + "origin": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operations_delete(self, resource_group): + response = await self.client.operations.delete( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_monitor_settings_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_monitor_settings_operations.py new file mode 100644 index 000000000000..d93eea9f9bc4 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_monitor_settings_operations.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtProviderMonitorSettingsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_monitor_settings_get(self, resource_group): + response = self.client.provider_monitor_settings.get( + resource_group_name=resource_group.name, + provider_monitor_setting_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_monitor_settings_begin_create(self, resource_group): + response = self.client.provider_monitor_settings.begin_create( + resource_group_name=resource_group.name, + provider_monitor_setting_name="str", + properties={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"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", + }, + ).result() # 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_provider_monitor_settings_update(self, resource_group): + response = self.client.provider_monitor_settings.update( + resource_group_name=resource_group.name, + provider_monitor_setting_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_monitor_settings_delete(self, resource_group): + response = self.client.provider_monitor_settings.delete( + resource_group_name=resource_group.name, + provider_monitor_setting_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_monitor_settings_list_by_resource_group(self, resource_group): + response = self.client.provider_monitor_settings.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_provider_monitor_settings_list_by_subscription(self, resource_group): + response = self.client.provider_monitor_settings.list_by_subscription() + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_monitor_settings_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_monitor_settings_operations_async.py new file mode 100644 index 000000000000..b8dcfaa38efb --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_monitor_settings_operations_async.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtProviderMonitorSettingsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_monitor_settings_get(self, resource_group): + response = await self.client.provider_monitor_settings.get( + resource_group_name=resource_group.name, + provider_monitor_setting_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_monitor_settings_begin_create(self, resource_group): + response = await ( + await self.client.provider_monitor_settings.begin_create( + resource_group_name=resource_group.name, + provider_monitor_setting_name="str", + properties={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"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", + }, + ) + ).result() # 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_provider_monitor_settings_update(self, resource_group): + response = await self.client.provider_monitor_settings.update( + resource_group_name=resource_group.name, + provider_monitor_setting_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_monitor_settings_delete(self, resource_group): + response = await self.client.provider_monitor_settings.delete( + resource_group_name=resource_group.name, + provider_monitor_setting_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_monitor_settings_list_by_resource_group(self, resource_group): + response = self.client.provider_monitor_settings.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_provider_monitor_settings_list_by_subscription(self, resource_group): + response = self.client.provider_monitor_settings.list_by_subscription() + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_registrations_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_registrations_operations.py new file mode 100644 index 000000000000..39bd6c19dc9e --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_registrations_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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtProviderRegistrationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_registrations_get(self, resource_group): + response = self.client.provider_registrations.get( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_registrations_begin_create_or_update(self, resource_group): + response = self.client.provider_registrations.begin_create_or_update( + provider_namespace="str", + properties={ + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "capabilities": [{"effect": "str", "quotaId": "str", "requiredFeatures": ["str"]}], + "crossTenantTokenValidation": "str", + "customManifestVersion": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableTenantLinkedNotification": bool, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "globalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "legacyNamespace": "str", + "legacyRegistrations": ["str"], + "linkedNotificationRules": [ + { + "actions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "endpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [{"componentId": "str", "readiness": "str", "serviceId": "str"}], + }, + "managementGroupGlobalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "metadata": {}, + "namespace": "str", + "notificationOptions": "str", + "notificationSettings": { + "subscriberSettings": [ + { + "filterRules": [ + { + "endpointInformation": [ + {"endpoint": "str", "endpointType": "str", "schemaVersion": "str"} + ], + "filterQuery": "str", + } + ] + } + ] + }, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "optionalFeatures": ["str"], + "privateResourceProviderConfiguration": {"allowedSubscriptions": ["str"]}, + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [{"applicationId": "str", "roleDefinitionId": "str"}], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "providerHubMetadata": { + "directRpRoleDefinitionId": "str", + "globalAsyncOperationResourceTypeName": "str", + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [{"applicationId": "str", "roleDefinitionId": "str"}], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "regionalAsyncOperationResourceTypeName": "str", + "thirdPartyProviderAuthorization": { + "authorizations": [{"principalId": "str", "roleDefinitionId": "str"}], + "managedByTenantId": "str", + }, + }, + "providerType": "str", + "providerVersion": "str", + "provisioningState": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceGroupLockOptionDuringMove": {"blockActionVerb": "str"}, + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ], + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": {"additionalOptions": "str", "authorizationActions": ["str"]} + }, + "responseOptions": {"serviceClientOptionsType": "str"}, + "serviceName": "str", + "services": [{"serviceName": "str", "status": "str"}], + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "templateDeploymentOptions": {"preflightOptions": ["str"], "preflightSupported": bool}, + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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_provider_registrations_delete(self, resource_group): + response = self.client.provider_registrations.delete( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_registrations_list(self, resource_group): + response = self.client.provider_registrations.list() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_registrations_generate_operations(self, resource_group): + response = self.client.provider_registrations.generate_operations( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_registrations_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_registrations_operations_async.py new file mode 100644 index 000000000000..a568de37b207 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_provider_registrations_operations_async.py @@ -0,0 +1,252 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtProviderRegistrationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_registrations_get(self, resource_group): + response = await self.client.provider_registrations.get( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_registrations_begin_create_or_update(self, resource_group): + response = await ( + await self.client.provider_registrations.begin_create_or_update( + provider_namespace="str", + properties={ + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "capabilities": [{"effect": "str", "quotaId": "str", "requiredFeatures": ["str"]}], + "crossTenantTokenValidation": "str", + "customManifestVersion": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableTenantLinkedNotification": bool, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "globalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "legacyNamespace": "str", + "legacyRegistrations": ["str"], + "linkedNotificationRules": [ + { + "actions": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "endpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [{"componentId": "str", "readiness": "str", "serviceId": "str"}], + }, + "managementGroupGlobalNotificationEndpoints": [ + { + "apiVersions": ["str"], + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + } + ], + "metadata": {}, + "namespace": "str", + "notificationOptions": "str", + "notificationSettings": { + "subscriberSettings": [ + { + "filterRules": [ + { + "endpointInformation": [ + {"endpoint": "str", "endpointType": "str", "schemaVersion": "str"} + ], + "filterQuery": "str", + } + ] + } + ] + }, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "optionalFeatures": ["str"], + "privateResourceProviderConfiguration": {"allowedSubscriptions": ["str"]}, + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [{"applicationId": "str", "roleDefinitionId": "str"}], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "providerHubMetadata": { + "directRpRoleDefinitionId": "str", + "globalAsyncOperationResourceTypeName": "str", + "providerAuthentication": {"allowedAudiences": ["str"]}, + "providerAuthorizations": [ + { + "allowedThirdPartyExtensions": [{"name": "str"}], + "applicationId": "str", + "groupingTag": "str", + "managedByAuthorization": { + "additionalAuthorizations": [ + {"applicationId": "str", "roleDefinitionId": "str"} + ], + "allowManagedByInheritance": bool, + "managedByResourceRoleDefinitionId": "str", + }, + "managedByRoleDefinitionId": "str", + "roleDefinitionId": "str", + } + ], + "regionalAsyncOperationResourceTypeName": "str", + "thirdPartyProviderAuthorization": { + "authorizations": [{"principalId": "str", "roleDefinitionId": "str"}], + "managedByTenantId": "str", + }, + }, + "providerType": "str", + "providerVersion": "str", + "provisioningState": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceGroupLockOptionDuringMove": {"blockActionVerb": "str"}, + "resourceHydrationAccounts": [ + { + "accountName": "str", + "encryptedKey": "str", + "maxChildResourceConsistencyJobLimit": 0, + "subscriptionId": "str", + } + ], + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": {"additionalOptions": "str", "authorizationActions": ["str"]} + }, + "responseOptions": {"serviceClientOptionsType": "str"}, + "serviceName": "str", + "services": [{"serviceName": "str", "status": "str"}], + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "templateDeploymentOptions": {"preflightOptions": ["str"], "preflightSupported": bool}, + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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_provider_registrations_delete(self, resource_group): + response = await self.client.provider_registrations.delete( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_registrations_list(self, resource_group): + response = self.client.provider_registrations.list() + 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_provider_registrations_generate_operations(self, resource_group): + response = await self.client.provider_registrations.generate_operations( + provider_namespace="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_actions_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_actions_operations.py new file mode 100644 index 000000000000..8d268da32cdc --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_actions_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtResourceActionsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resource_actions_begin_delete_resources(self, resource_group): + response = self.client.resource_actions.begin_delete_resources( + provider_namespace="str", + resource_action_name="str", + properties={ + "resources": [{"resourceId": "str", "homeTenantId": "str", "location": "str", "status": "str"}] + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_actions_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_actions_operations_async.py new file mode 100644 index 000000000000..85ca74f7fa1d --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_actions_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtResourceActionsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resource_actions_begin_delete_resources(self, resource_group): + response = await ( + await self.client.resource_actions.begin_delete_resources( + provider_namespace="str", + resource_action_name="str", + properties={ + "resources": [{"resourceId": "str", "homeTenantId": "str", "location": "str", "status": "str"}] + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_type_registrations_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_type_registrations_operations.py new file mode 100644 index 000000000000..33c6c7df5b2a --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_type_registrations_operations.py @@ -0,0 +1,264 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtResourceTypeRegistrationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resource_type_registrations_get(self, resource_group): + response = self.client.resource_type_registrations.get( + provider_namespace="str", + resource_type="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resource_type_registrations_begin_create_or_update(self, resource_group): + response = self.client.resource_type_registrations.begin_create_or_update( + provider_namespace="str", + resource_type="str", + properties={ + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "addResourceListTargetLocations": bool, + "additionalOptions": "str", + "allowEmptyRoleAssignments": bool, + "allowedResourceNames": [{"getActionVerb": "str", "name": "str"}], + "allowedTemplateDeploymentReferenceActions": ["str"], + "allowedUnauthorizedActions": ["str"], + "allowedUnauthorizedActionsExtensions": [{"action": "str", "intent": "str"}], + "apiProfiles": [{"apiVersion": "str", "profileVersion": "str"}], + "asyncOperationResourceTypeName": "str", + "asyncTimeoutRules": [{"actionName": "str", "timeout": "str"}], + "authorizationActionMappings": [{"desired": "str", "original": "str"}], + "availabilityZoneRule": {"availabilityZonePolicy": "str"}, + "capacityRule": {"capacityPolicy": "str", "skuAlias": "str"}, + "category": "str", + "checkNameAvailabilitySpecifications": { + "enableDefaultValidation": bool, + "resourceTypesWithCustomValidation": ["str"], + }, + "commonApiVersions": ["str"], + "crossTenantTokenValidation": "str", + "defaultApiVersion": "str", + "disallowedActionVerbs": ["str"], + "disallowedEndUserOperations": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableAsyncOperation": bool, + "enableThirdPartyS2S": bool, + "endpoints": [ + { + "apiVersion": "str", + "apiVersions": ["str"], + "dataBoundary": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "extensions": [ + {"endpointUri": "str", "extensionCategories": ["str"], "timeout": "1 day, 0:00:00"} + ], + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "kind": "str", + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + "zones": ["str"], + } + ], + "extendedLocations": [{"supportedPolicy": "str", "type": "str"}], + "extensionOptions": {"resourceCreationBegin": {"request": ["str"], "response": ["str"]}}, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "frontdoorRequestMode": "str", + "groupingTag": "str", + "identityManagement": { + "applicationId": "str", + "applicationIds": ["str"], + "delegationAppIds": ["str"], + "type": "str", + }, + "isPureProxy": bool, + "legacyName": "str", + "legacyNames": ["str"], + "legacyPolicy": { + "disallowedConditions": [{"disallowedLegacyOperations": ["str"], "feature": "str"}], + "disallowedLegacyOperations": ["str"], + }, + "linkedAccessChecks": [ + { + "actionName": "str", + "linkedAction": "str", + "linkedActionVerb": "str", + "linkedProperty": "str", + "linkedType": "str", + } + ], + "linkedNotificationRules": [ + { + "actions": ["str"], + "actionsOnFailedOperation": ["str"], + "fastPathActions": ["str"], + "fastPathActionsOnFailedOperation": ["str"], + "linkedNotificationTimeout": "1 day, 0:00:00", + } + ], + "linkedOperationRules": [ + {"linkedAction": "str", "linkedOperation": "str", "dependsOnTypes": ["str"]} + ], + "loggingRules": [ + { + "action": "str", + "detailLevel": "str", + "direction": "str", + "hiddenPropertyPaths": {"hiddenPathsOnRequest": ["str"], "hiddenPathsOnResponse": ["str"]}, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [{"componentId": "str", "readiness": "str", "serviceId": "str"}], + }, + "manifestLink": "str", + "marketplaceOptions": {"addOnPlanConversionAllowed": bool}, + "marketplaceType": "str", + "metadata": {"str": {}}, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "onBehalfOfTokens": {"actionName": "str", "lifeTime": "str"}, + "openApiConfiguration": {"validation": {"allowNoncompliantCollectionResponse": bool}}, + "policyExecutionType": "str", + "provisioningState": "str", + "quotaRule": { + "locationRules": [{"location": "str", "policy": "str", "quotaId": "str"}], + "quotaPolicy": "str", + "requiredFeatures": ["str"], + }, + "regionality": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceCache": {"enableResourceCache": bool, "resourceCacheExpirationTimespan": "str"}, + "resourceConcurrencyControlOptions": {"str": {"policy": "str"}}, + "resourceDeletionPolicy": "str", + "resourceGraphConfiguration": {"apiVersion": "str", "enabled": bool}, + "resourceManagementOptions": { + "batchProvisioningSupport": {"supportedOperations": "str"}, + "deleteDependencies": [ + {"linkedProperty": "str", "linkedType": "str", "requiredFeatures": ["str"]} + ], + "nestedProvisioningSupport": {"minimumApiVersion": "str"}, + }, + "resourceMovePolicy": { + "crossResourceGroupMoveEnabled": bool, + "crossSubscriptionMoveEnabled": bool, + "validationRequired": bool, + }, + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": {"additionalOptions": "str", "authorizationActions": ["str"]} + }, + "resourceQueryManagement": {"filterOption": "str"}, + "resourceSubType": "str", + "resourceTypeCommonAttributeManagement": {"commonApiVersionsMergeMode": "str"}, + "resourceValidation": "str", + "routingRule": {"hostResourceType": "str"}, + "routingType": "str", + "serviceTreeInfos": [{"componentId": "str", "readiness": "str", "serviceId": "str"}], + "skuLink": "str", + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "subscriptionStateRules": [{"allowedActions": ["str"], "state": "str"}], + "supportsTags": bool, + "swaggerSpecifications": [{"apiVersions": ["str"], "swaggerSpecFolderUri": "str"}], + "templateDeploymentOptions": {"preflightOptions": ["str"], "preflightSupported": bool}, + "templateDeploymentPolicy": { + "capabilities": "str", + "preflightOptions": "str", + "preflightNotifications": "str", + }, + "throttlingRules": [ + { + "action": "str", + "metrics": [{"limit": 0, "type": "str", "interval": "1 day, 0:00:00"}], + "applicationId": ["str"], + "requiredFeatures": ["str"], + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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_resource_type_registrations_begin_delete(self, resource_group): + response = self.client.resource_type_registrations.begin_delete( + provider_namespace="str", + resource_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_resource_type_registrations_list_by_provider_registration(self, resource_group): + response = self.client.resource_type_registrations.list_by_provider_registration( + provider_namespace="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_type_registrations_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_type_registrations_operations_async.py new file mode 100644 index 000000000000..766085f95623 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_resource_type_registrations_operations_async.py @@ -0,0 +1,272 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtResourceTypeRegistrationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resource_type_registrations_get(self, resource_group): + response = await self.client.resource_type_registrations.get( + provider_namespace="str", + resource_type="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resource_type_registrations_begin_create_or_update(self, resource_group): + response = await ( + await self.client.resource_type_registrations.begin_create_or_update( + provider_namespace="str", + resource_type="str", + properties={ + "id": "str", + "kind": "str", + "name": "str", + "properties": { + "addResourceListTargetLocations": bool, + "additionalOptions": "str", + "allowEmptyRoleAssignments": bool, + "allowedResourceNames": [{"getActionVerb": "str", "name": "str"}], + "allowedTemplateDeploymentReferenceActions": ["str"], + "allowedUnauthorizedActions": ["str"], + "allowedUnauthorizedActionsExtensions": [{"action": "str", "intent": "str"}], + "apiProfiles": [{"apiVersion": "str", "profileVersion": "str"}], + "asyncOperationResourceTypeName": "str", + "asyncTimeoutRules": [{"actionName": "str", "timeout": "str"}], + "authorizationActionMappings": [{"desired": "str", "original": "str"}], + "availabilityZoneRule": {"availabilityZonePolicy": "str"}, + "capacityRule": {"capacityPolicy": "str", "skuAlias": "str"}, + "category": "str", + "checkNameAvailabilitySpecifications": { + "enableDefaultValidation": bool, + "resourceTypesWithCustomValidation": ["str"], + }, + "commonApiVersions": ["str"], + "crossTenantTokenValidation": "str", + "defaultApiVersion": "str", + "disallowedActionVerbs": ["str"], + "disallowedEndUserOperations": ["str"], + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enableAsyncOperation": bool, + "enableThirdPartyS2S": bool, + "endpoints": [ + { + "apiVersion": "str", + "apiVersions": ["str"], + "dataBoundary": "str", + "dstsConfiguration": {"serviceName": "str", "serviceDnsName": "str"}, + "enabled": bool, + "endpointType": "str", + "endpointUri": "str", + "extensions": [ + {"endpointUri": "str", "extensionCategories": ["str"], "timeout": "1 day, 0:00:00"} + ], + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "kind": "str", + "locations": ["str"], + "requiredFeatures": ["str"], + "skuLink": "str", + "timeout": "1 day, 0:00:00", + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "str", + }, + "zones": ["str"], + } + ], + "extendedLocations": [{"supportedPolicy": "str", "type": "str"}], + "extensionOptions": {"resourceCreationBegin": {"request": ["str"], "response": ["str"]}}, + "featuresRule": {"requiredFeaturesPolicy": "str"}, + "frontdoorRequestMode": "str", + "groupingTag": "str", + "identityManagement": { + "applicationId": "str", + "applicationIds": ["str"], + "delegationAppIds": ["str"], + "type": "str", + }, + "isPureProxy": bool, + "legacyName": "str", + "legacyNames": ["str"], + "legacyPolicy": { + "disallowedConditions": [{"disallowedLegacyOperations": ["str"], "feature": "str"}], + "disallowedLegacyOperations": ["str"], + }, + "linkedAccessChecks": [ + { + "actionName": "str", + "linkedAction": "str", + "linkedActionVerb": "str", + "linkedProperty": "str", + "linkedType": "str", + } + ], + "linkedNotificationRules": [ + { + "actions": ["str"], + "actionsOnFailedOperation": ["str"], + "fastPathActions": ["str"], + "fastPathActionsOnFailedOperation": ["str"], + "linkedNotificationTimeout": "1 day, 0:00:00", + } + ], + "linkedOperationRules": [ + {"linkedAction": "str", "linkedOperation": "str", "dependsOnTypes": ["str"]} + ], + "loggingRules": [ + { + "action": "str", + "detailLevel": "str", + "direction": "str", + "hiddenPropertyPaths": { + "hiddenPathsOnRequest": ["str"], + "hiddenPathsOnResponse": ["str"], + }, + } + ], + "management": { + "authorizationOwners": ["str"], + "canaryManifestOwners": ["str"], + "errorResponseMessageOptions": {"serverFailureResponseMessageType": "str"}, + "expeditedRolloutMetadata": {"enabled": bool, "expeditedRolloutIntent": "str"}, + "expeditedRolloutSubmitters": ["str"], + "incidentContactEmail": "str", + "incidentRoutingService": "str", + "incidentRoutingTeam": "str", + "manifestOwners": ["str"], + "pcCode": "str", + "profitCenterProgramId": "str", + "resourceAccessPolicy": "str", + "resourceAccessRoles": [{"actions": ["str"], "allowedGroupClaims": ["str"]}], + "schemaOwners": ["str"], + "serviceTreeInfos": [{"componentId": "str", "readiness": "str", "serviceId": "str"}], + }, + "manifestLink": "str", + "marketplaceOptions": {"addOnPlanConversionAllowed": bool}, + "marketplaceType": "str", + "metadata": {"str": {}}, + "notifications": [{"notificationType": "str", "skipNotifications": "str"}], + "onBehalfOfTokens": {"actionName": "str", "lifeTime": "str"}, + "openApiConfiguration": {"validation": {"allowNoncompliantCollectionResponse": bool}}, + "policyExecutionType": "str", + "provisioningState": "str", + "quotaRule": { + "locationRules": [{"location": "str", "policy": "str", "quotaId": "str"}], + "quotaPolicy": "str", + "requiredFeatures": ["str"], + }, + "regionality": "str", + "requestHeaderOptions": {"optInHeaders": "str", "optOutHeaders": "str"}, + "requiredFeatures": ["str"], + "resourceCache": {"enableResourceCache": bool, "resourceCacheExpirationTimespan": "str"}, + "resourceConcurrencyControlOptions": {"str": {"policy": "str"}}, + "resourceDeletionPolicy": "str", + "resourceGraphConfiguration": {"apiVersion": "str", "enabled": bool}, + "resourceManagementOptions": { + "batchProvisioningSupport": {"supportedOperations": "str"}, + "deleteDependencies": [ + {"linkedProperty": "str", "linkedType": "str", "requiredFeatures": ["str"]} + ], + "nestedProvisioningSupport": {"minimumApiVersion": "str"}, + }, + "resourceMovePolicy": { + "crossResourceGroupMoveEnabled": bool, + "crossSubscriptionMoveEnabled": bool, + "validationRequired": bool, + }, + "resourceProviderAuthorizationRules": { + "asyncOperationPollingRules": {"additionalOptions": "str", "authorizationActions": ["str"]} + }, + "resourceQueryManagement": {"filterOption": "str"}, + "resourceSubType": "str", + "resourceTypeCommonAttributeManagement": {"commonApiVersionsMergeMode": "str"}, + "resourceValidation": "str", + "routingRule": {"hostResourceType": "str"}, + "routingType": "str", + "serviceTreeInfos": [{"componentId": "str", "readiness": "str", "serviceId": "str"}], + "skuLink": "str", + "subscriptionLifecycleNotificationSpecifications": { + "softDeleteTTL": "1 day, 0:00:00", + "subscriptionStateOverrideActions": [{"action": "str", "state": "str"}], + }, + "subscriptionStateRules": [{"allowedActions": ["str"], "state": "str"}], + "supportsTags": bool, + "swaggerSpecifications": [{"apiVersions": ["str"], "swaggerSpecFolderUri": "str"}], + "templateDeploymentOptions": {"preflightOptions": ["str"], "preflightSupported": bool}, + "templateDeploymentPolicy": { + "capabilities": "str", + "preflightOptions": "str", + "preflightNotifications": "str", + }, + "throttlingRules": [ + { + "action": "str", + "metrics": [{"limit": 0, "type": "str", "interval": "1 day, 0:00:00"}], + "applicationId": ["str"], + "requiredFeatures": ["str"], + } + ], + "tokenAuthConfiguration": { + "authenticationScheme": "str", + "disableCertificateAuthenticationFallback": bool, + "signedRequestScope": "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_resource_type_registrations_begin_delete(self, resource_group): + response = await ( + await self.client.resource_type_registrations.begin_delete( + provider_namespace="str", + resource_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_resource_type_registrations_list_by_provider_registration(self, resource_group): + response = self.client.resource_type_registrations.list_by_provider_registration( + provider_namespace="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_skus_operations.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_skus_operations.py new file mode 100644 index 000000000000..0331c0c3bf0a --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_skus_operations.py @@ -0,0 +1,399 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +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 TestProviderHubMgmtSkusOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_get_nested_resource_type_first(self, resource_group): + response = self.client.skus.get_nested_resource_type_first( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_create_or_update_nested_resource_type_first(self, resource_group): + response = self.client.skus.create_or_update_nested_resource_type_first( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + sku="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "skuSettings": [ + { + "name": "str", + "capabilities": [{"name": "str", "value": "str"}], + "capacity": {"minimum": 0, "default": 0, "maximum": 0, "scaleType": "str"}, + "costs": [{"meterId": "str", "extendedUnit": "str", "quantity": 0}], + "family": "str", + "kind": "str", + "locationInfo": [ + { + "location": "str", + "extendedLocations": ["str"], + "type": "str", + "zoneDetails": [ + {"capabilities": [{"name": "str", "value": "str"}], "name": ["str"]} + ], + "zones": ["str"], + } + ], + "locations": ["str"], + "requiredFeatures": ["str"], + "requiredQuotaIds": ["str"], + "size": "str", + "tier": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_delete_nested_resource_type_first(self, resource_group): + response = self.client.skus.delete_nested_resource_type_first( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_list_by_resource_type_registrations_nested_resource_type_first(self, resource_group): + response = self.client.skus.list_by_resource_type_registrations_nested_resource_type_first( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_get(self, resource_group): + response = self.client.skus.get( + provider_namespace="str", + resource_type="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_create_or_update(self, resource_group): + response = self.client.skus.create_or_update( + provider_namespace="str", + resource_type="str", + sku="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "skuSettings": [ + { + "name": "str", + "capabilities": [{"name": "str", "value": "str"}], + "capacity": {"minimum": 0, "default": 0, "maximum": 0, "scaleType": "str"}, + "costs": [{"meterId": "str", "extendedUnit": "str", "quantity": 0}], + "family": "str", + "kind": "str", + "locationInfo": [ + { + "location": "str", + "extendedLocations": ["str"], + "type": "str", + "zoneDetails": [ + {"capabilities": [{"name": "str", "value": "str"}], "name": ["str"]} + ], + "zones": ["str"], + } + ], + "locations": ["str"], + "requiredFeatures": ["str"], + "requiredQuotaIds": ["str"], + "size": "str", + "tier": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_delete(self, resource_group): + response = self.client.skus.delete( + provider_namespace="str", + resource_type="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_list_by_resource_type_registrations(self, resource_group): + response = self.client.skus.list_by_resource_type_registrations( + provider_namespace="str", + resource_type="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_get_nested_resource_type_second(self, resource_group): + response = self.client.skus.get_nested_resource_type_second( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_create_or_update_nested_resource_type_second(self, resource_group): + response = self.client.skus.create_or_update_nested_resource_type_second( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + sku="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "skuSettings": [ + { + "name": "str", + "capabilities": [{"name": "str", "value": "str"}], + "capacity": {"minimum": 0, "default": 0, "maximum": 0, "scaleType": "str"}, + "costs": [{"meterId": "str", "extendedUnit": "str", "quantity": 0}], + "family": "str", + "kind": "str", + "locationInfo": [ + { + "location": "str", + "extendedLocations": ["str"], + "type": "str", + "zoneDetails": [ + {"capabilities": [{"name": "str", "value": "str"}], "name": ["str"]} + ], + "zones": ["str"], + } + ], + "locations": ["str"], + "requiredFeatures": ["str"], + "requiredQuotaIds": ["str"], + "size": "str", + "tier": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_delete_nested_resource_type_second(self, resource_group): + response = self.client.skus.delete_nested_resource_type_second( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_list_by_resource_type_registrations_nested_resource_type_second(self, resource_group): + response = self.client.skus.list_by_resource_type_registrations_nested_resource_type_second( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_get_nested_resource_type_third(self, resource_group): + response = self.client.skus.get_nested_resource_type_third( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + nested_resource_type_third="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_create_or_update_nested_resource_type_third(self, resource_group): + response = self.client.skus.create_or_update_nested_resource_type_third( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + nested_resource_type_third="str", + sku="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "skuSettings": [ + { + "name": "str", + "capabilities": [{"name": "str", "value": "str"}], + "capacity": {"minimum": 0, "default": 0, "maximum": 0, "scaleType": "str"}, + "costs": [{"meterId": "str", "extendedUnit": "str", "quantity": 0}], + "family": "str", + "kind": "str", + "locationInfo": [ + { + "location": "str", + "extendedLocations": ["str"], + "type": "str", + "zoneDetails": [ + {"capabilities": [{"name": "str", "value": "str"}], "name": ["str"]} + ], + "zones": ["str"], + } + ], + "locations": ["str"], + "requiredFeatures": ["str"], + "requiredQuotaIds": ["str"], + "size": "str", + "tier": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_delete_nested_resource_type_third(self, resource_group): + response = self.client.skus.delete_nested_resource_type_third( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + nested_resource_type_third="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_skus_list_by_resource_type_registrations_nested_resource_type_third(self, resource_group): + response = self.client.skus.list_by_resource_type_registrations_nested_resource_type_third( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + nested_resource_type_third="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_skus_operations_async.py b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_skus_operations_async.py new file mode 100644 index 000000000000..3d8c6b01215b --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/generated_tests/test_provider_hub_mgmt_skus_operations_async.py @@ -0,0 +1,400 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +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 TestProviderHubMgmtSkusOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_get_nested_resource_type_first(self, resource_group): + response = await self.client.skus.get_nested_resource_type_first( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_create_or_update_nested_resource_type_first(self, resource_group): + response = await self.client.skus.create_or_update_nested_resource_type_first( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + sku="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "skuSettings": [ + { + "name": "str", + "capabilities": [{"name": "str", "value": "str"}], + "capacity": {"minimum": 0, "default": 0, "maximum": 0, "scaleType": "str"}, + "costs": [{"meterId": "str", "extendedUnit": "str", "quantity": 0}], + "family": "str", + "kind": "str", + "locationInfo": [ + { + "location": "str", + "extendedLocations": ["str"], + "type": "str", + "zoneDetails": [ + {"capabilities": [{"name": "str", "value": "str"}], "name": ["str"]} + ], + "zones": ["str"], + } + ], + "locations": ["str"], + "requiredFeatures": ["str"], + "requiredQuotaIds": ["str"], + "size": "str", + "tier": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_delete_nested_resource_type_first(self, resource_group): + response = await self.client.skus.delete_nested_resource_type_first( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_list_by_resource_type_registrations_nested_resource_type_first(self, resource_group): + response = self.client.skus.list_by_resource_type_registrations_nested_resource_type_first( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="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_skus_get(self, resource_group): + response = await self.client.skus.get( + provider_namespace="str", + resource_type="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_create_or_update(self, resource_group): + response = await self.client.skus.create_or_update( + provider_namespace="str", + resource_type="str", + sku="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "skuSettings": [ + { + "name": "str", + "capabilities": [{"name": "str", "value": "str"}], + "capacity": {"minimum": 0, "default": 0, "maximum": 0, "scaleType": "str"}, + "costs": [{"meterId": "str", "extendedUnit": "str", "quantity": 0}], + "family": "str", + "kind": "str", + "locationInfo": [ + { + "location": "str", + "extendedLocations": ["str"], + "type": "str", + "zoneDetails": [ + {"capabilities": [{"name": "str", "value": "str"}], "name": ["str"]} + ], + "zones": ["str"], + } + ], + "locations": ["str"], + "requiredFeatures": ["str"], + "requiredQuotaIds": ["str"], + "size": "str", + "tier": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_delete(self, resource_group): + response = await self.client.skus.delete( + provider_namespace="str", + resource_type="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_list_by_resource_type_registrations(self, resource_group): + response = self.client.skus.list_by_resource_type_registrations( + provider_namespace="str", + resource_type="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_skus_get_nested_resource_type_second(self, resource_group): + response = await self.client.skus.get_nested_resource_type_second( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_create_or_update_nested_resource_type_second(self, resource_group): + response = await self.client.skus.create_or_update_nested_resource_type_second( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + sku="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "skuSettings": [ + { + "name": "str", + "capabilities": [{"name": "str", "value": "str"}], + "capacity": {"minimum": 0, "default": 0, "maximum": 0, "scaleType": "str"}, + "costs": [{"meterId": "str", "extendedUnit": "str", "quantity": 0}], + "family": "str", + "kind": "str", + "locationInfo": [ + { + "location": "str", + "extendedLocations": ["str"], + "type": "str", + "zoneDetails": [ + {"capabilities": [{"name": "str", "value": "str"}], "name": ["str"]} + ], + "zones": ["str"], + } + ], + "locations": ["str"], + "requiredFeatures": ["str"], + "requiredQuotaIds": ["str"], + "size": "str", + "tier": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_delete_nested_resource_type_second(self, resource_group): + response = await self.client.skus.delete_nested_resource_type_second( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_list_by_resource_type_registrations_nested_resource_type_second(self, resource_group): + response = self.client.skus.list_by_resource_type_registrations_nested_resource_type_second( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="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_skus_get_nested_resource_type_third(self, resource_group): + response = await self.client.skus.get_nested_resource_type_third( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + nested_resource_type_third="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_create_or_update_nested_resource_type_third(self, resource_group): + response = await self.client.skus.create_or_update_nested_resource_type_third( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + nested_resource_type_third="str", + sku="str", + properties={ + "id": "str", + "name": "str", + "properties": { + "skuSettings": [ + { + "name": "str", + "capabilities": [{"name": "str", "value": "str"}], + "capacity": {"minimum": 0, "default": 0, "maximum": 0, "scaleType": "str"}, + "costs": [{"meterId": "str", "extendedUnit": "str", "quantity": 0}], + "family": "str", + "kind": "str", + "locationInfo": [ + { + "location": "str", + "extendedLocations": ["str"], + "type": "str", + "zoneDetails": [ + {"capabilities": [{"name": "str", "value": "str"}], "name": ["str"]} + ], + "zones": ["str"], + } + ], + "locations": ["str"], + "requiredFeatures": ["str"], + "requiredQuotaIds": ["str"], + "size": "str", + "tier": "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", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_delete_nested_resource_type_third(self, resource_group): + response = await self.client.skus.delete_nested_resource_type_third( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + nested_resource_type_third="str", + sku="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_skus_list_by_resource_type_registrations_nested_resource_type_third(self, resource_group): + response = self.client.skus.list_by_resource_type_registrations_nested_resource_type_third( + provider_namespace="str", + resource_type="str", + nested_resource_type_first="str", + nested_resource_type_second="str", + nested_resource_type_third="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/providerhub/azure-mgmt-providerhub/pyproject.toml b/sdk/providerhub/azure-mgmt-providerhub/pyproject.toml new file mode 100644 index 000000000000..ff579654809c --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/pyproject.toml @@ -0,0 +1,86 @@ +[build-system] +requires = [ + "setuptools>=77.0.3", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-providerhub" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Providerhub Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] +requires-python = ">=3.10" +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.providerhub._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 +pyright = false +mypy = false + +[packaging] +package_name = "azure-mgmt-providerhub" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Providerhub Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true +sample_link = "" +exclude_folders = "" +title = "ProviderHubMgmtClient" diff --git a/sdk/providerhub/azure-mgmt-providerhub/tsp-location.yaml b/sdk/providerhub/azure-mgmt-providerhub/tsp-location.yaml new file mode 100644 index 000000000000..ec170ef053a2 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/providerhub/ProviderHub.Management +commit: ea850a065dc8679f82dc3fdbba9ceff53eeba116 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/providerhub/ci.yml b/sdk/providerhub/ci.yml new file mode 100644 index 000000000000..2f74fa7f3c2f --- /dev/null +++ b/sdk/providerhub/ci.yml @@ -0,0 +1,34 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/providerhub/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/providerhub/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: providerhub + TestProxy: true + Artifacts: + - name: azure-mgmt-providerhub + safeName: azuremgmtproviderhub From c41582514ca656df1437c3a7c39eab46edb07375 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 8 Jul 2026 14:53:02 +0800 Subject: [PATCH 2/2] Add live tests for azure-mgmt-providerhub --- .../azure-mgmt-providerhub/tests/conftest.py | 35 +++++++++++++++++++ ...provider_hub_mgmt_operations_async_test.py | 27 ++++++++++++++ .../test_provider_hub_mgmt_operations_test.py | 26 ++++++++++++++ ..._monitor_settings_operations_async_test.py | 27 ++++++++++++++ ...ovider_monitor_settings_operations_test.py | 26 ++++++++++++++ ...der_registrations_operations_async_test.py | 27 ++++++++++++++ ..._provider_registrations_operations_test.py | 26 ++++++++++++++ 7 files changed, 194 insertions(+) create mode 100644 sdk/providerhub/azure-mgmt-providerhub/tests/conftest.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_operations_async_test.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_operations_test.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_monitor_settings_operations_async_test.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_monitor_settings_operations_test.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_registrations_operations_async_test.py create mode 100644 sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_registrations_operations_test.py diff --git a/sdk/providerhub/azure-mgmt-providerhub/tests/conftest.py b/sdk/providerhub/azure-mgmt-providerhub/tests/conftest.py new file mode 100644 index 000000000000..80208391aa92 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/tests/conftest.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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 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): + providerhubmgmt_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + providerhubmgmt_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + providerhubmgmt_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + providerhubmgmt_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=providerhubmgmt_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=providerhubmgmt_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=providerhubmgmt_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=providerhubmgmt_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/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_operations_async_test.py b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_operations_async_test.py new file mode 100644 index 000000000000..224c1d711eb8 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_operations_async_test.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestProviderHubMgmtOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operations_list(self, resource_group): + response = self.client.operations.list() + result = [r async for r in response] + assert len(result) >= 0 diff --git a/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_operations_test.py b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_operations_test.py new file mode 100644 index 000000000000..a0e70c3ae874 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_operations_test.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestProviderHubMgmtOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operations_list(self, resource_group): + response = self.client.operations.list() + result = [r for r in response] + assert len(result) >= 0 diff --git a/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_monitor_settings_operations_async_test.py b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_monitor_settings_operations_async_test.py new file mode 100644 index 000000000000..af7ccec3a3d6 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_monitor_settings_operations_async_test.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestProviderHubMgmtProviderMonitorSettingsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_monitor_settings_list_by_subscription(self, resource_group): + response = self.client.provider_monitor_settings.list_by_subscription() + result = [r async for r in response] + assert len(result) >= 0 diff --git a/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_monitor_settings_operations_test.py b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_monitor_settings_operations_test.py new file mode 100644 index 000000000000..b9417a2fd7a2 --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_monitor_settings_operations_test.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestProviderHubMgmtProviderMonitorSettingsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_monitor_settings_list_by_subscription(self, resource_group): + response = self.client.provider_monitor_settings.list_by_subscription() + result = [r for r in response] + assert len(result) >= 0 diff --git a/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_registrations_operations_async_test.py b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_registrations_operations_async_test.py new file mode 100644 index 000000000000..3b9837d4ecdd --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_registrations_operations_async_test.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub.aio import ProviderHubMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestProviderHubMgmtProviderRegistrationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_provider_registrations_list(self, resource_group): + response = self.client.provider_registrations.list() + result = [r async for r in response] + assert len(result) >= 0 diff --git a/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_registrations_operations_test.py b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_registrations_operations_test.py new file mode 100644 index 000000000000..bc0c8d7f1efe --- /dev/null +++ b/sdk/providerhub/azure-mgmt-providerhub/tests/test_provider_hub_mgmt_provider_registrations_operations_test.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft 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.providerhub import ProviderHubMgmtClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.live_test_only +class TestProviderHubMgmtProviderRegistrationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ProviderHubMgmtClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_provider_registrations_list(self, resource_group): + response = self.client.provider_registrations.list() + result = [r for r in response] + assert len(result) >= 0