From 180e1eb6ed2309d5673a2079c409bdcabfc76098 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 28 Mar 2023 20:34:40 +0000 Subject: [PATCH] CodeGen from PR 23107 in Azure/azure-rest-api-specs Merge 5011d28e57560894089b2260b5187a7deeca09ae into 8f83af24ce9b54bc5b4bb3d36b895dd1d2c62a23 --- sdk/monitor/azure-mgmt-monitor/_meta.json | 6 +- .../azure/mgmt/monitor/_serialization.py | 6 +- .../azure/mgmt/monitor/_version.py | 2 +- .../mgmt/monitor/v2015_04_01/_version.py | 2 +- .../operations/_activity_logs_operations.py | 7 +-- .../aio/operations/_alert_rules_operations.py | 17 ++--- .../_autoscale_settings_operations.py | 17 ++--- .../_event_categories_operations.py | 7 +-- .../v2015_04_01/aio/operations/_operations.py | 7 +-- .../_tenant_activity_logs_operations.py | 7 +-- .../operations/_activity_logs_operations.py | 9 +-- .../operations/_alert_rules_operations.py | 29 ++++----- .../_autoscale_settings_operations.py | 29 ++++----- .../_event_categories_operations.py | 9 +-- .../v2015_04_01/operations/_operations.py | 9 +-- .../_tenant_activity_logs_operations.py | 9 +-- .../mgmt/monitor/v2015_07_01/_version.py | 2 +- .../aio/operations/_alert_rules_operations.py | 17 ++--- .../_metric_definitions_operations.py | 7 +-- .../v2015_07_01/aio/operations/_operations.py | 7 +-- ..._service_diagnostic_settings_operations.py | 9 +-- .../operations/_alert_rules_operations.py | 29 ++++----- .../_metric_definitions_operations.py | 9 +-- .../v2015_07_01/operations/_operations.py | 9 +-- ..._service_diagnostic_settings_operations.py | 13 ++-- .../monitor/v2016_03_01/_configuration.py | 8 +-- .../mgmt/monitor/v2016_03_01/_version.py | 2 +- .../monitor/v2016_03_01/aio/_configuration.py | 8 +-- .../_alert_rule_incidents_operations.py | 9 +-- .../aio/operations/_alert_rules_operations.py | 17 ++--- .../operations/_log_profiles_operations.py | 15 ++--- .../_metric_definitions_operations.py | 7 +-- .../_alert_rule_incidents_operations.py | 13 ++-- .../operations/_alert_rules_operations.py | 29 ++++----- .../operations/_log_profiles_operations.py | 25 +++----- .../_metric_definitions_operations.py | 9 +-- .../monitor/v2016_09_01/_configuration.py | 8 +-- .../mgmt/monitor/v2016_09_01/_version.py | 2 +- .../monitor/v2016_09_01/aio/_configuration.py | 8 +-- .../aio/operations/_metrics_operations.py | 7 +-- ..._service_diagnostic_settings_operations.py | 11 +--- .../operations/_metrics_operations.py | 9 +-- ..._service_diagnostic_settings_operations.py | 17 ++--- .../v2017_03_01_preview/_configuration.py | 8 +-- .../monitor/v2017_03_01_preview/_version.py | 2 +- .../v2017_03_01_preview/aio/_configuration.py | 8 +-- .../_activity_log_alerts_operations.py | 29 ++------- .../_activity_log_alerts_operations.py | 53 ++++------------ .../monitor/v2017_04_01/_configuration.py | 8 +-- .../mgmt/monitor/v2017_04_01/_version.py | 2 +- .../monitor/v2017_04_01/aio/_configuration.py | 8 +-- .../operations/_action_groups_operations.py | 19 +++--- .../_activity_log_alerts_operations.py | 17 ++--- .../operations/_action_groups_operations.py | 33 +++++----- .../_activity_log_alerts_operations.py | 29 ++++----- .../v2017_05_01_preview/_configuration.py | 8 +-- .../monitor/v2017_05_01_preview/_version.py | 2 +- .../v2017_05_01_preview/aio/_configuration.py | 8 +-- ...diagnostic_settings_category_operations.py | 13 +--- .../_diagnostic_settings_operations.py | 21 ++----- .../_metric_definitions_operations.py | 9 +-- .../aio/operations/_metrics_operations.py | 9 +-- ...cription_diagnostic_settings_operations.py | 21 ++----- ...diagnostic_settings_category_operations.py | 21 ++----- .../_diagnostic_settings_operations.py | 37 +++-------- .../_metric_definitions_operations.py | 13 +--- .../operations/_metrics_operations.py | 13 +--- ...cription_diagnostic_settings_operations.py | 37 +++-------- .../v2017_12_01_preview/_configuration.py | 8 +-- .../monitor/v2017_12_01_preview/_version.py | 2 +- .../v2017_12_01_preview/aio/_configuration.py | 8 +-- .../_metric_namespaces_operations.py | 9 +-- .../_metric_namespaces_operations.py | 13 +--- .../monitor/v2018_01_01/_configuration.py | 8 +-- .../mgmt/monitor/v2018_01_01/_version.py | 2 +- .../monitor/v2018_01_01/aio/_configuration.py | 8 +-- .../_metric_definitions_operations.py | 7 +-- .../aio/operations/_metrics_operations.py | 7 +-- .../_metric_definitions_operations.py | 9 +-- .../operations/_metrics_operations.py | 9 +-- .../monitor/v2018_03_01/_configuration.py | 8 +-- .../mgmt/monitor/v2018_03_01/_version.py | 2 +- .../monitor/v2018_03_01/aio/_configuration.py | 8 +-- .../operations/_action_groups_operations.py | 19 +++--- .../operations/_metric_alerts_operations.py | 17 ++--- .../_metric_alerts_status_operations.py | 9 +-- .../operations/_action_groups_operations.py | 33 +++++----- .../operations/_metric_alerts_operations.py | 29 ++++----- .../_metric_alerts_status_operations.py | 13 ++-- .../monitor/v2018_04_16/_configuration.py | 8 +-- .../mgmt/monitor/v2018_04_16/_version.py | 2 +- .../monitor/v2018_04_16/aio/_configuration.py | 8 +-- .../_scheduled_query_rules_operations.py | 17 ++--- .../_scheduled_query_rules_operations.py | 29 ++++----- .../v2018_06_01_preview/_configuration.py | 8 +-- .../monitor/v2018_06_01_preview/_version.py | 2 +- .../v2018_06_01_preview/aio/_configuration.py | 8 +-- ...nostics_settings_association_operations.py | 29 ++------- .../_guest_diagnostics_settings_operations.py | 29 ++------- ...nostics_settings_association_operations.py | 53 ++++------------ .../_guest_diagnostics_settings_operations.py | 53 ++++------------ .../monitor/v2018_09_01/_configuration.py | 8 +-- .../mgmt/monitor/v2018_09_01/_version.py | 2 +- .../monitor/v2018_09_01/aio/_configuration.py | 8 +-- .../operations/_action_groups_operations.py | 19 +++--- .../aio/operations/_baselines_operations.py | 7 +-- .../operations/_action_groups_operations.py | 33 +++++----- .../operations/_baselines_operations.py | 9 +-- .../v2018_11_27_preview/_configuration.py | 8 +-- .../monitor/v2018_11_27_preview/_version.py | 2 +- .../v2018_11_27_preview/aio/_configuration.py | 8 +-- .../aio/operations/_vm_insights_operations.py | 9 +-- .../operations/_vm_insights_operations.py | 13 +--- .../monitor/v2019_03_01/_configuration.py | 8 +-- .../mgmt/monitor/v2019_03_01/_version.py | 2 +- .../monitor/v2019_03_01/aio/_configuration.py | 8 +-- .../operations/_action_groups_operations.py | 19 +++--- .../aio/operations/_baselines_operations.py | 7 +-- .../operations/_action_groups_operations.py | 33 +++++----- .../operations/_baselines_operations.py | 9 +-- .../monitor/v2019_06_01/_configuration.py | 8 +-- .../mgmt/monitor/v2019_06_01/_version.py | 2 +- .../monitor/v2019_06_01/aio/_configuration.py | 8 +-- .../operations/_action_groups_operations.py | 19 +++--- .../operations/_action_groups_operations.py | 33 +++++----- .../monitor/v2019_10_17/_configuration.py | 8 +-- .../mgmt/monitor/v2019_10_17/_version.py | 2 +- .../monitor/v2019_10_17/aio/_configuration.py | 8 +-- ...private_endpoint_connections_operations.py | 29 ++------- .../_private_link_resources_operations.py | 13 +--- ..._link_scope_operation_status_operations.py | 9 +-- ...rivate_link_scoped_resources_operations.py | 29 ++------- .../_private_link_scopes_operations.py | 33 +++------- ...private_endpoint_connections_operations.py | 45 +++---------- .../_private_link_resources_operations.py | 21 ++----- ..._link_scope_operation_status_operations.py | 13 +--- ...rivate_link_scoped_resources_operations.py | 45 +++---------- .../_private_link_scopes_operations.py | 57 ++++------------- .../v2019_11_01_preview/_configuration.py | 8 +-- .../monitor/v2019_11_01_preview/_version.py | 2 +- .../v2019_11_01_preview/aio/_configuration.py | 8 +-- ...collection_rule_associations_operations.py | 25 ++------ .../_data_collection_rules_operations.py | 29 ++------- ...collection_rule_associations_operations.py | 45 +++---------- .../_data_collection_rules_operations.py | 53 ++++------------ .../v2020_01_01_preview/_configuration.py | 8 +-- .../monitor/v2020_01_01_preview/_version.py | 2 +- .../v2020_01_01_preview/aio/_configuration.py | 8 +-- ...nt_group_diagnostic_settings_operations.py | 21 ++----- ...nt_group_diagnostic_settings_operations.py | 37 +++-------- .../v2020_05_01_preview/_configuration.py | 8 +-- .../monitor/v2020_05_01_preview/_version.py | 2 +- .../v2020_05_01_preview/aio/_configuration.py | 8 +-- .../_scheduled_query_rules_operations.py | 29 ++------- .../_scheduled_query_rules_operations.py | 53 ++++------------ .../monitor/v2020_10_01/_configuration.py | 8 +-- .../mgmt/monitor/v2020_10_01/_version.py | 2 +- .../monitor/v2020_10_01/aio/_configuration.py | 8 +-- .../_activity_log_alerts_operations.py | 17 ++--- .../_activity_log_alerts_operations.py | 29 ++++----- .../monitor/v2021_04_01/_configuration.py | 8 +-- .../mgmt/monitor/v2021_04_01/_version.py | 2 +- .../monitor/v2021_04_01/aio/_configuration.py | 8 +-- .../_data_collection_endpoints_operations.py | 17 ++--- ...collection_rule_associations_operations.py | 15 ++--- .../_data_collection_rules_operations.py | 17 ++--- .../_data_collection_endpoints_operations.py | 29 ++++----- ...collection_rule_associations_operations.py | 25 +++----- .../_data_collection_rules_operations.py | 29 ++++----- .../monitor/v2021_05_01/_configuration.py | 8 +-- .../mgmt/monitor/v2021_05_01/_version.py | 2 +- .../monitor/v2021_05_01/aio/_configuration.py | 8 +-- .../_metric_definitions_operations.py | 9 +-- .../aio/operations/_metrics_operations.py | 11 +--- .../v2021_05_01/aio/operations/_operations.py | 7 +-- .../_metric_definitions_operations.py | 13 ++-- .../operations/_metrics_operations.py | 17 ++--- .../v2021_05_01/operations/_operations.py | 9 +-- .../v2021_05_01_preview/_configuration.py | 8 +-- .../monitor/v2021_05_01_preview/_version.py | 2 +- .../v2021_05_01_preview/aio/_configuration.py | 8 +-- .../_autoscale_settings_operations.py | 29 ++------- ...diagnostic_settings_category_operations.py | 13 +--- .../_diagnostic_settings_operations.py | 21 ++----- ...nt_group_diagnostic_settings_operations.py | 21 ++----- .../_predictive_metric_operations.py | 9 +-- ...cription_diagnostic_settings_operations.py | 21 ++----- .../_autoscale_settings_operations.py | 53 ++++------------ ...diagnostic_settings_category_operations.py | 21 ++----- .../_diagnostic_settings_operations.py | 37 +++-------- ...nt_group_diagnostic_settings_operations.py | 37 +++-------- .../_predictive_metric_operations.py | 13 +--- ...cription_diagnostic_settings_operations.py | 37 +++-------- .../v2021_06_03_preview/_configuration.py | 8 +-- .../monitor/v2021_06_03_preview/_version.py | 2 +- .../v2021_06_03_preview/aio/_configuration.py | 8 +-- .../_azure_monitor_workspaces_operations.py | 29 ++------- .../_monitor_operations_operations.py | 9 +-- .../_azure_monitor_workspaces_operations.py | 53 ++++------------ .../_monitor_operations_operations.py | 13 +--- .../v2021_07_01_preview/_configuration.py | 8 +-- .../monitor/v2021_07_01_preview/_version.py | 2 +- .../v2021_07_01_preview/aio/_configuration.py | 8 +-- ...private_endpoint_connections_operations.py | 29 ++------- .../_private_link_resources_operations.py | 13 +--- ..._link_scope_operation_status_operations.py | 9 +-- ...rivate_link_scoped_resources_operations.py | 29 ++------- .../_private_link_scopes_operations.py | 33 +++------- ...private_endpoint_connections_operations.py | 45 +++---------- .../_private_link_resources_operations.py | 21 ++----- ..._link_scope_operation_status_operations.py | 13 +--- ...rivate_link_scoped_resources_operations.py | 45 +++---------- .../_private_link_scopes_operations.py | 57 ++++------------- .../monitor/v2021_09_01/_configuration.py | 8 +-- .../mgmt/monitor/v2021_09_01/_version.py | 2 +- .../monitor/v2021_09_01/aio/_configuration.py | 8 +-- .../operations/_action_groups_operations.py | 37 +++++------ .../operations/_action_groups_operations.py | 63 +++++++++---------- .../v2022_02_01_preview/_configuration.py | 8 +-- .../monitor/v2022_02_01_preview/_version.py | 2 +- .../v2022_02_01_preview/aio/_configuration.py | 8 +-- .../_data_collection_endpoints_operations.py | 29 ++------- ...collection_rule_associations_operations.py | 29 ++------- .../_data_collection_rules_operations.py | 29 ++------- .../_data_collection_endpoints_operations.py | 53 ++++------------ ...collection_rule_associations_operations.py | 53 ++++------------ .../_data_collection_rules_operations.py | 53 ++++------------ .../monitor/v2022_04_01/_configuration.py | 8 +-- .../mgmt/monitor/v2022_04_01/_version.py | 2 +- .../monitor/v2022_04_01/aio/_configuration.py | 8 +-- .../operations/_action_groups_operations.py | 31 ++++----- .../operations/_action_groups_operations.py | 53 +++++++--------- .../monitor/v2022_06_01/_configuration.py | 8 +-- .../mgmt/monitor/v2022_06_01/_version.py | 2 +- .../monitor/v2022_06_01/aio/_configuration.py | 8 +-- .../operations/_action_groups_operations.py | 37 +++++------ .../_data_collection_endpoints_operations.py | 17 ++--- ...collection_rule_associations_operations.py | 17 ++--- .../_data_collection_rules_operations.py | 17 ++--- .../operations/_action_groups_operations.py | 63 +++++++++---------- .../_data_collection_endpoints_operations.py | 29 ++++----- ...collection_rule_associations_operations.py | 29 ++++----- .../_data_collection_rules_operations.py | 29 ++++----- .../v2022_08_01_preview/_configuration.py | 8 +-- .../monitor/v2022_08_01_preview/_version.py | 2 +- .../v2022_08_01_preview/aio/_configuration.py | 8 +-- .../_scheduled_query_rules_operations.py | 29 ++------- .../_scheduled_query_rules_operations.py | 53 ++++------------ .../monitor/v2022_10_01/_configuration.py | 8 +-- .../mgmt/monitor/v2022_10_01/_version.py | 2 +- .../monitor/v2022_10_01/aio/_configuration.py | 8 +-- .../_autoscale_settings_operations.py | 17 ++--- .../_predictive_metric_operations.py | 7 +-- .../_autoscale_settings_operations.py | 29 ++++----- .../_predictive_metric_operations.py | 9 +-- .../monitor/v2023_01_01/_configuration.py | 8 +-- .../mgmt/monitor/v2023_01_01/_version.py | 2 +- .../monitor/v2023_01_01/aio/_configuration.py | 8 +-- .../operations/_action_groups_operations.py | 25 +++----- .../operations/_action_groups_operations.py | 43 ++++++------- .../v2023_03_01_preview/_configuration.py | 8 +-- .../monitor/v2023_03_01_preview/_version.py | 2 +- .../v2023_03_01_preview/aio/_configuration.py | 8 +-- .../_tenant_action_groups_operations.py | 25 ++------ .../_tenant_action_groups_operations.py | 45 +++---------- 265 files changed, 1184 insertions(+), 3292 deletions(-) diff --git a/sdk/monitor/azure-mgmt-monitor/_meta.json b/sdk/monitor/azure-mgmt-monitor/_meta.json index 4a59bdacbfcb0..2459ee912641e 100644 --- a/sdk/monitor/azure-mgmt-monitor/_meta.json +++ b/sdk/monitor/azure-mgmt-monitor/_meta.json @@ -1,11 +1,11 @@ { - "commit": "7d313ecb6a58a51046a3916ee5ea6b6d29973522", + "commit": "b7575715edd90e500e1ca6a69e00353a2dcfefcf", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.4.3", + "@autorest/python@6.4.6", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/monitor/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/monitor/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.6 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/monitor/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_serialization.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_serialization.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_serialization.py @@ -631,7 +631,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if xml_desc.get("attr", False): if xml_ns: ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) serialized.set(xml_name, new_attr) # type: ignore continue if xml_desc.get("text", False): @@ -1273,7 +1273,7 @@ def _extract_name_from_internal_type(internal_type): 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) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) return xml_name @@ -1297,7 +1297,7 @@ def xml_key_extractor(attr, attr_desc, data): # 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) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) # If it's an attribute, that's simple if xml_desc.get("attr", False): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py index d15d41e4399e4..a30a458f8b5b3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py index 8c20cf8b0c310..636898b6d8802 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._activity_logs_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -93,7 +88,7 @@ def list(self, filter: str, select: Optional[str] = None, **kwargs: Any) -> Asyn _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py index 275f8cddfb413..bf34bae2ab1df 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -153,7 +148,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -234,7 +229,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -293,7 +288,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -428,7 +423,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -500,7 +495,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -574,7 +569,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AlertRul _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py index e5fc5ec681498..dfec725ec8a6e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -83,7 +78,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -237,7 +232,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -318,7 +313,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -379,7 +374,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -515,7 +510,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -579,7 +574,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Autoscal _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py index c0a972c8bf444..3c7b21b03b0e0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._event_categories_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,7 +66,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.LocalizableString"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventCategoryCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py index ef73e6fc95d72..d856b4b2f3d47 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -75,7 +70,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py index 2ff7d874e1948..bdb2f2b299ec9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._tenant_activity_logs_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -100,7 +95,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py index 9ee792bd6ad77..a7d2c0777295c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +41,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -126,7 +121,7 @@ def list(self, filter: str, select: Optional[str] = None, **kwargs: Any) -> Iter _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py index 534ee776ee7f7..510a1c84b1a2b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +41,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -80,7 +75,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -111,7 +106,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,7 +137,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,7 +171,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -206,7 +201,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -334,7 +329,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -415,7 +410,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -474,7 +469,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -609,7 +604,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -679,7 +674,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -753,7 +748,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AlertRuleReso _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py index 5253f300c7187..907af75438337 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +71,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -112,7 +107,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -145,7 +140,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,7 +173,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -212,7 +207,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -270,7 +265,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -424,7 +419,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -505,7 +500,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -566,7 +561,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -702,7 +697,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -766,7 +761,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AutoscaleSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py index 410131451239a..081e0c5c52abb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +88,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.LocalizableString"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventCategoryCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py index 89ce207c2b3c6..f91935f0adc8f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +92,7 @@ def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py index d88c0e1f614ef..791f8691af224 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_list_request(*, filter: Optional[str] = None, select: Optional[str] = _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -125,7 +120,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py index 791ee89842565..f0a53c271df53 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -153,7 +148,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -234,7 +229,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -293,7 +288,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -428,7 +423,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -500,7 +495,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -574,7 +569,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AlertRul _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py index 8c5205e5360b4..a463775beda27 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -80,7 +75,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py index 34188c0319b04..aba19d4e87f7d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -75,7 +70,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py index 3ebe1cd0d77aa..15eb338f0110e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._service_diagnostic_settings_operations import build_create_or_update_request, build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -77,7 +72,7 @@ async def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnost _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -186,7 +181,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py index 32328f2555d70..4c4f542d86bf5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +41,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -80,7 +75,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -111,7 +106,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,7 +137,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,7 +171,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -206,7 +201,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -334,7 +329,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -415,7 +410,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -474,7 +469,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -609,7 +604,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -679,7 +674,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -753,7 +748,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AlertRuleReso _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py index 6d2030791124a..67d901dc23aa8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_list_request(resource_uri: str, *, filter: Optional[str] = None, **kwa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -109,7 +104,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py index b673f2be25226..d3a5e13e33298 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +92,7 @@ def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py index 7a99ea39c932c..194c4f21edb16 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_get_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,7 +62,7 @@ def build_create_or_update_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -131,7 +126,7 @@ def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnosticSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -240,7 +235,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py index a0bc5d9fd0fee..45c019a2dd03b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", "2016-03-01") + api_version: str = kwargs.pop("api_version", "2016-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py index 41f10ab23424d..b092b2cb72396 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", "2016-03-01") + api_version: str = kwargs.pop("api_version", "2016-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py index 1764b3b26b469..0a00fb251b5f2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._alert_rule_incidents_operations import build_get_request, build_list_by_alert_rule_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -87,7 +82,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.Incident] = kwargs.pop("cls", None) request = build_get_request( @@ -146,7 +141,7 @@ def list_by_alert_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.IncidentListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py index e389e31ffe7f9..3e8c1dacc31d9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -154,7 +149,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -235,7 +230,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -294,7 +289,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -429,7 +424,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -501,7 +496,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -586,7 +581,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AlertRul _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py index 10cb590a9bd32..fa96caad88e47 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -88,7 +83,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -142,7 +137,7 @@ async def get(self, log_profile_name: str, **kwargs: Any) -> _models.LogProfileR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) request = build_get_request( @@ -250,7 +245,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) @@ -373,7 +368,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) @@ -435,7 +430,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.LogProfileResource"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.LogProfileCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py index 556b0b8def4d9..4bdf50c1b4625 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +76,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py index a0e63b9675f01..53e3730954677 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -81,7 +76,7 @@ def build_list_by_alert_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -154,7 +149,7 @@ def get(self, resource_group_name: str, rule_name: str, incident_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.Incident] = kwargs.pop("cls", None) request = build_get_request( @@ -212,7 +207,7 @@ def list_by_alert_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.IncidentListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py index 670ca8f322fbf..10f9550f3386b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -81,7 +76,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +107,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -143,7 +138,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -177,7 +172,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -335,7 +330,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -416,7 +411,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -475,7 +470,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -610,7 +605,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -680,7 +675,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -765,7 +760,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AlertRuleReso _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py index 6226c7b42433f..7fd197ab466b2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_delete_request(log_profile_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}" @@ -66,7 +61,7 @@ def build_get_request(log_profile_name: str, subscription_id: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +88,7 @@ def build_create_or_update_request(log_profile_name: str, subscription_id: str, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -123,7 +118,7 @@ def build_update_request(log_profile_name: str, subscription_id: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -153,7 +148,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -214,7 +209,7 @@ def delete(self, log_profile_name: str, **kwargs: Any) -> None: # pylint: disab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -268,7 +263,7 @@ def get(self, log_profile_name: str, **kwargs: Any) -> _models.LogProfileResourc _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) request = build_get_request( @@ -376,7 +371,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) @@ -499,7 +494,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) @@ -561,7 +556,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.LogProfileResource"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.LogProfileCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py index 80762775b379d..6fa9adbd9b383 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(resource_uri: str, *, filter: Optional[str] = None, **kwa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -110,7 +105,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py index b01c661afc04f..562b6f4def407 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", "2016-09-01") + api_version: str = kwargs.pop("api_version", "2016-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py index cf31f284f0d8d..fe87248263156 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", "2016-09-01") + api_version: str = kwargs.pop("api_version", "2016-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py index 4099aa2b9d35a..174ebb9d600c6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metrics_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -91,7 +86,7 @@ def list(self, resource_uri: str, filter: Optional[str] = None, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) cls: ClsType[_models.MetricCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py index 448baa914e6d0..48507251f89b5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -32,10 +31,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -82,7 +77,7 @@ async def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnost _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -194,7 +189,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -325,7 +320,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py index a72f1d4b8ca29..34d82dce6cc9c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(resource_uri: str, *, filter: Optional[str] = None, **kwa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -119,7 +114,7 @@ def list(self, resource_uri: str, filter: Optional[str] = None, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) cls: ClsType[_models.MetricCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py index 3185be78cc065..c9a88ec1f2e06 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_get_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,7 +62,7 @@ def build_create_or_update_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -94,7 +89,7 @@ def build_update_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -159,7 +154,7 @@ def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnosticSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -271,7 +266,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -402,7 +397,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py index 84b48bb6a7a56..fdcd1f8c74566 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-03-01-preview"] = kwargs.pop("api_version", "2017-03-01-preview") + api_version: str = kwargs.pop("api_version", "2017-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py index 4cde3faf0edc8..40ec0a582da1a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-03-01-preview"] = kwargs.pop("api_version", "2017-03-01-preview") + api_version: str = kwargs.pop("api_version", "2017-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py index 22493b5b16473..9861684344f78 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -160,9 +155,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -243,9 +236,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -310,9 +301,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -444,9 +433,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -510,9 +497,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Activ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { @@ -602,9 +587,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py index 787d559ae857c..3232ef2245050 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,9 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -120,9 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -155,9 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -191,9 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -217,9 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -359,9 +342,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -442,9 +423,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -509,9 +488,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -643,9 +620,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -709,9 +684,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActivityLo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { @@ -801,9 +774,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py index 1d781d6471a4d..9cbb2f0deda34 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", "2017-04-01") + api_version: str = kwargs.pop("api_version", "2017-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py index 1816576cd0417..8a6aabc450e2b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", "2017-04-01") + api_version: str = kwargs.pop("api_version", "2017-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py index af911c286fe5a..83b8cc0744221 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -431,7 +426,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -494,7 +489,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -583,7 +578,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -751,7 +746,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py index fa77aef8486e2..afc2e16ab129c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -240,7 +235,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -305,7 +300,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -437,7 +432,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -501,7 +496,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Activ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { @@ -591,7 +586,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py index 3f97b160b1d84..9d8127c667d95 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -653,7 +648,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -716,7 +711,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -805,7 +800,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -973,7 +968,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py index 69cbd686f903a..fa881faac5b30 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -346,7 +341,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -427,7 +422,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -492,7 +487,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -624,7 +619,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -688,7 +683,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActivityLo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { @@ -778,7 +773,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py index e68c824c7a367..4997675f65341 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-05-01-preview"] = kwargs.pop("api_version", "2017-05-01-preview") + api_version: str = kwargs.pop("api_version", "2017-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py index b85932e745333..850cb89324d22 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-05-01-preview"] = kwargs.pop("api_version", "2017-05-01-preview") + api_version: str = kwargs.pop("api_version", "2017-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py index b88b2a5d77a76..4d4206807d613 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._diagnostic_settings_category_operations import build_get_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,9 +74,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResource] = kwargs.pop("cls", None) request = build_get_request( @@ -139,9 +132,7 @@ async def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py index 381826d350407..0cd81c9333b78 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -33,10 +32,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +79,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -203,9 +196,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -278,9 +269,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -334,9 +323,7 @@ async def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py index 8f6e420c7b256..0f0a6b505442a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -72,9 +67,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> AsyncIterable["_models.Metri _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py index 77cd4b16629ab..8f592ebe74128 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._metrics_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -122,9 +117,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py index faca93278b29f..506f712cbd8d9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -33,10 +32,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -83,9 +78,7 @@ async def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -199,9 +192,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -272,9 +263,7 @@ async def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inc _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -326,9 +315,7 @@ async def list(self, **kwargs: Any) -> _models.SubscriptionDiagnosticSettingsRes _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py index caeaaed16267e..6bb5f7b119d54 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,9 +38,7 @@ def build_get_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReques _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -70,9 +63,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -135,9 +126,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResource] = kwargs.pop("cls", None) request = build_get_request( @@ -195,9 +184,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSettingsCa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py index 4b072849c8f1f..f96315778749e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,9 +38,7 @@ def build_get_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReques _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -70,9 +63,7 @@ def build_create_or_update_request(resource_uri: str, name: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -100,9 +91,7 @@ def build_delete_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -127,9 +116,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -192,9 +179,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -311,9 +296,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -386,9 +369,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -442,9 +423,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSettingsRe _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py index 92d149f0e0779..00ae06e79b604 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -101,9 +94,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> Iterable["_models.MetricDefi _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py index 076868a65d0b9..28f3fae726ec7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +51,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -179,9 +172,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py index e99ae19883804..55ab7824b6711 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,9 +38,7 @@ def build_get_request(name: str, subscription_id: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,9 +65,7 @@ def build_create_or_update_request(name: str, subscription_id: str, **kwargs: An _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -104,9 +95,7 @@ def build_delete_request(name: str, subscription_id: str, **kwargs: Any) -> Http _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -133,9 +122,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -197,9 +184,7 @@ def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticSetting _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -313,9 +298,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -386,9 +369,7 @@ def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsist _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -440,9 +421,7 @@ def list(self, **kwargs: Any) -> _models.SubscriptionDiagnosticSettingsResourceC _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py index a8702ad90584b..005178cd14075 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-12-01-preview"] = kwargs.pop("api_version", "2017-12-01-preview") + api_version: str = kwargs.pop("api_version", "2017-12-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py index 944ba3a22dbba..e54d5ce7c1efa 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-12-01-preview"] = kwargs.pop("api_version", "2017-12-01-preview") + api_version: str = kwargs.pop("api_version", "2017-12-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py index 23a55e3f0df54..2758d02015036 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_namespaces_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -77,9 +72,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-12-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-12-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-12-01-preview")) cls: ClsType[_models.MetricNamespaceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py index a6d630d78260f..1541a68360006 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_request(resource_uri: str, *, start_time: Optional[str] = None, * _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-12-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-12-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-12-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -108,9 +101,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-12-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-12-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-12-01-preview")) cls: ClsType[_models.MetricNamespaceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py index a672e9dac2c35..dad9cbbe64f27 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", "2018-01-01") + api_version: str = kwargs.pop("api_version", "2018-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py index 29b4366918974..30af6193b9be4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", "2018-01-01") + api_version: str = kwargs.pop("api_version", "2018-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py index bda566d7eb5c5..e80ecd0e17501 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -77,7 +72,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py index 59fc4adf136b5..d822e26f7980b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._metrics_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -131,7 +126,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py index ce998aa1291c6..5df81c156d457 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(resource_uri: str, *, metricnamespace: Optional[str] = No _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -106,7 +101,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py index a58abf0c4d357..f97b90eef4a0c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +52,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -189,7 +184,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py index d0ee3926b5845..73b44f979f35a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", "2018-03-01") + api_version: str = kwargs.pop("api_version", "2018-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py index 087b4a2041c71..9b7f0bc7ffb42 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", "2018-03-01") + api_version: str = kwargs.pop("api_version", "2018-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py index 1886eaebdf0e8..7d73df7a392ad 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -431,7 +426,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -494,7 +489,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -583,7 +578,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -751,7 +746,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py index 5ef5ee42bd157..f49127a17ef10 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,7 +73,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.MetricAl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -165,7 +160,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -262,7 +257,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -393,7 +388,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) @@ -536,7 +531,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) @@ -613,7 +608,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py index 5847ee4829b25..eeb6e07acf9e3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._metric_alerts_status_operations import build_list_by_name_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -82,7 +77,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertStatusCollection] = kwargs.pop("cls", None) request = build_list_request( @@ -149,7 +144,7 @@ async def list_by_name( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertStatusCollection] = kwargs.pop("cls", None) request = build_list_by_name_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py index 88780bd89d417..468db9a866dd3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -653,7 +648,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -716,7 +711,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -805,7 +800,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -973,7 +968,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py index b67e5515c6c34..77b44d7d1d871 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -69,7 +64,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -99,7 +94,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -132,7 +127,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -166,7 +161,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -200,7 +195,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -259,7 +254,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.MetricAlertRe _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -346,7 +341,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -443,7 +438,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -574,7 +569,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) @@ -717,7 +712,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) @@ -794,7 +789,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py index bba700a637280..7b21052a0cb71 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_list_request(resource_group_name: str, rule_name: str, subscription_id _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +71,7 @@ def build_list_by_name_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -148,7 +143,7 @@ def list(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertStatusCollection] = kwargs.pop("cls", None) request = build_list_request( @@ -215,7 +210,7 @@ def list_by_name( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertStatusCollection] = kwargs.pop("cls", None) request = build_list_by_name_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py index 90a10fa7b275f..c762f34e7a72b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", "2018-04-16") + api_version: str = kwargs.pop("api_version", "2018-04-16") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py index 01cea85a1b06d..9b10881a577b5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", "2018-04-16") + api_version: str = kwargs.pop("api_version", "2018-04-16") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py index 1502426a1f231..da65535a57b34 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -158,7 +153,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) @@ -237,7 +232,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -368,7 +363,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) @@ -445,7 +440,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -498,7 +493,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -592,7 +587,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py index bf46feafb16df..73f734d716569 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -81,7 +76,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +107,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +141,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -179,7 +174,7 @@ def build_list_by_subscription_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -209,7 +204,7 @@ def build_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -349,7 +344,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) @@ -428,7 +423,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -559,7 +554,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) @@ -636,7 +631,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -689,7 +684,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -783,7 +778,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py index 75fb9a1e12635..31454ff2ef96d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-06-01-preview"] = kwargs.pop("api_version", "2018-06-01-preview") + api_version: str = kwargs.pop("api_version", "2018-06-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py index 0b8eb8e469be9..44fe163ef8695 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-06-01-preview"] = kwargs.pop("api_version", "2018-06-01-preview") + api_version: str = kwargs.pop("api_version", "2018-06-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py index d44b6980674ca..a7e2cd39012ac 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -166,9 +161,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) @@ -249,9 +242,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) request = build_get_request( @@ -315,9 +306,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -452,9 +441,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) @@ -517,9 +504,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.GuestDiagnosticSettingsA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationList] = kwargs.pop("cls", None) error_map = { @@ -609,9 +594,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py index 7482cf10af513..3e3298f4462a3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -160,9 +155,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -243,9 +236,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -378,9 +369,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -461,9 +450,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -511,9 +498,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.GuestDiagnosticSettingsR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsList] = kwargs.pop("cls", None) error_map = { @@ -601,9 +586,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py index b2121d6ea0dda..4c78fd8a824e7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_create_or_update_request(resource_uri: str, association_name: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -78,9 +71,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -108,9 +99,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,9 +127,7 @@ def build_update_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -171,9 +158,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -200,9 +185,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -348,9 +331,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) @@ -431,9 +412,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) request = build_get_request( @@ -497,9 +476,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -634,9 +611,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) @@ -699,9 +674,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.GuestDiagnosticSettingsAssoci _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationList] = kwargs.pop("cls", None) error_map = { @@ -791,9 +764,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py index 4cf54e4124c36..84557c65ba55c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,9 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -120,9 +111,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -158,9 +147,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -191,9 +178,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -219,9 +204,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -361,9 +344,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -444,9 +425,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -579,9 +558,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -662,9 +639,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -712,9 +687,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.GuestDiagnosticSettingsResour _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsList] = kwargs.pop("cls", None) error_map = { @@ -802,9 +775,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py index edf7a4b51562e..20fa7a9824739 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", "2018-09-01") + api_version: str = kwargs.pop("api_version", "2018-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py index 3fc8bf276302b..a71fe19692e20 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", "2018-09-01") + api_version: str = kwargs.pop("api_version", "2018-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py index cbfe3c88d3d35..f6a4b809941ed 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -431,7 +426,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -494,7 +489,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -583,7 +578,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -751,7 +746,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baselines_operations.py index 259c349bb8eaf..4cfedcc925bff 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baselines_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._baselines_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -120,7 +115,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.MetricBaselinesResponse] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py index ecb0905d938dc..2b6acc7edf204 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -653,7 +648,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -716,7 +711,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -805,7 +800,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -973,7 +968,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baselines_operations.py index 83ceb032c95b0..d01905000eac2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baselines_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union import urllib.parse @@ -31,10 +30,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -58,7 +53,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -175,7 +170,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.MetricBaselinesResponse] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py index f6d57eb37c8c3..14b2024459683 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-11-27-preview"] = kwargs.pop("api_version", "2018-11-27-preview") + api_version: str = kwargs.pop("api_version", "2018-11-27-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py index f873a5ef6cdb4..a36e7edf06027 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-11-27-preview"] = kwargs.pop("api_version", "2018-11-27-preview") + api_version: str = kwargs.pop("api_version", "2018-11-27-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py index 8cbd90a61e6df..f775ff396b0ff 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._vm_insights_operations import build_get_onboarding_status_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,9 +73,7 @@ async def get_onboarding_status(self, resource_uri: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-11-27-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-11-27-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-11-27-preview")) cls: ClsType[_models.VMInsightsOnboardingStatus] = kwargs.pop("cls", None) request = build_get_onboarding_status_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py index 97fbdf52e545c..8e818c6fa4964 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,9 +38,7 @@ def build_get_onboarding_status_request(resource_uri: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-11-27-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-11-27-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-11-27-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -109,9 +102,7 @@ def get_onboarding_status(self, resource_uri: str, **kwargs: Any) -> _models.VMI _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-11-27-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-11-27-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-11-27-preview")) cls: ClsType[_models.VMInsightsOnboardingStatus] = kwargs.pop("cls", None) request = build_get_onboarding_status_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py index ed8c0533d9be5..0e809d339236f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", "2019-03-01") + api_version: str = kwargs.pop("api_version", "2019-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py index 22f44870cc994..62614c9a05515 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", "2019-03-01") + api_version: str = kwargs.pop("api_version", "2019-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py index 7b88b5d4ac72b..cfbbb63fd7150 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -431,7 +426,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -494,7 +489,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -583,7 +578,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -751,7 +746,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py index c37176004dee8..e0c0c6f4692cf 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._baselines_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -120,7 +115,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.MetricBaselinesResponse] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py index 64f75d46da9dd..5f50969a4e5c4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -653,7 +648,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -716,7 +711,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -805,7 +800,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -973,7 +968,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py index 53cee4dabd37a..faa89a914d4dc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union import urllib.parse @@ -31,10 +30,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -58,7 +53,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -175,7 +170,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.MetricBaselinesResponse] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py index 8839954d182dc..dc401fa09a71f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", "2019-06-01") + api_version: str = kwargs.pop("api_version", "2019-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py index 43ad73d857c94..44ead2faf77d3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", "2019-06-01") + api_version: str = kwargs.pop("api_version", "2019-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py index 657f6879fc1f4..b2454ef052777 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -431,7 +426,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -494,7 +489,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -583,7 +578,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -751,7 +746,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py index 1e1c4d738e9c7..9525620b317cf 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -653,7 +648,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -716,7 +711,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -805,7 +800,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -973,7 +968,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py index 629cf210dc21c..7b27cbdf9da5c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-10-17-preview"] = kwargs.pop("api_version", "2019-10-17-preview") + api_version: str = kwargs.pop("api_version", "2019-10-17-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py index 91e52467400f6..fd98a3ea043da 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-10-17-preview"] = kwargs.pop("api_version", "2019-10-17-preview") + api_version: str = kwargs.pop("api_version", "2019-10-17-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py index e414963530cd8..871407556eb4c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_private_link_scope_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -94,9 +89,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -153,9 +146,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -327,9 +318,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -389,9 +378,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -453,9 +440,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) 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) @@ -517,9 +502,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py index 2e89ac0060a25..e45f4e5413c06 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._private_link_resources_operations import build_get_request, build_list_by_private_link_scope_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,9 +73,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -181,9 +174,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py index eb17c279dd5c1..df12c42002ee1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._private_link_scope_operation_status_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,9 +76,7 @@ async def get(self, async_operation_id: str, resource_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py index 2fa35d04a4688..8d9f0626c0647 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_private_link_scope_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -92,9 +87,7 @@ async def get(self, resource_group_name: str, scope_name: str, name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) request = build_get_request( @@ -151,9 +144,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ScopedResource]] = kwargs.pop("cls", None) @@ -328,9 +319,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -390,9 +379,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -454,9 +441,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) 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) @@ -517,9 +502,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.ScopedResourceListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py index 2ccf8b87532a6..6515ff841ddac 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -40,10 +39,6 @@ build_update_tags_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,9 +76,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.AzureMonitorPrivateLinkS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -170,9 +163,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -257,9 +248,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -316,9 +305,7 @@ async def begin_delete(self, resource_group_name: str, scope_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) 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) @@ -385,9 +372,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) request = build_get_request( @@ -525,9 +510,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) @@ -678,9 +661,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py index da263aaf80457..c97da25e5f148 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,9 +48,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -95,9 +88,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -139,9 +130,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) # Construct URL _url = kwargs.pop( "template_url", @@ -172,9 +161,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -249,9 +236,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -308,9 +293,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -482,9 +465,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -544,9 +525,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -608,9 +587,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) 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) @@ -672,9 +649,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py index c839a54c30e03..d3ad9ed36ef27 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -82,9 +75,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,9 +142,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -254,9 +243,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py index a6df97e5fb6b3..b32887afeb16a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -119,9 +112,7 @@ def get(self, async_operation_id: str, resource_group_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py index e4f7ef252002e..5df531011edfb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,9 +44,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -85,9 +78,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -123,9 +114,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) # Construct URL _url = kwargs.pop( "template_url", @@ -154,9 +143,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -229,9 +216,7 @@ def get(self, resource_group_name: str, scope_name: str, name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) request = build_get_request( @@ -288,9 +273,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ScopedResource]] = kwargs.pop("cls", None) @@ -465,9 +448,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -527,9 +508,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -589,9 +568,7 @@ def begin_delete(self, resource_group_name: str, scope_name: str, name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) 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) @@ -652,9 +629,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.ScopedResourceListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py index c5aa3b55907f9..e7e0298837d16 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -104,9 +95,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ def build_delete_request(resource_group_name: str, scope_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) # Construct URL _url = kwargs.pop( "template_url", @@ -132,9 +121,7 @@ def build_get_request(resource_group_name: str, scope_name: str, subscription_id _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -167,9 +154,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -205,9 +190,7 @@ def build_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -270,9 +253,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.AzureMonitorPrivateLinkScope" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -359,9 +340,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -446,9 +425,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -505,9 +482,7 @@ def begin_delete(self, resource_group_name: str, scope_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) 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) @@ -572,9 +547,7 @@ def get(self, resource_group_name: str, scope_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) request = build_get_request( @@ -712,9 +685,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) @@ -865,9 +836,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py index 45edbfa23014d..73d4713452337 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-11-01-preview"] = kwargs.pop("api_version", "2019-11-01-preview") + api_version: str = kwargs.pop("api_version", "2019-11-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py index 62d02e980b543..ba7d63ed5b53a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-11-01-preview"] = kwargs.pop("api_version", "2019-11-01-preview") + api_version: str = kwargs.pop("api_version", "2019-11-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py index 1cc83b3818dda..99bb6befae1bd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -37,10 +36,6 @@ build_list_by_rule_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +79,7 @@ def list_by_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -181,9 +174,7 @@ def list_by_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -287,9 +278,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -428,9 +417,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -514,9 +501,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py index 78f4fa0b8085b..4a0584b41d6a6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,9 +81,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -176,9 +169,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -279,9 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -422,9 +411,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -583,9 +570,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -668,9 +653,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py index 572d41a6ca099..f133ffc49d8e1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -106,9 +97,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -135,9 +124,7 @@ def build_create_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -167,9 +154,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -231,9 +216,7 @@ def list_by_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -328,9 +311,7 @@ def list_by_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -434,9 +415,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -575,9 +554,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -661,9 +638,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py index 515ef96a8e46c..ec553d1acbd20 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,9 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,9 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,9 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,9 +167,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -218,9 +203,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -287,9 +270,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -377,9 +358,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -480,9 +459,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -623,9 +600,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -784,9 +759,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -869,9 +842,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py index a051a0ea24f5c..a38a4e1478699 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-01-01-preview"] = kwargs.pop("api_version", "2020-01-01-preview") + api_version: str = kwargs.pop("api_version", "2020-01-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py index 740c01dc5e21d..3c41728a41135 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-01-01-preview"] = kwargs.pop("api_version", "2020-01-01-preview") + api_version: str = kwargs.pop("api_version", "2020-01-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py index da34c581c4326..95c0defda5cdb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -90,9 +85,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -225,9 +218,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -302,9 +293,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -355,9 +344,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py index b020dfe7895f2..a4820859c5059 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(management_group_id: str, name: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,9 +68,7 @@ def build_create_or_update_request(management_group_id: str, name: str, **kwargs _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -108,9 +99,7 @@ def build_delete_request(management_group_id: str, name: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,9 +127,7 @@ def build_list_request(management_group_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -209,9 +196,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -344,9 +329,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -421,9 +404,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -474,9 +455,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py index 0c9435092a061..fe6231bcf3249 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-05-01-preview"] = kwargs.pop("api_version", "2020-05-01-preview") + api_version: str = kwargs.pop("api_version", "2020-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py index 2cb0cf71f8aee..2f135477387fb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-05-01-preview"] = kwargs.pop("api_version", "2020-05-01-preview") + api_version: str = kwargs.pop("api_version", "2020-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py index b2828cac1cc81..2fe4b3dc7850d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,9 +74,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Schedule _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -171,9 +164,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -270,9 +261,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -405,9 +394,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -556,9 +543,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -635,9 +620,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py index 9562b9ebab43d..6fd6e070f963f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,9 +96,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -140,9 +129,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,9 +163,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -212,9 +197,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -274,9 +257,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ScheduledQuer _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -366,9 +347,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -465,9 +444,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -600,9 +577,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -751,9 +726,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -830,9 +803,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py index 925eb3a2ad0f1..fddd1844a56b5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", "2020-10-01") + api_version: str = kwargs.pop("api_version", "2020-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py index 15ad289ba9cac..42b631fd85946 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", "2020-10-01") + api_version: str = kwargs.pop("api_version", "2020-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py index 7f58b5f4a74f3..e517d084df5df 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -162,7 +157,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -243,7 +238,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -308,7 +303,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -443,7 +438,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -507,7 +502,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Activ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.AlertRuleList] = kwargs.pop("cls", None) error_map = { @@ -597,7 +592,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.AlertRuleList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py index d6e804b59ed59..6c10122bc5ab2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -349,7 +344,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -430,7 +425,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -495,7 +490,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -630,7 +625,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -694,7 +689,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActivityLo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.AlertRuleList] = kwargs.pop("cls", None) error_map = { @@ -784,7 +779,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.AlertRuleList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py index adc1dbfb97de3..7299d9a2317f8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", "2021-04-01") + api_version: str = kwargs.pop("api_version", "2021-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py index 4b28acf65ca48..65ce5c4436802 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", "2021-04-01") + api_version: str = kwargs.pop("api_version", "2021-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py index fa57e39737669..98348749298c2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,7 +81,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -174,7 +169,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -415,7 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -574,7 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py index 2b5caca4608e7..6d20c7b2572bd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -37,10 +36,6 @@ build_list_by_rule_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +79,7 @@ def list_by_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -179,7 +174,7 @@ def list_by_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -283,7 +278,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -422,7 +417,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -506,7 +501,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py index 5882cad42ac4a..700241efb4993 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,7 +81,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -174,7 +169,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -415,7 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -574,7 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py index 45cc55333d1dd..ea84dce0094c0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,7 +133,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,7 +171,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -214,7 +209,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -283,7 +278,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -371,7 +366,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -472,7 +467,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -612,7 +607,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -771,7 +766,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -854,7 +849,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py index 4929b7bb01596..9c9b81af785ac 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,7 +66,7 @@ def build_list_by_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -102,7 +97,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -129,7 +124,7 @@ def build_create_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -159,7 +154,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -221,7 +216,7 @@ def list_by_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -316,7 +311,7 @@ def list_by_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -420,7 +415,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -559,7 +554,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -643,7 +638,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py index bc3d2c21a56b4..8ddaa3343cac4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -136,7 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -172,7 +167,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -208,7 +203,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -275,7 +270,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -363,7 +358,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -464,7 +459,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -604,7 +599,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -763,7 +758,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -846,7 +841,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_configuration.py index 46364adf795c1..7f084d2540de1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", "2021-05-01") + api_version: str = kwargs.pop("api_version", "2021-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_configuration.py index ef321a5b69f02..f210214ef4bfc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", "2021-05-01") + api_version: str = kwargs.pop("api_version", "2021-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metric_definitions_operations.py index 8ef08ccc8155d..d57b9b3dd76bd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_at_subscription_scope_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,7 +73,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.SubscriptionScopeMetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { @@ -171,7 +166,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metrics_operations.py index 4726fa6aabce8..f8bb2bf6db880 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -33,10 +32,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -142,7 +137,7 @@ async def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.SubscriptionScopeMetricResponse] = kwargs.pop("cls", None) request = build_list_at_subscription_scope_request( @@ -445,7 +440,7 @@ async def list_at_subscription_scope_post( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionScopeMetricResponse] = kwargs.pop("cls", None) @@ -590,7 +585,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_operations.py index 5a7aff5aebdd2..5ba95db4da1c7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -75,7 +70,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metric_definitions_operations.py index dd7bcbec64db7..1340e5847df89 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_at_subscription_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,7 +69,7 @@ def build_list_request(resource_uri: str, *, metricnamespace: Optional[str] = No _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -136,7 +131,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.SubscriptionScopeMetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { @@ -229,7 +224,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metrics_operations.py index 399d0ad7f7a6e..5ef64fdbbd104 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -60,7 +55,7 @@ def build_list_at_subscription_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -123,7 +118,7 @@ def build_list_at_subscription_scope_post_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +183,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -331,7 +326,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.SubscriptionScopeMetricResponse] = kwargs.pop("cls", None) request = build_list_at_subscription_scope_request( @@ -634,7 +629,7 @@ def list_at_subscription_scope_post( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionScopeMetricResponse] = kwargs.pop("cls", None) @@ -779,7 +774,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_operations.py index b399b16aa7f4a..21a77f2b1c6ba 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +92,7 @@ def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py index bdecfe75101af..225ab16920795 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-05-01-preview"] = kwargs.pop("api_version", "2021-05-01-preview") + api_version: str = kwargs.pop("api_version", "2021-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py index 9dbd2d5272517..06c4726413bfd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-05-01-preview"] = kwargs.pop("api_version", "2021-05-01-preview") + api_version: str = kwargs.pop("api_version", "2021-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py index 7fcf49d01c72a..d97350331881b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +79,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -252,9 +245,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -335,9 +326,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -398,9 +387,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -536,9 +523,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -602,9 +587,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Autoscal _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py index 4430389799cdc..e29c0551d2974 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._diagnostic_settings_category_operations import build_get_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -82,9 +77,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResource] = kwargs.pop("cls", None) request = build_get_request( @@ -135,9 +128,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> AsyncIterable["_models.Diagn _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py index 21dbf92a349b8..69e056e308927 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -87,9 +82,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -206,9 +199,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -281,9 +272,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -330,9 +319,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> AsyncIterable["_models.Diagn _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py index 834a6b4ad15d9..50d8701ff4653 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -90,9 +85,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -225,9 +218,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -302,9 +293,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -355,9 +344,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py index 430dc11860513..41ecbac73a400 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._predictive_metric_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -104,9 +99,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.PredictiveResponse] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py index 157c5a472e04e..5b4389f0dd870 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,9 +81,7 @@ async def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -202,9 +195,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -275,9 +266,7 @@ async def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inc _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -322,9 +311,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.SubscriptionDiagnosticSe _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py index 97e308d7f268a..d60cca94f0204 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -79,9 +72,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -117,9 +108,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -152,9 +141,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -187,9 +174,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -223,9 +208,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -283,9 +266,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -451,9 +432,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -534,9 +513,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -597,9 +574,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -735,9 +710,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -801,9 +774,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AutoscaleSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py index f2d77742a621a..942791fd13a1a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReques _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,9 +65,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,9 +128,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResource] = kwargs.pop("cls", None) request = build_get_request( @@ -190,9 +179,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> Iterable["_models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py index bdffe1ecb5224..0b8bc7df0beac 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReques _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,9 +65,7 @@ def build_create_or_update_request(resource_uri: str, name: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -102,9 +93,7 @@ def build_delete_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -129,9 +118,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -194,9 +181,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -313,9 +298,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -388,9 +371,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -437,9 +418,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> Iterable["_models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py index 3bc0b635c06e5..1d23b2322f4e6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(management_group_id: str, name: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,9 +68,7 @@ def build_create_or_update_request(management_group_id: str, name: str, **kwargs _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -108,9 +99,7 @@ def build_delete_request(management_group_id: str, name: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,9 +127,7 @@ def build_list_request(management_group_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -209,9 +196,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -344,9 +329,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -421,9 +404,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -474,9 +455,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py index 3685a2268e844..38b26e3dada26 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,9 +50,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -156,9 +149,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.PredictiveResponse] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py index edffb491ac888..b94b68ba7dcf1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(name: str, subscription_id: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,9 +67,7 @@ def build_create_or_update_request(name: str, subscription_id: str, **kwargs: An _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -106,9 +97,7 @@ def build_delete_request(name: str, subscription_id: str, **kwargs: Any) -> Http _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -135,9 +124,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -199,9 +186,7 @@ def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticSetting _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -315,9 +300,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -388,9 +371,7 @@ def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsist _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -435,9 +416,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.SubscriptionDiagnosticSetting _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_configuration.py index 1e0362343949e..31e53c1331455 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-06-03-preview"] = kwargs.pop("api_version", "2021-06-03-preview") + api_version: str = kwargs.pop("api_version", "2021-06-03-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_configuration.py index 2694a28b09517..798865c55f154 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-06-03-preview"] = kwargs.pop("api_version", "2021-06-03-preview") + api_version: str = kwargs.pop("api_version", "2021-06-03-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_azure_monitor_workspaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_azure_monitor_workspaces_operations.py index 8b8b615ef2be9..ffbd9681bdd0d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_azure_monitor_workspaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_azure_monitor_workspaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +79,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -172,9 +165,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AzureMon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -271,9 +262,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) request = build_get_request( @@ -411,9 +400,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) @@ -566,9 +553,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) @@ -651,9 +636,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_monitor_operations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_monitor_operations_operations.py index a60ad651589bc..9e79ac29be5da 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_monitor_operations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_monitor_operations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._monitor_operations_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -70,9 +65,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_azure_monitor_workspaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_azure_monitor_workspaces_operations.py index 2fc738879ac62..b4c302548e6f9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_azure_monitor_workspaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_azure_monitor_workspaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,9 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,9 +96,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,9 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -182,9 +169,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -222,9 +207,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -291,9 +274,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -379,9 +360,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AzureMonitorW _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -478,9 +457,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) request = build_get_request( @@ -618,9 +595,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) @@ -773,9 +748,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) @@ -858,9 +831,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_monitor_operations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_monitor_operations_operations.py index ea64efc671305..cbbfaedcabc60 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_monitor_operations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_monitor_operations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -94,9 +87,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_configuration.py index 8518f4b7ff2ae..746cd69c06e9f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-07-01-preview"] = kwargs.pop("api_version", "2021-07-01-preview") + api_version: str = kwargs.pop("api_version", "2021-07-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_configuration.py index 87fb122e77417..e8bedc02dd43c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-07-01-preview"] = kwargs.pop("api_version", "2021-07-01-preview") + api_version: str = kwargs.pop("api_version", "2021-07-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_endpoint_connections_operations.py index 7b10a907e2d23..7832cf55cfae9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -35,10 +34,6 @@ build_list_by_private_link_scope_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -91,9 +86,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -151,9 +144,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -328,9 +319,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -390,9 +379,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -455,9 +442,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) 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) @@ -526,9 +511,7 @@ async def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) request = build_list_by_private_link_scope_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_resources_operations.py index cd0b9d9f71258..9591c2bad8b2d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._private_link_resources_operations import build_get_request, build_list_by_private_link_scope_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -82,9 +77,7 @@ async def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) request = build_list_by_private_link_scope_request( @@ -151,9 +144,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scope_operation_status_operations.py index 6373278c3ba2f..8c29680d9dd40 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scope_operation_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._private_link_scope_operation_status_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,9 +76,7 @@ async def get(self, async_operation_id: str, resource_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scoped_resources_operations.py index d62cdc57d4e78..63500fb5e36d2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scoped_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_private_link_scope_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -92,9 +87,7 @@ async def get(self, resource_group_name: str, scope_name: str, name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) request = build_get_request( @@ -152,9 +145,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ScopedResource]] = kwargs.pop("cls", None) @@ -330,9 +321,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -392,9 +381,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -457,9 +444,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) 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) @@ -520,9 +505,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.ScopedResourceListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scopes_operations.py index e1532d99a2231..3c8f6893def31 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scopes_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -40,10 +39,6 @@ build_update_tags_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,9 +76,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.AzureMonitorPrivateLinkS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -171,9 +164,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -259,9 +250,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -319,9 +308,7 @@ async def begin_delete(self, resource_group_name: str, scope_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) 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) @@ -388,9 +375,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) request = build_get_request( @@ -529,9 +514,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) @@ -685,9 +668,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_endpoint_connections_operations.py index 6151944736f06..de420b3cc7a57 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -51,9 +46,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,9 +86,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -138,9 +129,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -176,9 +165,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -253,9 +240,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -313,9 +298,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -490,9 +473,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -552,9 +533,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -617,9 +596,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) 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) @@ -688,9 +665,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) request = build_list_by_private_link_scope_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_resources_operations.py index c2d4f89bcca90..792ee59cecc34 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,9 +73,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -156,9 +147,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) request = build_list_by_private_link_scope_request( @@ -225,9 +214,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scope_operation_status_operations.py index f8f129ea0317c..7ec571fba79fe 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scope_operation_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -119,9 +112,7 @@ def get(self, async_operation_id: str, resource_group_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scoped_resources_operations.py index 65b92219a7b31..9d8e44e80cd19 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scoped_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,9 +44,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -85,9 +78,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -124,9 +115,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -160,9 +149,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -235,9 +222,7 @@ def get(self, resource_group_name: str, scope_name: str, name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) request = build_get_request( @@ -295,9 +280,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ScopedResource]] = kwargs.pop("cls", None) @@ -473,9 +456,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -535,9 +516,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -598,9 +577,7 @@ def begin_delete(self, resource_group_name: str, scope_name: str, name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) 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) @@ -661,9 +638,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.ScopedResourceListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scopes_operations.py index eff49d5065592..632f0aeee941f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scopes_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,9 +96,7 @@ def build_delete_request(resource_group_name: str, scope_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,9 +127,7 @@ def build_get_request(resource_group_name: str, scope_name: str, subscription_id _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -173,9 +160,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -211,9 +196,7 @@ def build_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -276,9 +259,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.AzureMonitorPrivateLinkScope" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -366,9 +347,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -454,9 +433,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -514,9 +491,7 @@ def begin_delete(self, resource_group_name: str, scope_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) 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) @@ -581,9 +556,7 @@ def get(self, resource_group_name: str, scope_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) request = build_get_request( @@ -722,9 +695,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) @@ -878,9 +849,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py index 7a6d3c839c735..cacdad67be60c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", "2021-09-01") + api_version: str = kwargs.pop("api_version", "2021-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py index 0416c819bcb8e..cbebb0cdaa7c0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", "2021-09-01") + api_version: str = kwargs.pop("api_version", "2021-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py index 9a367e67151f4..d6ea4e9e458de 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -47,10 +46,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -167,7 +162,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -246,7 +241,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -311,7 +306,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -439,7 +434,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -503,7 +498,7 @@ async def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -646,7 +641,7 @@ async def begin_post_test_notifications( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -705,7 +700,7 @@ async def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -864,7 +859,7 @@ async def begin_create_notifications_at_resource_group_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -928,7 +923,7 @@ async def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1100,7 +1095,7 @@ async def begin_create_notifications_at_action_group_resource_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1171,7 +1166,7 @@ async def get_test_notifications( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1235,7 +1230,7 @@ async def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1302,7 +1297,7 @@ async def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1354,7 +1349,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1443,7 +1438,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1611,7 +1606,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py index fdfb8cdc85b98..1d168cf371661 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,7 +113,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,7 +146,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,7 +180,7 @@ def build_post_test_notifications_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -216,7 +211,7 @@ def build_create_notifications_at_resource_group_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -251,7 +246,7 @@ def build_create_notifications_at_action_group_resource_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -285,7 +280,7 @@ def build_get_test_notifications_request(notification_id: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -315,7 +310,7 @@ def build_get_test_notifications_at_resource_group_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -348,7 +343,7 @@ def build_get_test_notifications_at_action_group_resource_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -380,7 +375,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -404,7 +399,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -436,7 +431,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -578,7 +573,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -722,7 +717,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -850,7 +845,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -914,7 +909,7 @@ def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1057,7 +1052,7 @@ def begin_post_test_notifications( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1116,7 +1111,7 @@ def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1275,7 +1270,7 @@ def begin_create_notifications_at_resource_group_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1339,7 +1334,7 @@ def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1511,7 +1506,7 @@ def begin_create_notifications_at_action_group_resource_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1580,7 +1575,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1644,7 +1639,7 @@ def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1711,7 +1706,7 @@ def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1763,7 +1758,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1852,7 +1847,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -2020,7 +2015,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_configuration.py index 6fd488c201a4f..9cefea7b878c0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-09-01-preview"] = kwargs.pop("api_version", "2021-09-01-preview") + api_version: str = kwargs.pop("api_version", "2021-09-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_configuration.py index 163d71414550b..8213230543138 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-09-01-preview"] = kwargs.pop("api_version", "2021-09-01-preview") + api_version: str = kwargs.pop("api_version", "2021-09-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_endpoints_operations.py index 7ab6c51523419..6a785c55c729c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,9 +81,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -176,9 +169,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -279,9 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -422,9 +411,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -583,9 +570,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -668,9 +653,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rule_associations_operations.py index 97f4dd4d9e51b..53d817bc2ddf1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_rule_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,9 +80,7 @@ def list_by_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -182,9 +175,7 @@ def list_by_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -283,9 +274,7 @@ def list_by_data_collection_endpoint( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -389,9 +378,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -530,9 +517,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -616,9 +601,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rules_operations.py index 42cf22f0378d9..a3d5128df5dcf 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,9 +81,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -176,9 +169,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -279,9 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -422,9 +411,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -583,9 +570,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -668,9 +653,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_endpoints_operations.py index f6d2fbd5abbc0..e28ace273f4d5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,9 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,9 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -144,9 +133,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -184,9 +171,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -224,9 +209,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -295,9 +278,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -385,9 +366,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -488,9 +467,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -631,9 +608,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -792,9 +767,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -877,9 +850,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rule_associations_operations.py index 42b8e1f9fe4a8..2fca34eb01499 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -108,9 +99,7 @@ def build_list_by_data_collection_endpoint_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -143,9 +132,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -172,9 +159,7 @@ def build_create_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -204,9 +189,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -268,9 +251,7 @@ def list_by_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -365,9 +346,7 @@ def list_by_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -466,9 +445,7 @@ def list_by_data_collection_endpoint( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -572,9 +549,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -713,9 +688,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -799,9 +772,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rules_operations.py index d9aee7ceef764..e791c4b6aaadb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,9 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,9 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,9 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,9 +167,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -218,9 +203,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -287,9 +270,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -377,9 +358,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -480,9 +459,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -623,9 +600,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -784,9 +759,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -869,9 +842,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_configuration.py index b9ec9715dd48d..660245741936e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", "2022-04-01") + api_version: str = kwargs.pop("api_version", "2022-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_configuration.py index 6905ba16088c1..3df538e5f118e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", "2022-04-01") + api_version: str = kwargs.pop("api_version", "2022-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/operations/_action_groups_operations.py index cd9c9404814c9..b8e8d69bc684b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -45,10 +44,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -165,7 +160,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -244,7 +239,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -309,7 +304,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -437,7 +432,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -501,7 +496,7 @@ async def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -644,7 +639,7 @@ async def begin_post_test_notifications( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -703,7 +698,7 @@ async def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -862,7 +857,7 @@ async def begin_create_notifications_at_resource_group_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -932,7 +927,7 @@ async def get_test_notifications( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -996,7 +991,7 @@ async def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1047,7 +1042,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1136,7 +1131,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1304,7 +1299,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/operations/_action_groups_operations.py index 63f0c77294546..e2900ff4bf65a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,7 +113,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,7 +146,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,7 +180,7 @@ def build_post_test_notifications_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -216,7 +211,7 @@ def build_create_notifications_at_resource_group_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -249,7 +244,7 @@ def build_get_test_notifications_request(notification_id: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -279,7 +274,7 @@ def build_get_test_notifications_at_resource_group_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -310,7 +305,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -334,7 +329,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -366,7 +361,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -508,7 +503,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -587,7 +582,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -652,7 +647,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -780,7 +775,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -844,7 +839,7 @@ def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -987,7 +982,7 @@ def begin_post_test_notifications( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1046,7 +1041,7 @@ def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1205,7 +1200,7 @@ def begin_create_notifications_at_resource_group_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1273,7 +1268,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1337,7 +1332,7 @@ def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1388,7 +1383,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1477,7 +1472,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1645,7 +1640,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_configuration.py index b9c50c775c40a..3f9c93c26b65a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", "2022-06-01") + api_version: str = kwargs.pop("api_version", "2022-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_configuration.py index 8f99f90be32f6..233b355cd156a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", "2022-06-01") + api_version: str = kwargs.pop("api_version", "2022-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_action_groups_operations.py index 879ea7c520b83..1355e907caf05 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -47,10 +46,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -167,7 +162,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -246,7 +241,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -311,7 +306,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -439,7 +434,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -503,7 +498,7 @@ async def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -646,7 +641,7 @@ async def begin_post_test_notifications( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -705,7 +700,7 @@ async def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -864,7 +859,7 @@ async def begin_create_notifications_at_resource_group_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -928,7 +923,7 @@ async def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1100,7 +1095,7 @@ async def begin_create_notifications_at_action_group_resource_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1171,7 +1166,7 @@ async def get_test_notifications( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1235,7 +1230,7 @@ async def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1302,7 +1297,7 @@ async def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1354,7 +1349,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1443,7 +1438,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1611,7 +1606,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_endpoints_operations.py index abba78270fbf0..e3bd23bf73261 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,7 +81,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -174,7 +169,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -415,7 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -574,7 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rule_associations_operations.py index b00adfe15c8ba..2314000b1f588 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_rule_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,7 +80,7 @@ def list_by_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -180,7 +175,7 @@ def list_by_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -279,7 +274,7 @@ def list_by_data_collection_endpoint( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -383,7 +378,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -522,7 +517,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -606,7 +601,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rules_operations.py index b4d5d96041077..58a5e1ceafdc6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,7 +81,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -174,7 +169,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -415,7 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -574,7 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_action_groups_operations.py index f1f270f607d2b..eda94ce960d25 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,7 +113,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,7 +146,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,7 +180,7 @@ def build_post_test_notifications_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -216,7 +211,7 @@ def build_create_notifications_at_resource_group_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -251,7 +246,7 @@ def build_create_notifications_at_action_group_resource_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -285,7 +280,7 @@ def build_get_test_notifications_request(notification_id: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -315,7 +310,7 @@ def build_get_test_notifications_at_resource_group_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -348,7 +343,7 @@ def build_get_test_notifications_at_action_group_resource_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -380,7 +375,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -404,7 +399,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -436,7 +431,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -578,7 +573,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -722,7 +717,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -850,7 +845,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -914,7 +909,7 @@ def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1057,7 +1052,7 @@ def begin_post_test_notifications( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1116,7 +1111,7 @@ def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1275,7 +1270,7 @@ def begin_create_notifications_at_resource_group_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1339,7 +1334,7 @@ def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1511,7 +1506,7 @@ def begin_create_notifications_at_action_group_resource_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1580,7 +1575,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1644,7 +1639,7 @@ def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1711,7 +1706,7 @@ def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1763,7 +1758,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1852,7 +1847,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -2020,7 +2015,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_endpoints_operations.py index 2ef9621ec6686..9ac65af4b7657 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,7 +133,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,7 +171,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -214,7 +209,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -283,7 +278,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -371,7 +366,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -472,7 +467,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -612,7 +607,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -771,7 +766,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -854,7 +849,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rule_associations_operations.py index 4704ae627737b..96745fd5a799a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,7 +66,7 @@ def build_list_by_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -104,7 +99,7 @@ def build_list_by_data_collection_endpoint_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +132,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -164,7 +159,7 @@ def build_create_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -194,7 +189,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -256,7 +251,7 @@ def list_by_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -351,7 +346,7 @@ def list_by_rule( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -450,7 +445,7 @@ def list_by_data_collection_endpoint( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -554,7 +549,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -693,7 +688,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -777,7 +772,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rules_operations.py index 8d547efd95853..6d94d824d8923 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -136,7 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -172,7 +167,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -208,7 +203,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -275,7 +270,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -363,7 +358,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -464,7 +459,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -604,7 +599,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -763,7 +758,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -846,7 +841,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_configuration.py index 24f1af84e5d23..d1bf2062b24ca 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-08-01-preview"] = kwargs.pop("api_version", "2022-08-01-preview") + api_version: str = kwargs.pop("api_version", "2022-08-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_configuration.py index 93de7bfe09ae0..3a679591e3238 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-08-01-preview"] = kwargs.pop("api_version", "2022-08-01-preview") + api_version: str = kwargs.pop("api_version", "2022-08-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/operations/_scheduled_query_rules_operations.py index 183af9048f1e4..61f7021721fb6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,9 +74,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Schedule _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -171,9 +164,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -270,9 +261,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -405,9 +394,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -556,9 +543,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -635,9 +620,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/operations/_scheduled_query_rules_operations.py index e0237a7d75325..d3c4d46d24e79 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,9 +96,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -140,9 +129,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,9 +163,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -212,9 +197,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -274,9 +257,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ScheduledQuer _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -366,9 +347,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -465,9 +444,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -600,9 +577,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -751,9 +726,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -830,9 +803,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_configuration.py index 5b24348f04f97..a47c12c4834c1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01") + api_version: str = kwargs.pop("api_version", "2022-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_configuration.py index 8539bfb83e81d..a0bd7f0de702f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01") + api_version: str = kwargs.pop("api_version", "2022-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_autoscale_settings_operations.py index 2c93b8ef20120..2b942c698fdd9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +79,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -249,7 +244,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -330,7 +325,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -391,7 +386,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -527,7 +522,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -591,7 +586,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Autoscal _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_predictive_metric_operations.py index b9df0b2711cd2..411b0e3caf83c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_predictive_metric_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_predictive_metric_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._predictive_metric_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -104,7 +99,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.PredictiveResponse] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_autoscale_settings_operations.py index b38d2fc34bbdb..4c54114dbbe9f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,7 +72,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -113,7 +108,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,7 +141,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -179,7 +174,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -213,7 +208,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -271,7 +266,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -436,7 +431,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -517,7 +512,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -578,7 +573,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -714,7 +709,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -778,7 +773,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AutoscaleSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_predictive_metric_operations.py index 7a93c4a49a4da..6e58e699faef1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_predictive_metric_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_predictive_metric_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +50,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -154,7 +149,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.PredictiveResponse] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_configuration.py index 26b20e120f3cc..44706f982b49a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", "2023-01-01") + api_version: str = kwargs.pop("api_version", "2023-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_configuration.py index a43db08d71913..dde84c5326243 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", "2023-01-01") + api_version: str = kwargs.pop("api_version", "2023-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/operations/_action_groups_operations.py index 875fd274a274b..b29962db6a48d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -43,10 +42,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -163,7 +158,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -242,7 +237,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -307,7 +302,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -435,7 +430,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -503,7 +498,7 @@ async def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -675,7 +670,7 @@ async def begin_create_notifications_at_action_group_resource_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -751,7 +746,7 @@ async def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -803,7 +798,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -892,7 +887,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1060,7 +1055,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/operations/_action_groups_operations.py index 4980c15517404..a50e1caf727a5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,7 +113,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,7 +146,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -187,7 +182,7 @@ def build_create_notifications_at_action_group_resource_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -223,7 +218,7 @@ def build_get_test_notifications_at_action_group_resource_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -255,7 +250,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -279,7 +274,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -311,7 +306,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -453,7 +448,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -532,7 +527,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -597,7 +592,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -725,7 +720,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -793,7 +788,7 @@ def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -965,7 +960,7 @@ def begin_create_notifications_at_action_group_resource_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1041,7 +1036,7 @@ def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1093,7 +1088,7 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1182,7 +1177,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1350,7 +1345,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_configuration.py index 2c148bfb94b33..3c8cf235fbbad 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2023-03-01-preview"] = kwargs.pop("api_version", "2023-03-01-preview") + api_version: str = kwargs.pop("api_version", "2023-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_version.py index caf312bd2d0b8..e5754a47ce68f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_configuration.py index 0e9ba1b8ef8df..e95fb3f74ae14 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2023-03-01-preview"] = kwargs.pop("api_version", "2023-03-01-preview") + api_version: str = kwargs.pop("api_version", "2023-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/operations/_tenant_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/operations/_tenant_action_groups_operations.py index d71f73c51de85..95c11909ff976 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/operations/_tenant_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/operations/_tenant_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -165,9 +160,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) @@ -249,9 +242,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -317,9 +308,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -457,9 +446,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) @@ -529,9 +516,7 @@ def list_by_management_group_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[_models.TenantActionGroupList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/operations/_tenant_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/operations/_tenant_action_groups_operations.py index 554062986f9d6..27e3d9116e04c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/operations/_tenant_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/operations/_tenant_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,9 +76,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,9 +107,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,9 +138,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,9 +172,7 @@ def build_list_by_management_group_id_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -331,9 +316,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) @@ -415,9 +398,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -483,9 +464,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -623,9 +602,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) @@ -695,9 +672,7 @@ def list_by_management_group_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[_models.TenantActionGroupList] = kwargs.pop("cls", None) error_map = {