diff --git a/sdk/resources/azure-mgmt-resource/_meta.json b/sdk/resources/azure-mgmt-resource/_meta.json index 73fe803889c3b..4a9dffc97cdbf 100644 --- a/sdk/resources/azure-mgmt-resource/_meta.json +++ b/sdk/resources/azure-mgmt-resource/_meta.json @@ -1,11 +1,11 @@ { - "commit": "9d8a951af5d78e24d9d83592107f8d3c2cc417f5", + "commit": "e8923e4657d0e2e7b7f4102121d65bf445f74928", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.4.3", + "@autorest/python@6.4.8", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/resources/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/resources/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.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/resources/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_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/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_configuration.py index f090c0685f111..f8a97d71ff781 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_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 @@ -43,7 +37,7 @@ class ChangesClientConfiguration(Configuration): # pylint: disable=too-many-ins def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ChangesClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-05-01"] = kwargs.pop("api_version", "2022-05-01") + api_version: str = kwargs.pop("api_version", "2022-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/_configuration.py index f48681ffd04b5..be89451a2b93e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_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 @@ -43,7 +37,7 @@ class ChangesClientConfiguration(Configuration): # pylint: disable=too-many-ins def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ChangesClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-05-01"] = kwargs.pop("api_version", "2022-05-01") + api_version: str = kwargs.pop("api_version", "2022-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/operations/_operations.py index 1c953969f1abb..57960e990bae2 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_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, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_changes_get_request, build_changes_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( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) cls: ClsType[_models.ChangeResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -208,7 +203,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) cls: ClsType[_models.ChangeResourceResult] = kwargs.pop("cls", None) request = build_changes_get_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/operations/_operations.py index e327fc97ae3fd..e716cc4bcbf6f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_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, 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]] @@ -55,7 +50,7 @@ def build_changes_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -98,7 +93,7 @@ def build_changes_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -180,7 +175,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) cls: ClsType[_models.ChangeResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -295,7 +290,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) cls: ClsType[_models.ChangeResourceResult] = kwargs.pop("cls", None) request = build_changes_get_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/_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/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_configuration.py index a3f6597b2eaa7..59c76c32a4721 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_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 @@ -43,7 +37,7 @@ class DeploymentScriptsClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(DeploymentScriptsClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-10-01-preview"] = kwargs.pop("api_version", "2019-10-01-preview") + api_version: str = kwargs.pop("api_version", "2019-10-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/_configuration.py index 1c4c6cf61e899..cc65e8be3615b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_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 @@ -43,7 +37,7 @@ class DeploymentScriptsClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(DeploymentScriptsClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-10-01-preview"] = kwargs.pop("api_version", "2019-10-01-preview") + api_version: str = kwargs.pop("api_version", "2019-10-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/operations/_operations.py index 5442e1fafb6a7..37cab9a030482 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -42,10 +41,6 @@ build_deployment_scripts_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]] @@ -87,9 +82,7 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentScript] = kwargs.pop("cls", None) @@ -257,9 +250,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentScript] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -402,9 +393,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentScript] = kwargs.pop("cls", None) @@ -482,9 +471,7 @@ async def get(self, resource_group_name: str, script_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.DeploymentScript] = kwargs.pop("cls", None) request = build_deployment_scripts_get_request( @@ -550,9 +537,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-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployment_scripts_delete_request( @@ -599,9 +584,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Deployme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) error_map = { @@ -697,9 +680,7 @@ async def get_logs(self, resource_group_name: str, script_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.ScriptLogsList] = kwargs.pop("cls", None) request = build_deployment_scripts_get_logs_request( @@ -768,9 +749,7 @@ async def get_logs_default( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.ScriptLog] = kwargs.pop("cls", None) request = build_deployment_scripts_get_logs_default_request( @@ -827,9 +806,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/operations/_operations.py index 4821d49ce85a7..80725fe07a4ca 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2019_10_01_preview/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, 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_deployment_scripts_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -87,9 +80,7 @@ def build_deployment_scripts_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -125,9 +116,7 @@ def build_deployment_scripts_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -160,9 +149,7 @@ def build_deployment_scripts_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -189,13 +176,13 @@ def build_deployment_scripts_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_scripts_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_deployment_scripts_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -215,15 +202,13 @@ def build_deployment_scripts_list_by_subscription_request(subscription_id: str, return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_scripts_get_logs_request( +def build_deployment_scripts_get_logs_request( # pylint: disable=name-too-long resource_group_name: str, script_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -250,15 +235,13 @@ def build_deployment_scripts_get_logs_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_scripts_get_logs_default_request( +def build_deployment_scripts_get_logs_default_request( # pylint: disable=name-too-long resource_group_name: str, script_name: str, subscription_id: str, *, tail: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -287,15 +270,13 @@ def build_deployment_scripts_get_logs_default_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_scripts_list_by_resource_group_request( +def build_deployment_scripts_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -358,9 +339,7 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentScript] = kwargs.pop("cls", None) @@ -528,9 +507,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentScript] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -673,9 +650,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentScript] = kwargs.pop("cls", None) @@ -753,9 +728,7 @@ def get(self, resource_group_name: str, script_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.DeploymentScript] = kwargs.pop("cls", None) request = build_deployment_scripts_get_request( @@ -821,9 +794,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-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployment_scripts_delete_request( @@ -870,9 +841,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DeploymentScr _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) error_map = { @@ -968,9 +937,7 @@ def get_logs(self, resource_group_name: str, script_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.ScriptLogsList] = kwargs.pop("cls", None) request = build_deployment_scripts_get_logs_request( @@ -1039,9 +1006,7 @@ def get_logs_default( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.ScriptLog] = kwargs.pop("cls", None) request = build_deployment_scripts_get_logs_default_request( @@ -1096,9 +1061,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["2019-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01-preview")) cls: ClsType[_models.DeploymentScriptListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_configuration.py index c29cbc4456e9d..c055e20577f5d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/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 @@ -43,7 +37,7 @@ class DeploymentScriptsClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(DeploymentScriptsClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/_configuration.py index b08fea9ae2474..0444a59bf2937 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/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 @@ -43,7 +37,7 @@ class DeploymentScriptsClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(DeploymentScriptsClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/operations/_operations.py index eb2f97d24d37b..d41af1fe202f3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -42,10 +41,6 @@ build_deployment_scripts_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]] @@ -87,7 +82,7 @@ async def _create_initial( _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.DeploymentScript] = kwargs.pop("cls", None) @@ -255,7 +250,7 @@ async def begin_create( _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.DeploymentScript] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -397,7 +392,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.DeploymentScript] = kwargs.pop("cls", None) @@ -475,7 +470,7 @@ async def get(self, resource_group_name: str, script_name: str, **kwargs: Any) - _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.DeploymentScript] = kwargs.pop("cls", None) request = build_deployment_scripts_get_request( @@ -541,7 +536,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_deployment_scripts_delete_request( @@ -588,7 +583,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Deployme _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.DeploymentScriptListResult] = kwargs.pop("cls", None) error_map = { @@ -684,7 +679,7 @@ async def get_logs(self, resource_group_name: str, script_name: str, **kwargs: A _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.ScriptLogsList] = kwargs.pop("cls", None) request = build_deployment_scripts_get_logs_request( @@ -753,7 +748,7 @@ async def get_logs_default( _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.ScriptLog] = kwargs.pop("cls", None) request = build_deployment_scripts_get_logs_default_request( @@ -810,7 +805,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.DeploymentScriptListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/operations/_operations.py index 6f5262daa7307..18e44f9f563ce 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentscripts/v2020_10_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, 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_deployment_scripts_create_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") @@ -85,7 +80,7 @@ def build_deployment_scripts_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") @@ -121,7 +116,7 @@ def build_deployment_scripts_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 @@ -154,7 +149,7 @@ def build_deployment_scripts_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 @@ -181,11 +176,13 @@ def build_deployment_scripts_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_scripts_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_deployment_scripts_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -205,13 +202,13 @@ def build_deployment_scripts_list_by_subscription_request(subscription_id: str, return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_scripts_get_logs_request( +def build_deployment_scripts_get_logs_request( # pylint: disable=name-too-long resource_group_name: str, script_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -238,13 +235,13 @@ def build_deployment_scripts_get_logs_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_scripts_get_logs_default_request( +def build_deployment_scripts_get_logs_default_request( # pylint: disable=name-too-long resource_group_name: str, script_name: str, subscription_id: str, *, tail: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -273,13 +270,13 @@ def build_deployment_scripts_get_logs_default_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_scripts_list_by_resource_group_request( +def build_deployment_scripts_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -342,7 +339,7 @@ def _create_initial( _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.DeploymentScript] = kwargs.pop("cls", None) @@ -510,7 +507,7 @@ def begin_create( _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.DeploymentScript] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -652,7 +649,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.DeploymentScript] = kwargs.pop("cls", None) @@ -730,7 +727,7 @@ def get(self, resource_group_name: str, script_name: str, **kwargs: Any) -> _mod _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.DeploymentScript] = kwargs.pop("cls", None) request = build_deployment_scripts_get_request( @@ -796,7 +793,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_deployment_scripts_delete_request( @@ -843,7 +840,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DeploymentScr _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.DeploymentScriptListResult] = kwargs.pop("cls", None) error_map = { @@ -939,7 +936,7 @@ def get_logs(self, resource_group_name: str, script_name: str, **kwargs: Any) -> _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.ScriptLogsList] = kwargs.pop("cls", None) request = build_deployment_scripts_get_logs_request( @@ -1008,7 +1005,7 @@ def get_logs_default( _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.ScriptLog] = kwargs.pop("cls", None) request = build_deployment_scripts_get_logs_default_request( @@ -1063,7 +1060,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["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.DeploymentScriptListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/__init__.py new file mode 100644 index 0000000000000..a29e675572d52 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/__init__.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._deployment_stacks_client import DeploymentStacksClient +__all__ = ['DeploymentStacksClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass + +from ._version import VERSION + +__version__ = VERSION diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_configuration.py new file mode 100644 index 0000000000000..3d870fc0cd1b3 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + +class DeploymentStacksClientConfiguration(Configuration): + """Configuration for DeploymentStacksClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + **kwargs: Any + ): + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DeploymentStacksClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-resource/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ): + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_deployment_stacks_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_deployment_stacks_client.py new file mode 100644 index 0000000000000..abe248f19e171 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_deployment_stacks_client.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin + +from ._configuration import DeploymentStacksClientConfiguration +from ._serialization import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass + +class DeploymentStacksClient(MultiApiClientMixin, _SDKClient): + """The APIs listed in this specification can be used to manage deployment stack resources through the Azure Resource Manager. + + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + DEFAULT_API_VERSION = '2022-08-01-preview' + _PROFILE_TAG = "azure.mgmt.resource.deploymentstacks.DeploymentStacksClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + }}, + _PROFILE_TAG + " latest" + ) + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + api_version: Optional[str]=None, + base_url: str = "https://management.azure.com", + profile: KnownProfiles=KnownProfiles.default, + **kwargs: Any + ): + self._config = DeploymentStacksClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + super(DeploymentStacksClient, self).__init__( + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2022-08-01-preview: :mod:`v2022_08_01_preview.models` + """ + if api_version == '2022-08-01-preview': + from .v2022_08_01_preview import models + return models + raise ValueError("API version {} is not available".format(api_version)) + + @property + def deployment_stacks(self): + """Instance depends on the API version: + + * 2022-08-01-preview: :class:`DeploymentStacksOperations` + """ + api_version = self._get_api_version('deployment_stacks') + if api_version == '2022-08-01-preview': + from .v2022_08_01_preview.operations import DeploymentStacksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'deployment_stacks'".format(api_version)) + self._config.api_version = api_version + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + def close(self): + self._client.close() + def __enter__(self): + self._client.__enter__() + return self + def __exit__(self, *exc_details): + self._client.__exit__(*exc_details) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_serialization.py new file mode 100644 index 0000000000000..e3cc6ce6ed6f8 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_serialization.py @@ -0,0 +1,1998 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# pylint: skip-file +# pyright: reportUnnecessaryTypeIgnoreComment=false + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + TypeVar, + MutableMapping, + Type, + List, + Mapping, +) + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote +import xml.etree.ElementTree as ET + +import isodate # type: ignore + +from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback +from azure.core.serialization import NULL as AzureCoreNull + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +ModelType = TypeVar("ModelType", bound="Model") +JSON = MutableMapping[str, Any] + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: Optional[str] = None) -> Any: + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise_with_traceback(DeserializationError, "XML is invalid") + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], headers: Mapping) -> Any: + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +try: + basestring # type: ignore + unicode_str = unicode # type: ignore +except NameError: + basestring = str + unicode_str = str + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + + +class UTC(datetime.tzinfo): + """Time Zone info for handling UTC""" + + def utcoffset(self, dt): + """UTF offset for UTC is 0.""" + return datetime.timedelta(0) + + def tzname(self, dt): + """Timestamp representation.""" + return "Z" + + def dst(self, dt): + """No daylight saving for UTC.""" + return datetime.timedelta(hours=1) + + +try: + from datetime import timezone as _FixedOffset # type: ignore +except ImportError: # Python 2.7 + + class _FixedOffset(datetime.tzinfo): # type: ignore + """Fixed offset in minutes east from UTC. + Copy/pasted from Python doc + :param datetime.timedelta offset: offset in timedelta format + """ + + def __init__(self, offset): + self.__offset = offset + + def utcoffset(self, dt): + return self.__offset + + def tzname(self, dt): + return str(self.__offset.total_seconds() / 3600) + + def __repr__(self): + return "".format(self.tzname(None)) + + def dst(self, dt): + return datetime.timedelta(0) + + def __getinitargs__(self): + return (self.__offset,) + + +try: + from datetime import timezone + + TZ_UTC = timezone.utc +except ImportError: + TZ_UTC = UTC() # type: ignore + +_FLATTEN = re.compile(r"(? None: + self.additional_properties: Dict[str, Any] = {} + for k in kwargs: + if k not in self._attribute_map: + _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) + elif k in self._validation and self._validation[k].get("readonly", False): + _LOGGER.warning("Readonly attribute %s will be ignored in class %s", k, self.__class__) + else: + setattr(self, k, kwargs[k]) + + def __eq__(self, other: Any) -> bool: + """Compare objects by comparing all attributes.""" + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + def __ne__(self, other: Any) -> bool: + """Compare objects by comparing all attributes.""" + return not self.__eq__(other) + + def __str__(self) -> str: + return str(self.__dict__) + + @classmethod + def enable_additional_properties_sending(cls) -> None: + cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} + + @classmethod + def is_xml_model(cls) -> bool: + try: + cls._xml_map # type: ignore + except AttributeError: + return False + return True + + @classmethod + def _create_xml_node(cls): + """Create XML node.""" + try: + xml_map = cls._xml_map # type: ignore + except AttributeError: + xml_map = {} + + return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) + + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: + """Return the JSON that would be sent to azure from this model. + + This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param bool keep_readonly: If you want to serialize the readonly attributes + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) + + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[ + [str, Dict[str, Any], Any], Any + ] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. + + Advanced usage might optionally use a callback as parameter: + + .. code::python + + def my_key_transformer(key, attr_desc, value): + return key + + Key is the attribute name used in Python. Attr_desc + is a dict of metadata. Currently contains 'type' with the + msrest type and 'key' with the RestAPI encoded key. + Value is the current value in this object. + + The string returned will be used to serialize the key. + If the return type is a list, this is considered hierarchical + result dict. + + See the three examples in this file: + + - attribute_transformer + - full_restapi_key_transformer + - last_restapi_key_transformer + + If you want XML serialization, you can pass the kwargs is_xml=True. + + :param function key_transformer: A key transformer function. + :returns: A dict JSON compatible object + :rtype: dict + """ + serializer = Serializer(self._infer_class_models()) + return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) + + @classmethod + def _infer_class_models(cls): + try: + str_models = cls.__module__.rsplit(".", 1)[0] + models = sys.modules[str_models] + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + if cls.__name__ not in client_models: + raise ValueError("Not Autorest generated code") + except Exception: + # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. + client_models = {cls.__name__: cls} + return client_models + + @classmethod + def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: + """Parse a str using the RestAPI syntax and return a model. + + :param str data: A str using RestAPI structure. JSON by default. + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises: DeserializationError if something went wrong + """ + deserializer = Deserializer(cls._infer_class_models()) + return deserializer(cls.__name__, data, content_type=content_type) + + @classmethod + def from_dict( + cls: Type[ModelType], + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> ModelType: + """Parse a dict using given key extractor return a model. + + By default consider key + extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor + and last_rest_key_case_insensitive_extractor) + + :param dict data: A dict using RestAPI structure + :param str content_type: JSON by default, set application/xml if XML. + :returns: An instance of this model + :raises: DeserializationError if something went wrong + """ + deserializer = Deserializer(cls._infer_class_models()) + deserializer.key_extractors = ( # type: ignore + [ # type: ignore + attribute_key_case_insensitive_extractor, + rest_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + if key_extractors is None + else key_extractors + ) + return deserializer(cls.__name__, data, content_type=content_type) + + @classmethod + def _flatten_subtype(cls, key, objects): + if "_subtype_map" not in cls.__dict__: + return {} + result = dict(cls._subtype_map[key]) + for valuetype in cls._subtype_map[key].values(): + result.update(objects[valuetype]._flatten_subtype(key, objects)) + return result + + @classmethod + def _classify(cls, response, objects): + """Check the class _subtype_map for any child classes. + We want to ignore any inherited _subtype_maps. + Remove the polymorphic key from the initial data. + """ + for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): + subtype_value = None + + if not isinstance(response, ET.Element): + rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] + subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + else: + subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) + if subtype_value: + # Try to match base class. Can be class name only + # (bug to fix in Autorest to support x-ms-discriminator-name) + if cls.__name__ == subtype_value: + return cls + flatten_mapping_type = cls._flatten_subtype(subtype_key, objects) + try: + return objects[flatten_mapping_type[subtype_value]] # type: ignore + except KeyError: + _LOGGER.warning( + "Subtype value %s has no mapping, use base class %s.", + subtype_value, + cls.__name__, + ) + break + else: + _LOGGER.warning("Discriminator %s is absent or null, use base class %s.", subtype_key, cls.__name__) + break + return cls + + @classmethod + def _get_rest_key_parts(cls, attr_key): + """Get the RestAPI key of this attr, split it and decode part + :param str attr_key: Attribute key must be in attribute_map. + :returns: A list of RestAPI part + :rtype: list + """ + rest_split_key = _FLATTEN.split(cls._attribute_map[attr_key]["key"]) + return [_decode_attribute_map_key(key_part) for key_part in rest_split_key] + + +def _decode_attribute_map_key(key): + """This decode a key in an _attribute_map to the actual key we want to look at + inside the received data. + + :param str key: A key string from the generated code + """ + return key.replace("\\.", ".") + + +class Serializer(object): + """Request object model serializer.""" + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + _xml_basic_types_serializers = {"bool": lambda x: str(x).lower()} + days = {0: "Mon", 1: "Tue", 2: "Wed", 3: "Thu", 4: "Fri", 5: "Sat", 6: "Sun"} + months = { + 1: "Jan", + 2: "Feb", + 3: "Mar", + 4: "Apr", + 5: "May", + 6: "Jun", + 7: "Jul", + 8: "Aug", + 9: "Sep", + 10: "Oct", + 11: "Nov", + 12: "Dec", + } + validation = { + "min_length": lambda x, y: len(x) < y, + "max_length": lambda x, y: len(x) > y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]]=None): + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize(self, target_obj, data_type=None, **kwargs): + """Serialize data into a string according to type. + + :param target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises: SerializationError if serialization fails. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() + try: + attributes = target_obj._attribute_map + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) # type: ignore + continue + if xml_desc.get("text", False): + serialized.text = new_attr # type: ignore + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) # type: ignore + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) # type: ignore + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = unicode_str(new_attr) + serialized.append(local_node) # type: ignore + else: # JSON + for k in reversed(keys): # type: ignore + new_attr = {k: new_attr} + + _new_attr = new_attr + _serialized = serialized + for k in keys: # type: ignore + if k not in _serialized: + _serialized.update(_new_attr) # type: ignore + _new_attr = _new_attr[k] # type: ignore + _serialized = _serialized[k] + except ValueError: + continue + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise_with_traceback(SerializationError, msg, err) + else: + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises: SerializationError if serialization fails. + :raises: ValueError if data is None + """ + + # Just in case this is a dict + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ # type: ignore + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) + except DeserializationError as err: + raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] + if not kwargs.get("skip_quote", False): + data = [quote(str(d), safe="") for d in data] + return str(self.serialize_iter(data, internal_data_type, **kwargs)) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :param bool required: Whether it's essential that the data not be + empty or None + :raises: AttributeError if required data is None. + :raises: ValueError if data is None + :raises: SerializationError if serialization fails. + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data is AzureCoreNull: + return None + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + elif data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise_with_traceback(SerializationError, msg.format(data, data_type), err) + else: + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param data: Object to be serialized. + :param str data_type: Type of object in the iterable. + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param data: Object to be serialized. + :rtype: str + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): # type: ignore + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + else: + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list attr: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param bool required: Whether the objects in the iterable must + not be None or empty. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + :rtype: list, str + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError: + serialized.append(None) + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :param bool required: Whether the objects in the dictionary must + not be None or empty. + :rtype: dict + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is unicode_str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + elif obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) # type: ignore + return result + except ValueError: + for enum_value in enum_obj: # type: ignore + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) + + @staticmethod + def serialize_bytearray(attr, **kwargs): + """Serialize bytearray into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): + """Serialize str into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): + """Serialize Decimal object to float. + + :param attr: Object to be serialized. + :rtype: float + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): + """Serialize long (Py2) or int (Py3). + + :param attr: Object to be serialized. + :rtype: int/long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: TypeError if format invalid. + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError: + raise TypeError("RFC1123 object must be valid Datetime object.") + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: SerializationError if format invalid. + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise_with_traceback(SerializationError, msg, err) + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise_with_traceback(TypeError, msg, err) + + @staticmethod + def serialize_unix(attr, **kwargs): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises: SerializationError if format invalid + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError: + raise TypeError("Unix time object must be valid Datetime object.") + + +def rest_key_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key.""" + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{{{}}}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + else: + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + else: # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer(object): + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]]=None): + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, basestring): + return self.deserialize_data(data, response) + elif isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None: + return data + try: + attributes = response._attribute_map # type: ignore + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name # type: ignore + raise_with_traceback(DeserializationError, msg, err) + else: + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + """ + if target is None: + return None, None + + if isinstance(target, basestring): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ # type: ignore + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deserialize. + :param str content_type: Swagger "produces" if available. + """ + try: + return self(target_obj, data, content_type=content_type) + except: + _LOGGER.debug( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param raw_data: Data to be processed. + :param content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) # type: ignore + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param response: The response model class. + :param d_attrs: The deserialized response attributes. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [k for k, v in response._validation.items() if v.get("readonly")] + const = [k for k, v in response._validation.items() if v.get("constant")] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore + raise DeserializationError(msg + str(err)) + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) + + def deserialize_data(self, data, data_type): + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise_with_traceback(DeserializationError, msg, err) + else: + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :rtype: dict + :raises: TypeError if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, basestring): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + else: + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :rtype: str, int, float or bool + :raises: TypeError if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + else: + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + elif isinstance(attr, basestring): + if attr.lower() in ["true", "1"]: + return True + elif attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): # type: ignore + return data + except NameError: + return str(data) + else: + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + # https://github.com/Azure/azure-rest-api-specs/issues/141 + try: + return list(enum_obj.__members__.values())[data] + except IndexError: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) # type: ignore + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) # type: ignore + attr = attr + padding # type: ignore + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :rtype: Decimal + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(attr) # type: ignore + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise_with_traceback(DeserializationError, msg, err) + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :rtype: long or int + :raises: ValueError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) # type: ignore + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :rtype: TimeDelta + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise_with_traceback(DeserializationError, msg, err) + else: + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :rtype: Date + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): # type: ignore + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) # type: ignore + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() # type: ignore + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :rtype: Datetime + :raises: DeserializationError if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) # type: ignore + try: + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_version.py new file mode 100644 index 0000000000000..a30a458f8b5b3 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/_version.py @@ -0,0 +1,8 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/aio/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/aio/__init__.py new file mode 100644 index 0000000000000..2c26dda342365 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._deployment_stacks_client import DeploymentStacksClient +__all__ = ['DeploymentStacksClient'] diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/aio/_configuration.py new file mode 100644 index 0000000000000..08435cb1ae7f6 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class DeploymentStacksClientConfiguration(Configuration): + """Configuration for DeploymentStacksClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DeploymentStacksClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-resource/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/aio/_deployment_stacks_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/aio/_deployment_stacks_client.py new file mode 100644 index 0000000000000..d644121d227eb --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/aio/_deployment_stacks_client.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.mgmt.core import AsyncARMPipelineClient +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin + +from .._serialization import Deserializer, Serializer +from ._configuration import DeploymentStacksClientConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass + +class DeploymentStacksClient(MultiApiClientMixin, _SDKClient): + """The APIs listed in this specification can be used to manage deployment stack resources through the Azure Resource Manager. + + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + DEFAULT_API_VERSION = '2022-08-01-preview' + _PROFILE_TAG = "azure.mgmt.resource.deploymentstacks.DeploymentStacksClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + }}, + _PROFILE_TAG + " latest" + ) + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + api_version: Optional[str] = None, + base_url: str = "https://management.azure.com", + profile: KnownProfiles = KnownProfiles.default, + **kwargs: Any + ) -> None: + self._config = DeploymentStacksClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + super(DeploymentStacksClient, self).__init__( + api_version=api_version, + profile=profile + ) + + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} + + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: + + * 2022-08-01-preview: :mod:`v2022_08_01_preview.models` + """ + if api_version == '2022-08-01-preview': + from ..v2022_08_01_preview import models + return models + raise ValueError("API version {} is not available".format(api_version)) + + @property + def deployment_stacks(self): + """Instance depends on the API version: + + * 2022-08-01-preview: :class:`DeploymentStacksOperations` + """ + api_version = self._get_api_version('deployment_stacks') + if api_version == '2022-08-01-preview': + from ..v2022_08_01_preview.aio.operations import DeploymentStacksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'deployment_stacks'".format(api_version)) + self._config.api_version = api_version + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + async def close(self): + await self._client.close() + async def __aenter__(self): + await self._client.__aenter__() + return self + async def __aexit__(self, *exc_details): + await self._client.__aexit__(*exc_details) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/models.py new file mode 100644 index 0000000000000..07c0a44197535 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/models.py @@ -0,0 +1,7 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from .v2022_08_01_preview.models import * diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/py.typed b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/__init__.py new file mode 100644 index 0000000000000..855a759959e3d --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/__init__.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._deployment_stacks_client import DeploymentStacksClient +from ._version import VERSION + +__version__ = VERSION + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "DeploymentStacksClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_configuration.py new file mode 100644 index 0000000000000..754d9b4e764dc --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class DeploymentStacksClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for DeploymentStacksClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :keyword api_version: Api Version. Default value is "2022-08-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: + super(DeploymentStacksClientConfiguration, self).__init__(**kwargs) + api_version: str = kwargs.pop("api_version", "2022-08-01-preview") + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-resource/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = ARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_deployment_stacks_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_deployment_stacks_client.py new file mode 100644 index 0000000000000..b628b340859aa --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_deployment_stacks_client.py @@ -0,0 +1,95 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, TYPE_CHECKING + +from azure.core.rest import HttpRequest, HttpResponse +from azure.mgmt.core import ARMPipelineClient + +from . import models as _models +from .._serialization import Deserializer, Serializer +from ._configuration import DeploymentStacksClientConfiguration +from .operations import DeploymentStacksOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class DeploymentStacksClient: # pylint: disable=client-accepts-api-version-keyword + """The APIs listed in this specification can be used to manage deployment stack resources through + the Azure Resource Manager. + + :ivar deployment_stacks: DeploymentStacksOperations operations + :vartype deployment_stacks: + azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.operations.DeploymentStacksOperations + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2022-08-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = DeploymentStacksClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.deployment_stacks = DeploymentStacksOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self) -> None: + self._client.close() + + def __enter__(self) -> "DeploymentStacksClient": + self._client.__enter__() + return self + + def __exit__(self, *exc_details: Any) -> None: + self._client.__exit__(*exc_details) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_metadata.json b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_metadata.json new file mode 100644 index 0000000000000..6014ae18a8605 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_metadata.json @@ -0,0 +1,110 @@ +{ + "chosen_version": "2022-08-01-preview", + "total_api_version_list": ["2022-08-01-preview"], + "client": { + "name": "DeploymentStacksClient", + "filename": "_deployment_stacks_client", + "description": "The APIs listed in this specification can be used to manage deployment stack resources through the Azure Resource Manager.", + "host_value": "\"https://management.azure.com\"", + "parameterized_host_template": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"azurecore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"DeploymentStacksClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"azurecore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"DeploymentStacksClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential: \"TokenCredential\",", + "description": "Credential needed for the client to connect to Azure. Required.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true, + "method_location": "positional" + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription. Required.", + "docstring_type": "str", + "required": true, + "method_location": "positional" + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure. Required.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription. Required.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version: Optional[str]=None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "base_url": { + "signature": "base_url: str = \"https://management.azure.com\",", + "description": "Service URL", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "profile": { + "signature": "profile: KnownProfiles=KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false, + "method_location": "positional" + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "base_url": { + "signature": "base_url: str = \"https://management.azure.com\",", + "description": "Service URL", + "docstring_type": "str", + "required": false, + "method_location": "positional" + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false, + "method_location": "positional" + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "deployment_stacks": "DeploymentStacksOperations" + } +} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_patch.py new file mode 100644 index 0000000000000..f7dd32510333d --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_vendor.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_vendor.py new file mode 100644 index 0000000000000..bd0df84f5319f --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_vendor.py @@ -0,0 +1,30 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import List, cast + +from azure.core.pipeline.transport import HttpRequest + + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] + template = "/".join(components) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_version.py new file mode 100644 index 0000000000000..e5754a47ce68f --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/__init__.py new file mode 100644 index 0000000000000..5a9967ee126da --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._deployment_stacks_client import DeploymentStacksClient + +try: + from ._patch import __all__ as _patch_all + from ._patch import * # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "DeploymentStacksClient", +] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/_configuration.py new file mode 100644 index 0000000000000..8266cb3c360a3 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DeploymentStacksClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for DeploymentStacksClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :keyword api_version: Api Version. Default value is "2022-08-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: + super(DeploymentStacksClientConfiguration, self).__init__(**kwargs) + api_version: str = kwargs.pop("api_version", "2022-08-01-preview") + + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = api_version + self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) + kwargs.setdefault("sdk_moniker", "mgmt-resource/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") + if self.credential and not self.authentication_policy: + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy( + self.credential, *self.credential_scopes, **kwargs + ) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/_deployment_stacks_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/_deployment_stacks_client.py new file mode 100644 index 0000000000000..01f413fa4d2a7 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/_deployment_stacks_client.py @@ -0,0 +1,95 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from .. import models as _models +from ..._serialization import Deserializer, Serializer +from ._configuration import DeploymentStacksClientConfiguration +from .operations import DeploymentStacksOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DeploymentStacksClient: # pylint: disable=client-accepts-api-version-keyword + """The APIs listed in this specification can be used to manage deployment stack resources through + the Azure Resource Manager. + + :ivar deployment_stacks: DeploymentStacksOperations operations + :vartype deployment_stacks: + azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.aio.operations.DeploymentStacksOperations + :param credential: Credential needed for the client to connect to Azure. Required. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. Required. + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2022-08-01-preview". Note that overriding + this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = DeploymentStacksClientConfiguration( + credential=credential, subscription_id=subscription_id, **kwargs + ) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.deployment_stacks = DeploymentStacksOperations( + self._client, self._config, self._serialize, self._deserialize + ) + + def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DeploymentStacksClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details: Any) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/_patch.py new file mode 100644 index 0000000000000..f7dd32510333d --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/__init__.py new file mode 100644 index 0000000000000..0945e1f1e205d --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import DeploymentStacksOperations + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "DeploymentStacksOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/_operations.py new file mode 100644 index 0000000000000..376a05d98b835 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/_operations.py @@ -0,0 +1,1813 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._operations import ( + build_deployment_stacks_create_or_update_at_management_group_request, + build_deployment_stacks_create_or_update_at_resource_group_request, + build_deployment_stacks_create_or_update_at_subscription_request, + build_deployment_stacks_delete_at_management_group_request, + build_deployment_stacks_delete_at_resource_group_request, + build_deployment_stacks_delete_at_subscription_request, + build_deployment_stacks_export_template_at_management_group_request, + build_deployment_stacks_export_template_at_resource_group_request, + build_deployment_stacks_export_template_at_subscription_request, + build_deployment_stacks_get_at_management_group_request, + build_deployment_stacks_get_at_resource_group_request, + build_deployment_stacks_get_at_subscription_request, + build_deployment_stacks_list_at_management_group_request, + build_deployment_stacks_list_at_resource_group_request, + build_deployment_stacks_list_at_subscription_request, +) + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class DeploymentStacksOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.aio.DeploymentStacksClient`'s + :attr:`deployment_stacks` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_at_resource_group( + self, resource_group_name: str, **kwargs: Any + ) -> AsyncIterable["_models.DeploymentStack"]: + """Lists all the Deployment Stacks within the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentStack or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_deployment_stacks_list_at_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_at_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DeploymentStackListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks" + } + + @distributed_trace + def list_at_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DeploymentStack"]: + """Lists all the Deployment Stacks within the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentStack or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_deployment_stacks_list_at_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_at_subscription.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DeploymentStackListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks" + } + + @distributed_trace + def list_at_management_group( + self, management_group_id: str, **kwargs: Any + ) -> AsyncIterable["_models.DeploymentStack"]: + """Lists all the Deployment Stacks within the specified management group. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentStack or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_deployment_stacks_list_at_management_group_request( + management_group_id=management_group_id, + api_version=api_version, + template_url=self.list_at_management_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("DeploymentStackListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks" + } + + async def _create_or_update_at_resource_group_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + deployment_stack_name: str, + deployment_stack: Union[_models.DeploymentStack, IO], + **kwargs: Any + ) -> _models.DeploymentStack: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(deployment_stack, (IO, bytes)): + _content = deployment_stack + else: + _json = self._serialize.body(deployment_stack, "DeploymentStack") + + request = build_deployment_stacks_create_or_update_at_resource_group_request( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_at_resource_group_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_at_resource_group_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @overload + async def begin_create_or_update_at_resource_group( + self, + resource_group_name: str, + deployment_stack_name: str, + deployment_stack: _models.DeploymentStack, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update_at_resource_group( + self, + resource_group_name: str, + deployment_stack_name: str, + deployment_stack: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update_at_resource_group( + self, + resource_group_name: str, + deployment_stack_name: str, + deployment_stack: Union[_models.DeploymentStack, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Is either a + DeploymentStack type or a IO type. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_at_resource_group_initial( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + deployment_stack=deployment_stack, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("DeploymentStack", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace_async + async def get_at_resource_group( + self, resource_group_name: str, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStack: + """Gets a Deployment Stack with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStack or the result of cls(response) + :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + request = build_deployment_stacks_get_at_resource_group_request( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_at_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + async def _delete_at_resource_group_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_deployment_stacks_delete_at_resource_group_request( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + api_version=api_version, + template_url=self._delete_at_resource_group_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_at_resource_group_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace_async + async def begin_delete_at_resource_group( + self, + resource_group_name: str, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Deployment Stack by name. When operation completes, status code 200 returned without + content. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param unmanage_action_resources: Flag to indicate delete rather than detach for the resources. + Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resources: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceMode + :param unmanage_action_resource_groups: Flag to indicate delete rather than detach for the + resource groups. Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resource_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceGroupMode + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-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) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_at_resource_group_initial( # type: ignore + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + async def _create_or_update_at_subscription_initial( # pylint: disable=name-too-long + self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO], **kwargs: Any + ) -> _models.DeploymentStack: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(deployment_stack, (IO, bytes)): + _content = deployment_stack + else: + _json = self._serialize.body(deployment_stack, "DeploymentStack") + + request = build_deployment_stacks_create_or_update_at_subscription_request( + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_at_subscription_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_at_subscription_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @overload + async def begin_create_or_update_at_subscription( + self, + deployment_stack_name: str, + deployment_stack: _models.DeploymentStack, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update_at_subscription( + self, deployment_stack_name: str, deployment_stack: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> AsyncLROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update_at_subscription( + self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO], **kwargs: Any + ) -> AsyncLROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Is either a + DeploymentStack type or a IO type. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_at_subscription_initial( + deployment_stack_name=deployment_stack_name, + deployment_stack=deployment_stack, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("DeploymentStack", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace_async + async def get_at_subscription(self, deployment_stack_name: str, **kwargs: Any) -> _models.DeploymentStack: + """Gets a Deployment Stack with a given name. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStack or the result of cls(response) + :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + request = build_deployment_stacks_get_at_subscription_request( + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_at_subscription.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + async def _delete_at_subscription_initial( # pylint: disable=inconsistent-return-statements + self, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_deployment_stacks_delete_at_subscription_request( + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + api_version=api_version, + template_url=self._delete_at_subscription_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_at_subscription_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace_async + async def begin_delete_at_subscription( + self, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Deployment Stack by name. When operation completes, status code 200 returned without + content. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param unmanage_action_resources: Flag to indicate delete rather than detach for the resources. + Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resources: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceMode + :param unmanage_action_resource_groups: Flag to indicate delete rather than detach for the + resource groups. Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resource_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceGroupMode + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-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) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_at_subscription_initial( # type: ignore + deployment_stack_name=deployment_stack_name, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + async def _create_or_update_at_management_group_initial( # pylint: disable=name-too-long + self, + management_group_id: str, + deployment_stack_name: str, + deployment_stack: Union[_models.DeploymentStack, IO], + **kwargs: Any + ) -> _models.DeploymentStack: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(deployment_stack, (IO, bytes)): + _content = deployment_stack + else: + _json = self._serialize.body(deployment_stack, "DeploymentStack") + + request = build_deployment_stacks_create_or_update_at_management_group_request( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_at_management_group_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_at_management_group_initial.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @overload + async def begin_create_or_update_at_management_group( # pylint: disable=name-too-long + self, + management_group_id: str, + deployment_stack_name: str, + deployment_stack: _models.DeploymentStack, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update_at_management_group( # pylint: disable=name-too-long + self, + management_group_id: str, + deployment_stack_name: str, + deployment_stack: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update_at_management_group( # pylint: disable=name-too-long + self, + management_group_id: str, + deployment_stack_name: str, + deployment_stack: Union[_models.DeploymentStack, IO], + **kwargs: Any + ) -> AsyncLROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Is either a + DeploymentStack type or a IO type. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._create_or_update_at_management_group_initial( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + deployment_stack=deployment_stack, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("DeploymentStack", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, + AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace_async + async def get_at_management_group( + self, management_group_id: str, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStack: + """Gets a Deployment Stack with a given name. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStack or the result of cls(response) + :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + request = build_deployment_stacks_get_at_management_group_request( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + api_version=api_version, + template_url=self.get_at_management_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + async def _delete_at_management_group_initial( # pylint: disable=inconsistent-return-statements + self, + management_group_id: str, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + unmanage_action_management_groups: Optional[Union[str, _models.UnmanageActionManagementGroupMode]] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_deployment_stacks_delete_at_management_group_request( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + unmanage_action_management_groups=unmanage_action_management_groups, + api_version=api_version, + template_url=self._delete_at_management_group_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_at_management_group_initial.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace_async + async def begin_delete_at_management_group( + self, + management_group_id: str, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + unmanage_action_management_groups: Optional[Union[str, _models.UnmanageActionManagementGroupMode]] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a Deployment Stack by name. When operation completes, status code 200 returned without + content. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param unmanage_action_resources: Flag to indicate delete rather than detach for the resources. + Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resources: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceMode + :param unmanage_action_resource_groups: Flag to indicate delete rather than detach for the + resource groups. Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resource_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceGroupMode + :param unmanage_action_management_groups: Flag to indicate delete rather than detach for the + management groups. Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_management_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionManagementGroupMode + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-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) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_at_management_group_initial( # type: ignore + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + unmanage_action_management_groups=unmanage_action_management_groups, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace_async + async def export_template_at_resource_group( + self, resource_group_name: str, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStackTemplateDefinition: + """Exports the template used to create the deployment stack. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStackTemplateDefinition or the result of cls(response) + :rtype: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackTemplateDefinition] = kwargs.pop("cls", None) + + request = build_deployment_stacks_export_template_at_resource_group_request( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.export_template_at_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStackTemplateDefinition", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + export_template_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate" + } + + @distributed_trace_async + async def export_template_at_subscription( + self, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStackTemplateDefinition: + """Exports the template used to create the deployment stack. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStackTemplateDefinition or the result of cls(response) + :rtype: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackTemplateDefinition] = kwargs.pop("cls", None) + + request = build_deployment_stacks_export_template_at_subscription_request( + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.export_template_at_subscription.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStackTemplateDefinition", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + export_template_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate" + } + + @distributed_trace_async + async def export_template_at_management_group( + self, management_group_id: str, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStackTemplateDefinition: + """Exports the template used to create the deployment stack. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStackTemplateDefinition or the result of cls(response) + :rtype: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackTemplateDefinition] = kwargs.pop("cls", None) + + request = build_deployment_stacks_export_template_at_management_group_request( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + api_version=api_version, + template_url=self.export_template_at_management_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStackTemplateDefinition", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + export_template_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate" + } diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/_patch.py new file mode 100644 index 0000000000000..f7dd32510333d --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/aio/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/__init__.py new file mode 100644 index 0000000000000..d588e61c6230c --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/__init__.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._models_py3 import AzureResourceBase +from ._models_py3 import DenySettings +from ._models_py3 import DeploymentStack +from ._models_py3 import DeploymentStackListResult +from ._models_py3 import DeploymentStackProperties +from ._models_py3 import DeploymentStackPropertiesActionOnUnmanage +from ._models_py3 import DeploymentStackTemplateDefinition +from ._models_py3 import DeploymentStacksDebugSetting +from ._models_py3 import DeploymentStacksError +from ._models_py3 import DeploymentStacksParametersLink +from ._models_py3 import DeploymentStacksTemplateLink +from ._models_py3 import ErrorAdditionalInfo +from ._models_py3 import ErrorDetail +from ._models_py3 import ErrorResponse +from ._models_py3 import ManagedResourceReference +from ._models_py3 import ResourceReference +from ._models_py3 import ResourceReferenceExtended +from ._models_py3 import SystemData + +from ._deployment_stacks_client_enums import CreatedByType +from ._deployment_stacks_client_enums import DenySettingsMode +from ._deployment_stacks_client_enums import DenyStatusMode +from ._deployment_stacks_client_enums import DeploymentStackProvisioningState +from ._deployment_stacks_client_enums import DeploymentStacksDeleteDetachEnum +from ._deployment_stacks_client_enums import ResourceStatusMode +from ._deployment_stacks_client_enums import UnmanageActionManagementGroupMode +from ._deployment_stacks_client_enums import UnmanageActionResourceGroupMode +from ._deployment_stacks_client_enums import UnmanageActionResourceMode +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "AzureResourceBase", + "DenySettings", + "DeploymentStack", + "DeploymentStackListResult", + "DeploymentStackProperties", + "DeploymentStackPropertiesActionOnUnmanage", + "DeploymentStackTemplateDefinition", + "DeploymentStacksDebugSetting", + "DeploymentStacksError", + "DeploymentStacksParametersLink", + "DeploymentStacksTemplateLink", + "ErrorAdditionalInfo", + "ErrorDetail", + "ErrorResponse", + "ManagedResourceReference", + "ResourceReference", + "ResourceReferenceExtended", + "SystemData", + "CreatedByType", + "DenySettingsMode", + "DenyStatusMode", + "DeploymentStackProvisioningState", + "DeploymentStacksDeleteDetachEnum", + "ResourceStatusMode", + "UnmanageActionManagementGroupMode", + "UnmanageActionResourceGroupMode", + "UnmanageActionResourceMode", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_deployment_stacks_client_enums.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_deployment_stacks_client_enums.py new file mode 100644 index 0000000000000..09b5cd78917f4 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_deployment_stacks_client_enums.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum +from azure.core import CaseInsensitiveEnumMeta + + +class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity that created the resource.""" + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + + +class DenySettingsMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """denySettings Mode.""" + + DENY_DELETE = "denyDelete" + """Authorized users are able to read and modify the resources, but cannot delete.""" + DENY_WRITE_AND_DELETE = "denyWriteAndDelete" + """Authorized users can only read from a resource, but cannot modify or delete it.""" + NONE = "none" + """No denyAssignments have been applied.""" + + +class DenyStatusMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """denyAssignment settings applied to the resource.""" + + DENY_DELETE = "denyDelete" + """Authorized users are able to read and modify the resources, but cannot delete.""" + NOT_SUPPORTED = "notSupported" + """Resource type does not support denyAssignments.""" + INAPPLICABLE = "inapplicable" + """denyAssignments are not supported on resources outside the scope of the deployment stack.""" + DENY_WRITE_AND_DELETE = "denyWriteAndDelete" + """Authorized users can only read from a resource, but cannot modify or delete it.""" + REMOVED_BY_SYSTEM = "removedBySystem" + """Deny assignment has been removed by Azure due to a resource management change (management group + #: move, etc.)""" + NONE = "None" + """No denyAssignments have been applied.""" + + +class DeploymentStackProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """State of the deployment stack.""" + + CREATING = "Creating" + VALIDATING = "Validating" + WAITING = "Waiting" + DEPLOYING = "Deploying" + CANCELING = "Canceling" + LOCKING = "Locking" + DELETING_RESOURCES = "DeletingResources" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + DELETING = "Deleting" + + +class DeploymentStacksDeleteDetachEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the action that should be taken on the resource when the deployment stack is deleted. + Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's + current state. + """ + + DELETE = "delete" + DETACH = "detach" + + +class ResourceStatusMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Current management state of the resource in the deployment stack.""" + + MANAGED = "Managed" + """This resource is managed by the deployment stack.""" + REMOVE_DENY_FAILED = "removeDenyFailed" + """Unable to remove the deny assignment on resource.""" + DELETE_FAILED = "deleteFailed" + """Unable to delete the resource from Azure. The delete will be retried on the next stack + #: deployment, or can be deleted manually.""" + NONE = "None" + """No denyAssignments have been applied.""" + + +class UnmanageActionManagementGroupMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """UnmanageActionManagementGroupMode.""" + + DELETE = "delete" + DETACH = "detach" + + +class UnmanageActionResourceGroupMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """UnmanageActionResourceGroupMode.""" + + DELETE = "delete" + DETACH = "detach" + + +class UnmanageActionResourceMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """UnmanageActionResourceMode.""" + + DELETE = "delete" + DETACH = "detach" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_models_py3.py new file mode 100644 index 0000000000000..73b645be43390 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_models_py3.py @@ -0,0 +1,1089 @@ +# coding=utf-8 +# pylint: disable=too-many-lines +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +import sys +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union + +from ... import _serialization + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from .. import models as _models +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object + + +class AzureResourceBase(_serialization.Model): + """Common properties for all Azure resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar name: Name of this resource. + :vartype name: str + :ivar type: Type of this resource. + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.SystemData + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class DenySettings(_serialization.Model): + """Defines how resources deployed by the deployment stack are locked. + + :ivar mode: denySettings Mode. Known values are: "denyDelete", "denyWriteAndDelete", and + "none". + :vartype mode: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DenySettingsMode + :ivar excluded_principals: List of AAD principal IDs excluded from the lock. Up to 5 principals + are permitted. + :vartype excluded_principals: list[str] + :ivar excluded_actions: List of role-based management operations that are excluded from the + denySettings. Up to 200 actions are permitted. If the denySetting mode is set to + 'denyWriteAndDelete', then the following actions are automatically appended to + 'excludedActions': '*/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode + is set to 'denyDelete', then the following actions are automatically appended to + 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. + :vartype excluded_actions: list[str] + :ivar apply_to_child_scopes: DenySettings will be applied to child scopes. + :vartype apply_to_child_scopes: bool + """ + + _attribute_map = { + "mode": {"key": "mode", "type": "str"}, + "excluded_principals": {"key": "excludedPrincipals", "type": "[str]"}, + "excluded_actions": {"key": "excludedActions", "type": "[str]"}, + "apply_to_child_scopes": {"key": "applyToChildScopes", "type": "bool"}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "_models.DenySettingsMode"]] = None, + excluded_principals: Optional[List[str]] = None, + excluded_actions: Optional[List[str]] = None, + apply_to_child_scopes: Optional[bool] = None, + **kwargs: Any + ) -> None: + """ + :keyword mode: denySettings Mode. Known values are: "denyDelete", "denyWriteAndDelete", and + "none". + :paramtype mode: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DenySettingsMode + :keyword excluded_principals: List of AAD principal IDs excluded from the lock. Up to 5 + principals are permitted. + :paramtype excluded_principals: list[str] + :keyword excluded_actions: List of role-based management operations that are excluded from the + denySettings. Up to 200 actions are permitted. If the denySetting mode is set to + 'denyWriteAndDelete', then the following actions are automatically appended to + 'excludedActions': '*/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode + is set to 'denyDelete', then the following actions are automatically appended to + 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. + :paramtype excluded_actions: list[str] + :keyword apply_to_child_scopes: DenySettings will be applied to child scopes. + :paramtype apply_to_child_scopes: bool + """ + super().__init__(**kwargs) + self.mode = mode + self.excluded_principals = excluded_principals + self.excluded_actions = excluded_actions + self.apply_to_child_scopes = apply_to_child_scopes + + +class DeploymentStack(AzureResourceBase): # pylint: disable=too-many-instance-attributes + """Deployment stack object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: String Id used to locate any resource on Azure. + :vartype id: str + :ivar name: Name of this resource. + :vartype name: str + :ivar type: Type of this resource. + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.SystemData + :ivar location: The location of the deployment stack. It cannot be changed after creation. It + must be one of the supported Azure locations. + :vartype location: str + :ivar tags: Deployment stack resource tags. + :vartype tags: dict[str, str] + :ivar error: Common error response for all Azure Resource Manager APIs to return error details + for failed operations. (This also follows the OData error response format.). + :vartype error: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorResponse + :ivar template: The template content. You use this element when you want to pass the template + syntax directly in the request rather than link to an existing template. It can be a JObject or + well-formed JSON string. Use either the templateLink property or the template property, but not + both. + :vartype template: JSON + :ivar template_link: The URI of the template. Use either the templateLink property or the + template property, but not both. + :vartype template_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksTemplateLink + :ivar parameters: Name and value pairs that define the deployment parameters for the template. + Use this element when providing the parameter values directly in the request, rather than + linking to an existing parameter file. Use either the parametersLink property or the parameters + property, but not both. It can be a JObject or a well formed JSON string. + :vartype parameters: JSON + :ivar parameters_link: The URI of parameters file. Use this element to link to an existing + parameters file. Use either the parametersLink property or the parameters property, but not + both. + :vartype parameters_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksParametersLink + :ivar action_on_unmanage: Defines the behavior of resources that are not managed immediately + after the stack is updated. + :vartype action_on_unmanage: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackPropertiesActionOnUnmanage + :ivar debug_setting: The debug setting of the deployment. + :vartype debug_setting: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDebugSetting + :ivar deployment_scope: The scope at which the initial deployment should be created. If a scope + is not specified, it will default to the scope of the deployment stack. Valid scopes are: + management group (format: + '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + '/subscriptions/{subscriptionId}'), resource group (format: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + :vartype deployment_scope: str + :ivar description: Deployment stack description. + :vartype description: str + :ivar deny_settings: Defines how resources deployed by the stack are locked. + :vartype deny_settings: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DenySettings + :ivar provisioning_state: State of the deployment stack. Known values are: "Creating", + "Validating", "Waiting", "Deploying", "Canceling", "Locking", "DeletingResources", "Succeeded", + "Failed", "Canceled", and "Deleting". + :vartype provisioning_state: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackProvisioningState + :ivar detached_resources: An array of resources that were detached during the most recent + update. + :vartype detached_resources: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ResourceReference] + :ivar deleted_resources: An array of resources that were deleted during the most recent update. + :vartype deleted_resources: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ResourceReference] + :ivar failed_resources: An array of resources that failed to reach goal state during the most + recent update. + :vartype failed_resources: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ResourceReferenceExtended] + :ivar resources: An array of resources currently managed by the deployment stack. + :vartype resources: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ManagedResourceReference] + :ivar deployment_id: The resourceId of the deployment resource created by the deployment stack. + :vartype deployment_id: str + :ivar outputs: The outputs of the underlying deployment. + :vartype outputs: JSON + :ivar duration: The duration of the deployment stack update. + :vartype duration: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "description": {"max_length": 4096}, + "provisioning_state": {"readonly": True}, + "detached_resources": {"readonly": True}, + "deleted_resources": {"readonly": True}, + "failed_resources": {"readonly": True}, + "resources": {"readonly": True}, + "deployment_id": {"readonly": True}, + "outputs": {"readonly": True}, + "duration": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "error": {"key": "properties.error", "type": "ErrorResponse"}, + "template": {"key": "properties.template", "type": "object"}, + "template_link": {"key": "properties.templateLink", "type": "DeploymentStacksTemplateLink"}, + "parameters": {"key": "properties.parameters", "type": "object"}, + "parameters_link": {"key": "properties.parametersLink", "type": "DeploymentStacksParametersLink"}, + "action_on_unmanage": { + "key": "properties.actionOnUnmanage", + "type": "DeploymentStackPropertiesActionOnUnmanage", + }, + "debug_setting": {"key": "properties.debugSetting", "type": "DeploymentStacksDebugSetting"}, + "deployment_scope": {"key": "properties.deploymentScope", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "deny_settings": {"key": "properties.denySettings", "type": "DenySettings"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "detached_resources": {"key": "properties.detachedResources", "type": "[ResourceReference]"}, + "deleted_resources": {"key": "properties.deletedResources", "type": "[ResourceReference]"}, + "failed_resources": {"key": "properties.failedResources", "type": "[ResourceReferenceExtended]"}, + "resources": {"key": "properties.resources", "type": "[ManagedResourceReference]"}, + "deployment_id": {"key": "properties.deploymentId", "type": "str"}, + "outputs": {"key": "properties.outputs", "type": "object"}, + "duration": {"key": "properties.duration", "type": "str"}, + } + + def __init__( # pylint: disable=too-many-locals + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + error: Optional["_models.ErrorResponse"] = None, + template: Optional[JSON] = None, + template_link: Optional["_models.DeploymentStacksTemplateLink"] = None, + parameters: Optional[JSON] = None, + parameters_link: Optional["_models.DeploymentStacksParametersLink"] = None, + action_on_unmanage: Optional["_models.DeploymentStackPropertiesActionOnUnmanage"] = None, + debug_setting: Optional["_models.DeploymentStacksDebugSetting"] = None, + deployment_scope: Optional[str] = None, + description: Optional[str] = None, + deny_settings: Optional["_models.DenySettings"] = None, + **kwargs: Any + ) -> None: + """ + :keyword location: The location of the deployment stack. It cannot be changed after creation. + It must be one of the supported Azure locations. + :paramtype location: str + :keyword tags: Deployment stack resource tags. + :paramtype tags: dict[str, str] + :keyword error: Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response format.). + :paramtype error: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorResponse + :keyword template: The template content. You use this element when you want to pass the + template syntax directly in the request rather than link to an existing template. It can be a + JObject or well-formed JSON string. Use either the templateLink property or the template + property, but not both. + :paramtype template: JSON + :keyword template_link: The URI of the template. Use either the templateLink property or the + template property, but not both. + :paramtype template_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksTemplateLink + :keyword parameters: Name and value pairs that define the deployment parameters for the + template. Use this element when providing the parameter values directly in the request, rather + than linking to an existing parameter file. Use either the parametersLink property or the + parameters property, but not both. It can be a JObject or a well formed JSON string. + :paramtype parameters: JSON + :keyword parameters_link: The URI of parameters file. Use this element to link to an existing + parameters file. Use either the parametersLink property or the parameters property, but not + both. + :paramtype parameters_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksParametersLink + :keyword action_on_unmanage: Defines the behavior of resources that are not managed immediately + after the stack is updated. + :paramtype action_on_unmanage: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackPropertiesActionOnUnmanage + :keyword debug_setting: The debug setting of the deployment. + :paramtype debug_setting: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDebugSetting + :keyword deployment_scope: The scope at which the initial deployment should be created. If a + scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: + management group (format: + '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + '/subscriptions/{subscriptionId}'), resource group (format: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + :paramtype deployment_scope: str + :keyword description: Deployment stack description. + :paramtype description: str + :keyword deny_settings: Defines how resources deployed by the stack are locked. + :paramtype deny_settings: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DenySettings + """ + super().__init__(**kwargs) + self.location = location + self.tags = tags + self.error = error + self.template = template + self.template_link = template_link + self.parameters = parameters + self.parameters_link = parameters_link + self.action_on_unmanage = action_on_unmanage + self.debug_setting = debug_setting + self.deployment_scope = deployment_scope + self.description = description + self.deny_settings = deny_settings + self.provisioning_state = None + self.detached_resources = None + self.deleted_resources = None + self.failed_resources = None + self.resources = None + self.deployment_id = None + self.outputs = None + self.duration = None + + +class DeploymentStackListResult(_serialization.Model): + """List of deployment stacks. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: An array of deployment stacks. + :vartype value: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :ivar next_link: The URL to use for getting the next set of results. + :vartype next_link: str + """ + + _validation = { + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[DeploymentStack]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, *, value: Optional[List["_models.DeploymentStack"]] = None, **kwargs: Any) -> None: + """ + :keyword value: An array of deployment stacks. + :paramtype value: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + """ + super().__init__(**kwargs) + self.value = value + self.next_link = None + + +class DeploymentStacksError(_serialization.Model): + """Deployment Stacks error response. + + :ivar error: Common error response for all Azure Resource Manager APIs to return error details + for failed operations. (This also follows the OData error response format.). + :vartype error: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorResponse + """ + + _attribute_map = { + "error": {"key": "error", "type": "ErrorResponse"}, + } + + def __init__(self, *, error: Optional["_models.ErrorResponse"] = None, **kwargs: Any) -> None: + """ + :keyword error: Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response format.). + :paramtype error: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorResponse + """ + super().__init__(**kwargs) + self.error = error + + +class DeploymentStackProperties(DeploymentStacksError): # pylint: disable=too-many-instance-attributes + """Deployment stack properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar error: Common error response for all Azure Resource Manager APIs to return error details + for failed operations. (This also follows the OData error response format.). + :vartype error: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorResponse + :ivar template: The template content. You use this element when you want to pass the template + syntax directly in the request rather than link to an existing template. It can be a JObject or + well-formed JSON string. Use either the templateLink property or the template property, but not + both. + :vartype template: JSON + :ivar template_link: The URI of the template. Use either the templateLink property or the + template property, but not both. + :vartype template_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksTemplateLink + :ivar parameters: Name and value pairs that define the deployment parameters for the template. + Use this element when providing the parameter values directly in the request, rather than + linking to an existing parameter file. Use either the parametersLink property or the parameters + property, but not both. It can be a JObject or a well formed JSON string. + :vartype parameters: JSON + :ivar parameters_link: The URI of parameters file. Use this element to link to an existing + parameters file. Use either the parametersLink property or the parameters property, but not + both. + :vartype parameters_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksParametersLink + :ivar action_on_unmanage: Defines the behavior of resources that are not managed immediately + after the stack is updated. Required. + :vartype action_on_unmanage: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackPropertiesActionOnUnmanage + :ivar debug_setting: The debug setting of the deployment. + :vartype debug_setting: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDebugSetting + :ivar deployment_scope: The scope at which the initial deployment should be created. If a scope + is not specified, it will default to the scope of the deployment stack. Valid scopes are: + management group (format: + '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + '/subscriptions/{subscriptionId}'), resource group (format: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + :vartype deployment_scope: str + :ivar description: Deployment stack description. + :vartype description: str + :ivar deny_settings: Defines how resources deployed by the stack are locked. + :vartype deny_settings: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DenySettings + :ivar provisioning_state: State of the deployment stack. Known values are: "Creating", + "Validating", "Waiting", "Deploying", "Canceling", "Locking", "DeletingResources", "Succeeded", + "Failed", "Canceled", and "Deleting". + :vartype provisioning_state: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackProvisioningState + :ivar detached_resources: An array of resources that were detached during the most recent + update. + :vartype detached_resources: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ResourceReference] + :ivar deleted_resources: An array of resources that were deleted during the most recent update. + :vartype deleted_resources: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ResourceReference] + :ivar failed_resources: An array of resources that failed to reach goal state during the most + recent update. + :vartype failed_resources: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ResourceReferenceExtended] + :ivar resources: An array of resources currently managed by the deployment stack. + :vartype resources: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ManagedResourceReference] + :ivar deployment_id: The resourceId of the deployment resource created by the deployment stack. + :vartype deployment_id: str + :ivar outputs: The outputs of the underlying deployment. + :vartype outputs: JSON + :ivar duration: The duration of the deployment stack update. + :vartype duration: str + """ + + _validation = { + "action_on_unmanage": {"required": True}, + "description": {"max_length": 4096}, + "provisioning_state": {"readonly": True}, + "detached_resources": {"readonly": True}, + "deleted_resources": {"readonly": True}, + "failed_resources": {"readonly": True}, + "resources": {"readonly": True}, + "deployment_id": {"readonly": True}, + "outputs": {"readonly": True}, + "duration": {"readonly": True}, + } + + _attribute_map = { + "error": {"key": "error", "type": "ErrorResponse"}, + "template": {"key": "template", "type": "object"}, + "template_link": {"key": "templateLink", "type": "DeploymentStacksTemplateLink"}, + "parameters": {"key": "parameters", "type": "object"}, + "parameters_link": {"key": "parametersLink", "type": "DeploymentStacksParametersLink"}, + "action_on_unmanage": {"key": "actionOnUnmanage", "type": "DeploymentStackPropertiesActionOnUnmanage"}, + "debug_setting": {"key": "debugSetting", "type": "DeploymentStacksDebugSetting"}, + "deployment_scope": {"key": "deploymentScope", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "deny_settings": {"key": "denySettings", "type": "DenySettings"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "detached_resources": {"key": "detachedResources", "type": "[ResourceReference]"}, + "deleted_resources": {"key": "deletedResources", "type": "[ResourceReference]"}, + "failed_resources": {"key": "failedResources", "type": "[ResourceReferenceExtended]"}, + "resources": {"key": "resources", "type": "[ManagedResourceReference]"}, + "deployment_id": {"key": "deploymentId", "type": "str"}, + "outputs": {"key": "outputs", "type": "object"}, + "duration": {"key": "duration", "type": "str"}, + } + + def __init__( + self, + *, + action_on_unmanage: "_models.DeploymentStackPropertiesActionOnUnmanage", + error: Optional["_models.ErrorResponse"] = None, + template: Optional[JSON] = None, + template_link: Optional["_models.DeploymentStacksTemplateLink"] = None, + parameters: Optional[JSON] = None, + parameters_link: Optional["_models.DeploymentStacksParametersLink"] = None, + debug_setting: Optional["_models.DeploymentStacksDebugSetting"] = None, + deployment_scope: Optional[str] = None, + description: Optional[str] = None, + deny_settings: Optional["_models.DenySettings"] = None, + **kwargs: Any + ) -> None: + """ + :keyword error: Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response format.). + :paramtype error: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorResponse + :keyword template: The template content. You use this element when you want to pass the + template syntax directly in the request rather than link to an existing template. It can be a + JObject or well-formed JSON string. Use either the templateLink property or the template + property, but not both. + :paramtype template: JSON + :keyword template_link: The URI of the template. Use either the templateLink property or the + template property, but not both. + :paramtype template_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksTemplateLink + :keyword parameters: Name and value pairs that define the deployment parameters for the + template. Use this element when providing the parameter values directly in the request, rather + than linking to an existing parameter file. Use either the parametersLink property or the + parameters property, but not both. It can be a JObject or a well formed JSON string. + :paramtype parameters: JSON + :keyword parameters_link: The URI of parameters file. Use this element to link to an existing + parameters file. Use either the parametersLink property or the parameters property, but not + both. + :paramtype parameters_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksParametersLink + :keyword action_on_unmanage: Defines the behavior of resources that are not managed immediately + after the stack is updated. Required. + :paramtype action_on_unmanage: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackPropertiesActionOnUnmanage + :keyword debug_setting: The debug setting of the deployment. + :paramtype debug_setting: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDebugSetting + :keyword deployment_scope: The scope at which the initial deployment should be created. If a + scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: + management group (format: + '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: + '/subscriptions/{subscriptionId}'), resource group (format: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + :paramtype deployment_scope: str + :keyword description: Deployment stack description. + :paramtype description: str + :keyword deny_settings: Defines how resources deployed by the stack are locked. + :paramtype deny_settings: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DenySettings + """ + super().__init__(error=error, **kwargs) + self.template = template + self.template_link = template_link + self.parameters = parameters + self.parameters_link = parameters_link + self.action_on_unmanage = action_on_unmanage + self.debug_setting = debug_setting + self.deployment_scope = deployment_scope + self.description = description + self.deny_settings = deny_settings + self.provisioning_state = None + self.detached_resources = None + self.deleted_resources = None + self.failed_resources = None + self.resources = None + self.deployment_id = None + self.outputs = None + self.duration = None + + +class DeploymentStackPropertiesActionOnUnmanage(_serialization.Model): + """Defines the behavior of resources that are not managed immediately after the stack is updated. + + All required parameters must be populated in order to send to Azure. + + :ivar resources: Specifies the action that should be taken on the resource when the deployment + stack is deleted. Delete will attempt to delete the resource from Azure. Detach will leave the + resource in it's current state. Required. Known values are: "delete" and "detach". + :vartype resources: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDeleteDetachEnum + :ivar resource_groups: Specifies the action that should be taken on the resource when the + deployment stack is deleted. Delete will attempt to delete the resource from Azure. Detach will + leave the resource in it's current state. Known values are: "delete" and "detach". + :vartype resource_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDeleteDetachEnum + :ivar management_groups: Specifies the action that should be taken on the resource when the + deployment stack is deleted. Delete will attempt to delete the resource from Azure. Detach will + leave the resource in it's current state. Known values are: "delete" and "detach". + :vartype management_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDeleteDetachEnum + """ + + _validation = { + "resources": {"required": True}, + } + + _attribute_map = { + "resources": {"key": "resources", "type": "str"}, + "resource_groups": {"key": "resourceGroups", "type": "str"}, + "management_groups": {"key": "managementGroups", "type": "str"}, + } + + def __init__( + self, + *, + resources: Union[str, "_models.DeploymentStacksDeleteDetachEnum"], + resource_groups: Optional[Union[str, "_models.DeploymentStacksDeleteDetachEnum"]] = None, + management_groups: Optional[Union[str, "_models.DeploymentStacksDeleteDetachEnum"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword resources: Specifies the action that should be taken on the resource when the + deployment stack is deleted. Delete will attempt to delete the resource from Azure. Detach will + leave the resource in it's current state. Required. Known values are: "delete" and "detach". + :paramtype resources: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDeleteDetachEnum + :keyword resource_groups: Specifies the action that should be taken on the resource when the + deployment stack is deleted. Delete will attempt to delete the resource from Azure. Detach will + leave the resource in it's current state. Known values are: "delete" and "detach". + :paramtype resource_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDeleteDetachEnum + :keyword management_groups: Specifies the action that should be taken on the resource when the + deployment stack is deleted. Delete will attempt to delete the resource from Azure. Detach will + leave the resource in it's current state. Known values are: "delete" and "detach". + :paramtype management_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksDeleteDetachEnum + """ + super().__init__(**kwargs) + self.resources = resources + self.resource_groups = resource_groups + self.management_groups = management_groups + + +class DeploymentStacksDebugSetting(_serialization.Model): + """The debug setting. + + :ivar detail_level: Specifies the type of information to log for debugging. The permitted + values are none, requestContent, responseContent, or both requestContent and responseContent + separated by a comma. The default is none. When setting this value, carefully consider the type + of information that is being passed in during deployment. By logging information about the + request or response, sensitive data that is retrieved through the deployment operations could + potentially be exposed. + :vartype detail_level: str + """ + + _attribute_map = { + "detail_level": {"key": "detailLevel", "type": "str"}, + } + + def __init__(self, *, detail_level: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword detail_level: Specifies the type of information to log for debugging. The permitted + values are none, requestContent, responseContent, or both requestContent and responseContent + separated by a comma. The default is none. When setting this value, carefully consider the type + of information that is being passed in during deployment. By logging information about the + request or response, sensitive data that is retrieved through the deployment operations could + potentially be exposed. + :paramtype detail_level: str + """ + super().__init__(**kwargs) + self.detail_level = detail_level + + +class DeploymentStacksParametersLink(_serialization.Model): + """Entity representing the reference to the deployment parameters. + + All required parameters must be populated in order to send to Azure. + + :ivar uri: The URI of the parameters file. Required. + :vartype uri: str + :ivar content_version: If included, must match the ContentVersion in the template. + :vartype content_version: str + """ + + _validation = { + "uri": {"required": True}, + } + + _attribute_map = { + "uri": {"key": "uri", "type": "str"}, + "content_version": {"key": "contentVersion", "type": "str"}, + } + + def __init__(self, *, uri: str, content_version: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword uri: The URI of the parameters file. Required. + :paramtype uri: str + :keyword content_version: If included, must match the ContentVersion in the template. + :paramtype content_version: str + """ + super().__init__(**kwargs) + self.uri = uri + self.content_version = content_version + + +class DeploymentStacksTemplateLink(_serialization.Model): + """Entity representing the reference to the template. + + :ivar uri: The URI of the template to deploy. Use either the uri or id property, but not both. + :vartype uri: str + :ivar id: The resource id of a Template Spec. Use either the id or uri property, but not both. + :vartype id: str + :ivar relative_path: The relativePath property can be used to deploy a linked template at a + location relative to the parent. If the parent template was linked with a TemplateSpec, this + will reference an artifact in the TemplateSpec. If the parent was linked with a URI, the child + deployment will be a combination of the parent and relativePath URIs. + :vartype relative_path: str + :ivar query_string: The query string (for example, a SAS token) to be used with the + templateLink URI. + :vartype query_string: str + :ivar content_version: If included, must match the ContentVersion in the template. + :vartype content_version: str + """ + + _attribute_map = { + "uri": {"key": "uri", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "relative_path": {"key": "relativePath", "type": "str"}, + "query_string": {"key": "queryString", "type": "str"}, + "content_version": {"key": "contentVersion", "type": "str"}, + } + + def __init__( + self, + *, + uri: Optional[str] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin + relative_path: Optional[str] = None, + query_string: Optional[str] = None, + content_version: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword uri: The URI of the template to deploy. Use either the uri or id property, but not + both. + :paramtype uri: str + :keyword id: The resource id of a Template Spec. Use either the id or uri property, but not + both. + :paramtype id: str + :keyword relative_path: The relativePath property can be used to deploy a linked template at a + location relative to the parent. If the parent template was linked with a TemplateSpec, this + will reference an artifact in the TemplateSpec. If the parent was linked with a URI, the child + deployment will be a combination of the parent and relativePath URIs. + :paramtype relative_path: str + :keyword query_string: The query string (for example, a SAS token) to be used with the + templateLink URI. + :paramtype query_string: str + :keyword content_version: If included, must match the ContentVersion in the template. + :paramtype content_version: str + """ + super().__init__(**kwargs) + self.uri = uri + self.id = id + self.relative_path = relative_path + self.query_string = query_string + self.content_version = content_version + + +class DeploymentStackTemplateDefinition(_serialization.Model): + """Export Template specific properties of the Stack. + + :ivar template: The template content. Use this element to pass the template syntax directly in + the request rather than link to an existing template. It can be a JObject or well-formed JSON + string. Use either the templateLink property or the template property, but not both. + :vartype template: JSON + :ivar template_link: The URI of the template. Use either the templateLink property or the + template property, but not both. + :vartype template_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksTemplateLink + """ + + _attribute_map = { + "template": {"key": "template", "type": "object"}, + "template_link": {"key": "templateLink", "type": "DeploymentStacksTemplateLink"}, + } + + def __init__( + self, + *, + template: Optional[JSON] = None, + template_link: Optional["_models.DeploymentStacksTemplateLink"] = None, + **kwargs: Any + ) -> None: + """ + :keyword template: The template content. Use this element to pass the template syntax directly + in the request rather than link to an existing template. It can be a JObject or well-formed + JSON string. Use either the templateLink property or the template property, but not both. + :paramtype template: JSON + :keyword template_link: The URI of the template. Use either the templateLink property or the + template property, but not both. + :paramtype template_link: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStacksTemplateLink + """ + super().__init__(**kwargs) + self.template = template + self.template_link = template_link + + +class ErrorAdditionalInfo(_serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: JSON + """ + + _validation = { + "type": {"readonly": True}, + "info": {"readonly": True}, + } + + _attribute_map = { + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(_serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorAdditionalInfo] + """ + + _validation = { + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, + } + + _attribute_map = { + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorDetail]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(_serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). + + :ivar error: The error object. + :vartype error: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorDetail + """ + + _attribute_map = { + "error": {"key": "error", "type": "ErrorDetail"}, + } + + def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorDetail + """ + super().__init__(**kwargs) + self.error = error + + +class ResourceReference(_serialization.Model): + """The resource Id model. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resourceId of a resource managed by the deployment stack. + :vartype id: str + """ + + _validation = { + "id": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + + +class ManagedResourceReference(ResourceReference): + """The managed resource model. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resourceId of a resource managed by the deployment stack. + :vartype id: str + :ivar status: Current management state of the resource in the deployment stack. Known values + are: "Managed", "removeDenyFailed", "deleteFailed", and "None". + :vartype status: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ResourceStatusMode + :ivar deny_status: denyAssignment settings applied to the resource. Known values are: + "denyDelete", "notSupported", "inapplicable", "denyWriteAndDelete", "removedBySystem", and + "None". + :vartype deny_status: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DenyStatusMode + """ + + _validation = { + "id": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "deny_status": {"key": "denyStatus", "type": "str"}, + } + + def __init__( + self, + *, + status: Union[str, "_models.ResourceStatusMode"] = "None", + deny_status: Union[str, "_models.DenyStatusMode"] = "None", + **kwargs: Any + ) -> None: + """ + :keyword status: Current management state of the resource in the deployment stack. Known values + are: "Managed", "removeDenyFailed", "deleteFailed", and "None". + :paramtype status: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ResourceStatusMode + :keyword deny_status: denyAssignment settings applied to the resource. Known values are: + "denyDelete", "notSupported", "inapplicable", "denyWriteAndDelete", "removedBySystem", and + "None". + :paramtype deny_status: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DenyStatusMode + """ + super().__init__(**kwargs) + self.status = status + self.deny_status = deny_status + + +class ResourceReferenceExtended(ResourceReference, DeploymentStacksError): + """The resource Id extended model. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: Common error response for all Azure Resource Manager APIs to return error details + for failed operations. (This also follows the OData error response format.). + :vartype error: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorResponse + :ivar id: The resourceId of a resource managed by the deployment stack. + :vartype id: str + """ + + _validation = { + "id": {"readonly": True}, + } + + _attribute_map = { + "error": {"key": "error", "type": "ErrorResponse"}, + "id": {"key": "id", "type": "str"}, + } + + def __init__(self, *, error: Optional["_models.ErrorResponse"] = None, **kwargs: Any) -> None: + """ + :keyword error: Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response format.). + :paramtype error: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.ErrorResponse + """ + super().__init__(error=error, **kwargs) + self.error = error + self.id = None + + +class SystemData(_serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs: Any + ) -> None: + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :paramtype created_by_type: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Known + values are: "User", "Application", "ManagedIdentity", and "Key". + :paramtype last_modified_by_type: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ + super().__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_patch.py new file mode 100644 index 0000000000000..f7dd32510333d --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/models/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/__init__.py new file mode 100644 index 0000000000000..0945e1f1e205d --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import DeploymentStacksOperations + +from ._patch import __all__ as _patch_all +from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk + +__all__ = [ + "DeploymentStacksOperations", +] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/_operations.py new file mode 100644 index 0000000000000..85e8f2cdb3960 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/_operations.py @@ -0,0 +1,2399 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from ..._serialization import Serializer +from .._vendor import _convert_request, _format_url_section + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_deployment_stacks_list_at_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_list_at_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_list_at_management_group_request( # pylint: disable=name-too-long + 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: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks", + ) # pylint: disable=line-too-long + path_format_arguments = { + "managementGroupId": _SERIALIZER.url( + "management_group_id", management_group_id, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_create_or_update_at_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, deployment_stack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_get_at_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, deployment_stack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_delete_at_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, + deployment_stack_name: str, + subscription_id: str, + *, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + if unmanage_action_resources is not None: + _params["unmanageAction.Resources"] = _SERIALIZER.query( + "unmanage_action_resources", unmanage_action_resources, "str" + ) + if unmanage_action_resource_groups is not None: + _params["unmanageAction.ResourceGroups"] = _SERIALIZER.query( + "unmanage_action_resource_groups", unmanage_action_resource_groups, "str" + ) + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_create_or_update_at_subscription_request( # pylint: disable=name-too-long + deployment_stack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_get_at_subscription_request( # pylint: disable=name-too-long + deployment_stack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_delete_at_subscription_request( # pylint: disable=name-too-long + deployment_stack_name: str, + subscription_id: str, + *, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + if unmanage_action_resources is not None: + _params["unmanageAction.Resources"] = _SERIALIZER.query( + "unmanage_action_resources", unmanage_action_resources, "str" + ) + if unmanage_action_resource_groups is not None: + _params["unmanageAction.ResourceGroups"] = _SERIALIZER.query( + "unmanage_action_resource_groups", unmanage_action_resource_groups, "str" + ) + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_create_or_update_at_management_group_request( # pylint: disable=name-too-long + management_group_id: str, deployment_stack_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + 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") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "managementGroupId": _SERIALIZER.url( + "management_group_id", management_group_id, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + ), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_get_at_management_group_request( # pylint: disable=name-too-long + management_group_id: str, deployment_stack_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "managementGroupId": _SERIALIZER.url( + "management_group_id", management_group_id, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + ), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_delete_at_management_group_request( # pylint: disable=name-too-long + management_group_id: str, + deployment_stack_name: str, + *, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + unmanage_action_management_groups: Optional[Union[str, _models.UnmanageActionManagementGroupMode]] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "managementGroupId": _SERIALIZER.url( + "management_group_id", management_group_id, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + ), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + if unmanage_action_resources is not None: + _params["unmanageAction.Resources"] = _SERIALIZER.query( + "unmanage_action_resources", unmanage_action_resources, "str" + ) + if unmanage_action_resource_groups is not None: + _params["unmanageAction.ResourceGroups"] = _SERIALIZER.query( + "unmanage_action_resource_groups", unmanage_action_resource_groups, "str" + ) + if unmanage_action_management_groups is not None: + _params["unmanageAction.ManagementGroups"] = _SERIALIZER.query( + "unmanage_action_management_groups", unmanage_action_management_groups, "str" + ) + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_export_template_at_resource_group_request( # pylint: disable=name-too-long + resource_group_name: str, deployment_stack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_export_template_at_subscription_request( # pylint: disable=name-too-long + deployment_stack_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_deployment_stacks_export_template_at_management_group_request( # pylint: disable=name-too-long + management_group_id: str, deployment_stack_name: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate", + ) # pylint: disable=line-too-long + path_format_arguments = { + "managementGroupId": _SERIALIZER.url( + "management_group_id", management_group_id, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$" + ), + "deploymentStackName": _SERIALIZER.url( + "deployment_stack_name", + deployment_stack_name, + "str", + max_length=90, + min_length=1, + pattern=r"^[-\w\._\(\)]+$", + ), + } + + _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class DeploymentStacksOperations: # pylint: disable=too-many-public-methods + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.DeploymentStacksClient`'s + :attr:`deployment_stacks` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_at_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.DeploymentStack"]: + """Lists all the Deployment Stacks within the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentStack or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_deployment_stacks_list_at_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_at_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DeploymentStackListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks" + } + + @distributed_trace + def list_at_subscription(self, **kwargs: Any) -> Iterable["_models.DeploymentStack"]: + """Lists all the Deployment Stacks within the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentStack or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_deployment_stacks_list_at_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_at_subscription.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DeploymentStackListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks" + } + + @distributed_trace + def list_at_management_group(self, management_group_id: str, **kwargs: Any) -> Iterable["_models.DeploymentStack"]: + """Lists all the Deployment Stacks within the specified management group. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentStack or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_deployment_stacks_list_at_management_group_request( + management_group_id=management_group_id, + api_version=api_version, + template_url=self.list_at_management_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("DeploymentStackListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks" + } + + def _create_or_update_at_resource_group_initial( # pylint: disable=name-too-long + self, + resource_group_name: str, + deployment_stack_name: str, + deployment_stack: Union[_models.DeploymentStack, IO], + **kwargs: Any + ) -> _models.DeploymentStack: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(deployment_stack, (IO, bytes)): + _content = deployment_stack + else: + _json = self._serialize.body(deployment_stack, "DeploymentStack") + + request = build_deployment_stacks_create_or_update_at_resource_group_request( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_at_resource_group_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_at_resource_group_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @overload + def begin_create_or_update_at_resource_group( + self, + resource_group_name: str, + deployment_stack_name: str, + deployment_stack: _models.DeploymentStack, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update_at_resource_group( + self, + resource_group_name: str, + deployment_stack_name: str, + deployment_stack: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update_at_resource_group( + self, + resource_group_name: str, + deployment_stack_name: str, + deployment_stack: Union[_models.DeploymentStack, IO], + **kwargs: Any + ) -> LROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Is either a + DeploymentStack type or a IO type. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_at_resource_group_initial( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + deployment_stack=deployment_stack, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("DeploymentStack", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace + def get_at_resource_group( + self, resource_group_name: str, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStack: + """Gets a Deployment Stack with a given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStack or the result of cls(response) + :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + request = build_deployment_stacks_get_at_resource_group_request( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_at_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + def _delete_at_resource_group_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_deployment_stacks_delete_at_resource_group_request( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + api_version=api_version, + template_url=self._delete_at_resource_group_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_at_resource_group_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace + def begin_delete_at_resource_group( + self, + resource_group_name: str, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a Deployment Stack by name. When operation completes, status code 200 returned without + content. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param unmanage_action_resources: Flag to indicate delete rather than detach for the resources. + Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resources: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceMode + :param unmanage_action_resource_groups: Flag to indicate delete rather than detach for the + resource groups. Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resource_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceGroupMode + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-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) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_at_resource_group_initial( # type: ignore + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + def _create_or_update_at_subscription_initial( # pylint: disable=name-too-long + self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO], **kwargs: Any + ) -> _models.DeploymentStack: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(deployment_stack, (IO, bytes)): + _content = deployment_stack + else: + _json = self._serialize.body(deployment_stack, "DeploymentStack") + + request = build_deployment_stacks_create_or_update_at_subscription_request( + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_at_subscription_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_at_subscription_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @overload + def begin_create_or_update_at_subscription( + self, + deployment_stack_name: str, + deployment_stack: _models.DeploymentStack, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update_at_subscription( + self, deployment_stack_name: str, deployment_stack: IO, *, content_type: str = "application/json", **kwargs: Any + ) -> LROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update_at_subscription( + self, deployment_stack_name: str, deployment_stack: Union[_models.DeploymentStack, IO], **kwargs: Any + ) -> LROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Is either a + DeploymentStack type or a IO type. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_at_subscription_initial( + deployment_stack_name=deployment_stack_name, + deployment_stack=deployment_stack, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("DeploymentStack", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace + def get_at_subscription(self, deployment_stack_name: str, **kwargs: Any) -> _models.DeploymentStack: + """Gets a Deployment Stack with a given name. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStack or the result of cls(response) + :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + request = build_deployment_stacks_get_at_subscription_request( + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_at_subscription.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + def _delete_at_subscription_initial( # pylint: disable=inconsistent-return-statements + self, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_deployment_stacks_delete_at_subscription_request( + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + api_version=api_version, + template_url=self._delete_at_subscription_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_at_subscription_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace + def begin_delete_at_subscription( + self, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a Deployment Stack by name. When operation completes, status code 200 returned without + content. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param unmanage_action_resources: Flag to indicate delete rather than detach for the resources. + Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resources: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceMode + :param unmanage_action_resource_groups: Flag to indicate delete rather than detach for the + resource groups. Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resource_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceGroupMode + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-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) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_at_subscription_initial( # type: ignore + deployment_stack_name=deployment_stack_name, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + def _create_or_update_at_management_group_initial( # pylint: disable=name-too-long + self, + management_group_id: str, + deployment_stack_name: str, + deployment_stack: Union[_models.DeploymentStack, IO], + **kwargs: Any + ) -> _models.DeploymentStack: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(deployment_stack, (IO, bytes)): + _content = deployment_stack + else: + _json = self._serialize.body(deployment_stack, "DeploymentStack") + + request = build_deployment_stacks_create_or_update_at_management_group_request( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + api_version=api_version, + content_type=content_type, + json=_json, + content=_content, + template_url=self._create_or_update_at_management_group_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + _create_or_update_at_management_group_initial.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @overload + def begin_create_or_update_at_management_group( # pylint: disable=name-too-long + self, + management_group_id: str, + deployment_stack_name: str, + deployment_stack: _models.DeploymentStack, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update_at_management_group( # pylint: disable=name-too-long + self, + management_group_id: str, + deployment_stack_name: str, + deployment_stack: IO, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Required. + :type deployment_stack: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update_at_management_group( # pylint: disable=name-too-long + self, + management_group_id: str, + deployment_stack_name: str, + deployment_stack: Union[_models.DeploymentStack, IO], + **kwargs: Any + ) -> LROPoller[_models.DeploymentStack]: + """Creates or updates a Deployment Stack. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param deployment_stack: Deployment Stack supplied to the operation. Is either a + DeploymentStack type or a IO type. Required. + :type deployment_stack: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack or IO + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either DeploymentStack or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._create_or_update_at_management_group_initial( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + deployment_stack=deployment_stack, + api_version=api_version, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize("DeploymentStack", pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_create_or_update_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace + def get_at_management_group( + self, management_group_id: str, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStack: + """Gets a Deployment Stack with a given name. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStack or the result of cls(response) + :rtype: ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStack + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStack] = kwargs.pop("cls", None) + + request = build_deployment_stacks_get_at_management_group_request( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + api_version=api_version, + template_url=self.get_at_management_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStack", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + def _delete_at_management_group_initial( # pylint: disable=inconsistent-return-statements + self, + management_group_id: str, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + unmanage_action_management_groups: Optional[Union[str, _models.UnmanageActionManagementGroupMode]] = None, + **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_deployment_stacks_delete_at_management_group_request( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + unmanage_action_management_groups=unmanage_action_management_groups, + api_version=api_version, + template_url=self._delete_at_management_group_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _delete_at_management_group_initial.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace + def begin_delete_at_management_group( + self, + management_group_id: str, + deployment_stack_name: str, + unmanage_action_resources: Optional[Union[str, _models.UnmanageActionResourceMode]] = None, + unmanage_action_resource_groups: Optional[Union[str, _models.UnmanageActionResourceGroupMode]] = None, + unmanage_action_management_groups: Optional[Union[str, _models.UnmanageActionManagementGroupMode]] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes a Deployment Stack by name. When operation completes, status code 200 returned without + content. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :param unmanage_action_resources: Flag to indicate delete rather than detach for the resources. + Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resources: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceMode + :param unmanage_action_resource_groups: Flag to indicate delete rather than detach for the + resource groups. Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_resource_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionResourceGroupMode + :param unmanage_action_management_groups: Flag to indicate delete rather than detach for the + management groups. Known values are: "delete" and "detach". Default value is None. + :type unmanage_action_management_groups: str or + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.UnmanageActionManagementGroupMode + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-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) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_at_management_group_initial( # type: ignore + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + unmanage_action_resources=unmanage_action_resources, + unmanage_action_resource_groups=unmanage_action_resource_groups, + unmanage_action_management_groups=unmanage_action_management_groups, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_delete_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}" + } + + @distributed_trace + def export_template_at_resource_group( + self, resource_group_name: str, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStackTemplateDefinition: + """Exports the template used to create the deployment stack. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStackTemplateDefinition or the result of cls(response) + :rtype: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackTemplateDefinition] = kwargs.pop("cls", None) + + request = build_deployment_stacks_export_template_at_resource_group_request( + resource_group_name=resource_group_name, + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.export_template_at_resource_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStackTemplateDefinition", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + export_template_at_resource_group.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate" + } + + @distributed_trace + def export_template_at_subscription( + self, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStackTemplateDefinition: + """Exports the template used to create the deployment stack. + + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStackTemplateDefinition or the result of cls(response) + :rtype: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackTemplateDefinition] = kwargs.pop("cls", None) + + request = build_deployment_stacks_export_template_at_subscription_request( + deployment_stack_name=deployment_stack_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.export_template_at_subscription.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStackTemplateDefinition", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + export_template_at_subscription.metadata = { + "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate" + } + + @distributed_trace + def export_template_at_management_group( + self, management_group_id: str, deployment_stack_name: str, **kwargs: Any + ) -> _models.DeploymentStackTemplateDefinition: + """Exports the template used to create the deployment stack. + + :param management_group_id: Management Group. Required. + :type management_group_id: str + :param deployment_stack_name: Name of the deployment stack. Required. + :type deployment_stack_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeploymentStackTemplateDefinition or the result of cls(response) + :rtype: + ~azure.mgmt.resource.deploymentstacks.v2022_08_01_preview.models.DeploymentStackTemplateDefinition + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) + cls: ClsType[_models.DeploymentStackTemplateDefinition] = kwargs.pop("cls", None) + + request = build_deployment_stacks_export_template_at_management_group_request( + management_group_id=management_group_id, + deployment_stack_name=deployment_stack_name, + api_version=api_version, + template_url=self.export_template_at_management_group.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DeploymentStacksError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize("DeploymentStackTemplateDefinition", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + export_template_at_management_group.metadata = { + "url": "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate" + } diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/_patch.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/_patch.py new file mode 100644 index 0000000000000..f7dd32510333d --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/py.typed b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/py.typed new file mode 100644 index 0000000000000..e5aff4f83af86 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/deploymentstacks/v2022_08_01_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/_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/resources/azure-mgmt-resource/azure/mgmt/resource/features/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_configuration.py index 2cb0d093df9b0..250413c4313d2 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_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 FeatureClientConfiguration(Configuration): # pylint: disable=too-many-ins def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(FeatureClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", "2015-12-01") + api_version: str = kwargs.pop("api_version", "2015-12-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/aio/_configuration.py index 8efc01ac87100..6f97d5bc8ef6c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_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 FeatureClientConfiguration(Configuration): # pylint: disable=too-many-ins def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(FeatureClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", "2015-12-01") + api_version: str = kwargs.pop("api_version", "2015-12-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/aio/operations/_operations.py index c84786575fe2d..84909c22aa54e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_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, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -39,10 +38,6 @@ ) from .._vendor import FeatureClientMixinABC -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]] @@ -61,7 +56,7 @@ def list_operations(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -161,7 +156,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.FeatureResult"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -246,7 +241,7 @@ def list(self, resource_provider_namespace: str, **kwargs: Any) -> AsyncIterable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -341,7 +336,7 @@ async def get(self, resource_provider_namespace: str, feature_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_get_request( @@ -404,7 +399,7 @@ async def register( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_register_request( @@ -467,7 +462,7 @@ async def unregister( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_unregister_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/_operations.py index 43d868ac5e2a5..b3625f075ecf7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2015_12_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, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import FeatureClientMixinABC, _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_feature_list_operations_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -64,7 +59,7 @@ def build_features_list_all_request(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["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -88,7 +83,7 @@ def build_features_list_request(resource_provider_namespace: str, subscription_i _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -118,7 +113,7 @@ def build_features_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -149,7 +144,7 @@ def build_features_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -180,7 +175,7 @@ def build_features_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -219,7 +214,7 @@ def list_operations(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -319,7 +314,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.FeatureResult"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -404,7 +399,7 @@ def list(self, resource_provider_namespace: str, **kwargs: Any) -> Iterable["_mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -499,7 +494,7 @@ def get(self, resource_provider_namespace: str, feature_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_get_request( @@ -560,7 +555,7 @@ def register(self, resource_provider_namespace: str, feature_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_register_request( @@ -621,7 +616,7 @@ def unregister(self, resource_provider_namespace: str, feature_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-12-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_unregister_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_configuration.py index 941f0066a82cc..b7b77f27d9033 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_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 FeatureClientConfiguration(Configuration): # pylint: disable=too-many-ins def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(FeatureClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", "2021-07-01") + api_version: str = kwargs.pop("api_version", "2021-07-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/_configuration.py index 1b19be7b85851..b672620aa980e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_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 FeatureClientConfiguration(Configuration): # pylint: disable=too-many-ins def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(FeatureClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", "2021-07-01") + api_version: str = kwargs.pop("api_version", "2021-07-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/operations/_operations.py index ee4351ce486bb..c96ab2e0ffa61 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -44,10 +43,6 @@ ) from .._vendor import FeatureClientMixinABC -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]] @@ -66,7 +61,7 @@ def list_operations(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -167,7 +162,7 @@ def list_all(self, **kwargs: Any) -> AsyncIterable["_models.FeatureResult"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -253,7 +248,7 @@ def list(self, resource_provider_namespace: str, **kwargs: Any) -> AsyncIterable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -349,7 +344,7 @@ async def get(self, resource_provider_namespace: str, feature_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_get_request( @@ -413,7 +408,7 @@ async def register( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_register_request( @@ -477,7 +472,7 @@ async def unregister( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_unregister_request( @@ -561,7 +556,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.SubscriptionFeatureRegistration] = kwargs.pop("cls", None) request = build_subscription_feature_registrations_get_request( @@ -693,7 +688,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"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionFeatureRegistration] = kwargs.pop("cls", None) @@ -772,7 +767,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_subscription_feature_registrations_delete_request( @@ -824,7 +819,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.SubscriptionFeatureRegistrationList] = kwargs.pop("cls", None) error_map = { @@ -910,7 +905,7 @@ def list_all_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Subs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.SubscriptionFeatureRegistrationList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/operations/_operations.py index 0eb0506f9ff94..2977af1ada34b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_07_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/features/v2021_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, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import FeatureClientMixinABC, _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_feature_list_operations_request(**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"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -64,7 +59,7 @@ def build_features_list_all_request(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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -88,7 +83,7 @@ def build_features_list_request(resource_provider_namespace: str, subscription_i _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -118,7 +113,7 @@ def build_features_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -149,7 +144,7 @@ def build_features_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -180,7 +175,7 @@ def build_features_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -205,13 +200,13 @@ def build_features_unregister_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_feature_registrations_get_request( +def build_subscription_feature_registrations_get_request( # pylint: disable=name-too-long provider_namespace: str, feature_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -236,13 +231,13 @@ def build_subscription_feature_registrations_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_feature_registrations_create_or_update_request( +def build_subscription_feature_registrations_create_or_update_request( # pylint: disable=name-too-long provider_namespace: str, feature_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -270,13 +265,13 @@ def build_subscription_feature_registrations_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_feature_registrations_delete_request( +def build_subscription_feature_registrations_delete_request( # pylint: disable=name-too-long provider_namespace: str, feature_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -301,13 +296,13 @@ def build_subscription_feature_registrations_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_feature_registrations_list_by_subscription_request( +def build_subscription_feature_registrations_list_by_subscription_request( # pylint: disable=name-too-long provider_namespace: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -331,13 +326,13 @@ def build_subscription_feature_registrations_list_by_subscription_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_feature_registrations_list_all_by_subscription_request( +def build_subscription_feature_registrations_list_all_by_subscription_request( # pylint: disable=name-too-long subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -373,7 +368,7 @@ def list_operations(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -474,7 +469,7 @@ def list_all(self, **kwargs: Any) -> Iterable["_models.FeatureResult"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -560,7 +555,7 @@ def list(self, resource_provider_namespace: str, **kwargs: Any) -> Iterable["_mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -656,7 +651,7 @@ def get(self, resource_provider_namespace: str, feature_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_get_request( @@ -718,7 +713,7 @@ def register(self, resource_provider_namespace: str, feature_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_register_request( @@ -780,7 +775,7 @@ def unregister(self, resource_provider_namespace: str, feature_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.FeatureResult] = kwargs.pop("cls", None) request = build_features_unregister_request( @@ -862,7 +857,7 @@ def get(self, provider_namespace: str, feature_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.SubscriptionFeatureRegistration] = kwargs.pop("cls", None) request = build_subscription_feature_registrations_get_request( @@ -994,7 +989,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"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionFeatureRegistration] = kwargs.pop("cls", None) @@ -1073,7 +1068,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_subscription_feature_registrations_delete_request( @@ -1125,7 +1120,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.SubscriptionFeatureRegistrationList] = kwargs.pop("cls", None) error_map = { @@ -1211,7 +1206,7 @@ def list_all_by_subscription(self, **kwargs: Any) -> Iterable["_models.Subscript _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01")) cls: ClsType[_models.SubscriptionFeatureRegistrationList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/_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/resources/azure-mgmt-resource/azure/mgmt/resource/links/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_configuration.py index 93af381b41488..dc2d8533cb6fe 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/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 @@ -42,7 +36,7 @@ class ManagementLinkClientConfiguration(Configuration): # pylint: disable=too-m def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ManagementLinkClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/_configuration.py index 08fdc0c236c5b..5aebd52651e78 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/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 @@ -42,7 +36,7 @@ class ManagementLinkClientConfiguration(Configuration): # pylint: disable=too-m def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ManagementLinkClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py index b17ed03bcfbcd..0f236654fa242 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py @@ -78,7 +78,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["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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -191,7 +191,7 @@ async def delete(self, link_id: str, **kwargs: Any) -> None: # pylint: disable= _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[None] = kwargs.pop("cls", None) request = build_resource_links_delete_request( @@ -300,7 +300,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.ResourceLink] = kwargs.pop("cls", None) @@ -373,7 +373,7 @@ async def get(self, link_id: str, **kwargs: Any) -> _models.ResourceLink: _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.ResourceLink] = kwargs.pop("cls", None) request = build_resource_links_get_request( @@ -425,7 +425,7 @@ def list_at_subscription( _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.ResourceLinkResult] = kwargs.pop("cls", None) error_map = { @@ -517,7 +517,7 @@ def list_at_source_scope( _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.ResourceLinkResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/_operations.py index b029b191d51cd..a2d2faac7b79e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/operations/_operations.py @@ -45,7 +45,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -63,7 +63,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: def build_resource_links_delete_request(link_id: str, **kwargs: Any) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/{linkId}") path_format_arguments = { @@ -78,11 +78,13 @@ def build_resource_links_delete_request(link_id: str, **kwargs: Any) -> HttpRequ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_resource_links_create_or_update_request(link_id: str, **kwargs: Any) -> HttpRequest: +def build_resource_links_create_or_update_request( # pylint: disable=name-too-long + link_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-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") @@ -109,7 +111,7 @@ def build_resource_links_get_request(link_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-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 @@ -129,13 +131,13 @@ def build_resource_links_get_request(link_id: str, **kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_links_list_at_subscription_request( +def build_resource_links_list_at_subscription_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, **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 @@ -157,13 +159,13 @@ def build_resource_links_list_at_subscription_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_links_list_at_source_scope_request( +def build_resource_links_list_at_source_scope_request( # pylint: disable=name-too-long scope: str, *, filter: Literal["atScope()"] = "atScope()", **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 @@ -216,7 +218,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["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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -329,7 +331,7 @@ def delete(self, link_id: str, **kwargs: Any) -> None: # pylint: disable=incons _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[None] = kwargs.pop("cls", None) request = build_resource_links_delete_request( @@ -438,7 +440,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.ResourceLink] = kwargs.pop("cls", None) @@ -511,7 +513,7 @@ def get(self, link_id: str, **kwargs: Any) -> _models.ResourceLink: _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.ResourceLink] = kwargs.pop("cls", None) request = build_resource_links_get_request( @@ -561,7 +563,7 @@ def list_at_subscription(self, filter: Optional[str] = None, **kwargs: Any) -> I _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.ResourceLinkResult] = kwargs.pop("cls", None) error_map = { @@ -653,7 +655,7 @@ def list_at_source_scope( _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.ResourceLinkResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/_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/resources/azure-mgmt-resource/azure/mgmt/resource/locks/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_configuration.py index a73f79c5acf03..ade5385fbbceb 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_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 ManagementLockClientConfiguration(Configuration): # pylint: disable=too-m def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ManagementLockClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", "2015-01-01") + api_version: str = kwargs.pop("api_version", "2015-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/aio/_configuration.py index 805ace13188de..922e83e18ad74 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_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 ManagementLockClientConfiguration(Configuration): # pylint: disable=too-m def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ManagementLockClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", "2015-01-01") + api_version: str = kwargs.pop("api_version", "2015-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/aio/operations/_operations.py index 3bd82ae5eb35a..15c2c389979a5 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -43,10 +42,6 @@ build_management_locks_list_at_subscription_level_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,7 +155,7 @@ async def create_or_update_at_resource_group_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) @@ -239,7 +234,7 @@ async def delete_at_resource_group_level( # pylint: disable=inconsistent-return _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_resource_group_level_request( @@ -298,7 +293,7 @@ async def get_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_at_resource_group_level_request( @@ -461,7 +456,7 @@ async def create_or_update_at_resource_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) @@ -559,7 +554,7 @@ async def delete_at_resource_level( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_resource_level_request( @@ -669,7 +664,7 @@ async def create_or_update_at_subscription_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) @@ -745,7 +740,7 @@ async def delete_at_subscription_level( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_subscription_level_request( @@ -799,7 +794,7 @@ async def get(self, lock_name: str, **kwargs: Any) -> _models.ManagementLockObje _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_request( @@ -853,7 +848,7 @@ def list_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -961,7 +956,7 @@ def list_at_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -1055,7 +1050,7 @@ def list_at_subscription_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/_operations.py index 2e4b7a0f3d5a0..1f3345cd4f99a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_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, 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]] @@ -41,13 +36,13 @@ _SERIALIZER.client_side_validation = False -def build_management_locks_create_or_update_at_resource_group_level_request( +def build_management_locks_create_or_update_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -77,12 +72,12 @@ def build_management_locks_create_or_update_at_resource_group_level_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_delete_at_resource_group_level_request( +def build_management_locks_delete_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -104,13 +99,13 @@ def build_management_locks_delete_at_resource_group_level_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_management_locks_get_at_resource_group_level_request( +def build_management_locks_get_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +132,7 @@ def build_management_locks_get_at_resource_group_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_create_or_update_at_resource_level_request( +def build_management_locks_create_or_update_at_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -150,7 +145,7 @@ def build_management_locks_create_or_update_at_resource_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -184,7 +179,7 @@ def build_management_locks_create_or_update_at_resource_level_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_delete_at_resource_level_request( +def build_management_locks_delete_at_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -196,7 +191,7 @@ def build_management_locks_delete_at_resource_level_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -222,13 +217,13 @@ def build_management_locks_delete_at_resource_level_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_management_locks_create_or_update_at_subscription_level_request( +def build_management_locks_create_or_update_at_subscription_level_request( # pylint: disable=name-too-long lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -254,12 +249,12 @@ def build_management_locks_create_or_update_at_subscription_level_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_delete_at_subscription_level_request( +def build_management_locks_delete_at_subscription_level_request( # pylint: disable=name-too-long lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}" @@ -281,7 +276,7 @@ def build_management_locks_get_request(lock_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -304,13 +299,13 @@ def build_management_locks_get_request(lock_name: str, subscription_id: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_list_at_resource_group_level_request( +def build_management_locks_list_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -338,7 +333,7 @@ def build_management_locks_list_at_resource_group_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_list_at_resource_level_request( +def build_management_locks_list_at_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -352,7 +347,7 @@ def build_management_locks_list_at_resource_level_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -384,13 +379,13 @@ def build_management_locks_list_at_resource_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_list_at_subscription_level_request( +def build_management_locks_list_at_subscription_level_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -521,7 +516,7 @@ def create_or_update_at_resource_group_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) @@ -600,7 +595,7 @@ def delete_at_resource_group_level( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_resource_group_level_request( @@ -659,7 +654,7 @@ def get_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_at_resource_group_level_request( @@ -822,7 +817,7 @@ def create_or_update_at_resource_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) @@ -920,7 +915,7 @@ def delete_at_resource_level( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_resource_level_request( @@ -1030,7 +1025,7 @@ def create_or_update_at_subscription_level( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) @@ -1106,7 +1101,7 @@ def delete_at_subscription_level( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_subscription_level_request( @@ -1160,7 +1155,7 @@ def get(self, lock_name: str, **kwargs: Any) -> _models.ManagementLockObject: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_request( @@ -1214,7 +1209,7 @@ def list_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -1322,7 +1317,7 @@ def list_at_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -1416,7 +1411,7 @@ def list_at_subscription_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-01-01")) cls: ClsType[_models.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_configuration.py index d2a5da467cfa2..3a7539d409639 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/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 @@ -42,7 +36,7 @@ class ManagementLockClientConfiguration(Configuration): # pylint: disable=too-m def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ManagementLockClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/aio/_configuration.py index 32fc153c90b64..e1021bd97de6b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/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 @@ -42,7 +36,7 @@ class ManagementLockClientConfiguration(Configuration): # pylint: disable=too-m def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ManagementLockClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/aio/operations/_operations.py index bf8caf7bdfddf..3c989f772c200 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -49,10 +48,6 @@ build_management_locks_list_by_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]] @@ -89,7 +84,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["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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -284,7 +279,7 @@ async def create_or_update_at_resource_group_level( _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.ManagementLockObject] = kwargs.pop("cls", None) @@ -367,7 +362,7 @@ async def delete_at_resource_group_level( # pylint: disable=inconsistent-return _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[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_resource_group_level_request( @@ -426,7 +421,7 @@ async def get_at_resource_group_level( _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.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_at_resource_group_level_request( @@ -555,7 +550,7 @@ async def create_or_update_by_scope( _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.ManagementLockObject] = kwargs.pop("cls", None) @@ -631,7 +626,7 @@ async def delete_by_scope( # pylint: disable=inconsistent-return-statements _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[None] = kwargs.pop("cls", None) request = build_management_locks_delete_by_scope_request( @@ -685,7 +680,7 @@ async def get_by_scope(self, scope: str, lock_name: str, **kwargs: Any) -> _mode _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.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_by_scope_request( @@ -869,7 +864,7 @@ async def create_or_update_at_resource_level( _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.ManagementLockObject] = kwargs.pop("cls", None) @@ -973,7 +968,7 @@ async def delete_at_resource_level( # pylint: disable=inconsistent-return-state _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[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_resource_level_request( @@ -1052,7 +1047,7 @@ async def get_at_resource_level( _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.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_at_resource_level_request( @@ -1184,7 +1179,7 @@ async def create_or_update_at_subscription_level( _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.ManagementLockObject] = kwargs.pop("cls", None) @@ -1264,7 +1259,7 @@ async def delete_at_subscription_level( # pylint: disable=inconsistent-return-s _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[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_subscription_level_request( @@ -1318,7 +1313,7 @@ async def get_at_subscription_level(self, lock_name: str, **kwargs: Any) -> _mod _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.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_at_subscription_level_request( @@ -1375,7 +1370,7 @@ def list_at_resource_group_level( _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.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -1483,7 +1478,7 @@ def list_at_resource_level( _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.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -1577,7 +1572,7 @@ def list_at_subscription_level( _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.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -1672,7 +1667,7 @@ def list_by_scope( _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.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/_operations.py index ba15dddf1d919..2a35e1cd7f6dc 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_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, 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]] @@ -41,11 +36,11 @@ _SERIALIZER.client_side_validation = False -def build_authorization_operations_list_request(**kwargs: Any) -> HttpRequest: +def build_authorization_operations_list_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _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 @@ -60,13 +55,13 @@ def build_authorization_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_create_or_update_at_resource_group_level_request( +def build_management_locks_create_or_update_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -96,12 +91,12 @@ def build_management_locks_create_or_update_at_resource_group_level_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_delete_at_resource_group_level_request( +def build_management_locks_delete_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -123,13 +118,13 @@ def build_management_locks_delete_at_resource_group_level_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_management_locks_get_at_resource_group_level_request( +def build_management_locks_get_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -156,11 +151,13 @@ def build_management_locks_get_at_resource_group_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_create_or_update_by_scope_request(scope: str, lock_name: str, **kwargs: Any) -> HttpRequest: +def build_management_locks_create_or_update_by_scope_request( # pylint: disable=name-too-long + scope: str, lock_name: 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") @@ -184,10 +181,12 @@ def build_management_locks_create_or_update_by_scope_request(scope: str, lock_na return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_delete_by_scope_request(scope: str, lock_name: str, **kwargs: Any) -> HttpRequest: +def build_management_locks_delete_by_scope_request( # pylint: disable=name-too-long + scope: str, lock_name: str, **kwargs: Any +) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/{scope}/providers/Microsoft.Authorization/locks/{lockName}") path_format_arguments = { @@ -203,11 +202,13 @@ def build_management_locks_delete_by_scope_request(scope: str, lock_name: str, * return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_management_locks_get_by_scope_request(scope: str, lock_name: str, **kwargs: Any) -> HttpRequest: +def build_management_locks_get_by_scope_request( # pylint: disable=name-too-long + scope: str, lock_name: 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 @@ -228,7 +229,7 @@ def build_management_locks_get_by_scope_request(scope: str, lock_name: str, **kw return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_create_or_update_at_resource_level_request( +def build_management_locks_create_or_update_at_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -241,7 +242,7 @@ def build_management_locks_create_or_update_at_resource_level_request( _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") @@ -275,7 +276,7 @@ def build_management_locks_create_or_update_at_resource_level_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_delete_at_resource_level_request( +def build_management_locks_delete_at_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -287,7 +288,7 @@ def build_management_locks_delete_at_resource_level_request( ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -313,7 +314,7 @@ def build_management_locks_delete_at_resource_level_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_management_locks_get_at_resource_level_request( +def build_management_locks_get_at_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -326,7 +327,7 @@ def build_management_locks_get_at_resource_level_request( _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 @@ -357,13 +358,13 @@ def build_management_locks_get_at_resource_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_create_or_update_at_subscription_level_request( +def build_management_locks_create_or_update_at_subscription_level_request( # pylint: disable=name-too-long lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -389,12 +390,12 @@ def build_management_locks_create_or_update_at_subscription_level_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_delete_at_subscription_level_request( +def build_management_locks_delete_at_subscription_level_request( # pylint: disable=name-too-long lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}" @@ -412,13 +413,13 @@ def build_management_locks_delete_at_subscription_level_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_management_locks_get_at_subscription_level_request( +def build_management_locks_get_at_subscription_level_request( # pylint: disable=name-too-long lock_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -441,13 +442,13 @@ def build_management_locks_get_at_subscription_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_list_at_resource_group_level_request( +def build_management_locks_list_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **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 @@ -475,7 +476,7 @@ def build_management_locks_list_at_resource_group_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_list_at_resource_level_request( +def build_management_locks_list_at_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -489,7 +490,7 @@ def build_management_locks_list_at_resource_level_request( _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 @@ -521,13 +522,13 @@ def build_management_locks_list_at_resource_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_list_at_subscription_level_request( +def build_management_locks_list_at_subscription_level_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, **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 @@ -549,13 +550,13 @@ def build_management_locks_list_at_subscription_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_management_locks_list_by_scope_request( +def build_management_locks_list_by_scope_request( # pylint: disable=name-too-long scope: str, *, filter: Optional[str] = None, **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 @@ -608,7 +609,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["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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -803,7 +804,7 @@ def create_or_update_at_resource_group_level( _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.ManagementLockObject] = kwargs.pop("cls", None) @@ -886,7 +887,7 @@ def delete_at_resource_group_level( # pylint: disable=inconsistent-return-state _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[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_resource_group_level_request( @@ -945,7 +946,7 @@ def get_at_resource_group_level( _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.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_at_resource_group_level_request( @@ -1074,7 +1075,7 @@ def create_or_update_by_scope( _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.ManagementLockObject] = kwargs.pop("cls", None) @@ -1150,7 +1151,7 @@ def delete_by_scope( # pylint: disable=inconsistent-return-statements _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[None] = kwargs.pop("cls", None) request = build_management_locks_delete_by_scope_request( @@ -1204,7 +1205,7 @@ def get_by_scope(self, scope: str, lock_name: str, **kwargs: Any) -> _models.Man _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.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_by_scope_request( @@ -1388,7 +1389,7 @@ def create_or_update_at_resource_level( _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.ManagementLockObject] = kwargs.pop("cls", None) @@ -1492,7 +1493,7 @@ def delete_at_resource_level( # pylint: disable=inconsistent-return-statements _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[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_resource_level_request( @@ -1571,7 +1572,7 @@ def get_at_resource_level( _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.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_at_resource_level_request( @@ -1703,7 +1704,7 @@ def create_or_update_at_subscription_level( _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.ManagementLockObject] = kwargs.pop("cls", None) @@ -1783,7 +1784,7 @@ def delete_at_subscription_level( # pylint: disable=inconsistent-return-stateme _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[None] = kwargs.pop("cls", None) request = build_management_locks_delete_at_subscription_level_request( @@ -1837,7 +1838,7 @@ def get_at_subscription_level(self, lock_name: str, **kwargs: Any) -> _models.Ma _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.ManagementLockObject] = kwargs.pop("cls", None) request = build_management_locks_get_at_subscription_level_request( @@ -1894,7 +1895,7 @@ def list_at_resource_group_level( _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.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -2002,7 +2003,7 @@ def list_at_resource_level( _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.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -2096,7 +2097,7 @@ def list_at_subscription_level( _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.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { @@ -2191,7 +2192,7 @@ def list_by_scope( _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.ManagementLockListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_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/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_configuration.py index 50052d1bfef80..a92c3e253726a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_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 ApplicationClientConfiguration(Configuration): # pylint: disable=too-many def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ApplicationClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", "2019-07-01") + api_version: str = kwargs.pop("api_version", "2019-07-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/aio/_configuration.py index f902df95544f8..bd2c79717b317 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_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 ApplicationClientConfiguration(Configuration): # pylint: disable=too-many def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ApplicationClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", "2019-07-01") + api_version: str = kwargs.pop("api_version", "2019-07-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/aio/operations/_operations.py index 38aec5fbd9863..69be9b1cbdc95 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -60,10 +59,6 @@ ) from .._vendor import ApplicationClientMixinABC -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 @@ def list_operations(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -194,7 +189,7 @@ async def get(self, resource_group_name: str, application_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Application] = kwargs.pop("cls", None) request = build_applications_get_request( @@ -246,7 +241,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_applications_delete_request( @@ -306,7 +301,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -360,7 +355,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) @@ -522,7 +517,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -667,7 +662,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Application]] = kwargs.pop("cls", None) @@ -738,7 +733,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationListResult] = kwargs.pop("cls", None) error_map = { @@ -823,7 +818,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Applicat _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationListResult] = kwargs.pop("cls", None) error_map = { @@ -919,7 +914,7 @@ async def get_by_id(self, application_id: str, **kwargs: Any) -> _models.Applica _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Application] = kwargs.pop("cls", None) request = build_applications_get_by_id_request( @@ -967,7 +962,7 @@ async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statemen _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_applications_delete_by_id_request( @@ -1021,7 +1016,7 @@ async def begin_delete_by_id(self, application_id: str, **kwargs: Any) -> AsyncL _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -1072,7 +1067,7 @@ async def _create_or_update_by_id_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) @@ -1223,7 +1218,7 @@ async def begin_create_or_update_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1357,7 +1352,7 @@ async def update_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) @@ -1420,7 +1415,7 @@ async def _refresh_permissions_initial( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_applications_refresh_permissions_request( @@ -1480,7 +1475,7 @@ async def begin_refresh_permissions( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -1567,7 +1562,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) request = build_application_definitions_get_request( @@ -1619,7 +1614,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_application_definitions_delete_request( @@ -1680,7 +1675,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -1738,7 +1733,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) @@ -1908,7 +1903,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1972,7 +1967,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2071,7 +2066,7 @@ async def get_by_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) request = build_application_definitions_get_by_id_request( @@ -2123,7 +2118,7 @@ async def _delete_by_id_initial( # pylint: disable=inconsistent-return-statemen _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_application_definitions_delete_by_id_request( @@ -2183,7 +2178,7 @@ async def begin_delete_by_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -2241,7 +2236,7 @@ async def _create_or_update_by_id_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) @@ -2411,7 +2406,7 @@ async def begin_create_or_update_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2501,7 +2496,7 @@ async def get(self, resource_group_name: str, jit_request_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.JitRequestDefinition] = kwargs.pop("cls", None) request = build_jit_requests_get_request( @@ -2557,7 +2552,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.JitRequestDefinition] = kwargs.pop("cls", None) @@ -2725,7 +2720,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.JitRequestDefinition] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2865,7 +2860,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.JitRequestDefinition] = kwargs.pop("cls", None) @@ -2942,7 +2937,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_jit_requests_delete_request( @@ -2997,7 +2992,7 @@ async def list_by_subscription(self, **kwargs: Any) -> _models.JitRequestDefinit _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.JitRequestDefinitionListResult] = kwargs.pop("cls", None) request = build_jit_requests_list_by_subscription_request( @@ -3057,7 +3052,7 @@ async def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.JitRequestDefinitionListResult] = kwargs.pop("cls", None) request = build_jit_requests_list_by_resource_group_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/operations/_operations.py index 0b60709935cb6..3b1cf1b212314 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_07_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications/v2019_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, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import ApplicationClientMixinABC, _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,11 +38,11 @@ _SERIALIZER.client_side_validation = False -def build_application_list_operations_request(**kwargs: Any) -> HttpRequest: +def build_application_list_operations_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -68,7 +63,7 @@ def build_applications_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -101,7 +96,7 @@ def build_applications_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -128,13 +123,13 @@ def build_applications_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_applications_create_or_update_request( +def build_applications_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, application_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -170,7 +165,7 @@ def build_applications_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -200,13 +195,13 @@ def build_applications_update_request( return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_applications_list_by_resource_group_request( +def build_applications_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -232,11 +227,13 @@ def build_applications_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_applications_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_applications_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -260,7 +257,7 @@ def build_applications_get_by_id_request(application_id: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -284,7 +281,7 @@ def build_applications_delete_by_id_request(application_id: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -304,11 +301,13 @@ def build_applications_delete_by_id_request(application_id: str, **kwargs: Any) return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_applications_create_or_update_by_id_request(application_id: str, **kwargs: Any) -> HttpRequest: +def build_applications_create_or_update_by_id_request( # pylint: disable=name-too-long + application_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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -335,7 +334,7 @@ def build_applications_update_by_id_request(application_id: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -358,13 +357,13 @@ def build_applications_update_by_id_request(application_id: str, **kwargs: Any) return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_applications_refresh_permissions_request( +def build_applications_refresh_permissions_request( # pylint: disable=name-too-long resource_group_name: str, application_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -391,13 +390,13 @@ def build_applications_refresh_permissions_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_application_definitions_get_request( +def build_application_definitions_get_request( # pylint: disable=name-too-long resource_group_name: str, application_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -426,13 +425,13 @@ def build_application_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_application_definitions_delete_request( +def build_application_definitions_delete_request( # pylint: disable=name-too-long resource_group_name: str, application_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -461,13 +460,13 @@ def build_application_definitions_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_application_definitions_create_or_update_request( +def build_application_definitions_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, application_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -499,13 +498,13 @@ def build_application_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_application_definitions_list_by_resource_group_request( +def build_application_definitions_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -531,13 +530,13 @@ def build_application_definitions_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_application_definitions_get_by_id_request( +def build_application_definitions_get_by_id_request( # pylint: disable=name-too-long resource_group_name: str, application_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -566,13 +565,13 @@ def build_application_definitions_get_by_id_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_application_definitions_delete_by_id_request( +def build_application_definitions_delete_by_id_request( # pylint: disable=name-too-long resource_group_name: str, application_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -601,13 +600,13 @@ def build_application_definitions_delete_by_id_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_application_definitions_create_or_update_by_id_request( +def build_application_definitions_create_or_update_by_id_request( # pylint: disable=name-too-long resource_group_name: str, application_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -645,7 +644,7 @@ def build_jit_requests_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -672,13 +671,13 @@ def build_jit_requests_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_jit_requests_create_or_update_request( +def build_jit_requests_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, jit_request_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -714,7 +713,7 @@ def build_jit_requests_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -750,7 +749,7 @@ def build_jit_requests_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -777,11 +776,13 @@ def build_jit_requests_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_jit_requests_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_jit_requests_list_by_subscription_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -801,13 +802,13 @@ def build_jit_requests_list_by_subscription_request(subscription_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_jit_requests_list_by_resource_group_request( +def build_jit_requests_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -847,7 +848,7 @@ def list_operations(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -959,7 +960,7 @@ def get(self, resource_group_name: str, application_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Application] = kwargs.pop("cls", None) request = build_applications_get_request( @@ -1011,7 +1012,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_applications_delete_request( @@ -1069,7 +1070,7 @@ def begin_delete(self, resource_group_name: str, application_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -1123,7 +1124,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) @@ -1285,7 +1286,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1430,7 +1431,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Application]] = kwargs.pop("cls", None) @@ -1501,7 +1502,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["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationListResult] = kwargs.pop("cls", None) error_map = { @@ -1586,7 +1587,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.Application"] _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationListResult] = kwargs.pop("cls", None) error_map = { @@ -1682,7 +1683,7 @@ def get_by_id(self, application_id: str, **kwargs: Any) -> _models.Application: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Application] = kwargs.pop("cls", None) request = build_applications_get_by_id_request( @@ -1730,7 +1731,7 @@ def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_applications_delete_by_id_request( @@ -1784,7 +1785,7 @@ def begin_delete_by_id(self, application_id: str, **kwargs: Any) -> LROPoller[No _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -1835,7 +1836,7 @@ def _create_or_update_by_id_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) @@ -1986,7 +1987,7 @@ def begin_create_or_update_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2120,7 +2121,7 @@ def update_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Application] = kwargs.pop("cls", None) @@ -2183,7 +2184,7 @@ def _refresh_permissions_initial( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_applications_refresh_permissions_request( @@ -2243,7 +2244,7 @@ def begin_refresh_permissions( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -2330,7 +2331,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) request = build_application_definitions_get_request( @@ -2382,7 +2383,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_application_definitions_delete_request( @@ -2443,7 +2444,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -2501,7 +2502,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) @@ -2671,7 +2672,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2735,7 +2736,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2834,7 +2835,7 @@ def get_by_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) request = build_application_definitions_get_by_id_request( @@ -2886,7 +2887,7 @@ def _delete_by_id_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_application_definitions_delete_by_id_request( @@ -2946,7 +2947,7 @@ def begin_delete_by_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -3004,7 +3005,7 @@ def _create_or_update_by_id_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) @@ -3174,7 +3175,7 @@ def begin_create_or_update_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ApplicationDefinition] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3264,7 +3265,7 @@ def get(self, resource_group_name: str, jit_request_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.JitRequestDefinition] = kwargs.pop("cls", None) request = build_jit_requests_get_request( @@ -3320,7 +3321,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.JitRequestDefinition] = kwargs.pop("cls", None) @@ -3488,7 +3489,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.JitRequestDefinition] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3628,7 +3629,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.JitRequestDefinition] = kwargs.pop("cls", None) @@ -3705,7 +3706,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_jit_requests_delete_request( @@ -3760,7 +3761,7 @@ def list_by_subscription(self, **kwargs: Any) -> _models.JitRequestDefinitionLis _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.JitRequestDefinitionListResult] = kwargs.pop("cls", None) request = build_jit_requests_list_by_subscription_request( @@ -3818,7 +3819,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.JitRequestDefinitionListResult] = kwargs.pop("cls", None) request = build_jit_requests_list_by_resource_group_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/_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/resources/azure-mgmt-resource/azure/mgmt/resource/policy/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_configuration.py index fce4eb36f1bfc..cce977bf30350 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2015-10-01-preview"] = kwargs.pop("api_version", "2015-10-01-preview") + api_version: str = kwargs.pop("api_version", "2015-10-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/_configuration.py index 818eef3454653..a09374fc7ce77 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2015-10-01-preview"] = kwargs.pop("api_version", "2015-10-01-preview") + api_version: str = kwargs.pop("api_version", "2015-10-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/operations/_operations.py index 6f2aa36b66f46..1d37d639d15d2 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -45,10 +44,6 @@ build_policy_definitions_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]] @@ -96,9 +91,7 @@ async def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -227,9 +220,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -299,9 +290,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -355,9 +344,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -464,9 +451,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -557,9 +542,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -658,9 +641,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -796,9 +777,7 @@ async def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -873,9 +852,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1001,9 +978,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-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1075,9 +1050,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-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1131,9 +1104,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1184,9 +1155,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/_operations.py index 2ed2ab656283b..7cfc7a09038a7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2015_10_01_preview/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, 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_policy_assignments_delete_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -74,9 +67,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -106,9 +97,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -131,15 +120,13 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -167,7 +154,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -181,9 +168,7 @@ def build_policy_assignments_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -221,9 +206,7 @@ def build_policy_assignments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -247,13 +230,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -273,13 +256,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -302,13 +285,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -328,15 +311,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -368,9 +349,7 @@ def build_policy_definitions_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) # Construct URL _url = kwargs.pop( "template_url", @@ -395,9 +374,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -427,9 +404,7 @@ def build_policy_definitions_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -496,9 +471,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -627,9 +600,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -699,9 +670,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -755,9 +724,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -864,9 +831,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -957,9 +922,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1058,9 +1021,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.Poli _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1196,9 +1157,7 @@ def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1273,9 +1232,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1401,9 +1358,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-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1475,9 +1430,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-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1531,9 +1484,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1584,9 +1535,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2015-10-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-01-preview")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_configuration.py index 335e32683eb3a..892cf3a044353 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", "2016-04-01") + api_version: str = kwargs.pop("api_version", "2016-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/aio/_configuration.py index 7dae5cd1d493d..3314867d39e6a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", "2016-04-01") + api_version: str = kwargs.pop("api_version", "2016-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/aio/operations/_operations.py index fcff231ee6679..2886caf233c43 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -45,10 +44,6 @@ build_policy_definitions_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]] @@ -96,7 +91,7 @@ async def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -225,7 +220,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -295,7 +290,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -349,7 +344,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -456,7 +451,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -547,7 +542,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -646,7 +641,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -782,7 +777,7 @@ async def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -857,7 +852,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -983,7 +978,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-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1055,7 +1050,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-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1109,7 +1104,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1160,7 +1155,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/_operations.py index cd94f79a8e9ce..b6ff62babc1d5 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_04_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_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, 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_policy_assignments_delete_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -72,7 +67,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -102,7 +97,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -125,13 +120,13 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -159,7 +154,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -173,7 +168,7 @@ def build_policy_assignments_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -211,7 +206,7 @@ def build_policy_assignments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -235,11 +230,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -259,11 +256,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -286,11 +285,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -310,13 +311,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -348,7 +349,7 @@ def build_policy_definitions_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -373,7 +374,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -403,7 +404,7 @@ def build_policy_definitions_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -470,7 +471,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -599,7 +600,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -669,7 +670,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -723,7 +724,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -830,7 +831,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -921,7 +922,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1020,7 +1021,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.Poli _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1156,7 +1157,7 @@ def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1231,7 +1232,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1357,7 +1358,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-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1429,7 +1430,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-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1483,7 +1484,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1534,7 +1535,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-04-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_configuration.py index 0fe52652d525e..67bb2387a4b0c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", "2016-12-01") + api_version: str = kwargs.pop("api_version", "2016-12-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/aio/_configuration.py index b276431cee295..e6a486d94268a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", "2016-12-01") + api_version: str = kwargs.pop("api_version", "2016-12-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/aio/operations/_operations.py index 0e5d6e65caca3..f195b1a24cdc1 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -51,10 +50,6 @@ build_policy_definitions_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]] @@ -151,7 +146,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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -223,7 +218,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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -277,7 +272,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -335,7 +330,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -458,7 +453,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -532,7 +527,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -590,7 +585,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -639,7 +634,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -720,7 +715,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -804,7 +799,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -920,7 +915,7 @@ async def delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -1051,7 +1046,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1121,7 +1116,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -1175,7 +1170,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1282,7 +1277,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1373,7 +1368,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1472,7 +1467,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1608,7 +1603,7 @@ async def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1683,7 +1678,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/_operations.py index a8f415979506e..4f6e6bdff6fa7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_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, 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]] @@ -41,13 +36,13 @@ _SERIALIZER.client_side_validation = False -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -79,7 +74,7 @@ def build_policy_definitions_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -104,7 +99,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -128,11 +123,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -152,13 +149,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -185,12 +182,12 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, management_group_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -209,13 +206,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -243,7 +240,7 @@ def build_policy_definitions_list_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["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -265,11 +262,11 @@ def build_policy_definitions_list_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -284,11 +281,13 @@ def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request(management_group_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long + 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["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -315,7 +314,7 @@ def build_policy_assignments_delete_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -342,7 +341,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -372,7 +371,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -395,13 +394,13 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -429,7 +428,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -443,7 +442,7 @@ def build_policy_assignments_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -481,7 +480,7 @@ def build_policy_assignments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -505,11 +504,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -529,11 +530,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -556,11 +559,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -672,7 +677,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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -744,7 +749,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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -798,7 +803,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -856,7 +861,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -979,7 +984,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1053,7 +1058,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -1111,7 +1116,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -1160,7 +1165,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1241,7 +1246,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1323,7 +1328,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1437,7 +1442,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -1568,7 +1573,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1638,7 +1643,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -1692,7 +1697,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1799,7 +1804,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1890,7 +1895,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1989,7 +1994,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.Poli _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -2125,7 +2130,7 @@ def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -2200,7 +2205,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/aio/operations/_operations.py index f7616e068823f..2292fc1834a9a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -60,10 +59,6 @@ build_policy_set_definitions_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]] @@ -113,9 +108,7 @@ async def delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -247,9 +240,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -320,9 +311,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -377,9 +366,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -476,9 +463,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -559,9 +544,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -650,9 +633,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -789,9 +770,7 @@ async def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -867,9 +846,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -997,9 +974,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-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -1076,9 +1051,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-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -1133,9 +1106,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -1194,9 +1165,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -1243,9 +1212,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1316,9 +1283,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1466,9 +1431,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -1547,9 +1510,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -1608,9 +1569,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -1664,9 +1623,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1819,7 +1776,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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1891,7 +1848,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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1945,7 +1902,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -2003,7 +1960,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2126,7 +2083,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2200,7 +2157,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -2258,7 +2215,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -2307,7 +2264,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2377,7 +2334,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2450,7 +2407,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/_operations.py index fd3de3eace13d..e2b44765c4d93 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/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, 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,9 +39,7 @@ def build_policy_assignments_delete_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -73,9 +66,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -105,9 +96,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -130,15 +119,13 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -166,7 +153,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -180,9 +167,7 @@ def build_policy_assignments_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -220,9 +205,7 @@ def build_policy_assignments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -246,13 +229,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -272,13 +255,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -301,13 +284,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -327,15 +310,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_request( +def build_policy_set_definitions_create_or_update_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -362,15 +343,13 @@ def build_policy_set_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_request( +def build_policy_set_definitions_delete_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -400,9 +379,7 @@ def build_policy_set_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -426,13 +403,13 @@ def build_policy_set_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_built_in_request(policy_set_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_set_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -454,13 +431,13 @@ def build_policy_set_definitions_get_built_in_request(policy_set_definition_name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -482,13 +459,11 @@ def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: An return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -503,15 +478,13 @@ def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_at_management_group_request( +def build_policy_set_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -538,15 +511,13 @@ def build_policy_set_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_at_management_group_request( +def build_policy_set_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -570,15 +541,13 @@ def build_policy_set_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_at_management_group_request( +def build_policy_set_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -602,15 +571,13 @@ def build_policy_set_definitions_get_at_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_by_management_group_request( +def build_policy_set_definitions_list_by_management_group_request( # pylint: disable=name-too-long 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["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -633,13 +600,13 @@ def build_policy_set_definitions_list_by_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -671,7 +638,7 @@ def build_policy_definitions_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -696,7 +663,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -720,11 +687,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -744,13 +713,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json, text/json") @@ -777,12 +746,12 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, management_group_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -801,13 +770,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -835,7 +804,7 @@ def build_policy_definitions_list_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["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -857,11 +826,11 @@ def build_policy_definitions_list_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -876,11 +845,13 @@ def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request(management_group_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long + 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["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) accept = _headers.pop("Accept", "application/json, text/json") # Construct URL @@ -946,9 +917,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -1080,9 +1049,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1153,9 +1120,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -1210,9 +1175,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1309,9 +1272,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1392,9 +1353,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1483,9 +1442,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.Poli _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1622,9 +1579,7 @@ def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1700,9 +1655,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1830,9 +1783,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-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -1909,9 +1860,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-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -1966,9 +1915,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2027,9 +1974,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -2076,9 +2021,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2149,9 +2092,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2299,9 +2240,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2380,9 +2319,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -2441,9 +2378,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -2497,9 +2432,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-06-01-preview")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2652,7 +2585,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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2724,7 +2657,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-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -2778,7 +2711,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -2836,7 +2769,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2959,7 +2892,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -3033,7 +2966,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -3091,7 +3024,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -3140,7 +3073,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3210,7 +3143,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3281,7 +3214,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-12-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-12-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_configuration.py index 2719c69b9a51b..3ccfbd5b2ffc8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/aio/_configuration.py index fa185be4e1259..f412ec51b4bd4 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/aio/operations/_operations.py index 9b3a2475cd001..b73aa912be9ce 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -61,10 +60,6 @@ build_policy_set_definitions_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]] @@ -123,7 +118,7 @@ async def delete( _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -273,7 +268,7 @@ async def create( _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.PolicyAssignment] = kwargs.pop("cls", None) @@ -352,7 +347,7 @@ async def get(self, scope: str, policy_assignment_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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -420,7 +415,7 @@ def list_for_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -556,7 +551,7 @@ def list_for_resource( _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -661,7 +656,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -762,7 +757,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -907,7 +902,7 @@ async def create_by_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -985,7 +980,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1121,7 +1116,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.PolicyDefinition] = kwargs.pop("cls", None) @@ -1195,7 +1190,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_policy_definitions_delete_request( @@ -1251,7 +1246,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1311,7 +1306,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -1443,7 +1438,7 @@ async def create_or_update_at_management_group( _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.PolicyDefinition] = kwargs.pop("cls", None) @@ -1519,7 +1514,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _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_policy_definitions_delete_at_management_group_request( @@ -1580,7 +1575,7 @@ async def get_at_management_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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -1631,7 +1626,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1714,7 +1709,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1800,7 +1795,7 @@ def list_by_management_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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1972,7 +1967,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.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2051,7 +2046,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_policy_set_definitions_delete_request( @@ -2109,7 +2104,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P _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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2170,7 +2165,7 @@ async def get_built_in(self, policy_set_definition_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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -2219,7 +2214,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: _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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2303,7 +2298,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini _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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2470,7 +2465,7 @@ async def create_or_update_at_management_group( _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.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2552,7 +2547,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _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_policy_set_definitions_delete_at_management_group_request( @@ -2614,7 +2609,7 @@ async def get_at_management_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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -2671,7 +2666,7 @@ def list_by_management_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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/operations/_operations.py index a0e74293fbcea..607f85378e713 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_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, 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_policy_assignments_delete_request(scope: str, policy_assignment_name: _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 @@ -72,7 +67,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _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") @@ -102,7 +97,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _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 @@ -125,13 +120,13 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -159,7 +154,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -173,7 +168,7 @@ def build_policy_assignments_list_for_resource_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 @@ -211,7 +206,7 @@ def build_policy_assignments_list_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 @@ -235,11 +230,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-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,11 +256,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-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") @@ -286,11 +285,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-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 @@ -310,13 +311,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -348,7 +349,7 @@ def build_policy_definitions_delete_request( ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -373,7 +374,7 @@ def build_policy_definitions_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 @@ -397,11 +398,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -421,13 +424,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["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") @@ -454,12 +457,12 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, management_group_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -478,13 +481,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["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 @@ -512,7 +515,7 @@ def build_policy_definitions_list_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 @@ -534,11 +537,11 @@ def build_policy_definitions_list_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _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 @@ -553,11 +556,13 @@ def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request(management_group_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long + 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["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 @@ -580,13 +585,13 @@ def build_policy_definitions_list_by_management_group_request(management_group_i return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_request( +def build_policy_set_definitions_create_or_update_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -613,13 +618,13 @@ def build_policy_set_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_request( +def build_policy_set_definitions_delete_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -649,7 +654,7 @@ def build_policy_set_definitions_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 @@ -673,11 +678,13 @@ def build_policy_set_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_built_in_request(policy_set_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_set_definition_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -699,11 +706,13 @@ def build_policy_set_definitions_get_built_in_request(policy_set_definition_name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -725,11 +734,11 @@ def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: An return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _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 @@ -744,13 +753,13 @@ def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_at_management_group_request( +def build_policy_set_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["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") @@ -777,13 +786,13 @@ def build_policy_set_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_at_management_group_request( +def build_policy_set_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["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 @@ -807,13 +816,13 @@ def build_policy_set_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_at_management_group_request( +def build_policy_set_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["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 @@ -837,13 +846,13 @@ def build_policy_set_definitions_get_at_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_by_management_group_request( +def build_policy_set_definitions_list_by_management_group_request( # pylint: disable=name-too-long 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["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 @@ -918,7 +927,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -1068,7 +1077,7 @@ def create( _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.PolicyAssignment] = kwargs.pop("cls", None) @@ -1147,7 +1156,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -1215,7 +1224,7 @@ def list_for_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1351,7 +1360,7 @@ def list_for_resource( _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1456,7 +1465,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1557,7 +1566,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1702,7 +1711,7 @@ def create_by_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1780,7 +1789,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1916,7 +1925,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.PolicyDefinition] = kwargs.pop("cls", None) @@ -1990,7 +1999,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_policy_definitions_delete_request( @@ -2046,7 +2055,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -2106,7 +2115,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2238,7 +2247,7 @@ def create_or_update_at_management_group( _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.PolicyDefinition] = kwargs.pop("cls", None) @@ -2314,7 +2323,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _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_policy_definitions_delete_at_management_group_request( @@ -2375,7 +2384,7 @@ def get_at_management_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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -2426,7 +2435,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2509,7 +2518,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2593,7 +2602,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2765,7 +2774,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.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2844,7 +2853,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_policy_set_definitions_delete_request( @@ -2902,7 +2911,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS _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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2963,7 +2972,7 @@ def get_built_in(self, policy_set_definition_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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -3012,7 +3021,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: _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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3096,7 +3105,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" _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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3263,7 +3272,7 @@ def create_or_update_at_management_group( _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.PolicySetDefinition] = kwargs.pop("cls", None) @@ -3345,7 +3354,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _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_policy_set_definitions_delete_at_management_group_request( @@ -3407,7 +3416,7 @@ def get_at_management_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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -3464,7 +3473,7 @@ def list_by_management_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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_configuration.py index 9e6200376bc74..09609604cee8b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", "2018-05-01") + api_version: str = kwargs.pop("api_version", "2018-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/aio/_configuration.py index 7105ef472075a..a23acd66d9489 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", "2018-05-01") + api_version: str = kwargs.pop("api_version", "2018-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/aio/operations/_operations.py index 36973b87ed61d..dd9c0fb443f08 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -61,10 +60,6 @@ build_policy_set_definitions_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]] @@ -123,7 +118,7 @@ async def delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -273,7 +268,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -352,7 +347,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -420,7 +415,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -556,7 +551,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -661,7 +656,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -762,7 +757,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -907,7 +902,7 @@ async def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -985,7 +980,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1121,7 +1116,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1195,7 +1190,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1251,7 +1246,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1311,7 +1306,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -1443,7 +1438,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1519,7 +1514,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -1580,7 +1575,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -1631,7 +1626,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1714,7 +1709,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1800,7 +1795,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1972,7 +1967,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2051,7 +2046,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -2109,7 +2104,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2170,7 +2165,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -2219,7 +2214,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2303,7 +2298,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2470,7 +2465,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2552,7 +2547,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -2614,7 +2609,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -2671,7 +2666,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/operations/_operations.py index ada2100adf09f..de78c1f5da6b2 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_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, 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_policy_assignments_delete_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +67,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -102,7 +97,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -125,13 +120,13 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -159,7 +154,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -173,7 +168,7 @@ def build_policy_assignments_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -211,7 +206,7 @@ def build_policy_assignments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -235,11 +230,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -259,11 +256,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -286,11 +285,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -310,13 +311,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -348,7 +349,7 @@ def build_policy_definitions_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -373,7 +374,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -397,11 +398,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -421,13 +424,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -454,12 +457,12 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, management_group_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -478,13 +481,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -512,7 +515,7 @@ def build_policy_definitions_list_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -534,11 +537,11 @@ def build_policy_definitions_list_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -553,11 +556,13 @@ def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request(management_group_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long + 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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -580,13 +585,13 @@ def build_policy_definitions_list_by_management_group_request(management_group_i return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_request( +def build_policy_set_definitions_create_or_update_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -613,13 +618,13 @@ def build_policy_set_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_request( +def build_policy_set_definitions_delete_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -649,7 +654,7 @@ def build_policy_set_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -673,11 +678,13 @@ def build_policy_set_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_built_in_request(policy_set_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_set_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -699,11 +706,13 @@ def build_policy_set_definitions_get_built_in_request(policy_set_definition_name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -725,11 +734,11 @@ def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: An return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -744,13 +753,13 @@ def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_at_management_group_request( +def build_policy_set_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -777,13 +786,13 @@ def build_policy_set_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_at_management_group_request( +def build_policy_set_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -807,13 +816,13 @@ def build_policy_set_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_at_management_group_request( +def build_policy_set_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -837,13 +846,13 @@ def build_policy_set_definitions_get_at_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_by_management_group_request( +def build_policy_set_definitions_list_by_management_group_request( # pylint: disable=name-too-long 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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -918,7 +927,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -1068,7 +1077,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1147,7 +1156,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -1215,7 +1224,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1351,7 +1360,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1456,7 +1465,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1557,7 +1566,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1702,7 +1711,7 @@ def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1780,7 +1789,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1916,7 +1925,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1990,7 +1999,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -2046,7 +2055,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -2106,7 +2115,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2238,7 +2247,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2314,7 +2323,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -2375,7 +2384,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -2426,7 +2435,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2509,7 +2518,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2593,7 +2602,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2765,7 +2774,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2844,7 +2853,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -2902,7 +2911,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2963,7 +2972,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -3012,7 +3021,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3096,7 +3105,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3263,7 +3272,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -3345,7 +3354,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -3407,7 +3416,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -3464,7 +3473,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_configuration.py index 9093e12351849..e70d8f67cf742 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", "2019-01-01") + api_version: str = kwargs.pop("api_version", "2019-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/aio/_configuration.py index 96f5d0b52d860..5510eae382932 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", "2019-01-01") + api_version: str = kwargs.pop("api_version", "2019-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/aio/operations/_operations.py index 72b85249f78f9..35c5fc5be182a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -61,10 +60,6 @@ build_policy_set_definitions_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]] @@ -123,7 +118,7 @@ async def delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -273,7 +268,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -352,7 +347,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -420,7 +415,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -556,7 +551,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -661,7 +656,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -762,7 +757,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -907,7 +902,7 @@ async def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -985,7 +980,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1121,7 +1116,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1195,7 +1190,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1251,7 +1246,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1311,7 +1306,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -1443,7 +1438,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1519,7 +1514,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -1580,7 +1575,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -1631,7 +1626,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1714,7 +1709,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1800,7 +1795,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1972,7 +1967,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2051,7 +2046,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -2109,7 +2104,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2170,7 +2165,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -2219,7 +2214,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2303,7 +2298,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2470,7 +2465,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2552,7 +2547,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -2614,7 +2609,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -2671,7 +2666,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/operations/_operations.py index 0fcf3db8f5d76..0ea49cdefd19c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_01_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, 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_policy_assignments_delete_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +67,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -102,7 +97,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -125,13 +120,13 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -159,7 +154,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -173,7 +168,7 @@ def build_policy_assignments_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -211,7 +206,7 @@ def build_policy_assignments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -235,11 +230,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -259,11 +256,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -286,11 +285,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -310,13 +311,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -348,7 +349,7 @@ def build_policy_definitions_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -373,7 +374,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -397,11 +398,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -421,13 +424,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -454,12 +457,12 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, management_group_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -478,13 +481,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -512,7 +515,7 @@ def build_policy_definitions_list_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -534,11 +537,11 @@ def build_policy_definitions_list_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -553,11 +556,13 @@ def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request(management_group_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long + 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["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -580,13 +585,13 @@ def build_policy_definitions_list_by_management_group_request(management_group_i return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_request( +def build_policy_set_definitions_create_or_update_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -613,13 +618,13 @@ def build_policy_set_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_request( +def build_policy_set_definitions_delete_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -649,7 +654,7 @@ def build_policy_set_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -673,11 +678,13 @@ def build_policy_set_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_built_in_request(policy_set_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_set_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -699,11 +706,13 @@ def build_policy_set_definitions_get_built_in_request(policy_set_definition_name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -725,11 +734,11 @@ def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: An return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -744,13 +753,13 @@ def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_at_management_group_request( +def build_policy_set_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -777,13 +786,13 @@ def build_policy_set_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_at_management_group_request( +def build_policy_set_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -807,13 +816,13 @@ def build_policy_set_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_at_management_group_request( +def build_policy_set_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -837,13 +846,13 @@ def build_policy_set_definitions_get_at_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_by_management_group_request( +def build_policy_set_definitions_list_by_management_group_request( # pylint: disable=name-too-long 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["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -918,7 +927,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -1068,7 +1077,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1147,7 +1156,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -1215,7 +1224,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1351,7 +1360,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1456,7 +1465,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1557,7 +1566,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1702,7 +1711,7 @@ def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1780,7 +1789,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1916,7 +1925,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1990,7 +1999,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -2046,7 +2055,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -2106,7 +2115,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2238,7 +2247,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2314,7 +2323,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -2375,7 +2384,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -2426,7 +2435,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2509,7 +2518,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2593,7 +2602,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2765,7 +2774,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2844,7 +2853,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -2902,7 +2911,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2963,7 +2972,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -3012,7 +3021,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3096,7 +3105,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3263,7 +3272,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -3345,7 +3354,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -3407,7 +3416,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -3464,7 +3473,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-01-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_configuration.py index 40f5784407438..e6500117f97a7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/_configuration.py index baf44c61bd13c..16ea1bd51ef58 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/operations/_operations.py index 790f154dd96f3..f555119e2eb4a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -61,10 +60,6 @@ build_policy_set_definitions_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]] @@ -123,7 +118,7 @@ async def delete( _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -273,7 +268,7 @@ async def create( _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.PolicyAssignment] = kwargs.pop("cls", None) @@ -352,7 +347,7 @@ async def get(self, scope: str, policy_assignment_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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -420,7 +415,7 @@ def list_for_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -556,7 +551,7 @@ def list_for_resource( _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -661,7 +656,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -762,7 +757,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -907,7 +902,7 @@ async def create_by_id( _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.PolicyAssignment] = kwargs.pop("cls", None) @@ -985,7 +980,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1121,7 +1116,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.PolicyDefinition] = kwargs.pop("cls", None) @@ -1195,7 +1190,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_policy_definitions_delete_request( @@ -1251,7 +1246,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1311,7 +1306,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -1443,7 +1438,7 @@ async def create_or_update_at_management_group( _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.PolicyDefinition] = kwargs.pop("cls", None) @@ -1519,7 +1514,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _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_policy_definitions_delete_at_management_group_request( @@ -1580,7 +1575,7 @@ async def get_at_management_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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -1631,7 +1626,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1714,7 +1709,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1800,7 +1795,7 @@ def list_by_management_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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1972,7 +1967,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.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2051,7 +2046,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_policy_set_definitions_delete_request( @@ -2109,7 +2104,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P _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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2170,7 +2165,7 @@ async def get_built_in(self, policy_set_definition_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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -2219,7 +2214,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: _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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2303,7 +2298,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini _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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2470,7 +2465,7 @@ async def create_or_update_at_management_group( _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.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2552,7 +2547,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _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_policy_set_definitions_delete_at_management_group_request( @@ -2614,7 +2609,7 @@ async def get_at_management_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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -2671,7 +2666,7 @@ def list_by_management_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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/operations/_operations.py index ec2c611f68911..62c4946e4181c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_06_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, 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_policy_assignments_delete_request(scope: str, policy_assignment_name: _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 @@ -72,7 +67,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _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") @@ -102,7 +97,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _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 @@ -125,13 +120,13 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -159,7 +154,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -173,7 +168,7 @@ def build_policy_assignments_list_for_resource_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 @@ -211,7 +206,7 @@ def build_policy_assignments_list_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 @@ -235,11 +230,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-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 @@ -259,11 +256,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-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") @@ -286,11 +285,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-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 @@ -310,13 +311,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -348,7 +349,7 @@ def build_policy_definitions_delete_request( ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -373,7 +374,7 @@ def build_policy_definitions_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 @@ -397,11 +398,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -421,13 +424,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["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") @@ -454,12 +457,12 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, management_group_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -478,13 +481,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["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 @@ -512,7 +515,7 @@ def build_policy_definitions_list_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 @@ -534,11 +537,11 @@ def build_policy_definitions_list_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _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 @@ -553,11 +556,13 @@ def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request(management_group_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long + 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["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 @@ -580,13 +585,13 @@ def build_policy_definitions_list_by_management_group_request(management_group_i return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_request( +def build_policy_set_definitions_create_or_update_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -613,13 +618,13 @@ def build_policy_set_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_request( +def build_policy_set_definitions_delete_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -649,7 +654,7 @@ def build_policy_set_definitions_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 @@ -673,11 +678,13 @@ def build_policy_set_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_built_in_request(policy_set_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_set_definition_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -699,11 +706,13 @@ def build_policy_set_definitions_get_built_in_request(policy_set_definition_name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -725,11 +734,11 @@ def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: An return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _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 @@ -744,13 +753,13 @@ def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_at_management_group_request( +def build_policy_set_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["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") @@ -777,13 +786,13 @@ def build_policy_set_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_at_management_group_request( +def build_policy_set_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["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 @@ -807,13 +816,13 @@ def build_policy_set_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_at_management_group_request( +def build_policy_set_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["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 @@ -837,13 +846,13 @@ def build_policy_set_definitions_get_at_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_by_management_group_request( +def build_policy_set_definitions_list_by_management_group_request( # pylint: disable=name-too-long 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["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 @@ -918,7 +927,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -1068,7 +1077,7 @@ def create( _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.PolicyAssignment] = kwargs.pop("cls", None) @@ -1147,7 +1156,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -1215,7 +1224,7 @@ def list_for_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1351,7 +1360,7 @@ def list_for_resource( _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1456,7 +1465,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1557,7 +1566,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1702,7 +1711,7 @@ def create_by_id( _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.PolicyAssignment] = kwargs.pop("cls", None) @@ -1780,7 +1789,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1916,7 +1925,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.PolicyDefinition] = kwargs.pop("cls", None) @@ -1990,7 +1999,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_policy_definitions_delete_request( @@ -2046,7 +2055,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -2106,7 +2115,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2238,7 +2247,7 @@ def create_or_update_at_management_group( _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.PolicyDefinition] = kwargs.pop("cls", None) @@ -2314,7 +2323,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _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_policy_definitions_delete_at_management_group_request( @@ -2375,7 +2384,7 @@ def get_at_management_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.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -2426,7 +2435,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2509,7 +2518,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2593,7 +2602,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I _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.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2765,7 +2774,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.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2844,7 +2853,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_policy_set_definitions_delete_request( @@ -2902,7 +2911,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS _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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2963,7 +2972,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model _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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -3012,7 +3021,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: _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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3096,7 +3105,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" _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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3263,7 +3272,7 @@ def create_or_update_at_management_group( _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.PolicySetDefinition] = kwargs.pop("cls", None) @@ -3345,7 +3354,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _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_policy_set_definitions_delete_at_management_group_request( @@ -3407,7 +3416,7 @@ def get_at_management_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.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -3464,7 +3473,7 @@ def list_by_management_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.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_configuration.py index 12e64d259cd24..98e0329dcc9a0 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", "2019-09-01") + api_version: str = kwargs.pop("api_version", "2019-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/_configuration.py index 3518a0c01d6eb..30509880b540a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_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 PolicyClientConfiguration(Configuration): # pylint: disable=too-many-inst def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(PolicyClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", "2019-09-01") + api_version: str = kwargs.pop("api_version", "2019-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/operations/_operations.py index 33878bd5bb5ee..715c59d897406 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -62,10 +61,6 @@ build_policy_set_definitions_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]] @@ -124,7 +119,7 @@ async def delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -273,7 +268,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -351,7 +346,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -418,7 +413,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -553,7 +548,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -657,7 +652,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -756,7 +751,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -856,7 +851,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1000,7 +995,7 @@ async def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1077,7 +1072,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1212,7 +1207,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1286,7 +1281,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1342,7 +1337,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1402,7 +1397,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -1534,7 +1529,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1610,7 +1605,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -1671,7 +1666,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -1722,7 +1717,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1805,7 +1800,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicyDefinitio _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1891,7 +1886,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2063,7 +2058,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2141,7 +2136,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -2198,7 +2193,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2258,7 +2253,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -2306,7 +2301,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2389,7 +2384,7 @@ def list_built_in(self, **kwargs: Any) -> AsyncIterable["_models.PolicySetDefini _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2555,7 +2550,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2636,7 +2631,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -2697,7 +2692,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -2753,7 +2748,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/operations/_operations.py index d45244c2defc5..ab230d16744a7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_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, 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_policy_assignments_delete_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +67,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -102,7 +97,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -125,13 +120,13 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -159,7 +154,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -173,7 +168,7 @@ def build_policy_assignments_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -205,13 +200,13 @@ def build_policy_assignments_list_for_resource_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_management_group_request( +def build_policy_assignments_list_for_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -241,7 +236,7 @@ def build_policy_assignments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -265,11 +260,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -289,11 +286,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -316,11 +315,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -340,13 +341,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -379,7 +380,7 @@ def build_policy_definitions_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -409,7 +410,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -433,11 +434,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -457,13 +460,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -490,13 +493,13 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -520,13 +523,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -554,7 +557,7 @@ def build_policy_definitions_list_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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -576,11 +579,11 @@ def build_policy_definitions_list_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -595,11 +598,13 @@ def build_policy_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request(management_group_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long + 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["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -622,13 +627,13 @@ def build_policy_definitions_list_by_management_group_request(management_group_i return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_request( +def build_policy_set_definitions_create_or_update_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -655,13 +660,13 @@ def build_policy_set_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_request( +def build_policy_set_definitions_delete_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -691,7 +696,7 @@ def build_policy_set_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -715,11 +720,13 @@ def build_policy_set_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_built_in_request(policy_set_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_set_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -741,11 +748,13 @@ def build_policy_set_definitions_get_built_in_request(policy_set_definition_name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -767,11 +776,11 @@ def build_policy_set_definitions_list_request(subscription_id: str, **kwargs: An return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -786,13 +795,13 @@ def build_policy_set_definitions_list_built_in_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_at_management_group_request( +def build_policy_set_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -819,13 +828,13 @@ def build_policy_set_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_at_management_group_request( +def build_policy_set_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -849,13 +858,13 @@ def build_policy_set_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_at_management_group_request( +def build_policy_set_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -879,13 +888,13 @@ def build_policy_set_definitions_get_at_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_by_management_group_request( +def build_policy_set_definitions_list_by_management_group_request( # pylint: disable=name-too-long 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["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -960,7 +969,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -1109,7 +1118,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1187,7 +1196,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -1254,7 +1263,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1389,7 +1398,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1493,7 +1502,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1592,7 +1601,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1692,7 +1701,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1836,7 +1845,7 @@ def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1913,7 +1922,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -2048,7 +2057,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2122,7 +2131,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -2178,7 +2187,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -2238,7 +2247,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2370,7 +2379,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2446,7 +2455,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -2507,7 +2516,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -2558,7 +2567,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2641,7 +2650,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicyDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2725,7 +2734,7 @@ def list_by_management_group(self, management_group_id: str, **kwargs: Any) -> I _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2897,7 +2906,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2975,7 +2984,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -3032,7 +3041,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -3092,7 +3101,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -3140,7 +3149,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3223,7 +3232,7 @@ def list_built_in(self, **kwargs: Any) -> Iterable["_models.PolicySetDefinition" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3389,7 +3398,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -3470,7 +3479,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -3531,7 +3540,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -3587,7 +3596,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/aio/operations/_operations.py index df7823bd5cdbb..1462787224bff 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -70,10 +69,6 @@ build_policy_set_definitions_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]] @@ -121,7 +116,7 @@ async def get_by_policy_mode(self, policy_mode: str, **kwargs: Any) -> _models.D _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifest] = kwargs.pop("cls", None) request = build_data_policy_manifests_get_by_policy_mode_request( @@ -178,7 +173,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifestListResult] = kwargs.pop("cls", None) error_map = { @@ -290,7 +285,7 @@ async def delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -439,7 +434,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -517,7 +512,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -594,7 +589,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -729,7 +724,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -833,7 +828,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -933,7 +928,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1023,7 +1018,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1167,7 +1162,7 @@ async def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1244,7 +1239,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1379,7 +1374,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1453,7 +1448,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1509,7 +1504,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1569,7 +1564,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -1701,7 +1696,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1777,7 +1772,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -1838,7 +1833,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -1912,7 +1907,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2004,7 +1999,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2103,7 +2098,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2266,7 +2261,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2344,7 +2339,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -2401,7 +2396,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2461,7 +2456,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -2532,7 +2527,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2622,7 +2617,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2779,7 +2774,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2860,7 +2855,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -2921,7 +2916,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -2998,7 +2993,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3114,9 +3109,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_exemptions_delete_request( @@ -3262,9 +3255,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) @@ -3348,9 +3339,7 @@ async def get(self, scope: str, policy_exemption_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) request = build_policy_exemptions_get_request( @@ -3417,9 +3406,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -3514,9 +3501,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -3645,9 +3630,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -3748,9 +3731,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/operations/_operations.py index a81f7447bc972..9b302a28ea07d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2020_09_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, 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]] @@ -40,11 +35,13 @@ _SERIALIZER.client_side_validation = False -def build_data_policy_manifests_get_by_policy_mode_request(policy_mode: str, **kwargs: Any) -> HttpRequest: +def build_data_policy_manifests_get_by_policy_mode_request( # pylint: disable=name-too-long + policy_mode: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -68,7 +65,7 @@ def build_data_policy_manifests_list_request(*, filter: Optional[str] = None, ** _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -89,7 +86,7 @@ def build_policy_assignments_delete_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +113,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +143,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -169,7 +166,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -180,7 +177,7 @@ def build_policy_assignments_list_for_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -210,7 +207,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -225,7 +222,7 @@ def build_policy_assignments_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -259,13 +256,13 @@ def build_policy_assignments_list_for_resource_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_management_group_request( +def build_policy_assignments_list_for_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -298,7 +295,7 @@ def build_policy_assignments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -324,11 +321,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -348,11 +347,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -375,11 +376,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -399,13 +402,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -438,7 +441,7 @@ def build_policy_definitions_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -468,7 +471,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -492,11 +495,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -516,13 +521,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -549,13 +554,13 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -579,13 +584,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -615,7 +620,7 @@ def build_policy_definitions_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -641,13 +646,13 @@ def build_policy_definitions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request( +def build_policy_definitions_list_built_in_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -666,13 +671,13 @@ def build_policy_definitions_list_built_in_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request( +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -699,13 +704,13 @@ def build_policy_definitions_list_by_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_request( +def build_policy_set_definitions_create_or_update_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -732,13 +737,13 @@ def build_policy_set_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_request( +def build_policy_set_definitions_delete_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -768,7 +773,7 @@ def build_policy_set_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -792,11 +797,13 @@ def build_policy_set_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_built_in_request(policy_set_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_set_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -818,13 +825,13 @@ def build_policy_set_definitions_get_built_in_request(policy_set_definition_name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_request( +def build_policy_set_definitions_list_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -850,13 +857,13 @@ def build_policy_set_definitions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_built_in_request( +def build_policy_set_definitions_list_built_in_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -875,13 +882,13 @@ def build_policy_set_definitions_list_built_in_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_at_management_group_request( +def build_policy_set_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -908,13 +915,13 @@ def build_policy_set_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_at_management_group_request( +def build_policy_set_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -938,13 +945,13 @@ def build_policy_set_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_at_management_group_request( +def build_policy_set_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -968,13 +975,13 @@ def build_policy_set_definitions_get_at_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_by_management_group_request( +def build_policy_set_definitions_list_by_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1005,9 +1012,7 @@ def build_policy_exemptions_delete_request(scope: str, policy_exemption_name: st _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1030,15 +1035,13 @@ def build_policy_exemptions_delete_request(scope: str, policy_exemption_name: st return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_create_or_update_request( +def build_policy_exemptions_create_or_update_request( # pylint: disable=name-too-long scope: str, policy_exemption_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1068,9 +1071,7 @@ def build_policy_exemptions_get_request(scope: str, policy_exemption_name: str, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1099,9 +1100,7 @@ def build_policy_exemptions_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1125,15 +1124,13 @@ def build_policy_exemptions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_list_for_resource_group_request( +def build_policy_exemptions_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1161,7 +1158,7 @@ def build_policy_exemptions_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_list_for_resource_request( +def build_policy_exemptions_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -1175,9 +1172,7 @@ def build_policy_exemptions_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1209,15 +1204,13 @@ def build_policy_exemptions_list_for_resource_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_list_for_management_group_request( +def build_policy_exemptions_list_for_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1285,7 +1278,7 @@ def get_by_policy_mode(self, policy_mode: str, **kwargs: Any) -> _models.DataPol _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifest] = kwargs.pop("cls", None) request = build_data_policy_manifests_get_by_policy_mode_request( @@ -1342,7 +1335,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifestListResult] = kwargs.pop("cls", None) error_map = { @@ -1452,7 +1445,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -1601,7 +1594,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1679,7 +1672,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -1756,7 +1749,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1891,7 +1884,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1995,7 +1988,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2095,7 +2088,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2185,7 +2178,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -2329,7 +2322,7 @@ def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -2406,7 +2399,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -2541,7 +2534,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2615,7 +2608,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -2671,7 +2664,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -2731,7 +2724,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2863,7 +2856,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2939,7 +2932,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -3000,7 +2993,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -3074,7 +3067,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3166,7 +3159,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3265,7 +3258,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3428,7 +3421,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -3506,7 +3499,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -3563,7 +3556,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -3623,7 +3616,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -3694,7 +3687,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3784,7 +3777,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3941,7 +3934,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -4022,7 +4015,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -4083,7 +4076,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -4160,7 +4153,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -4276,9 +4269,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_exemptions_delete_request( @@ -4424,9 +4415,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) @@ -4510,9 +4499,7 @@ def get(self, scope: str, policy_exemption_name: str, **kwargs: Any) -> _models. _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) request = build_policy_exemptions_get_request( @@ -4579,9 +4566,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -4676,9 +4661,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -4807,9 +4790,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -4910,9 +4891,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/aio/operations/_operations.py index 45c7283177bd1..80ce401bd5085 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -88,10 +87,6 @@ build_variables_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]] @@ -139,7 +134,7 @@ async def get_by_policy_mode(self, policy_mode: str, **kwargs: Any) -> _models.D _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifest] = kwargs.pop("cls", None) request = build_data_policy_manifests_get_by_policy_mode_request( @@ -196,7 +191,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifestListResult] = kwargs.pop("cls", None) error_map = { @@ -308,7 +303,7 @@ async def delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -457,7 +452,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -535,7 +530,7 @@ async def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -686,7 +681,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -775,7 +770,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -910,7 +905,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1014,7 +1009,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1114,7 +1109,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -1204,7 +1199,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -1348,7 +1343,7 @@ async def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1425,7 +1420,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -1567,7 +1562,7 @@ async def update_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -1714,7 +1709,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -1788,7 +1783,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -1844,7 +1839,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -1904,7 +1899,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2036,7 +2031,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2112,7 +2107,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -2173,7 +2168,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -2247,7 +2242,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2339,7 +2334,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2438,7 +2433,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2601,7 +2596,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -2679,7 +2674,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -2736,7 +2731,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -2796,7 +2791,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -2867,7 +2862,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2957,7 +2952,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3114,7 +3109,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -3195,7 +3190,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -3256,7 +3251,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -3333,7 +3328,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3449,9 +3444,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_exemptions_delete_request( @@ -3597,9 +3590,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) @@ -3683,9 +3674,7 @@ async def get(self, scope: str, policy_exemption_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) request = build_policy_exemptions_get_request( @@ -3752,9 +3741,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -3849,9 +3836,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -3980,9 +3965,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -4083,9 +4066,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -4191,9 +4172,7 @@ async def delete(self, variable_name: str, **kwargs: Any) -> None: # pylint: di _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_variables_delete_request( @@ -4302,9 +4281,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.Variable] = kwargs.pop("cls", None) @@ -4381,9 +4358,7 @@ async def get(self, variable_name: str, **kwargs: Any) -> _models.Variable: _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.Variable] = kwargs.pop("cls", None) request = build_variables_get_request( @@ -4447,9 +4422,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _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_variables_delete_at_management_group_request( @@ -4576,9 +4549,7 @@ async def create_or_update_at_management_group( _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.Variable] = kwargs.pop("cls", None) @@ -4659,9 +4630,7 @@ async def get_at_management_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.Variable] = kwargs.pop("cls", None) request = build_variables_get_at_management_group_request( @@ -4712,9 +4681,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Variable"]: _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.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -4788,9 +4755,7 @@ def list_for_management_group(self, management_group_id: 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.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -4899,9 +4864,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_variable_values_delete_request( @@ -5029,9 +4992,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.VariableValue] = kwargs.pop("cls", None) @@ -5111,9 +5072,7 @@ async def get(self, variable_name: str, variable_value_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.VariableValue] = kwargs.pop("cls", None) request = build_variable_values_get_request( @@ -5168,9 +5127,7 @@ def list(self, variable_name: str, **kwargs: Any) -> AsyncIterable["_models.Vari _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.VariableValueListResult] = kwargs.pop("cls", None) error_map = { @@ -5252,9 +5209,7 @@ def list_for_management_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.VariableValueListResult] = kwargs.pop("cls", None) error_map = { @@ -5346,9 +5301,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _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_variable_values_delete_at_management_group_request( @@ -5489,9 +5442,7 @@ async def create_or_update_at_management_group( _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.VariableValue] = kwargs.pop("cls", None) @@ -5575,9 +5526,7 @@ async def get_at_management_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.VariableValue] = kwargs.pop("cls", None) request = build_variable_values_get_at_management_group_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/operations/_operations.py index ce7e17719c588..dae7db6540d4c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_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, 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]] @@ -40,11 +35,13 @@ _SERIALIZER.client_side_validation = False -def build_data_policy_manifests_get_by_policy_mode_request(policy_mode: str, **kwargs: Any) -> HttpRequest: +def build_data_policy_manifests_get_by_policy_mode_request( # pylint: disable=name-too-long + policy_mode: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -68,7 +65,7 @@ def build_data_policy_manifests_list_request(*, filter: Optional[str] = None, ** _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -89,7 +86,7 @@ def build_policy_assignments_delete_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +113,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +143,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -173,7 +170,7 @@ def build_policy_assignments_update_request(scope: str, policy_assignment_name: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -199,7 +196,7 @@ def build_policy_assignments_update_request(scope: str, policy_assignment_name: return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -210,7 +207,7 @@ def build_policy_assignments_list_for_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,7 +237,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -255,7 +252,7 @@ def build_policy_assignments_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -289,13 +286,13 @@ def build_policy_assignments_list_for_resource_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_management_group_request( +def build_policy_assignments_list_for_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -328,7 +325,7 @@ def build_policy_assignments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -354,11 +351,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -378,11 +377,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -405,11 +406,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -429,11 +432,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_update_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_update_by_id_request( # pylint: disable=name-too-long + policy_assignment_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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -456,13 +461,13 @@ def build_policy_assignments_update_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -495,7 +500,7 @@ def build_policy_definitions_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -525,7 +530,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -549,11 +554,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -573,13 +580,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -606,13 +613,13 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -636,13 +643,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -672,7 +679,7 @@ def build_policy_definitions_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -698,13 +705,13 @@ def build_policy_definitions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request( +def build_policy_definitions_list_built_in_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -723,13 +730,13 @@ def build_policy_definitions_list_built_in_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request( +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -756,13 +763,13 @@ def build_policy_definitions_list_by_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_request( +def build_policy_set_definitions_create_or_update_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -789,13 +796,13 @@ def build_policy_set_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_request( +def build_policy_set_definitions_delete_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -825,7 +832,7 @@ def build_policy_set_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -849,11 +856,13 @@ def build_policy_set_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_built_in_request(policy_set_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_set_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -875,13 +884,13 @@ def build_policy_set_definitions_get_built_in_request(policy_set_definition_name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_request( +def build_policy_set_definitions_list_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -907,13 +916,13 @@ def build_policy_set_definitions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_built_in_request( +def build_policy_set_definitions_list_built_in_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -932,13 +941,13 @@ def build_policy_set_definitions_list_built_in_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_at_management_group_request( +def build_policy_set_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -965,13 +974,13 @@ def build_policy_set_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_at_management_group_request( +def build_policy_set_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -995,13 +1004,13 @@ def build_policy_set_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_at_management_group_request( +def build_policy_set_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1025,13 +1034,13 @@ def build_policy_set_definitions_get_at_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_by_management_group_request( +def build_policy_set_definitions_list_by_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1062,9 +1071,7 @@ def build_policy_exemptions_delete_request(scope: str, policy_exemption_name: st _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1087,15 +1094,13 @@ def build_policy_exemptions_delete_request(scope: str, policy_exemption_name: st return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_create_or_update_request( +def build_policy_exemptions_create_or_update_request( # pylint: disable=name-too-long scope: str, policy_exemption_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1125,9 +1130,7 @@ def build_policy_exemptions_get_request(scope: str, policy_exemption_name: str, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1156,9 +1159,7 @@ def build_policy_exemptions_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1182,15 +1183,13 @@ def build_policy_exemptions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_list_for_resource_group_request( +def build_policy_exemptions_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1218,7 +1217,7 @@ def build_policy_exemptions_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_list_for_resource_request( +def build_policy_exemptions_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -1232,9 +1231,7 @@ def build_policy_exemptions_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1266,15 +1263,13 @@ def build_policy_exemptions_list_for_resource_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_list_for_management_group_request( +def build_policy_exemptions_list_for_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1303,9 +1298,7 @@ def build_variables_delete_request(variable_name: str, subscription_id: str, **k _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 @@ -1332,9 +1325,7 @@ def build_variables_create_or_update_request(variable_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1364,9 +1355,7 @@ def build_variables_get_request(variable_name: str, subscription_id: str, **kwar _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 @@ -1389,15 +1378,13 @@ def build_variables_get_request(variable_name: str, subscription_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_variables_delete_at_management_group_request( +def build_variables_delete_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1421,15 +1408,13 @@ def build_variables_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_variables_create_or_update_at_management_group_request( +def build_variables_create_or_update_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -1456,15 +1441,13 @@ def build_variables_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_variables_get_at_management_group_request( +def build_variables_get_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1492,9 +1475,7 @@ def build_variables_list_request(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["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 @@ -1514,13 +1495,13 @@ def build_variables_list_request(subscription_id: str, **kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_variables_list_for_management_group_request(management_group_id: str, **kwargs: Any) -> HttpRequest: +def build_variables_list_for_management_group_request( # pylint: disable=name-too-long + 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["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 @@ -1549,9 +1530,7 @@ def build_variable_values_delete_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")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1576,15 +1555,13 @@ def build_variable_values_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_create_or_update_request( +def build_variable_values_create_or_update_request( # pylint: disable=name-too-long variable_name: str, variable_value_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1618,9 +1595,7 @@ def build_variable_values_get_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")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1649,9 +1624,7 @@ def build_variable_values_list_request(variable_name: str, subscription_id: str, _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 @@ -1675,15 +1648,13 @@ def build_variable_values_list_request(variable_name: str, subscription_id: str, return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_list_for_management_group_request( +def build_variable_values_list_for_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1707,15 +1678,13 @@ def build_variable_values_list_for_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_delete_at_management_group_request( +def build_variable_values_delete_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, variable_value_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1740,15 +1709,13 @@ def build_variable_values_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_create_or_update_at_management_group_request( +def build_variable_values_create_or_update_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, variable_value_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -1776,15 +1743,13 @@ def build_variable_values_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_get_at_management_group_request( +def build_variable_values_get_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, variable_value_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1852,7 +1817,7 @@ def get_by_policy_mode(self, policy_mode: str, **kwargs: Any) -> _models.DataPol _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifest] = kwargs.pop("cls", None) request = build_data_policy_manifests_get_by_policy_mode_request( @@ -1909,7 +1874,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifestListResult] = kwargs.pop("cls", None) error_map = { @@ -2019,7 +1984,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -2168,7 +2133,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -2246,7 +2211,7 @@ def get(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -2397,7 +2362,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -2486,7 +2451,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2621,7 +2586,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2725,7 +2690,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2825,7 +2790,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2915,7 +2880,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -3059,7 +3024,7 @@ def create_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -3136,7 +3101,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -3278,7 +3243,7 @@ def update_by_id( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -3425,7 +3390,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -3499,7 +3464,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -3555,7 +3520,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -3615,7 +3580,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -3747,7 +3712,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -3823,7 +3788,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -3884,7 +3849,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -3958,7 +3923,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -4050,7 +4015,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -4149,7 +4114,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -4312,7 +4277,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -4390,7 +4355,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -4447,7 +4412,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -4507,7 +4472,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -4578,7 +4543,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -4668,7 +4633,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -4825,7 +4790,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -4906,7 +4871,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -4967,7 +4932,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -5044,7 +5009,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -5160,9 +5125,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_exemptions_delete_request( @@ -5308,9 +5271,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) @@ -5394,9 +5355,7 @@ def get(self, scope: str, policy_exemption_name: str, **kwargs: Any) -> _models. _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) request = build_policy_exemptions_get_request( @@ -5463,9 +5422,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -5560,9 +5517,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -5691,9 +5646,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -5794,9 +5747,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -5902,9 +5853,7 @@ def delete(self, variable_name: str, **kwargs: Any) -> None: # pylint: disable= _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_variables_delete_request( @@ -6013,9 +5962,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.Variable] = kwargs.pop("cls", None) @@ -6092,9 +6039,7 @@ def get(self, variable_name: str, **kwargs: Any) -> _models.Variable: _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.Variable] = kwargs.pop("cls", None) request = build_variables_get_request( @@ -6158,9 +6103,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _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_variables_delete_at_management_group_request( @@ -6287,9 +6230,7 @@ def create_or_update_at_management_group( _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.Variable] = kwargs.pop("cls", None) @@ -6368,9 +6309,7 @@ def get_at_management_group(self, management_group_id: str, variable_name: str, _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.Variable] = kwargs.pop("cls", None) request = build_variables_get_at_management_group_request( @@ -6420,9 +6359,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Variable"]: _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.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -6495,9 +6432,7 @@ def list_for_management_group(self, management_group_id: 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.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -6606,9 +6541,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_variable_values_delete_request( @@ -6736,9 +6669,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.VariableValue] = kwargs.pop("cls", None) @@ -6818,9 +6749,7 @@ def get(self, variable_name: str, variable_value_name: str, **kwargs: Any) -> _m _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.VariableValue] = kwargs.pop("cls", None) request = build_variable_values_get_request( @@ -6875,9 +6804,7 @@ def list(self, variable_name: str, **kwargs: Any) -> Iterable["_models.VariableV _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.VariableValueListResult] = kwargs.pop("cls", None) error_map = { @@ -6959,9 +6886,7 @@ def list_for_management_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.VariableValueListResult] = kwargs.pop("cls", None) error_map = { @@ -7053,9 +6978,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _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_variable_values_delete_at_management_group_request( @@ -7196,9 +7119,7 @@ def create_or_update_at_management_group( _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.VariableValue] = kwargs.pop("cls", None) @@ -7282,9 +7203,7 @@ def get_at_management_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.VariableValue] = kwargs.pop("cls", None) request = build_variable_values_get_at_management_group_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/aio/operations/_operations.py index cc88a65d6ea61..eeb07cd173f2c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -89,10 +88,6 @@ build_variables_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]] @@ -140,7 +135,7 @@ async def get_by_policy_mode(self, policy_mode: str, **kwargs: Any) -> _models.D _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifest] = kwargs.pop("cls", None) request = build_data_policy_manifests_get_by_policy_mode_request( @@ -197,7 +192,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifestListResult] = kwargs.pop("cls", None) error_map = { @@ -356,7 +351,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -430,7 +425,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -486,7 +481,7 @@ async def get(self, policy_definition_name: str, **kwargs: Any) -> _models.Polic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -546,7 +541,7 @@ async def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -678,7 +673,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -754,7 +749,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -815,7 +810,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -889,7 +884,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -981,7 +976,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1080,7 +1075,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1243,7 +1238,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -1321,7 +1316,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -1378,7 +1373,7 @@ async def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -1438,7 +1433,7 @@ async def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -1509,7 +1504,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1599,7 +1594,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -1756,7 +1751,7 @@ async def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -1837,7 +1832,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -1898,7 +1893,7 @@ async def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -1975,7 +1970,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2091,7 +2086,7 @@ async def delete( _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -2240,7 +2235,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.PolicyAssignment] = kwargs.pop("cls", None) @@ -2318,7 +2313,7 @@ async def get(self, scope: str, policy_assignment_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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -2469,7 +2464,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.PolicyAssignment] = kwargs.pop("cls", None) @@ -2558,7 +2553,7 @@ def list_for_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2693,7 +2688,7 @@ def list_for_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2797,7 +2792,7 @@ def list_for_management_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2897,7 +2892,7 @@ def list( _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -2987,7 +2982,7 @@ async def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Option _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -3131,7 +3126,7 @@ async def create_by_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -3208,7 +3203,7 @@ async def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.P _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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -3350,7 +3345,7 @@ async def update_by_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -3450,9 +3445,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_exemptions_delete_request( @@ -3598,9 +3591,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) @@ -3684,9 +3675,7 @@ async def get(self, scope: str, policy_exemption_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) request = build_policy_exemptions_get_request( @@ -3831,9 +3820,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) @@ -3912,9 +3899,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -4009,9 +3994,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -4140,9 +4123,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -4243,9 +4224,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -4351,9 +4330,7 @@ async def delete(self, variable_name: str, **kwargs: Any) -> None: # pylint: di _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_variables_delete_request( @@ -4462,9 +4439,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.Variable] = kwargs.pop("cls", None) @@ -4541,9 +4516,7 @@ async def get(self, variable_name: str, **kwargs: Any) -> _models.Variable: _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.Variable] = kwargs.pop("cls", None) request = build_variables_get_request( @@ -4607,9 +4580,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _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_variables_delete_at_management_group_request( @@ -4736,9 +4707,7 @@ async def create_or_update_at_management_group( _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.Variable] = kwargs.pop("cls", None) @@ -4819,9 +4788,7 @@ async def get_at_management_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.Variable] = kwargs.pop("cls", None) request = build_variables_get_at_management_group_request( @@ -4872,9 +4839,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Variable"]: _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.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -4948,9 +4913,7 @@ def list_for_management_group(self, management_group_id: 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.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -5059,9 +5022,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_variable_values_delete_request( @@ -5189,9 +5150,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.VariableValue] = kwargs.pop("cls", None) @@ -5271,9 +5230,7 @@ async def get(self, variable_name: str, variable_value_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.VariableValue] = kwargs.pop("cls", None) request = build_variable_values_get_request( @@ -5328,9 +5285,7 @@ def list(self, variable_name: str, **kwargs: Any) -> AsyncIterable["_models.Vari _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.VariableValueListResult] = kwargs.pop("cls", None) error_map = { @@ -5412,9 +5367,7 @@ def list_for_management_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.VariableValueListResult] = kwargs.pop("cls", None) error_map = { @@ -5506,9 +5459,7 @@ async def delete_at_management_group( # pylint: disable=inconsistent-return-sta _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_variable_values_delete_at_management_group_request( @@ -5649,9 +5600,7 @@ async def create_or_update_at_management_group( _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.VariableValue] = kwargs.pop("cls", None) @@ -5735,9 +5684,7 @@ async def get_at_management_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.VariableValue] = kwargs.pop("cls", None) request = build_variable_values_get_at_management_group_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/operations/_operations.py index 873e09fab5989..7a55d83f8f610 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2022_06_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, 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]] @@ -40,11 +35,13 @@ _SERIALIZER.client_side_validation = False -def build_data_policy_manifests_get_by_policy_mode_request(policy_mode: str, **kwargs: Any) -> HttpRequest: +def build_data_policy_manifests_get_by_policy_mode_request( # pylint: disable=name-too-long + policy_mode: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -68,7 +65,7 @@ def build_data_policy_manifests_list_request(*, filter: Optional[str] = None, ** _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -85,13 +82,13 @@ def build_data_policy_manifests_list_request(*, filter: Optional[str] = None, ** return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_request( +def build_policy_definitions_create_or_update_request( # pylint: disable=name-too-long policy_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -124,7 +121,7 @@ def build_policy_definitions_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -154,7 +151,7 @@ def build_policy_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,11 +175,13 @@ def build_policy_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_built_in_request(policy_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -202,13 +201,13 @@ def build_policy_definitions_get_built_in_request(policy_definition_name: str, * return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_create_or_update_at_management_group_request( +def build_policy_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -235,13 +234,13 @@ def build_policy_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_delete_at_management_group_request( +def build_policy_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -265,13 +264,13 @@ def build_policy_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_get_at_management_group_request( +def build_policy_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -301,7 +300,7 @@ def build_policy_definitions_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -327,13 +326,13 @@ def build_policy_definitions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_built_in_request( +def build_policy_definitions_list_built_in_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -352,13 +351,13 @@ def build_policy_definitions_list_built_in_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_definitions_list_by_management_group_request( +def build_policy_definitions_list_by_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -385,13 +384,13 @@ def build_policy_definitions_list_by_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_request( +def build_policy_set_definitions_create_or_update_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -418,13 +417,13 @@ def build_policy_set_definitions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_request( +def build_policy_set_definitions_delete_request( # pylint: disable=name-too-long policy_set_definition_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -454,7 +453,7 @@ def build_policy_set_definitions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -478,11 +477,13 @@ def build_policy_set_definitions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_built_in_request(policy_set_definition_name: str, **kwargs: Any) -> HttpRequest: +def build_policy_set_definitions_get_built_in_request( # pylint: disable=name-too-long + policy_set_definition_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -504,13 +505,13 @@ def build_policy_set_definitions_get_built_in_request(policy_set_definition_name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_request( +def build_policy_set_definitions_list_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -536,13 +537,13 @@ def build_policy_set_definitions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_built_in_request( +def build_policy_set_definitions_list_built_in_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -561,13 +562,13 @@ def build_policy_set_definitions_list_built_in_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_create_or_update_at_management_group_request( +def build_policy_set_definitions_create_or_update_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -594,13 +595,13 @@ def build_policy_set_definitions_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_delete_at_management_group_request( +def build_policy_set_definitions_delete_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -624,13 +625,13 @@ def build_policy_set_definitions_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_get_at_management_group_request( +def build_policy_set_definitions_get_at_management_group_request( # pylint: disable=name-too-long policy_set_definition_name: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -654,13 +655,13 @@ def build_policy_set_definitions_get_at_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_set_definitions_list_by_management_group_request( +def build_policy_set_definitions_list_by_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -691,7 +692,7 @@ def build_policy_assignments_delete_request(scope: str, policy_assignment_name: _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 @@ -718,7 +719,7 @@ def build_policy_assignments_create_request(scope: str, policy_assignment_name: _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") @@ -748,7 +749,7 @@ def build_policy_assignments_get_request(scope: str, policy_assignment_name: str _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 @@ -775,7 +776,7 @@ def build_policy_assignments_update_request(scope: str, policy_assignment_name: _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") @@ -801,7 +802,7 @@ def build_policy_assignments_update_request(scope: str, policy_assignment_name: return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_group_request( +def build_policy_assignments_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -812,7 +813,7 @@ def build_policy_assignments_list_for_resource_group_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 @@ -842,7 +843,7 @@ def build_policy_assignments_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_resource_request( +def build_policy_assignments_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -857,7 +858,7 @@ def build_policy_assignments_list_for_resource_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 @@ -891,13 +892,13 @@ def build_policy_assignments_list_for_resource_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_list_for_management_group_request( +def build_policy_assignments_list_for_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -930,7 +931,7 @@ def build_policy_assignments_list_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 @@ -956,11 +957,13 @@ def build_policy_assignments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_delete_by_id_request( # pylint: disable=name-too-long + policy_assignment_id: str, **kwargs: Any +) -> HttpRequest: _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 @@ -980,11 +983,13 @@ def build_policy_assignments_delete_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_create_by_id_request( # pylint: disable=name-too-long + policy_assignment_id: str, **kwargs: Any +) -> HttpRequest: _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") @@ -1007,11 +1012,13 @@ def build_policy_assignments_create_by_id_request(policy_assignment_id: str, **k return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_get_by_id_request( # pylint: disable=name-too-long + policy_assignment_id: str, **kwargs: Any +) -> HttpRequest: _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 @@ -1031,11 +1038,13 @@ def build_policy_assignments_get_by_id_request(policy_assignment_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_assignments_update_by_id_request(policy_assignment_id: str, **kwargs: Any) -> HttpRequest: +def build_policy_assignments_update_by_id_request( # pylint: disable=name-too-long + policy_assignment_id: str, **kwargs: Any +) -> HttpRequest: _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") @@ -1062,9 +1071,7 @@ def build_policy_exemptions_delete_request(scope: str, policy_exemption_name: st _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1087,15 +1094,13 @@ def build_policy_exemptions_delete_request(scope: str, policy_exemption_name: st return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_create_or_update_request( +def build_policy_exemptions_create_or_update_request( # pylint: disable=name-too-long scope: str, policy_exemption_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1125,9 +1130,7 @@ def build_policy_exemptions_get_request(scope: str, policy_exemption_name: str, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1154,9 +1157,7 @@ def build_policy_exemptions_update_request(scope: str, policy_exemption_name: st _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1188,9 +1189,7 @@ def build_policy_exemptions_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1214,15 +1213,13 @@ def build_policy_exemptions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_list_for_resource_group_request( +def build_policy_exemptions_list_for_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1250,7 +1247,7 @@ def build_policy_exemptions_list_for_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_list_for_resource_request( +def build_policy_exemptions_list_for_resource_request( # pylint: disable=name-too-long resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, @@ -1264,9 +1261,7 @@ def build_policy_exemptions_list_for_resource_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1298,15 +1293,13 @@ def build_policy_exemptions_list_for_resource_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_policy_exemptions_list_for_management_group_request( +def build_policy_exemptions_list_for_management_group_request( # pylint: disable=name-too-long management_group_id: str, *, filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1335,9 +1328,7 @@ def build_variables_delete_request(variable_name: str, subscription_id: str, **k _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 @@ -1364,9 +1355,7 @@ def build_variables_create_or_update_request(variable_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1396,9 +1385,7 @@ def build_variables_get_request(variable_name: str, subscription_id: str, **kwar _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 @@ -1421,15 +1408,13 @@ def build_variables_get_request(variable_name: str, subscription_id: str, **kwar return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_variables_delete_at_management_group_request( +def build_variables_delete_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1453,15 +1438,13 @@ def build_variables_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_variables_create_or_update_at_management_group_request( +def build_variables_create_or_update_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -1488,15 +1471,13 @@ def build_variables_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_variables_get_at_management_group_request( +def build_variables_get_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1524,9 +1505,7 @@ def build_variables_list_request(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["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 @@ -1546,13 +1525,13 @@ def build_variables_list_request(subscription_id: str, **kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_variables_list_for_management_group_request(management_group_id: str, **kwargs: Any) -> HttpRequest: +def build_variables_list_for_management_group_request( # pylint: disable=name-too-long + 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["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 @@ -1581,9 +1560,7 @@ def build_variable_values_delete_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")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1608,15 +1585,13 @@ def build_variable_values_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_create_or_update_request( +def build_variable_values_create_or_update_request( # pylint: disable=name-too-long variable_name: str, variable_value_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1650,9 +1625,7 @@ def build_variable_values_get_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")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1681,9 +1654,7 @@ def build_variable_values_list_request(variable_name: str, subscription_id: str, _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 @@ -1707,15 +1678,13 @@ def build_variable_values_list_request(variable_name: str, subscription_id: str, return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_list_for_management_group_request( +def build_variable_values_list_for_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1739,15 +1708,13 @@ def build_variable_values_list_for_management_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_delete_at_management_group_request( +def build_variable_values_delete_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, variable_value_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1772,15 +1739,13 @@ def build_variable_values_delete_at_management_group_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_create_or_update_at_management_group_request( +def build_variable_values_create_or_update_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, variable_value_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -1808,15 +1773,13 @@ def build_variable_values_create_or_update_at_management_group_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_variable_values_get_at_management_group_request( +def build_variable_values_get_at_management_group_request( # pylint: disable=name-too-long management_group_id: str, variable_name: str, variable_value_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -1884,7 +1847,7 @@ def get_by_policy_mode(self, policy_mode: str, **kwargs: Any) -> _models.DataPol _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifest] = kwargs.pop("cls", None) request = build_data_policy_manifests_get_by_policy_mode_request( @@ -1941,7 +1904,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-09-01")) cls: ClsType[_models.DataPolicyManifestListResult] = kwargs.pop("cls", None) error_map = { @@ -2100,7 +2063,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2174,7 +2137,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_request( @@ -2230,7 +2193,7 @@ def get(self, policy_definition_name: str, **kwargs: Any) -> _models.PolicyDefin _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_request( @@ -2290,7 +2253,7 @@ def get_built_in(self, policy_definition_name: str, **kwargs: Any) -> _models.Po _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_built_in_request( @@ -2422,7 +2385,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) @@ -2498,7 +2461,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_definitions_delete_at_management_group_request( @@ -2559,7 +2522,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinition] = kwargs.pop("cls", None) request = build_policy_definitions_get_at_management_group_request( @@ -2633,7 +2596,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2725,7 +2688,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2824,7 +2787,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicyDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -2987,7 +2950,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -3065,7 +3028,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_request( @@ -3122,7 +3085,7 @@ def get(self, policy_set_definition_name: str, **kwargs: Any) -> _models.PolicyS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_request( @@ -3182,7 +3145,7 @@ def get_built_in(self, policy_set_definition_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_built_in_request( @@ -3253,7 +3216,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3343,7 +3306,7 @@ def list_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3500,7 +3463,7 @@ def create_or_update_at_management_group( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) @@ -3581,7 +3544,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_set_definitions_delete_at_management_group_request( @@ -3642,7 +3605,7 @@ def get_at_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinition] = kwargs.pop("cls", None) request = build_policy_set_definitions_get_at_management_group_request( @@ -3719,7 +3682,7 @@ def list_by_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-01")) cls: ClsType[_models.PolicySetDefinitionListResult] = kwargs.pop("cls", None) error_map = { @@ -3833,7 +3796,7 @@ def delete(self, scope: str, policy_assignment_name: str, **kwargs: Any) -> Opti _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_request( @@ -3982,7 +3945,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.PolicyAssignment] = kwargs.pop("cls", None) @@ -4060,7 +4023,7 @@ def get(self, scope: str, policy_assignment_name: 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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_request( @@ -4211,7 +4174,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.PolicyAssignment] = kwargs.pop("cls", None) @@ -4300,7 +4263,7 @@ def list_for_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -4435,7 +4398,7 @@ def list_for_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -4539,7 +4502,7 @@ def list_for_management_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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -4639,7 +4602,7 @@ def list( _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.PolicyAssignmentListResult] = kwargs.pop("cls", None) error_map = { @@ -4729,7 +4692,7 @@ def delete_by_id(self, policy_assignment_id: str, **kwargs: Any) -> Optional[_mo _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[Optional[_models.PolicyAssignment]] = kwargs.pop("cls", None) request = build_policy_assignments_delete_by_id_request( @@ -4873,7 +4836,7 @@ def create_by_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -4950,7 +4913,7 @@ def get_by_id(self, policy_assignment_id: str, **kwargs: Any) -> _models.PolicyA _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.PolicyAssignment] = kwargs.pop("cls", None) request = build_policy_assignments_get_by_id_request( @@ -5092,7 +5055,7 @@ def update_by_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyAssignment] = kwargs.pop("cls", None) @@ -5192,9 +5155,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_policy_exemptions_delete_request( @@ -5340,9 +5301,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-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) @@ -5426,9 +5385,7 @@ def get(self, scope: str, policy_exemption_name: str, **kwargs: Any) -> _models. _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) request = build_policy_exemptions_get_request( @@ -5573,9 +5530,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PolicyExemption] = kwargs.pop("cls", None) @@ -5654,9 +5609,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -5751,9 +5704,7 @@ def list_for_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -5882,9 +5833,7 @@ def list_for_resource( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -5985,9 +5934,7 @@ def list_for_management_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-07-01-preview")) cls: ClsType[_models.PolicyExemptionListResult] = kwargs.pop("cls", None) error_map = { @@ -6093,9 +6040,7 @@ def delete(self, variable_name: str, **kwargs: Any) -> None: # pylint: disable= _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_variables_delete_request( @@ -6204,9 +6149,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.Variable] = kwargs.pop("cls", None) @@ -6283,9 +6226,7 @@ def get(self, variable_name: str, **kwargs: Any) -> _models.Variable: _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.Variable] = kwargs.pop("cls", None) request = build_variables_get_request( @@ -6349,9 +6290,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _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_variables_delete_at_management_group_request( @@ -6478,9 +6417,7 @@ def create_or_update_at_management_group( _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.Variable] = kwargs.pop("cls", None) @@ -6559,9 +6496,7 @@ def get_at_management_group(self, management_group_id: str, variable_name: str, _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.Variable] = kwargs.pop("cls", None) request = build_variables_get_at_management_group_request( @@ -6611,9 +6546,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Variable"]: _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.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -6686,9 +6619,7 @@ def list_for_management_group(self, management_group_id: 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.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -6797,9 +6728,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_variable_values_delete_request( @@ -6927,9 +6856,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.VariableValue] = kwargs.pop("cls", None) @@ -7009,9 +6936,7 @@ def get(self, variable_name: str, variable_value_name: str, **kwargs: Any) -> _m _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.VariableValue] = kwargs.pop("cls", None) request = build_variable_values_get_request( @@ -7066,9 +6991,7 @@ def list(self, variable_name: str, **kwargs: Any) -> Iterable["_models.VariableV _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.VariableValueListResult] = kwargs.pop("cls", None) error_map = { @@ -7150,9 +7073,7 @@ def list_for_management_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.VariableValueListResult] = kwargs.pop("cls", None) error_map = { @@ -7244,9 +7165,7 @@ def delete_at_management_group( # pylint: disable=inconsistent-return-statement _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_variable_values_delete_at_management_group_request( @@ -7387,9 +7306,7 @@ def create_or_update_at_management_group( _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.VariableValue] = kwargs.pop("cls", None) @@ -7473,9 +7390,7 @@ def get_at_management_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.VariableValue] = kwargs.pop("cls", None) request = build_variable_values_get_at_management_group_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/_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/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_configuration.py index 325d1b3385035..7903080b08787 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_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 ResourcePrivateLinkClientConfiguration(Configuration): # pylint: disable= def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourcePrivateLinkClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", "2020-05-01") + api_version: str = kwargs.pop("api_version", "2020-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/_configuration.py index c4cac378352cc..c64e1e49f8907 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_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 ResourcePrivateLinkClientConfiguration(Configuration): # pylint: disable= def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourcePrivateLinkClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", "2020-05-01") + api_version: str = kwargs.pop("api_version", "2020-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/operations/_operations.py index b44a65650bf1b..dd8cde57c2e2e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_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, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -38,10 +37,6 @@ build_resource_management_private_link_put_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]] @@ -147,7 +142,7 @@ async def put( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkAssociation] = kwargs.pop("cls", None) @@ -223,7 +218,7 @@ async def get(self, group_id: str, pla_id: str, **kwargs: Any) -> _models.Privat _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.PrivateLinkAssociation] = kwargs.pop("cls", None) request = build_private_link_association_get_request( @@ -285,7 +280,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"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_private_link_association_delete_request( @@ -339,7 +334,7 @@ async def list(self, group_id: str, **kwargs: Any) -> _models.PrivateLinkAssocia _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.PrivateLinkAssociationGetResult] = kwargs.pop("cls", None) request = build_private_link_association_list_request( @@ -490,7 +485,7 @@ async def put( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceManagementPrivateLink] = kwargs.pop("cls", None) @@ -570,7 +565,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.ResourceManagementPrivateLink] = kwargs.pop("cls", None) request = build_resource_management_private_link_get_request( @@ -634,7 +629,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"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_management_private_link_delete_request( @@ -688,7 +683,7 @@ async def list(self, **kwargs: Any) -> _models.ResourceManagementPrivateLinkList _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.ResourceManagementPrivateLinkListResult] = kwargs.pop("cls", None) request = build_resource_management_private_link_list_request( @@ -749,7 +744,7 @@ async def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.ResourceManagementPrivateLinkListResult] = kwargs.pop("cls", None) request = build_resource_management_private_link_list_by_resource_group_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/operations/_operations.py index b5b8c02b6ed1b..aeb921fc44f54 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_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, 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]] @@ -39,11 +34,13 @@ _SERIALIZER.client_side_validation = False -def build_private_link_association_put_request(group_id: str, pla_id: str, **kwargs: Any) -> HttpRequest: +def build_private_link_association_put_request( # pylint: disable=name-too-long + group_id: str, pla_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -70,11 +67,13 @@ def build_private_link_association_put_request(group_id: str, pla_id: str, **kwa return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_private_link_association_get_request(group_id: str, pla_id: str, **kwargs: Any) -> HttpRequest: +def build_private_link_association_get_request( # pylint: disable=name-too-long + group_id: str, pla_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -98,11 +97,13 @@ def build_private_link_association_get_request(group_id: str, pla_id: str, **kwa return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_private_link_association_delete_request(group_id: str, pla_id: str, **kwargs: Any) -> HttpRequest: +def build_private_link_association_delete_request( # pylint: disable=name-too-long + group_id: str, pla_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -126,11 +127,13 @@ def build_private_link_association_delete_request(group_id: str, pla_id: str, ** return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_private_link_association_list_request(group_id: str, **kwargs: Any) -> HttpRequest: +def build_private_link_association_list_request( # pylint: disable=name-too-long + 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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -153,13 +156,13 @@ def build_private_link_association_list_request(group_id: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_management_private_link_put_request( +def build_resource_management_private_link_put_request( # pylint: disable=name-too-long resource_group_name: str, rmpl_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -189,13 +192,13 @@ def build_resource_management_private_link_put_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_management_private_link_get_request( +def build_resource_management_private_link_get_request( # pylint: disable=name-too-long resource_group_name: str, rmpl_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -222,13 +225,13 @@ def build_resource_management_private_link_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_management_private_link_delete_request( +def build_resource_management_private_link_delete_request( # pylint: disable=name-too-long resource_group_name: str, rmpl_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -255,11 +258,13 @@ def build_resource_management_private_link_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_management_private_link_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_resource_management_private_link_list_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -282,13 +287,13 @@ def build_resource_management_private_link_list_request(subscription_id: str, ** return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_management_private_link_list_by_resource_group_request( +def build_resource_management_private_link_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -415,7 +420,7 @@ def put( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkAssociation] = kwargs.pop("cls", None) @@ -491,7 +496,7 @@ def get(self, group_id: str, pla_id: str, **kwargs: Any) -> _models.PrivateLinkA _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.PrivateLinkAssociation] = kwargs.pop("cls", None) request = build_private_link_association_get_request( @@ -553,7 +558,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"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_private_link_association_delete_request( @@ -607,7 +612,7 @@ def list(self, group_id: str, **kwargs: Any) -> _models.PrivateLinkAssociationGe _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.PrivateLinkAssociationGetResult] = kwargs.pop("cls", None) request = build_private_link_association_list_request( @@ -758,7 +763,7 @@ def put( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceManagementPrivateLink] = kwargs.pop("cls", None) @@ -836,7 +841,7 @@ def get(self, resource_group_name: str, rmpl_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.ResourceManagementPrivateLink] = kwargs.pop("cls", None) request = build_resource_management_private_link_get_request( @@ -900,7 +905,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"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_management_private_link_delete_request( @@ -954,7 +959,7 @@ def list(self, **kwargs: Any) -> _models.ResourceManagementPrivateLinkListResult _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.ResourceManagementPrivateLinkListResult] = kwargs.pop("cls", None) request = build_resource_management_private_link_list_request( @@ -1015,7 +1020,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"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01")) cls: ClsType[_models.ResourceManagementPrivateLinkListResult] = kwargs.pop("cls", None) request = build_resource_management_private_link_list_by_resource_group_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_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/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_configuration.py index 1ff09f943f7d1..78c6dd70014c9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", "2016-02-01") + api_version: str = kwargs.pop("api_version", "2016-02-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/_configuration.py index a8099c5b91469..fe4eadfd7401e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", "2016-02-01") + api_version: str = kwargs.pop("api_version", "2016-02-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/operations/_operations.py index c5bcb3531e61d..e6dee1fd0b29c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/aio/operations/_operations.py @@ -73,10 +73,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -115,7 +111,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["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -172,7 +168,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) 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) @@ -237,7 +233,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -285,7 +281,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["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -446,7 +442,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["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -516,7 +512,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -580,7 +576,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -701,7 +697,7 @@ async def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -781,7 +777,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -840,7 +836,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -935,7 +931,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -1014,7 +1010,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -1070,7 +1066,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -1124,7 +1120,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -1221,7 +1217,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -1309,7 +1305,7 @@ def list_resources( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -1404,7 +1400,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -1510,7 +1506,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -1574,7 +1570,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["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -1626,7 +1622,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) 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) @@ -1686,7 +1682,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -1804,7 +1800,7 @@ async def patch( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -1925,7 +1921,7 @@ async def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -1993,7 +1989,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -2097,7 +2093,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2230,7 +2226,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2297,7 +2293,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -3104,7 +3100,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -3159,7 +3155,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -3220,7 +3216,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -3280,7 +3276,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -3323,7 +3319,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -3440,7 +3436,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -3500,7 +3496,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_operations.py index d4080c7eebfc0..932956d8fa8d3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +49,7 @@ def build_deployments_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -75,12 +71,12 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -102,13 +98,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -144,7 +140,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -176,7 +172,7 @@ def build_deployments_cancel_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -204,7 +200,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -234,13 +230,13 @@ def build_deployments_validate_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -278,7 +274,7 @@ def build_deployments_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -308,11 +304,13 @@ def build_deployments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -336,7 +334,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -365,7 +363,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -392,7 +390,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -422,7 +420,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -445,7 +443,7 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_list_resources_request( +def build_resource_groups_list_resources_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -457,7 +455,7 @@ def build_resource_groups_list_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -486,12 +484,12 @@ def build_resource_groups_list_resources_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -509,13 +507,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -544,7 +542,7 @@ def build_resource_groups_create_or_update_request( def build_resource_groups_delete_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -566,7 +564,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -593,7 +591,7 @@ def build_resource_groups_patch_request(resource_group_name: str, subscription_i _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -619,13 +617,13 @@ def build_resource_groups_patch_request(resource_group_name: str, subscription_i return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -659,7 +657,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -689,7 +687,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -730,7 +728,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -968,7 +966,7 @@ def build_resources_get_request( def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") path_format_arguments = { @@ -985,13 +983,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1017,7 +1015,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1041,7 +1039,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k def build_tags_delete_request(tag_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}") path_format_arguments = { @@ -1061,7 +1059,7 @@ def build_tags_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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1087,7 +1085,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1121,7 +1119,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1183,7 +1181,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["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -1240,7 +1238,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) 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) @@ -1305,7 +1303,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -1353,7 +1351,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["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1514,7 +1512,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["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1584,7 +1582,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -1648,7 +1646,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -1769,7 +1767,7 @@ def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -1849,7 +1847,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -1908,7 +1906,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2003,7 +2001,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -2082,7 +2080,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -2138,7 +2136,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -2192,7 +2190,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -2287,7 +2285,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -2375,7 +2373,7 @@ def list_resources( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -2470,7 +2468,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -2576,7 +2574,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -2640,7 +2638,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["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -2692,7 +2690,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) 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) @@ -2752,7 +2750,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -2870,7 +2868,7 @@ def patch( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -2991,7 +2989,7 @@ def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -3059,7 +3057,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -3163,7 +3161,7 @@ def _move_resources_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -3296,7 +3294,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3363,7 +3361,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -4170,7 +4168,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -4225,7 +4223,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -4286,7 +4284,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -4346,7 +4344,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -4389,7 +4387,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -4506,7 +4504,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -4566,7 +4564,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-02-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_configuration.py index c63bd242deca4..9e50aa668b2d4 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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 @@ -42,7 +36,7 @@ class ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/_configuration.py index 46669dae52ed3..ae1d34d279c8c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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 @@ -42,7 +36,7 @@ class ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_operations.py index c9d00620f23c4..95156762b051c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/aio/operations/_operations.py @@ -78,10 +78,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -120,7 +116,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["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[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -186,7 +182,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _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[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -251,7 +247,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _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[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -299,7 +295,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["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.DeploymentExtended] = kwargs.pop("cls", None) @@ -466,7 +462,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["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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -536,7 +532,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -605,7 +601,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _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[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -729,7 +725,7 @@ async def validate( _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.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -809,7 +805,7 @@ async def export_template( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -870,7 +866,7 @@ def list( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -965,7 +961,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -1045,7 +1041,7 @@ async def unregister(self, resource_provider_namespace: str, **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.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -1102,7 +1098,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _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.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -1158,7 +1154,7 @@ def list( _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -1255,7 +1251,7 @@ async def get( _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -1342,7 +1338,7 @@ def list_resources( _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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -1437,7 +1433,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _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[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -1541,7 +1537,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.ResourceGroup] = kwargs.pop("cls", None) @@ -1605,7 +1601,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["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[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -1660,7 +1656,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _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[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1720,7 +1716,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _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.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -1842,7 +1838,7 @@ async def patch( _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.ResourceGroup] = kwargs.pop("cls", None) @@ -1961,7 +1957,7 @@ async def export_template( _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.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -2029,7 +2025,7 @@ def list( _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.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -2133,7 +2129,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _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[None] = kwargs.pop("cls", None) @@ -2281,7 +2277,7 @@ async def begin_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2348,7 +2344,7 @@ def list( _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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -3958,7 +3954,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _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[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -4013,7 +4009,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _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.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -4078,7 +4074,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _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.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -4140,7 +4136,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _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[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -4183,7 +4179,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _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.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -4300,7 +4296,7 @@ async def get( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -4360,7 +4356,7 @@ def list( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_operations.py index 73869ae8e3641..06eace0837654 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +49,7 @@ def build_deployments_delete_request( ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -77,12 +73,12 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -106,13 +102,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -150,7 +146,7 @@ def build_deployments_get_request( _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 @@ -184,7 +180,7 @@ def build_deployments_cancel_request( ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -214,7 +210,7 @@ def build_deployments_validate_request( _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") @@ -246,13 +242,13 @@ def build_deployments_validate_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -292,7 +288,7 @@ def build_deployments_list_request( _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 @@ -322,11 +318,13 @@ def build_deployments_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **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") @@ -350,7 +348,7 @@ def build_providers_unregister_request( _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 @@ -379,7 +377,7 @@ def build_providers_register_request( _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 @@ -406,7 +404,7 @@ def build_providers_list_request( _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 @@ -436,7 +434,7 @@ def build_providers_get_request( _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 @@ -459,7 +457,7 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_list_resources_request( +def build_resource_groups_list_resources_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -471,7 +469,7 @@ def build_resource_groups_list_resources_request( _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 @@ -500,12 +498,12 @@ def build_resource_groups_list_resources_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -523,13 +521,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -558,7 +556,7 @@ def build_resource_groups_create_or_update_request( def build_resource_groups_delete_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -580,7 +578,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _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 @@ -607,7 +605,7 @@ def build_resource_groups_patch_request(resource_group_name: str, subscription_i _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") @@ -633,13 +631,13 @@ def build_resource_groups_patch_request(resource_group_name: str, subscription_i return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -673,7 +671,7 @@ def build_resource_groups_list_request( _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 @@ -703,7 +701,7 @@ def build_resources_move_resources_request( _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)) # Construct URL _url = kwargs.pop( @@ -744,7 +742,7 @@ def build_resources_list_request( _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 @@ -979,7 +977,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1013,7 +1013,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1091,7 +1093,7 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") path_format_arguments = { @@ -1108,13 +1110,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1140,7 +1142,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _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 @@ -1164,7 +1166,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k def build_tags_delete_request(tag_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}") path_format_arguments = { @@ -1184,7 +1186,7 @@ def build_tags_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-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 @@ -1210,7 +1212,7 @@ def build_deployment_operations_get_request( _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 @@ -1246,7 +1248,7 @@ def build_deployment_operations_list_request( _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 @@ -1310,7 +1312,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["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[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -1376,7 +1378,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _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[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1441,7 +1443,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _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[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -1489,7 +1491,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["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.DeploymentExtended] = kwargs.pop("cls", None) @@ -1656,7 +1658,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["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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1726,7 +1728,7 @@ def get(self, resource_group_name: str, deployment_name: str, **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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -1795,7 +1797,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _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[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -1919,7 +1921,7 @@ def validate( _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.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -1999,7 +2001,7 @@ def export_template( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -2060,7 +2062,7 @@ def list( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2155,7 +2157,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -2235,7 +2237,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _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.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -2292,7 +2294,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _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.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -2348,7 +2350,7 @@ def list( _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -2443,7 +2445,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -2530,7 +2532,7 @@ def list_resources( _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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -2625,7 +2627,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _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[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -2729,7 +2731,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.ResourceGroup] = kwargs.pop("cls", None) @@ -2793,7 +2795,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["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[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -2848,7 +2850,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _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[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -2908,7 +2910,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _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.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -3030,7 +3032,7 @@ def patch( _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.ResourceGroup] = kwargs.pop("cls", None) @@ -3149,7 +3151,7 @@ def export_template( _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.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -3217,7 +3219,7 @@ def list( _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.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -3321,7 +3323,7 @@ def _move_resources_initial( # pylint: disable=inconsistent-return-statements _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[None] = kwargs.pop("cls", None) @@ -3469,7 +3471,7 @@ def begin_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3536,7 +3538,7 @@ def list( _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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -5146,7 +5148,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _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[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -5201,7 +5203,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **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.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -5266,7 +5268,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _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.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -5328,7 +5330,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _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[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -5371,7 +5373,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _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.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -5488,7 +5490,7 @@ def get( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -5548,7 +5550,7 @@ def list( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_configuration.py index 014f53cf766c4..5cc05c109300f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", "2017-05-10") + api_version: str = kwargs.pop("api_version", "2017-05-10") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/_configuration.py index 2db84653a693c..6576c39f117b6 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", "2017-05-10") + api_version: str = kwargs.pop("api_version", "2017-05-10") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/operations/_operations.py index 90a2d448cc7cb..b5fa7ca593d4b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/aio/operations/_operations.py @@ -79,10 +79,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -121,7 +117,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["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -187,7 +183,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) 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) @@ -252,7 +248,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -300,7 +296,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["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -467,7 +463,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["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -537,7 +533,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -606,7 +602,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -730,7 +726,7 @@ async def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -810,7 +806,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -871,7 +867,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -966,7 +962,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -1046,7 +1042,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -1103,7 +1099,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -1159,7 +1155,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -1256,7 +1252,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -1343,7 +1339,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -1431,7 +1427,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1579,7 +1575,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1635,7 +1631,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1789,7 +1785,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1856,7 +1852,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -3463,7 +3459,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -3567,7 +3563,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-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -3631,7 +3627,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["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -3686,7 +3682,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) 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) @@ -3746,7 +3742,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -3869,7 +3865,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -3988,7 +3984,7 @@ async def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -4056,7 +4052,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -4172,7 +4168,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -4227,7 +4223,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -4292,7 +4288,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -4354,7 +4350,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -4397,7 +4393,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -4514,7 +4510,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -4574,7 +4570,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_operations.py index ba4f1ca6d7afd..35b34e7a7ad2a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +49,7 @@ def build_deployments_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -77,12 +73,12 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -106,13 +102,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -150,7 +146,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -184,7 +180,7 @@ def build_deployments_cancel_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -214,7 +210,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -246,13 +242,13 @@ def build_deployments_validate_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -281,7 +277,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -292,7 +288,7 @@ def build_deployments_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -322,11 +318,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -350,7 +348,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -379,7 +377,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -406,7 +404,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -436,7 +434,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -459,7 +457,7 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -471,7 +469,7 @@ def build_resources_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -506,7 +504,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -536,13 +534,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -583,7 +581,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -818,7 +816,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -852,7 +852,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -927,12 +929,12 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -950,13 +952,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -985,7 +987,7 @@ def build_resource_groups_create_or_update_request( def build_resource_groups_delete_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1007,7 +1009,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1034,7 +1036,7 @@ def build_resource_groups_update_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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1060,13 +1062,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1100,7 +1102,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1127,7 +1129,7 @@ def build_resource_groups_list_request( def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") path_format_arguments = { @@ -1144,13 +1146,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1176,7 +1178,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1200,7 +1202,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k def build_tags_delete_request(tag_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}") path_format_arguments = { @@ -1220,7 +1222,7 @@ def build_tags_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-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1246,7 +1248,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1282,7 +1284,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1346,7 +1348,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["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -1412,7 +1414,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) 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) @@ -1477,7 +1479,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -1525,7 +1527,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["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1692,7 +1694,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["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1762,7 +1764,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -1831,7 +1833,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -1955,7 +1957,7 @@ def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2035,7 +2037,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -2096,7 +2098,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2191,7 +2193,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -2271,7 +2273,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -2328,7 +2330,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -2384,7 +2386,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -2479,7 +2481,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -2566,7 +2568,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -2654,7 +2656,7 @@ def _move_resources_initial( # 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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2802,7 +2804,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2858,7 +2860,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -3012,7 +3014,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3079,7 +3081,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -4686,7 +4688,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -4790,7 +4792,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-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -4854,7 +4856,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["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -4909,7 +4911,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) 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) @@ -4969,7 +4971,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -5092,7 +5094,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -5211,7 +5213,7 @@ def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -5279,7 +5281,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -5395,7 +5397,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -5450,7 +5452,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -5515,7 +5517,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -5577,7 +5579,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -5620,7 +5622,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -5737,7 +5739,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -5797,7 +5799,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_configuration.py index b7a596625bcee..7a6135c5b4444 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", "2018-02-01") + api_version: str = kwargs.pop("api_version", "2018-02-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/_configuration.py index 59bb30fad6a3a..9dc041196d1b8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", "2018-02-01") + api_version: str = kwargs.pop("api_version", "2018-02-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/operations/_operations.py index 0304652354b85..50e9c5ab4efe8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/aio/operations/_operations.py @@ -79,10 +79,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -121,7 +117,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["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -187,7 +183,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) 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) @@ -252,7 +248,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -300,7 +296,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["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -467,7 +463,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["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -537,7 +533,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -606,7 +602,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -730,7 +726,7 @@ async def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -810,7 +806,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -871,7 +867,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -966,7 +962,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -1046,7 +1042,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -1103,7 +1099,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -1159,7 +1155,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -1256,7 +1252,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -1343,7 +1339,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -1431,7 +1427,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1579,7 +1575,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1635,7 +1631,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1789,7 +1785,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1854,7 +1850,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -3461,7 +3457,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -3565,7 +3561,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -3629,7 +3625,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["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -3684,7 +3680,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) 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) @@ -3744,7 +3740,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -3867,7 +3863,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -3986,7 +3982,7 @@ async def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -4054,7 +4050,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -4170,7 +4166,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -4225,7 +4221,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -4290,7 +4286,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -4352,7 +4348,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -4395,7 +4391,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -4512,7 +4508,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -4572,7 +4568,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_operations.py index b6923fa8c89e1..ea9822ffea431 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +49,7 @@ def build_deployments_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -77,12 +73,12 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -106,13 +102,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -150,7 +146,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -184,7 +180,7 @@ def build_deployments_cancel_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -214,7 +210,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -246,13 +242,13 @@ def build_deployments_validate_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -281,7 +277,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -292,7 +288,7 @@ def build_deployments_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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -322,11 +318,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -350,7 +348,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -379,7 +377,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -406,7 +404,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -436,7 +434,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -459,7 +457,7 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -471,7 +469,7 @@ def build_resources_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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -506,7 +504,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -536,13 +534,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -583,7 +581,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -818,7 +816,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -852,7 +852,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -927,12 +929,12 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -950,13 +952,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -985,7 +987,7 @@ def build_resource_groups_create_or_update_request( def build_resource_groups_delete_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1007,7 +1009,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1034,7 +1036,7 @@ def build_resource_groups_update_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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1060,13 +1062,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1100,7 +1102,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1127,7 +1129,7 @@ def build_resource_groups_list_request( def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") path_format_arguments = { @@ -1144,13 +1146,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1176,7 +1178,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1200,7 +1202,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k def build_tags_delete_request(tag_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}") path_format_arguments = { @@ -1220,7 +1222,7 @@ def build_tags_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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1246,7 +1248,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1282,7 +1284,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1346,7 +1348,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["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -1412,7 +1414,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) 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) @@ -1477,7 +1479,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -1525,7 +1527,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["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1692,7 +1694,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["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1762,7 +1764,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -1831,7 +1833,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -1955,7 +1957,7 @@ def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2035,7 +2037,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -2096,7 +2098,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2191,7 +2193,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -2271,7 +2273,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -2328,7 +2330,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -2384,7 +2386,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -2479,7 +2481,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -2566,7 +2568,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -2654,7 +2656,7 @@ def _move_resources_initial( # 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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2802,7 +2804,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2858,7 +2860,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -3012,7 +3014,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3077,7 +3079,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -4684,7 +4686,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -4788,7 +4790,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -4852,7 +4854,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["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -4907,7 +4909,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) 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) @@ -4967,7 +4969,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -5090,7 +5092,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -5209,7 +5211,7 @@ def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -5277,7 +5279,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -5393,7 +5395,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -5448,7 +5450,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -5513,7 +5515,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -5575,7 +5577,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -5618,7 +5620,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -5735,7 +5737,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -5795,7 +5797,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-02-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_configuration.py index a7a96691352a0..5872ac986b1da 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", "2018-05-01") + api_version: str = kwargs.pop("api_version", "2018-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/_configuration.py index b21dd0b571f30..7dee4794807d7 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", "2018-05-01") + api_version: str = kwargs.pop("api_version", "2018-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/operations/_operations.py index b90a8eeabc0be..9cac957e4ac29 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/aio/operations/_operations.py @@ -90,10 +90,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -131,7 +127,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -232,7 +228,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -293,7 +289,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) 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) @@ -354,7 +350,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -387,7 +383,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -401,7 +397,7 @@ async def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -454,7 +450,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -489,7 +485,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -519,7 +515,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -551,7 +547,7 @@ async def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -617,7 +613,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -682,7 +678,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -789,7 +785,7 @@ async def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -865,7 +861,7 @@ async def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -922,7 +918,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1008,7 +1004,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -1074,7 +1070,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) 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) @@ -1139,7 +1135,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -1187,7 +1183,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1354,7 +1350,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1424,7 +1420,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -1493,7 +1489,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -1617,7 +1613,7 @@ async def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -1697,7 +1693,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -1758,7 +1754,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1853,7 +1849,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -1933,7 +1929,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -1990,7 +1986,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -2046,7 +2042,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -2143,7 +2139,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -2243,7 +2239,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -2331,7 +2327,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2479,7 +2475,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2535,7 +2531,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2689,7 +2685,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2769,7 +2765,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -4376,7 +4372,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -4486,7 +4482,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -4550,7 +4546,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -4605,7 +4601,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) 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) @@ -4665,7 +4661,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -4788,7 +4784,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -4907,7 +4903,7 @@ async def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -4977,7 +4973,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -5093,7 +5089,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -5148,7 +5144,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -5213,7 +5209,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -5275,7 +5271,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -5318,7 +5314,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -5432,7 +5428,7 @@ async def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -5488,7 +5484,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -5589,7 +5585,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -5649,7 +5645,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_operations.py index 83d7d0e479d72..39e368519c08e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,12 +63,12 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" @@ -92,12 +88,12 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" @@ -117,13 +113,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -151,13 +147,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -182,12 +178,12 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -208,13 +204,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -243,13 +239,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -275,13 +271,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -310,7 +306,7 @@ def build_deployments_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -334,12 +330,12 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -363,13 +359,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -407,7 +403,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -441,7 +437,7 @@ def build_deployments_cancel_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -471,7 +467,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -503,13 +499,13 @@ def build_deployments_validate_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -538,7 +534,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -549,7 +545,7 @@ def build_deployments_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -579,11 +575,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -607,7 +605,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -636,7 +634,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -663,7 +661,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -693,7 +691,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -716,7 +714,7 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -728,7 +726,7 @@ def build_resources_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -763,7 +761,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -793,13 +791,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -840,7 +838,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1075,7 +1073,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1109,7 +1109,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1184,12 +1186,12 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1207,13 +1209,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1242,7 +1244,7 @@ def build_resource_groups_create_or_update_request( def build_resource_groups_delete_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1264,7 +1266,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1291,7 +1293,7 @@ def build_resource_groups_update_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1317,13 +1319,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1357,7 +1359,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1384,7 +1386,7 @@ def build_resource_groups_list_request( def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") path_format_arguments = { @@ -1401,13 +1403,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1433,7 +1435,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1457,7 +1459,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k def build_tags_delete_request(tag_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}") path_format_arguments = { @@ -1477,7 +1479,7 @@ def build_tags_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1497,13 +1499,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1530,13 +1532,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1570,7 +1572,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1606,7 +1608,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1669,7 +1671,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -1770,7 +1772,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -1831,7 +1833,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) 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) @@ -1892,7 +1894,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -1925,7 +1927,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1939,7 +1941,7 @@ def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1992,7 +1994,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -2027,7 +2029,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -2057,7 +2059,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -2089,7 +2091,7 @@ def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2155,7 +2157,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -2220,7 +2222,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -2327,7 +2329,7 @@ def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2403,7 +2405,7 @@ def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -2460,7 +2462,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2546,7 +2548,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -2612,7 +2614,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) 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) @@ -2677,7 +2679,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -2725,7 +2727,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2892,7 +2894,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2962,7 +2964,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -3031,7 +3033,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -3155,7 +3157,7 @@ def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -3235,7 +3237,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -3296,7 +3298,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3391,7 +3393,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -3471,7 +3473,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -3528,7 +3530,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -3584,7 +3586,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -3679,7 +3681,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -3779,7 +3781,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -3867,7 +3869,7 @@ def _move_resources_initial( # 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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -4015,7 +4017,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4071,7 +4073,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -4225,7 +4227,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4305,7 +4307,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -5912,7 +5914,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -6022,7 +6024,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -6086,7 +6088,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["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -6141,7 +6143,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) 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) @@ -6201,7 +6203,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -6324,7 +6326,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -6443,7 +6445,7 @@ def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -6513,7 +6515,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -6629,7 +6631,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -6684,7 +6686,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -6749,7 +6751,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -6811,7 +6813,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -6854,7 +6856,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -6968,7 +6970,7 @@ def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -7024,7 +7026,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -7125,7 +7127,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -7185,7 +7187,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_configuration.py index 0bcefd97cb75a..dbb3b4d20096d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/_configuration.py index 78725e3e82be2..18096dbbf753c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/operations/_operations.py index bd29016e819fe..1cc7caa717b2a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/aio/operations/_operations.py @@ -90,10 +90,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -131,7 +127,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["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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -232,7 +228,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _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_deployments_delete_at_subscription_scope_request( @@ -293,7 +289,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -354,7 +350,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _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_deployments_check_existence_at_subscription_scope_request( @@ -387,7 +383,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -401,7 +397,7 @@ async def _create_or_update_at_subscription_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -454,7 +450,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -489,7 +485,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -519,7 +515,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -551,7 +547,7 @@ async def begin_create_or_update_at_subscription_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -617,7 +613,7 @@ async def get_at_subscription_scope(self, deployment_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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -682,7 +678,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _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_deployments_cancel_at_subscription_scope_request( @@ -789,7 +785,7 @@ async def validate_at_subscription_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -865,7 +861,7 @@ async def export_template_at_subscription_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -922,7 +918,7 @@ def list_at_subscription_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1008,7 +1004,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-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_deployments_delete_request( @@ -1074,7 +1070,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1139,7 +1135,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _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_deployments_check_existence_request( @@ -1187,7 +1183,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-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.DeploymentExtended] = kwargs.pop("cls", None) @@ -1354,7 +1350,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-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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1424,7 +1420,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -1493,7 +1489,7 @@ async def cancel( # 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_deployments_cancel_request( @@ -1617,7 +1613,7 @@ async def validate( _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.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -1697,7 +1693,7 @@ async def export_template( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -1758,7 +1754,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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1853,7 +1849,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -1933,7 +1929,7 @@ async def unregister(self, resource_provider_namespace: 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.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -1990,7 +1986,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _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.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -2046,7 +2042,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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -2143,7 +2139,7 @@ async def get( _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -2243,7 +2239,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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -2331,7 +2327,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _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) @@ -2479,7 +2475,7 @@ async def begin_move_resources( _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2535,7 +2531,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _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) @@ -2689,7 +2685,7 @@ async def begin_validate_move_resources( _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2769,7 +2765,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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -4376,7 +4372,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _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_resource_groups_check_existence_request( @@ -4486,7 +4482,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.ResourceGroup] = kwargs.pop("cls", None) @@ -4550,7 +4546,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-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_resource_groups_delete_request( @@ -4605,7 +4601,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -4665,7 +4661,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _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.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -4788,7 +4784,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.ResourceGroup] = kwargs.pop("cls", None) @@ -4907,7 +4903,7 @@ async def export_template( _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.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -4977,7 +4973,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.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -5093,7 +5089,7 @@ async def delete_value( # 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_tags_delete_value_request( @@ -5148,7 +5144,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: 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.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -5213,7 +5209,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _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.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -5275,7 +5271,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _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_tags_delete_request( @@ -5318,7 +5314,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _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.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -5432,7 +5428,7 @@ async def get_at_subscription_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -5488,7 +5484,7 @@ def list_at_subscription_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -5589,7 +5585,7 @@ async def get( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -5649,7 +5645,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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/operations/_operations.py index 51cf9328cd4c3..5abe9a2769334 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_03_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -67,12 +63,12 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" @@ -92,12 +88,12 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" @@ -117,13 +113,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -151,13 +147,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -182,12 +178,12 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -208,13 +204,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -243,13 +239,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -275,13 +271,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -310,7 +306,7 @@ def build_deployments_delete_request( ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -334,12 +330,12 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -363,13 +359,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -407,7 +403,7 @@ def build_deployments_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 @@ -441,7 +437,7 @@ def build_deployments_cancel_request( ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop( "template_url", @@ -471,7 +467,7 @@ def build_deployments_validate_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") @@ -503,13 +499,13 @@ def build_deployments_validate_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -538,7 +534,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -549,7 +545,7 @@ def build_deployments_list_by_resource_group_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 @@ -579,11 +575,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _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") @@ -607,7 +605,7 @@ def build_providers_unregister_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 @@ -636,7 +634,7 @@ def build_providers_register_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 @@ -663,7 +661,7 @@ def build_providers_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 @@ -693,7 +691,7 @@ def build_providers_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 @@ -716,7 +714,7 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -728,7 +726,7 @@ def build_resources_list_by_resource_group_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 @@ -763,7 +761,7 @@ def build_resources_move_resources_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)) # Construct URL _url = kwargs.pop( @@ -793,13 +791,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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)) # Construct URL _url = kwargs.pop( @@ -840,7 +838,7 @@ def build_resources_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 @@ -1075,7 +1073,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1109,7 +1109,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1184,12 +1186,12 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1207,13 +1209,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1242,7 +1244,7 @@ def build_resource_groups_create_or_update_request( def build_resource_groups_delete_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1264,7 +1266,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _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 @@ -1291,7 +1293,7 @@ def build_resource_groups_update_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1317,13 +1319,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1357,7 +1359,7 @@ def build_resource_groups_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 @@ -1384,7 +1386,7 @@ def build_resource_groups_list_request( def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") path_format_arguments = { @@ -1401,13 +1403,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1433,7 +1435,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _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 @@ -1457,7 +1459,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k def build_tags_delete_request(tag_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _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")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}") path_format_arguments = { @@ -1477,7 +1479,7 @@ def build_tags_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-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 @@ -1497,13 +1499,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1530,13 +1532,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -1570,7 +1572,7 @@ def build_deployment_operations_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 @@ -1606,7 +1608,7 @@ def build_deployment_operations_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 @@ -1669,7 +1671,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["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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -1770,7 +1772,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _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_deployments_delete_at_subscription_scope_request( @@ -1831,7 +1833,7 @@ def begin_delete_at_subscription_scope(self, deployment_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[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1892,7 +1894,7 @@ def check_existence_at_subscription_scope(self, deployment_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[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -1925,7 +1927,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1939,7 +1941,7 @@ def _create_or_update_at_subscription_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -1992,7 +1994,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -2027,7 +2029,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -2057,7 +2059,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -2089,7 +2091,7 @@ def begin_create_or_update_at_subscription_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2155,7 +2157,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -2220,7 +2222,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _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_deployments_cancel_at_subscription_scope_request( @@ -2327,7 +2329,7 @@ def validate_at_subscription_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2403,7 +2405,7 @@ def export_template_at_subscription_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -2460,7 +2462,7 @@ def list_at_subscription_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2546,7 +2548,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-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_deployments_delete_request( @@ -2612,7 +2614,7 @@ def begin_delete(self, resource_group_name: str, deployment_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[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -2677,7 +2679,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _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_deployments_check_existence_request( @@ -2725,7 +2727,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-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.DeploymentExtended] = kwargs.pop("cls", None) @@ -2892,7 +2894,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-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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2962,7 +2964,7 @@ def get(self, resource_group_name: str, deployment_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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -3031,7 +3033,7 @@ def cancel( # 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_deployments_cancel_request( @@ -3155,7 +3157,7 @@ def validate( _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.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -3235,7 +3237,7 @@ def export_template( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -3296,7 +3298,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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3391,7 +3393,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -3471,7 +3473,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _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.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -3528,7 +3530,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _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.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -3584,7 +3586,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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -3679,7 +3681,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -3779,7 +3781,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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -3867,7 +3869,7 @@ def _move_resources_initial( # 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) @@ -4015,7 +4017,7 @@ def begin_move_resources( _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4071,7 +4073,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _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) @@ -4225,7 +4227,7 @@ def begin_validate_move_resources( _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4305,7 +4307,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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -5912,7 +5914,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _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_resource_groups_check_existence_request( @@ -6022,7 +6024,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.ResourceGroup] = kwargs.pop("cls", None) @@ -6086,7 +6088,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-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_resource_groups_delete_request( @@ -6141,7 +6143,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -6201,7 +6203,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _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.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -6324,7 +6326,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.ResourceGroup] = kwargs.pop("cls", None) @@ -6443,7 +6445,7 @@ def export_template( _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.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -6513,7 +6515,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.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -6629,7 +6631,7 @@ def delete_value( # 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_tags_delete_value_request( @@ -6684,7 +6686,7 @@ def create_or_update_value(self, tag_name: str, tag_value: 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.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -6749,7 +6751,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _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.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -6811,7 +6813,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _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_tags_delete_request( @@ -6854,7 +6856,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _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.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -6968,7 +6970,7 @@ def get_at_subscription_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -7024,7 +7026,7 @@ def list_at_subscription_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -7125,7 +7127,7 @@ def get( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -7185,7 +7187,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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_configuration.py index e8e568c6ede23..aeb7dd4cc9564 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", "2019-05-01") + api_version: str = kwargs.pop("api_version", "2019-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/_configuration.py index c7b3be52192bf..cab380a8bc2ef 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", "2019-05-01") + api_version: str = kwargs.pop("api_version", "2019-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/operations/_operations.py index cee7a3b26ce29..36adf84181bf5 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/aio/operations/_operations.py @@ -100,10 +100,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -141,7 +137,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["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -228,7 +224,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -242,7 +238,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -307,7 +303,7 @@ async def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) 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) @@ -348,7 +344,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -373,7 +369,7 @@ async def check_existence_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -406,7 +402,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -420,7 +416,7 @@ async def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -473,7 +469,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -511,7 +507,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -549,7 +545,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -583,7 +579,7 @@ async def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -654,7 +650,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -721,7 +717,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -841,7 +837,7 @@ async def validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -894,7 +890,7 @@ async def validate_at_management_group_scope( } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -919,7 +915,7 @@ async def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -978,7 +974,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1064,7 +1060,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -1125,7 +1121,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) 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) @@ -1186,7 +1182,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -1219,7 +1215,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1233,7 +1229,7 @@ async def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1286,7 +1282,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -1321,7 +1317,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -1351,7 +1347,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -1383,7 +1379,7 @@ async def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1449,7 +1445,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -1514,7 +1510,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -1621,7 +1617,7 @@ async def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -1697,7 +1693,7 @@ async def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -1754,7 +1750,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1840,7 +1836,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -1906,7 +1902,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) 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) @@ -1971,7 +1967,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -2019,7 +2015,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2186,7 +2182,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2256,7 +2252,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -2325,7 +2321,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -2449,7 +2445,7 @@ async def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2529,7 +2525,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -2590,7 +2586,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2685,7 +2681,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -2765,7 +2761,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -2822,7 +2818,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -2878,7 +2874,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -2975,7 +2971,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -3075,7 +3071,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -3163,7 +3159,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -3311,7 +3307,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3367,7 +3363,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -3521,7 +3517,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3601,7 +3597,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -5208,7 +5204,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -5318,7 +5314,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -5382,7 +5378,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -5437,7 +5433,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) 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) @@ -5497,7 +5493,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -5620,7 +5616,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -5739,7 +5735,7 @@ async def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -5809,7 +5805,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -5925,7 +5921,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -5980,7 +5976,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -6045,7 +6041,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -6107,7 +6103,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -6150,7 +6146,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -6266,7 +6262,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -6324,7 +6320,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -6422,7 +6418,7 @@ async def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -6478,7 +6474,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -6579,7 +6575,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -6639,7 +6635,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_operations.py index 253e57c42b6e8..0bb9383f96d05 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,12 +63,12 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -93,12 +89,12 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -119,13 +115,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -154,13 +150,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -186,12 +182,12 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -212,13 +208,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -247,13 +243,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -279,13 +275,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -312,12 +308,12 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" @@ -337,12 +333,12 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" @@ -362,13 +358,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -396,13 +392,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -427,12 +423,12 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -453,13 +449,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -488,13 +484,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -520,13 +516,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -555,7 +551,7 @@ def build_deployments_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -579,12 +575,12 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -608,13 +604,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -652,7 +648,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -686,7 +682,7 @@ def build_deployments_cancel_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -716,7 +712,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -748,13 +744,13 @@ def build_deployments_validate_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -783,7 +779,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -794,7 +790,7 @@ def build_deployments_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -824,11 +820,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -852,7 +850,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -881,7 +879,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -908,7 +906,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -938,7 +936,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -961,7 +959,7 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -973,7 +971,7 @@ def build_resources_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1008,7 +1006,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -1038,13 +1036,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -1085,7 +1083,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1320,7 +1318,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1354,7 +1354,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1429,12 +1431,12 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1452,13 +1454,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1487,7 +1489,7 @@ def build_resource_groups_create_or_update_request( def build_resource_groups_delete_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1509,7 +1511,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1536,7 +1538,7 @@ def build_resource_groups_update_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1562,13 +1564,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1602,7 +1604,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1629,7 +1631,7 @@ def build_resource_groups_list_request( def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") path_format_arguments = { @@ -1646,13 +1648,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1678,7 +1680,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1702,7 +1704,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k def build_tags_delete_request(tag_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}") path_format_arguments = { @@ -1722,7 +1724,7 @@ def build_tags_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1742,13 +1744,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1775,13 +1777,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1809,13 +1811,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1842,13 +1844,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1882,7 +1884,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1918,7 +1920,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1981,7 +1983,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["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -2068,7 +2070,7 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -2082,7 +2084,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -2147,7 +2149,7 @@ def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) 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) @@ -2188,7 +2190,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -2211,7 +2215,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -2244,7 +2248,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2258,7 +2262,7 @@ def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2311,7 +2315,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2349,7 +2353,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2387,7 +2391,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2421,7 +2425,7 @@ def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2492,7 +2496,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2559,7 +2563,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -2679,7 +2683,7 @@ def validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2732,7 +2736,7 @@ def validate_at_management_group_scope( } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -2757,7 +2761,7 @@ def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -2816,7 +2820,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2902,7 +2906,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -2963,7 +2967,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) 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) @@ -3024,7 +3028,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -3057,7 +3061,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3071,7 +3075,7 @@ def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3124,7 +3128,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -3159,7 +3163,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3189,7 +3193,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3221,7 +3225,7 @@ def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3287,7 +3291,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3352,7 +3356,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -3459,7 +3463,7 @@ def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -3535,7 +3539,7 @@ def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -3592,7 +3596,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3678,7 +3682,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -3744,7 +3748,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) 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) @@ -3809,7 +3813,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -3857,7 +3861,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4024,7 +4028,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4094,7 +4098,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4163,7 +4167,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -4287,7 +4291,7 @@ def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -4367,7 +4371,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -4428,7 +4432,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4523,7 +4527,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -4603,7 +4607,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -4660,7 +4664,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -4716,7 +4720,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -4811,7 +4815,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -4911,7 +4915,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -4999,7 +5003,7 @@ def _move_resources_initial( # 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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -5147,7 +5151,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5203,7 +5207,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -5357,7 +5361,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5437,7 +5441,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -7044,7 +7048,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -7154,7 +7158,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -7218,7 +7222,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-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -7273,7 +7277,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) 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) @@ -7333,7 +7337,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -7456,7 +7460,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -7575,7 +7579,7 @@ def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -7645,7 +7649,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -7761,7 +7765,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -7816,7 +7820,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -7881,7 +7885,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -7943,7 +7947,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -7986,7 +7990,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -8102,7 +8106,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -8160,7 +8164,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8258,7 +8262,7 @@ def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -8314,7 +8318,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8415,7 +8419,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -8475,7 +8479,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_configuration.py index efa983740c6ca..f0eac00162fc9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", "2019-05-10") + api_version: str = kwargs.pop("api_version", "2019-05-10") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/_configuration.py index 2773d8d62014c..f24c7e0a6ff32 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", "2019-05-10") + api_version: str = kwargs.pop("api_version", "2019-05-10") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/operations/_operations.py index d4f6e6a62e291..055897f5d585c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/aio/operations/_operations.py @@ -102,10 +102,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -143,7 +139,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["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -230,7 +226,7 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -244,7 +240,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -309,7 +305,7 @@ async def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) 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) @@ -350,7 +346,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -375,7 +371,7 @@ async def check_existence_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -408,7 +404,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -422,7 +418,7 @@ async def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -475,7 +471,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -513,7 +509,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -551,7 +547,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -585,7 +581,7 @@ async def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -656,7 +652,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -723,7 +719,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -843,7 +839,7 @@ async def validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -896,7 +892,7 @@ async def validate_at_management_group_scope( } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -921,7 +917,7 @@ async def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -980,7 +976,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1066,7 +1062,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -1127,7 +1123,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) 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) @@ -1188,7 +1184,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -1221,7 +1217,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1235,7 +1231,7 @@ async def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1288,7 +1284,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -1323,7 +1319,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -1353,7 +1349,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -1385,7 +1381,7 @@ async def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1451,7 +1447,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -1516,7 +1512,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -1623,7 +1619,7 @@ async def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -1699,7 +1695,7 @@ async def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -1756,7 +1752,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1842,7 +1838,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -1908,7 +1904,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) 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) @@ -1973,7 +1969,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -2021,7 +2017,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2188,7 +2184,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2258,7 +2254,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -2327,7 +2323,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -2451,7 +2447,7 @@ async def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2531,7 +2527,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -2592,7 +2588,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2687,7 +2683,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -2767,7 +2763,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -2824,7 +2820,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -2880,7 +2876,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -2972,7 +2968,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -3068,7 +3064,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -3130,7 +3126,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -3229,7 +3225,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -3317,7 +3313,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -3465,7 +3461,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3521,7 +3517,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -3675,7 +3671,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3755,7 +3751,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -5362,7 +5358,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -5472,7 +5468,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -5536,7 +5532,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -5591,7 +5587,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) 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) @@ -5651,7 +5647,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -5774,7 +5770,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -5893,7 +5889,7 @@ async def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -5963,7 +5959,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -6079,7 +6075,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -6134,7 +6130,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -6199,7 +6195,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -6261,7 +6257,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -6304,7 +6300,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -6420,7 +6416,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -6478,7 +6474,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -6576,7 +6572,7 @@ async def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -6632,7 +6628,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -6733,7 +6729,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -6793,7 +6789,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_operations.py index 739312f98f8fd..1ffa33d13d92b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,12 +63,12 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -93,12 +89,12 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -119,13 +115,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -154,13 +150,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -186,12 +182,12 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -212,13 +208,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -247,13 +243,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -279,13 +275,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -312,12 +308,12 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" @@ -337,12 +333,12 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" @@ -362,13 +358,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -396,13 +392,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -427,12 +423,12 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -453,13 +449,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -488,13 +484,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -520,13 +516,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -555,7 +551,7 @@ def build_deployments_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -579,12 +575,12 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -608,13 +604,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -652,7 +648,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -686,7 +682,7 @@ def build_deployments_cancel_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop( "template_url", @@ -716,7 +712,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -748,13 +744,13 @@ def build_deployments_validate_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -783,7 +779,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -794,7 +790,7 @@ def build_deployments_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -824,11 +820,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -852,7 +850,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -881,7 +879,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -908,7 +906,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -932,13 +930,13 @@ def build_providers_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_list_at_tenant_scope_request( +def build_providers_list_at_tenant_scope_request( # pylint: disable=name-too-long *, top: Optional[int] = None, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -963,7 +961,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -986,13 +984,13 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_get_at_tenant_scope_request( +def build_providers_get_at_tenant_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1014,7 +1012,7 @@ def build_providers_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1026,7 +1024,7 @@ def build_resources_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1061,7 +1059,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -1091,13 +1089,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -1138,7 +1136,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1373,7 +1371,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1407,7 +1407,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1482,12 +1484,12 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1505,13 +1507,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1540,7 +1542,7 @@ def build_resource_groups_create_or_update_request( def build_resource_groups_delete_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") path_format_arguments = { @@ -1562,7 +1564,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1589,7 +1591,7 @@ def build_resource_groups_update_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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1615,13 +1617,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1655,7 +1657,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1682,7 +1684,7 @@ def build_resource_groups_list_request( def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}") path_format_arguments = { @@ -1699,13 +1701,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1731,7 +1733,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1755,7 +1757,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k def build_tags_delete_request(tag_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) # Construct URL _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/tagNames/{tagName}") path_format_arguments = { @@ -1775,7 +1777,7 @@ def build_tags_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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1795,13 +1797,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1828,13 +1830,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1862,13 +1864,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1895,13 +1897,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1935,7 +1937,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1971,7 +1973,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2034,7 +2036,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["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -2121,7 +2123,7 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -2135,7 +2137,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -2200,7 +2202,7 @@ def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) 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) @@ -2241,7 +2243,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -2264,7 +2268,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -2297,7 +2301,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2311,7 +2315,7 @@ def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2364,7 +2368,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2402,7 +2406,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2440,7 +2444,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2474,7 +2478,7 @@ def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2545,7 +2549,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2612,7 +2616,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -2732,7 +2736,7 @@ def validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2785,7 +2789,7 @@ def validate_at_management_group_scope( } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -2810,7 +2814,7 @@ def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -2869,7 +2873,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2955,7 +2959,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -3016,7 +3020,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) 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) @@ -3077,7 +3081,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -3110,7 +3114,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3124,7 +3128,7 @@ def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3177,7 +3181,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -3212,7 +3216,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3242,7 +3246,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3274,7 +3278,7 @@ def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3340,7 +3344,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3405,7 +3409,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -3512,7 +3516,7 @@ def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -3588,7 +3592,7 @@ def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -3645,7 +3649,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3731,7 +3735,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -3797,7 +3801,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) 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) @@ -3862,7 +3866,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -3910,7 +3914,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4077,7 +4081,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4147,7 +4151,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4216,7 +4220,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -4340,7 +4344,7 @@ def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -4420,7 +4424,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -4481,7 +4485,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4576,7 +4580,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -4656,7 +4660,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -4713,7 +4717,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -4769,7 +4773,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -4861,7 +4865,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -4955,7 +4959,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -5017,7 +5021,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -5116,7 +5120,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -5204,7 +5208,7 @@ def _move_resources_initial( # 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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -5352,7 +5356,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5408,7 +5412,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -5562,7 +5566,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5642,7 +5646,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -7249,7 +7253,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -7359,7 +7363,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -7423,7 +7427,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-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -7478,7 +7482,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) 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) @@ -7538,7 +7542,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -7661,7 +7665,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -7780,7 +7784,7 @@ def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -7850,7 +7854,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -7966,7 +7970,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -8021,7 +8025,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -8086,7 +8090,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -8148,7 +8152,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -8191,7 +8195,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -8307,7 +8311,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -8365,7 +8369,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8463,7 +8467,7 @@ def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -8519,7 +8523,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8620,7 +8624,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -8680,7 +8684,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-05-10"] = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-05-10")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_configuration.py index 406103ee0454c..e3a0014c1055b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", "2019-07-01") + api_version: str = kwargs.pop("api_version", "2019-07-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/_configuration.py index dffcb211bc9a5..a4d59849c19a0 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", "2019-07-01") + api_version: str = kwargs.pop("api_version", "2019-07-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/operations/_operations.py index 1cde9bc4b52cc..e442038606d16 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/operations/_operations.py @@ -124,10 +124,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -165,7 +161,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["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -266,7 +262,7 @@ async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -327,7 +323,7 @@ async def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -389,7 +385,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -434,7 +430,7 @@ async def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -591,7 +587,7 @@ async def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -660,7 +656,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -725,7 +721,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -837,7 +833,7 @@ async def validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -913,7 +909,7 @@ async def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -972,7 +968,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1056,7 +1052,7 @@ async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -1114,7 +1110,7 @@ async def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -1173,7 +1169,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -1203,7 +1199,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - async def _create_or_update_at_tenant_scope_initial( + async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1217,7 +1213,7 @@ async def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1366,7 +1362,7 @@ async def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1432,7 +1428,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -1494,7 +1490,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -1598,7 +1594,7 @@ async def validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -1671,7 +1667,7 @@ async def export_template_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -1727,7 +1723,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1796,7 +1792,7 @@ async def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -1810,7 +1806,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -1875,7 +1871,7 @@ async def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -1916,7 +1912,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -1941,7 +1937,7 @@ async def check_existence_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -1974,7 +1970,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1988,7 +1984,7 @@ async def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2041,7 +2037,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2079,7 +2075,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2117,7 +2113,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2151,7 +2147,7 @@ async def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2222,7 +2218,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2289,7 +2285,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -2409,7 +2405,7 @@ async def validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2462,7 +2458,7 @@ async def validate_at_management_group_scope( } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -2487,7 +2483,7 @@ async def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -2546,7 +2542,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2632,7 +2628,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -2693,7 +2689,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -2754,7 +2750,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -2787,7 +2783,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2801,7 +2797,7 @@ async def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2854,7 +2850,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -2889,7 +2885,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -2919,7 +2915,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -2951,7 +2947,7 @@ async def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3017,7 +3013,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3082,7 +3078,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -3189,7 +3185,7 @@ async def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -3255,7 +3251,7 @@ async def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -3405,7 +3401,7 @@ async def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3475,7 +3471,7 @@ async def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -3532,7 +3528,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3618,7 +3614,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -3684,7 +3680,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -3749,7 +3745,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -3797,7 +3793,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3964,7 +3960,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4034,7 +4030,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4103,7 +4099,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -4227,7 +4223,7 @@ async def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -4298,7 +4294,7 @@ async def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4469,7 +4465,7 @@ async def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4543,7 +4539,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -4604,7 +4600,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4699,7 +4695,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -4779,7 +4775,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -4836,7 +4832,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -4892,7 +4888,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -4984,7 +4980,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5080,7 +5076,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -5142,7 +5138,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -5241,7 +5237,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -5329,7 +5325,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -5477,7 +5473,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5533,7 +5529,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -5687,7 +5683,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5767,7 +5763,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -7374,7 +7370,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -7484,7 +7480,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -7548,7 +7544,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -7603,7 +7599,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -7663,7 +7659,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -7786,7 +7782,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -7905,7 +7901,7 @@ async def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -7975,7 +7971,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -8091,7 +8087,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -8146,7 +8142,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -8211,7 +8207,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -8273,7 +8269,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -8316,7 +8312,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -8432,7 +8428,7 @@ async def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -8490,7 +8486,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8586,7 +8582,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -8641,7 +8637,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8738,7 +8734,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -8796,7 +8792,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8894,7 +8890,7 @@ async def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -8950,7 +8946,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -9051,7 +9047,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -9111,7 +9107,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_operations.py index 272e4570ebe5d..2e1a92b2119bf 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,11 +63,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -94,11 +92,13 @@ def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -121,11 +121,13 @@ def build_deployments_check_existence_at_scope_request(scope: str, deployment_na return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -155,7 +157,7 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,11 +180,13 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -205,11 +209,13 @@ def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -235,11 +241,13 @@ def build_deployments_validate_at_scope_request(scope: str, deployment_name: str return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -270,7 +278,7 @@ def build_deployments_list_at_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -294,11 +302,13 @@ def build_deployments_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -320,11 +330,13 @@ def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -346,11 +358,13 @@ def build_deployments_check_existence_at_tenant_scope_request(deployment_name: s return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -375,11 +389,13 @@ def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_get_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -401,11 +417,13 @@ def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -427,11 +445,13 @@ def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -456,11 +476,13 @@ def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **k return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -482,13 +504,13 @@ def build_deployments_export_template_at_tenant_scope_request(deployment_name: s return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_tenant_scope_request( +def build_deployments_list_at_tenant_scope_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -507,13 +529,13 @@ def build_deployments_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -539,13 +561,13 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -571,13 +593,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -606,13 +628,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -638,13 +660,13 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -670,13 +692,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -705,13 +727,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -737,13 +759,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -770,13 +792,13 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -801,13 +823,13 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -832,13 +854,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -866,13 +888,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -897,13 +919,13 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -929,13 +951,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -964,13 +986,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_subscription_scope_request( +def build_deployments_what_if_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -999,13 +1021,13 @@ def build_deployments_what_if_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1031,13 +1053,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1067,7 +1089,7 @@ def build_deployments_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1096,13 +1118,13 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1131,13 +1153,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1175,7 +1197,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1210,7 +1232,7 @@ def build_deployments_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1245,7 +1267,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1283,7 +1305,7 @@ def build_deployments_what_if_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1315,13 +1337,13 @@ def build_deployments_what_if_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1350,7 +1372,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1361,7 +1383,7 @@ def build_deployments_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1391,11 +1413,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1419,7 +1443,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1448,7 +1472,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1475,7 +1499,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1499,13 +1523,13 @@ def build_providers_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_list_at_tenant_scope_request( +def build_providers_list_at_tenant_scope_request( # pylint: disable=name-too-long *, top: Optional[int] = None, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1530,7 +1554,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1553,13 +1577,13 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_get_at_tenant_scope_request( +def build_providers_get_at_tenant_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1581,7 +1605,7 @@ def build_providers_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1593,7 +1617,7 @@ def build_resources_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1628,7 +1652,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1661,13 +1685,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1711,7 +1735,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1958,7 +1982,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2004,7 +2030,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2079,13 +2107,13 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2108,13 +2136,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2144,7 +2172,7 @@ def build_resource_groups_delete_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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2171,7 +2199,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2198,7 +2226,7 @@ def build_resource_groups_update_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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2224,13 +2252,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2264,7 +2292,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2292,7 +2320,7 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2314,13 +2342,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2346,7 +2374,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2371,7 +2399,7 @@ def build_tags_delete_request(tag_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["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2396,7 +2424,7 @@ def build_tags_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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2416,13 +2444,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_scope_request( +def build_deployment_operations_get_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, operation_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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2448,13 +2476,13 @@ def build_deployment_operations_get_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_scope_request( +def build_deployment_operations_list_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2479,13 +2507,13 @@ def build_deployment_operations_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_tenant_scope_request( +def build_deployment_operations_get_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2510,13 +2538,13 @@ def build_deployment_operations_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_tenant_scope_request( +def build_deployment_operations_list_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2540,13 +2568,13 @@ def build_deployment_operations_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2573,13 +2601,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2607,13 +2635,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2640,13 +2668,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2680,7 +2708,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2716,7 +2744,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2779,7 +2807,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["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -2880,7 +2908,7 @@ def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -2941,7 +2969,7 @@ def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -3003,7 +3031,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -3048,7 +3076,7 @@ def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3205,7 +3233,7 @@ def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3274,7 +3302,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -3339,7 +3367,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -3451,7 +3479,7 @@ def validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -3527,7 +3555,7 @@ def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -3586,7 +3614,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3670,7 +3698,7 @@ def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-stat _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -3728,7 +3756,7 @@ def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> L _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -3787,7 +3815,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -3817,7 +3845,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - def _create_or_update_at_tenant_scope_initial( + def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3831,7 +3859,7 @@ def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3980,7 +4008,7 @@ def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4046,7 +4074,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -4108,7 +4136,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -4212,7 +4240,7 @@ def validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -4283,7 +4311,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -4339,7 +4367,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4408,7 +4436,7 @@ def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -4422,7 +4450,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -4487,7 +4515,7 @@ def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -4528,7 +4556,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -4551,7 +4581,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -4584,7 +4614,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -4598,7 +4628,7 @@ def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4651,7 +4681,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -4689,7 +4719,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -4727,7 +4757,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -4761,7 +4791,7 @@ def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4832,7 +4862,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -4899,7 +4929,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -5019,7 +5049,7 @@ def validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -5072,7 +5102,7 @@ def validate_at_management_group_scope( } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -5097,7 +5127,7 @@ def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -5156,7 +5186,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5242,7 +5272,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -5303,7 +5333,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -5364,7 +5394,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -5397,7 +5427,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -5411,7 +5441,7 @@ def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -5464,7 +5494,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -5499,7 +5529,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -5529,7 +5559,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -5561,7 +5591,7 @@ def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5627,7 +5657,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -5692,7 +5722,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -5799,7 +5829,7 @@ def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -5865,7 +5895,7 @@ def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -6015,7 +6045,7 @@ def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6085,7 +6115,7 @@ def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -6142,7 +6172,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -6228,7 +6258,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -6294,7 +6324,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -6359,7 +6389,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -6407,7 +6437,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -6574,7 +6604,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6644,7 +6674,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -6713,7 +6743,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -6837,7 +6867,7 @@ def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -6908,7 +6938,7 @@ def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -7079,7 +7109,7 @@ def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7153,7 +7183,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -7214,7 +7244,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -7309,7 +7339,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -7389,7 +7419,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -7446,7 +7476,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -7502,7 +7532,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -7594,7 +7624,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -7688,7 +7718,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -7750,7 +7780,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -7849,7 +7879,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -7937,7 +7967,7 @@ def _move_resources_initial( # 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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -8085,7 +8115,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8141,7 +8171,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -8295,7 +8325,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8375,7 +8405,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -9982,7 +10012,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -10092,7 +10122,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -10156,7 +10186,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-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -10211,7 +10241,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) 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) @@ -10271,7 +10301,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -10394,7 +10424,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -10513,7 +10543,7 @@ def export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) @@ -10583,7 +10613,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -10699,7 +10729,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -10754,7 +10784,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -10819,7 +10849,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -10881,7 +10911,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -10924,7 +10954,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -11040,7 +11070,7 @@ def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -11098,7 +11128,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -11194,7 +11224,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -11249,7 +11279,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -11346,7 +11376,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -11404,7 +11434,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -11502,7 +11532,7 @@ def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -11558,7 +11588,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -11659,7 +11689,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -11719,7 +11749,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-07-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_configuration.py index 27bb9c9a48ad4..b6494249aea20 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", "2019-08-01") + api_version: str = kwargs.pop("api_version", "2019-08-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/_configuration.py index 760501ff7a565..a551c79314920 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", "2019-08-01") + api_version: str = kwargs.pop("api_version", "2019-08-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py index 0d50cea6ed8ab..11a44bfc772d4 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/aio/operations/_operations.py @@ -124,10 +124,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -165,7 +161,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["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -266,7 +262,7 @@ async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -327,7 +323,7 @@ async def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -389,7 +385,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -434,7 +430,7 @@ async def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -591,7 +587,7 @@ async def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -660,7 +656,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -725,7 +721,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -837,7 +833,7 @@ async def validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -913,7 +909,7 @@ async def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -972,7 +968,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1056,7 +1052,7 @@ async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -1114,7 +1110,7 @@ async def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -1173,7 +1169,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -1203,7 +1199,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - async def _create_or_update_at_tenant_scope_initial( + async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1217,7 +1213,7 @@ async def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1366,7 +1362,7 @@ async def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1432,7 +1428,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -1494,7 +1490,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -1599,7 +1595,7 @@ async def validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -1672,7 +1668,7 @@ async def export_template_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -1728,7 +1724,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1797,7 +1793,7 @@ async def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -1811,7 +1807,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -1876,7 +1872,7 @@ async def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -1917,7 +1913,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -1942,7 +1938,7 @@ async def check_existence_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -1975,7 +1971,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1989,7 +1985,7 @@ async def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2042,7 +2038,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2080,7 +2076,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2118,7 +2114,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2152,7 +2148,7 @@ async def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2223,7 +2219,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2290,7 +2286,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -2411,7 +2407,7 @@ async def validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -2464,7 +2460,7 @@ async def validate_at_management_group_scope( } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -2489,7 +2485,7 @@ async def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -2548,7 +2544,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2634,7 +2630,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -2695,7 +2691,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -2756,7 +2752,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -2789,7 +2785,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2803,7 +2799,7 @@ async def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2856,7 +2852,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -2891,7 +2887,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -2921,7 +2917,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -2953,7 +2949,7 @@ async def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3019,7 +3015,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3084,7 +3080,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -3191,7 +3187,7 @@ async def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -3257,7 +3253,7 @@ async def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -3407,7 +3403,7 @@ async def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3477,7 +3473,7 @@ async def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -3534,7 +3530,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3620,7 +3616,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -3686,7 +3682,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -3751,7 +3747,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -3799,7 +3795,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3966,7 +3962,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4036,7 +4032,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4105,7 +4101,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -4229,7 +4225,7 @@ async def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -4300,7 +4296,7 @@ async def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4471,7 +4467,7 @@ async def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4545,7 +4541,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -4606,7 +4602,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4701,7 +4697,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -4781,7 +4777,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -4838,7 +4834,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -4894,7 +4890,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -4986,7 +4982,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5082,7 +5078,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -5144,7 +5140,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -5244,7 +5240,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -5332,7 +5328,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -5480,7 +5476,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5536,7 +5532,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -5690,7 +5686,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5771,7 +5767,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -7378,7 +7374,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -7488,7 +7484,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -7552,7 +7548,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -7607,7 +7603,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -7667,7 +7663,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -7790,7 +7786,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -7850,7 +7846,7 @@ async def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -7995,7 +7991,7 @@ async def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -8063,7 +8059,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -8179,7 +8175,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -8234,7 +8230,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -8299,7 +8295,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -8361,7 +8357,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -8404,7 +8400,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -8520,7 +8516,7 @@ async def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -8578,7 +8574,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8674,7 +8670,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -8729,7 +8725,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8826,7 +8822,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -8884,7 +8880,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -8982,7 +8978,7 @@ async def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -9038,7 +9034,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -9139,7 +9135,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -9199,7 +9195,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_operations.py index d2869e2bd8c42..e403c399f09b5 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,11 +63,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -94,11 +92,13 @@ def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -121,11 +121,13 @@ def build_deployments_check_existence_at_scope_request(scope: str, deployment_na return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -155,7 +157,7 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,11 +180,13 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -205,11 +209,13 @@ def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -235,11 +241,13 @@ def build_deployments_validate_at_scope_request(scope: str, deployment_name: str return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -270,7 +278,7 @@ def build_deployments_list_at_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -294,11 +302,13 @@ def build_deployments_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -320,11 +330,13 @@ def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -346,11 +358,13 @@ def build_deployments_check_existence_at_tenant_scope_request(deployment_name: s return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -375,11 +389,13 @@ def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_get_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -401,11 +417,13 @@ def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -427,11 +445,13 @@ def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -456,11 +476,13 @@ def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **k return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -482,13 +504,13 @@ def build_deployments_export_template_at_tenant_scope_request(deployment_name: s return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_tenant_scope_request( +def build_deployments_list_at_tenant_scope_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -507,13 +529,13 @@ def build_deployments_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -539,13 +561,13 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -571,13 +593,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -606,13 +628,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -638,13 +660,13 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -670,13 +692,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -705,13 +727,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -737,13 +759,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -770,13 +792,13 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -801,13 +823,13 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -832,13 +854,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -866,13 +888,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -897,13 +919,13 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -929,13 +951,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -964,13 +986,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_subscription_scope_request( +def build_deployments_what_if_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -999,13 +1021,13 @@ def build_deployments_what_if_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1031,13 +1053,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1067,7 +1089,7 @@ def build_deployments_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1096,13 +1118,13 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1131,13 +1153,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1175,7 +1197,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1210,7 +1232,7 @@ def build_deployments_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1245,7 +1267,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1283,7 +1305,7 @@ def build_deployments_what_if_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1315,13 +1337,13 @@ def build_deployments_what_if_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1350,7 +1372,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1361,7 +1383,7 @@ def build_deployments_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1391,11 +1413,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1419,7 +1443,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1448,7 +1472,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1475,7 +1499,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1499,13 +1523,13 @@ def build_providers_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_list_at_tenant_scope_request( +def build_providers_list_at_tenant_scope_request( # pylint: disable=name-too-long *, top: Optional[int] = None, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1530,7 +1554,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1553,13 +1577,13 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_get_at_tenant_scope_request( +def build_providers_get_at_tenant_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1581,7 +1605,7 @@ def build_providers_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1593,7 +1617,7 @@ def build_resources_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1628,7 +1652,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1661,13 +1685,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1711,7 +1735,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1958,7 +1982,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2004,7 +2030,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2079,13 +2107,13 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2108,13 +2136,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2144,7 +2172,7 @@ def build_resource_groups_delete_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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2171,7 +2199,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2198,7 +2226,7 @@ def build_resource_groups_update_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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2224,13 +2252,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2264,7 +2292,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2292,7 +2320,7 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2314,13 +2342,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2346,7 +2374,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2371,7 +2399,7 @@ def build_tags_delete_request(tag_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["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2396,7 +2424,7 @@ def build_tags_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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2416,13 +2444,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_scope_request( +def build_deployment_operations_get_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, operation_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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2448,13 +2476,13 @@ def build_deployment_operations_get_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_scope_request( +def build_deployment_operations_list_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2479,13 +2507,13 @@ def build_deployment_operations_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_tenant_scope_request( +def build_deployment_operations_get_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2510,13 +2538,13 @@ def build_deployment_operations_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_tenant_scope_request( +def build_deployment_operations_list_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2540,13 +2568,13 @@ def build_deployment_operations_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2573,13 +2601,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2607,13 +2635,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2640,13 +2668,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2680,7 +2708,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2716,7 +2744,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2779,7 +2807,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["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -2880,7 +2908,7 @@ def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -2941,7 +2969,7 @@ def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -3003,7 +3031,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -3048,7 +3076,7 @@ def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3205,7 +3233,7 @@ def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3274,7 +3302,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -3339,7 +3367,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -3451,7 +3479,7 @@ def validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -3527,7 +3555,7 @@ def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -3586,7 +3614,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3670,7 +3698,7 @@ def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-stat _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -3728,7 +3756,7 @@ def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> L _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -3787,7 +3815,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -3817,7 +3845,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - def _create_or_update_at_tenant_scope_initial( + def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3831,7 +3859,7 @@ def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3980,7 +4008,7 @@ def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4046,7 +4074,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -4108,7 +4136,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -4213,7 +4241,7 @@ def validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -4284,7 +4312,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -4340,7 +4368,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4409,7 +4437,7 @@ def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -4423,7 +4451,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -4488,7 +4516,7 @@ def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -4529,7 +4557,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -4552,7 +4582,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -4585,7 +4615,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -4599,7 +4629,7 @@ def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4652,7 +4682,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -4690,7 +4720,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -4728,7 +4758,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -4762,7 +4792,7 @@ def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4833,7 +4863,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -4900,7 +4930,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -5021,7 +5051,7 @@ def validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -5074,7 +5104,7 @@ def validate_at_management_group_scope( } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -5099,7 +5129,7 @@ def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -5158,7 +5188,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5244,7 +5274,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -5305,7 +5335,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -5366,7 +5396,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -5399,7 +5429,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -5413,7 +5443,7 @@ def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -5466,7 +5496,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -5501,7 +5531,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -5531,7 +5561,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -5563,7 +5593,7 @@ def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5629,7 +5659,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -5694,7 +5724,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -5801,7 +5831,7 @@ def validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -5867,7 +5897,7 @@ def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -6017,7 +6047,7 @@ def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6087,7 +6117,7 @@ def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -6144,7 +6174,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -6230,7 +6260,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -6296,7 +6326,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -6361,7 +6391,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -6409,7 +6439,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -6576,7 +6606,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6646,7 +6676,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -6715,7 +6745,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -6839,7 +6869,7 @@ def validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) @@ -6910,7 +6940,7 @@ def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -7081,7 +7111,7 @@ def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7155,7 +7185,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -7216,7 +7246,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -7311,7 +7341,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -7391,7 +7421,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -7448,7 +7478,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -7504,7 +7534,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -7596,7 +7626,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -7690,7 +7720,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -7752,7 +7782,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -7852,7 +7882,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -7940,7 +7970,7 @@ def _move_resources_initial( # 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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -8088,7 +8118,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8144,7 +8174,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -8298,7 +8328,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8379,7 +8409,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -9986,7 +10016,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -10096,7 +10126,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -10160,7 +10190,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-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -10215,7 +10245,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) 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) @@ -10275,7 +10305,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -10398,7 +10428,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -10458,7 +10488,7 @@ def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -10603,7 +10633,7 @@ def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -10671,7 +10701,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -10787,7 +10817,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -10842,7 +10872,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -10907,7 +10937,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -10969,7 +10999,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -11012,7 +11042,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -11128,7 +11158,7 @@ def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -11186,7 +11216,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -11282,7 +11312,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -11337,7 +11367,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -11434,7 +11464,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -11492,7 +11522,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -11590,7 +11620,7 @@ def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -11646,7 +11676,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -11747,7 +11777,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -11807,7 +11837,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-08-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-08-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_configuration.py index 265d4fe9f2c80..3c9b9b26f7a22 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", "2019-10-01") + api_version: str = kwargs.pop("api_version", "2019-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/_configuration.py index 424137991f2f3..bfb72de80a4ad 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", "2019-10-01") + api_version: str = kwargs.pop("api_version", "2019-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_operations.py index c9c62733fcce6..f49da41d053c4 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_operations.py @@ -130,10 +130,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -171,7 +167,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["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -272,7 +268,7 @@ async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -333,7 +329,7 @@ async def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -395,7 +391,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -440,7 +436,7 @@ async def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -597,7 +593,7 @@ async def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -666,7 +662,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -731,7 +727,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -775,7 +771,7 @@ async def _validate_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -929,7 +925,7 @@ async def begin_validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1000,7 +996,7 @@ async def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -1059,7 +1055,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1143,7 +1139,7 @@ async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -1201,7 +1197,7 @@ async def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -1260,7 +1256,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -1290,7 +1286,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - async def _create_or_update_at_tenant_scope_initial( + async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1304,7 +1300,7 @@ async def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1453,7 +1449,7 @@ async def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1519,7 +1515,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -1581,7 +1577,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -1624,7 +1620,7 @@ async def _validate_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -1771,7 +1767,7 @@ async def begin_validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1829,7 +1825,7 @@ async def _what_if_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -1979,7 +1975,7 @@ async def begin_what_if_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2049,7 +2045,7 @@ async def export_template_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -2105,7 +2101,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2174,7 +2170,7 @@ async def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -2188,7 +2184,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -2253,7 +2249,7 @@ async def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -2294,7 +2290,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -2319,7 +2315,7 @@ async def check_existence_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -2352,7 +2348,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2366,7 +2362,7 @@ async def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2419,7 +2415,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2457,7 +2453,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2495,7 +2491,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2529,7 +2525,7 @@ async def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2600,7 +2596,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2667,7 +2663,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -2699,7 +2695,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - async def _validate_at_management_group_scope_initial( + async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -2713,7 +2709,7 @@ async def _validate_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -2874,7 +2870,7 @@ async def begin_validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2919,7 +2915,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - async def _what_if_at_management_group_scope_initial( + async def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -2933,7 +2929,7 @@ async def _what_if_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -3097,7 +3093,7 @@ async def begin_what_if_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3145,7 +3141,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -3170,7 +3166,7 @@ async def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -3229,7 +3225,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3315,7 +3311,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -3376,7 +3372,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -3437,7 +3433,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -3470,7 +3466,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3484,7 +3480,7 @@ async def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3537,7 +3533,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -3572,7 +3568,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3602,7 +3598,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3634,7 +3630,7 @@ async def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3700,7 +3696,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3765,7 +3761,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -3811,7 +3807,7 @@ async def _validate_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3958,7 +3954,7 @@ async def begin_validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4016,7 +4012,7 @@ async def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4166,7 +4162,7 @@ async def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4236,7 +4232,7 @@ async def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -4293,7 +4289,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4379,7 +4375,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -4445,7 +4441,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -4510,7 +4506,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -4558,7 +4554,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4725,7 +4721,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4795,7 +4791,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4864,7 +4860,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -4911,7 +4907,7 @@ async def _validate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5075,7 +5071,7 @@ async def begin_validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5138,7 +5134,7 @@ async def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5309,7 +5305,7 @@ async def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5383,7 +5379,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -5444,7 +5440,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5539,7 +5535,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -5619,7 +5615,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -5676,7 +5672,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -5732,7 +5728,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5824,7 +5820,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5920,7 +5916,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -5982,7 +5978,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -6082,7 +6078,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -6170,7 +6166,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -6318,7 +6314,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6374,7 +6370,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -6528,7 +6524,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6609,7 +6605,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -8216,7 +8212,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -8326,7 +8322,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -8390,7 +8386,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -8445,7 +8441,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -8505,7 +8501,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -8628,7 +8624,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -8688,7 +8684,7 @@ async def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -8833,7 +8829,7 @@ async def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -8901,7 +8897,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -9021,7 +9017,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -9079,7 +9075,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -9145,7 +9141,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -9209,7 +9205,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -9257,7 +9253,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -9401,7 +9397,7 @@ async def create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -9539,7 +9535,7 @@ async def update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -9608,7 +9604,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -9667,7 +9663,7 @@ async def delete_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_at_scope_request( @@ -9744,7 +9740,7 @@ async def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -9802,7 +9798,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -9898,7 +9894,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -9953,7 +9949,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10050,7 +10046,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -10108,7 +10104,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10206,7 +10202,7 @@ async def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -10262,7 +10258,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10363,7 +10359,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -10423,7 +10419,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_operations.py index 942e4bdc4bf24..6ad99a4b8ba67 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,11 +63,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -94,11 +92,13 @@ def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -121,11 +121,13 @@ def build_deployments_check_existence_at_scope_request(scope: str, deployment_na return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -155,7 +157,7 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,11 +180,13 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -205,11 +209,13 @@ def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -235,11 +241,13 @@ def build_deployments_validate_at_scope_request(scope: str, deployment_name: str return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -270,7 +278,7 @@ def build_deployments_list_at_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -294,11 +302,13 @@ def build_deployments_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -320,11 +330,13 @@ def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -346,11 +358,13 @@ def build_deployments_check_existence_at_tenant_scope_request(deployment_name: s return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -375,11 +389,13 @@ def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_get_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -401,11 +417,13 @@ def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -427,11 +445,13 @@ def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -456,11 +476,13 @@ def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **k return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_what_if_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -485,11 +507,13 @@ def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kw return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -511,13 +535,13 @@ def build_deployments_export_template_at_tenant_scope_request(deployment_name: s return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_tenant_scope_request( +def build_deployments_list_at_tenant_scope_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -536,13 +560,13 @@ def build_deployments_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -568,13 +592,13 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -600,13 +624,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -635,13 +659,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -667,13 +691,13 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -699,13 +723,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -734,13 +758,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_management_group_scope_request( +def build_deployments_what_if_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -769,13 +793,13 @@ def build_deployments_what_if_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -801,13 +825,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -834,13 +858,13 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -865,13 +889,13 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -896,13 +920,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -930,13 +954,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -961,13 +985,13 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -993,13 +1017,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1028,13 +1052,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_subscription_scope_request( +def build_deployments_what_if_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1063,13 +1087,13 @@ def build_deployments_what_if_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1095,13 +1119,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1131,7 +1155,7 @@ def build_deployments_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1160,13 +1184,13 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1195,13 +1219,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1239,7 +1263,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1274,7 +1298,7 @@ def build_deployments_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1309,7 +1333,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1347,7 +1371,7 @@ def build_deployments_what_if_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1379,13 +1403,13 @@ def build_deployments_what_if_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1414,7 +1438,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1425,7 +1449,7 @@ def build_deployments_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1455,11 +1479,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1483,7 +1509,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1512,7 +1538,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1539,7 +1565,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1563,13 +1589,13 @@ def build_providers_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_list_at_tenant_scope_request( +def build_providers_list_at_tenant_scope_request( # pylint: disable=name-too-long *, top: Optional[int] = None, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1594,7 +1620,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1617,13 +1643,13 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_get_at_tenant_scope_request( +def build_providers_get_at_tenant_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1645,7 +1671,7 @@ def build_providers_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1657,7 +1683,7 @@ def build_resources_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1692,7 +1718,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1725,13 +1751,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1775,7 +1801,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2022,7 +2048,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2068,7 +2096,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2143,13 +2173,13 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2172,13 +2202,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2208,7 +2238,7 @@ def build_resource_groups_delete_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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2235,7 +2265,7 @@ def build_resource_groups_get_request(resource_group_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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2262,7 +2292,7 @@ def build_resource_groups_update_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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2288,13 +2318,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2328,7 +2358,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2356,7 +2386,7 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2378,13 +2408,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2410,7 +2440,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2435,7 +2465,7 @@ def build_tags_delete_request(tag_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["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2460,7 +2490,7 @@ def build_tags_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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2480,11 +2510,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: +def build_tags_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2511,7 +2543,7 @@ def build_tags_update_at_scope_request(scope: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2538,7 +2570,7 @@ def build_tags_get_at_scope_request(scope: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2562,7 +2594,7 @@ def build_tags_delete_at_scope_request(scope: 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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2582,13 +2614,13 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_scope_request( +def build_deployment_operations_get_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, operation_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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2614,13 +2646,13 @@ def build_deployment_operations_get_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_scope_request( +def build_deployment_operations_list_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2645,13 +2677,13 @@ def build_deployment_operations_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_tenant_scope_request( +def build_deployment_operations_get_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2676,13 +2708,13 @@ def build_deployment_operations_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_tenant_scope_request( +def build_deployment_operations_list_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2706,13 +2738,13 @@ def build_deployment_operations_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2739,13 +2771,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2773,13 +2805,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2806,13 +2838,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2846,7 +2878,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2882,7 +2914,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2945,7 +2977,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["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -3046,7 +3078,7 @@ def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -3107,7 +3139,7 @@ def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -3169,7 +3201,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -3214,7 +3246,7 @@ def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3371,7 +3403,7 @@ def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3440,7 +3472,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -3505,7 +3537,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -3549,7 +3581,7 @@ def _validate_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3703,7 +3735,7 @@ def begin_validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3774,7 +3806,7 @@ def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -3833,7 +3865,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3917,7 +3949,7 @@ def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-stat _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -3975,7 +4007,7 @@ def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> L _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -4034,7 +4066,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -4064,7 +4096,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - def _create_or_update_at_tenant_scope_initial( + def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -4078,7 +4110,7 @@ def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4227,7 +4259,7 @@ def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4293,7 +4325,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -4355,7 +4387,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -4398,7 +4430,7 @@ def _validate_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -4545,7 +4577,7 @@ def begin_validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4603,7 +4635,7 @@ def _what_if_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4753,7 +4785,7 @@ def begin_what_if_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4821,7 +4853,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -4877,7 +4909,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4946,7 +4978,7 @@ def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -4960,7 +4992,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -5025,7 +5057,7 @@ def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -5066,7 +5098,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -5089,7 +5123,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -5122,7 +5156,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -5136,7 +5170,7 @@ def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -5189,7 +5223,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5227,7 +5261,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5265,7 +5299,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -5299,7 +5333,7 @@ def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5370,7 +5404,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -5437,7 +5471,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -5469,7 +5503,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - def _validate_at_management_group_scope_initial( + def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -5483,7 +5517,7 @@ def _validate_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5644,7 +5678,7 @@ def begin_validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5689,7 +5723,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - def _what_if_at_management_group_scope_initial( + def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -5703,7 +5737,7 @@ def _what_if_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5867,7 +5901,7 @@ def begin_what_if_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5915,7 +5949,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -5940,7 +5974,7 @@ def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -5999,7 +6033,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -6085,7 +6119,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -6146,7 +6180,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -6207,7 +6241,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -6240,7 +6274,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -6254,7 +6288,7 @@ def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -6307,7 +6341,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -6342,7 +6376,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6372,7 +6406,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6404,7 +6438,7 @@ def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6470,7 +6504,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -6535,7 +6569,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -6581,7 +6615,7 @@ def _validate_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -6728,7 +6762,7 @@ def begin_validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6786,7 +6820,7 @@ def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -6936,7 +6970,7 @@ def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7006,7 +7040,7 @@ def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -7063,7 +7097,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -7149,7 +7183,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -7215,7 +7249,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -7280,7 +7314,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -7328,7 +7362,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -7495,7 +7529,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7565,7 +7599,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -7634,7 +7668,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -7681,7 +7715,7 @@ def _validate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -7845,7 +7879,7 @@ def begin_validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7908,7 +7942,7 @@ def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -8079,7 +8113,7 @@ def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8153,7 +8187,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -8214,7 +8248,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -8309,7 +8343,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -8389,7 +8423,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -8446,7 +8480,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -8502,7 +8536,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8594,7 +8628,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8688,7 +8722,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -8750,7 +8784,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -8850,7 +8884,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -8938,7 +8972,7 @@ def _move_resources_initial( # 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-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -9086,7 +9120,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9142,7 +9176,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -9296,7 +9330,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9377,7 +9411,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -10984,7 +11018,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -11094,7 +11128,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -11158,7 +11192,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-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -11213,7 +11247,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) 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) @@ -11273,7 +11307,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -11396,7 +11430,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -11456,7 +11490,7 @@ def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -11601,7 +11635,7 @@ def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -11669,7 +11703,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -11789,7 +11823,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -11847,7 +11881,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -11913,7 +11947,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -11977,7 +12011,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -12025,7 +12059,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -12169,7 +12203,7 @@ def create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -12307,7 +12341,7 @@ def update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -12376,7 +12410,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -12433,7 +12467,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_at_scope_request( @@ -12510,7 +12544,7 @@ def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -12568,7 +12602,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -12664,7 +12698,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -12719,7 +12753,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -12816,7 +12850,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -12874,7 +12908,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -12972,7 +13006,7 @@ def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -13028,7 +13062,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13129,7 +13163,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -13189,7 +13223,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_configuration.py index 1cd330519fcac..af9f93c49f190 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", "2020-06-01") + api_version: str = kwargs.pop("api_version", "2020-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/_configuration.py index c937c380f6d8e..6cf2f6a6f571e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", "2020-06-01") + api_version: str = kwargs.pop("api_version", "2020-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/operations/_operations.py index 2f859f01061b2..8c5926f478696 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/aio/operations/_operations.py @@ -131,10 +131,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -172,7 +168,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -273,7 +269,7 @@ async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -334,7 +330,7 @@ async def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -396,7 +392,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -441,7 +437,7 @@ async def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -598,7 +594,7 @@ async def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -667,7 +663,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -732,7 +728,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -776,7 +772,7 @@ async def _validate_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -930,7 +926,7 @@ async def begin_validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1001,7 +997,7 @@ async def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -1060,7 +1056,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1144,7 +1140,7 @@ async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -1202,7 +1198,7 @@ async def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -1261,7 +1257,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -1291,7 +1287,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - async def _create_or_update_at_tenant_scope_initial( + async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1305,7 +1301,7 @@ async def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1454,7 +1450,7 @@ async def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1520,7 +1516,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -1582,7 +1578,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -1625,7 +1621,7 @@ async def _validate_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -1772,7 +1768,7 @@ async def begin_validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1830,7 +1826,7 @@ async def _what_if_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -1980,7 +1976,7 @@ async def begin_what_if_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2050,7 +2046,7 @@ async def export_template_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -2106,7 +2102,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2175,7 +2171,7 @@ async def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -2189,7 +2185,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -2254,7 +2250,7 @@ async def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -2295,7 +2291,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -2320,7 +2316,7 @@ async def check_existence_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -2353,7 +2349,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2367,7 +2363,7 @@ async def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2420,7 +2416,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2458,7 +2454,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2496,7 +2492,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2530,7 +2526,7 @@ async def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2601,7 +2597,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2668,7 +2664,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -2700,7 +2696,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - async def _validate_at_management_group_scope_initial( + async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -2714,7 +2710,7 @@ async def _validate_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -2875,7 +2871,7 @@ async def begin_validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2920,7 +2916,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - async def _what_if_at_management_group_scope_initial( + async def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -2934,7 +2930,7 @@ async def _what_if_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -3098,7 +3094,7 @@ async def begin_what_if_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3146,7 +3142,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -3171,7 +3167,7 @@ async def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -3230,7 +3226,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3316,7 +3312,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -3377,7 +3373,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -3438,7 +3434,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -3471,7 +3467,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3485,7 +3481,7 @@ async def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3538,7 +3534,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -3573,7 +3569,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3603,7 +3599,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3635,7 +3631,7 @@ async def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3701,7 +3697,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3766,7 +3762,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -3812,7 +3808,7 @@ async def _validate_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3959,7 +3955,7 @@ async def begin_validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4017,7 +4013,7 @@ async def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4167,7 +4163,7 @@ async def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4237,7 +4233,7 @@ async def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -4294,7 +4290,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4380,7 +4376,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -4446,7 +4442,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -4511,7 +4507,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -4559,7 +4555,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4726,7 +4722,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4796,7 +4792,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4865,7 +4861,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -4912,7 +4908,7 @@ async def _validate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5076,7 +5072,7 @@ async def begin_validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5139,7 +5135,7 @@ async def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5310,7 +5306,7 @@ async def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5384,7 +5380,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -5445,7 +5441,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5540,7 +5536,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -5620,7 +5616,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -5681,7 +5677,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_providers_register_at_management_group_scope_request( @@ -5736,7 +5732,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -5792,7 +5788,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5884,7 +5880,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5980,7 +5976,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -6042,7 +6038,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -6142,7 +6138,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -6230,7 +6226,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -6378,7 +6374,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6434,7 +6430,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -6588,7 +6584,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6669,7 +6665,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -8276,7 +8272,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -8386,7 +8382,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -8450,7 +8446,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -8513,7 +8509,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -8574,7 +8570,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -8697,7 +8693,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -8757,7 +8753,7 @@ async def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -8902,7 +8898,7 @@ async def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -8970,7 +8966,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -9090,7 +9086,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -9148,7 +9144,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -9214,7 +9210,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -9278,7 +9274,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -9326,7 +9322,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -9470,7 +9466,7 @@ async def create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -9608,7 +9604,7 @@ async def update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -9677,7 +9673,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -9736,7 +9732,7 @@ async def delete_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_at_scope_request( @@ -9813,7 +9809,7 @@ async def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -9871,7 +9867,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -9967,7 +9963,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -10022,7 +10018,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10119,7 +10115,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -10177,7 +10173,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10275,7 +10271,7 @@ async def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -10331,7 +10327,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10432,7 +10428,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -10492,7 +10488,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_operations.py index 887fcf94d31a3..f4927b228f48f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_06_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,11 +63,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -92,11 +90,13 @@ def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -117,11 +117,13 @@ def build_deployments_check_existence_at_scope_request(scope: str, deployment_na return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -149,7 +151,7 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -170,11 +172,13 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -195,11 +199,13 @@ def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -223,11 +229,13 @@ def build_deployments_validate_at_scope_request(scope: str, deployment_name: str return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -256,7 +264,7 @@ def build_deployments_list_at_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -280,11 +288,13 @@ def build_deployments_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -304,11 +314,13 @@ def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -328,11 +340,13 @@ def build_deployments_check_existence_at_tenant_scope_request(deployment_name: s return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -355,11 +369,13 @@ def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_get_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -379,11 +395,13 @@ def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -403,11 +421,13 @@ def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -430,11 +450,13 @@ def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **k return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_what_if_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -457,11 +479,13 @@ def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kw return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -481,13 +505,13 @@ def build_deployments_export_template_at_tenant_scope_request(deployment_name: s return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_tenant_scope_request( +def build_deployments_list_at_tenant_scope_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -506,13 +530,13 @@ def build_deployments_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -536,13 +560,13 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -566,13 +590,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -599,13 +623,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -629,13 +653,13 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -659,13 +683,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -692,13 +716,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_management_group_scope_request( +def build_deployments_what_if_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -725,13 +749,13 @@ def build_deployments_what_if_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -755,13 +779,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -788,13 +812,13 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -817,13 +841,13 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -846,13 +870,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -878,13 +902,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -907,13 +931,13 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -937,13 +961,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -970,13 +994,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_subscription_scope_request( +def build_deployments_what_if_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1003,13 +1027,13 @@ def build_deployments_what_if_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1033,13 +1057,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1069,7 +1093,7 @@ def build_deployments_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1096,13 +1120,13 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1129,13 +1153,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1171,7 +1195,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1204,7 +1228,7 @@ def build_deployments_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1237,7 +1261,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1273,7 +1297,7 @@ def build_deployments_what_if_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1303,13 +1327,13 @@ def build_deployments_what_if_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1336,7 +1360,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1347,7 +1371,7 @@ def build_deployments_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1377,11 +1401,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1405,7 +1431,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1428,13 +1454,13 @@ def build_providers_unregister_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_register_at_management_group_scope_request( +def build_providers_register_at_management_group_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, 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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1464,7 +1490,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1491,7 +1517,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1515,13 +1541,13 @@ def build_providers_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_list_at_tenant_scope_request( +def build_providers_list_at_tenant_scope_request( # pylint: disable=name-too-long *, top: Optional[int] = None, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1546,7 +1572,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1569,13 +1595,13 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_get_at_tenant_scope_request( +def build_providers_get_at_tenant_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1597,7 +1623,7 @@ def build_providers_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1609,7 +1635,7 @@ def build_resources_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1644,7 +1670,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1672,13 +1698,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1717,7 +1743,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1964,7 +1990,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2010,7 +2038,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2085,13 +2115,13 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2114,13 +2144,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2152,7 +2182,7 @@ def build_resource_groups_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2181,7 +2211,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2208,7 +2238,7 @@ def build_resource_groups_update_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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2234,13 +2264,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2274,7 +2304,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2302,7 +2332,7 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2324,13 +2354,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2356,7 +2386,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2381,7 +2411,7 @@ def build_tags_delete_request(tag_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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2406,7 +2436,7 @@ def build_tags_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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2426,11 +2456,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: +def build_tags_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2457,7 +2489,7 @@ def build_tags_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2484,7 +2516,7 @@ def build_tags_get_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2508,7 +2540,7 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2528,13 +2560,13 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_scope_request( +def build_deployment_operations_get_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, operation_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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2558,13 +2590,13 @@ def build_deployment_operations_get_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_scope_request( +def build_deployment_operations_list_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2587,13 +2619,13 @@ def build_deployment_operations_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_tenant_scope_request( +def build_deployment_operations_get_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2616,13 +2648,13 @@ def build_deployment_operations_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_tenant_scope_request( +def build_deployment_operations_list_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2644,13 +2676,13 @@ def build_deployment_operations_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2675,13 +2707,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2707,13 +2739,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2738,13 +2770,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2776,7 +2808,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2810,7 +2842,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2871,7 +2903,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -2972,7 +3004,7 @@ def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -3033,7 +3065,7 @@ def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -3095,7 +3127,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -3140,7 +3172,7 @@ def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3297,7 +3329,7 @@ def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3366,7 +3398,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -3431,7 +3463,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -3475,7 +3507,7 @@ def _validate_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3629,7 +3661,7 @@ def begin_validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3700,7 +3732,7 @@ def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -3759,7 +3791,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3843,7 +3875,7 @@ def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-stat _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -3901,7 +3933,7 @@ def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> L _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -3960,7 +3992,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -3990,7 +4022,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - def _create_or_update_at_tenant_scope_initial( + def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -4004,7 +4036,7 @@ def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4153,7 +4185,7 @@ def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4219,7 +4251,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -4281,7 +4313,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -4324,7 +4356,7 @@ def _validate_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -4471,7 +4503,7 @@ def begin_validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4529,7 +4561,7 @@ def _what_if_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4679,7 +4711,7 @@ def begin_what_if_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4747,7 +4779,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -4803,7 +4835,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4872,7 +4904,7 @@ def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -4886,7 +4918,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -4951,7 +4983,7 @@ def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -4992,7 +5024,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -5015,7 +5049,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -5048,7 +5082,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -5062,7 +5096,7 @@ def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -5115,7 +5149,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5153,7 +5187,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5191,7 +5225,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -5225,7 +5259,7 @@ def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5296,7 +5330,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -5363,7 +5397,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -5395,7 +5429,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - def _validate_at_management_group_scope_initial( + def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -5409,7 +5443,7 @@ def _validate_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5570,7 +5604,7 @@ def begin_validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5615,7 +5649,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - def _what_if_at_management_group_scope_initial( + def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -5629,7 +5663,7 @@ def _what_if_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5793,7 +5827,7 @@ def begin_what_if_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5841,7 +5875,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -5866,7 +5900,7 @@ def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -5925,7 +5959,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -6011,7 +6045,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -6072,7 +6106,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -6133,7 +6167,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -6166,7 +6200,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -6180,7 +6214,7 @@ def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -6233,7 +6267,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -6268,7 +6302,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6298,7 +6332,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6330,7 +6364,7 @@ def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6396,7 +6430,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -6461,7 +6495,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -6507,7 +6541,7 @@ def _validate_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -6654,7 +6688,7 @@ def begin_validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6712,7 +6746,7 @@ def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -6862,7 +6896,7 @@ def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6932,7 +6966,7 @@ def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -6989,7 +7023,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -7075,7 +7109,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -7141,7 +7175,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -7206,7 +7240,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -7254,7 +7288,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -7421,7 +7455,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7491,7 +7525,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -7560,7 +7594,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -7607,7 +7641,7 @@ def _validate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -7771,7 +7805,7 @@ def begin_validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7834,7 +7868,7 @@ def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -8005,7 +8039,7 @@ def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8079,7 +8113,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -8140,7 +8174,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -8235,7 +8269,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -8315,7 +8349,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -8376,7 +8410,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_providers_register_at_management_group_scope_request( @@ -8431,7 +8465,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -8487,7 +8521,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8579,7 +8613,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8673,7 +8707,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -8735,7 +8769,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -8835,7 +8869,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -8923,7 +8957,7 @@ def _move_resources_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -9071,7 +9105,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9127,7 +9161,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -9281,7 +9315,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9362,7 +9396,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -10969,7 +11003,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -11079,7 +11113,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-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -11143,7 +11177,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["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -11206,7 +11240,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) 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) @@ -11267,7 +11301,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -11390,7 +11424,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -11450,7 +11484,7 @@ def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -11595,7 +11629,7 @@ def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -11663,7 +11697,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -11783,7 +11817,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -11841,7 +11875,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -11907,7 +11941,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -11971,7 +12005,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -12019,7 +12053,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -12163,7 +12197,7 @@ def create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -12301,7 +12335,7 @@ def update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -12370,7 +12404,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -12427,7 +12461,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_at_scope_request( @@ -12504,7 +12538,7 @@ def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -12562,7 +12596,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -12658,7 +12692,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -12713,7 +12747,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -12810,7 +12844,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -12868,7 +12902,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -12966,7 +13000,7 @@ def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -13022,7 +13056,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13123,7 +13157,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -13183,7 +13217,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-06-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_configuration.py index 40249461ce7b8..57b36567f59e9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/_configuration.py index e3bddf6d2bec0..5b289ab99e6d8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/operations/_operations.py index aaa653c1e612c..242542f052390 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/aio/operations/_operations.py @@ -132,10 +132,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -173,7 +169,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["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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -274,7 +270,7 @@ async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-state _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_deployments_delete_at_scope_request( @@ -335,7 +331,7 @@ async def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -397,7 +393,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa _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_deployments_check_existence_at_scope_request( @@ -442,7 +438,7 @@ async def _create_or_update_at_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -599,7 +595,7 @@ async def begin_create_or_update_at_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -668,7 +664,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -733,7 +729,7 @@ async def cancel_at_scope( # 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_deployments_cancel_at_scope_request( @@ -777,7 +773,7 @@ async def _validate_at_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -931,7 +927,7 @@ async def begin_validate_at_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1002,7 +998,7 @@ async def export_template_at_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -1061,7 +1057,7 @@ def list_at_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1145,7 +1141,7 @@ async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-retur _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_deployments_delete_at_tenant_scope_request( @@ -1203,7 +1199,7 @@ async def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1262,7 +1258,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: _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_deployments_check_existence_at_tenant_scope_request( @@ -1292,7 +1288,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - async def _create_or_update_at_tenant_scope_initial( + async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1306,7 +1302,7 @@ async def _create_or_update_at_tenant_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -1455,7 +1451,7 @@ async def begin_create_or_update_at_tenant_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1521,7 +1517,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -1583,7 +1579,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme _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_deployments_cancel_at_tenant_scope_request( @@ -1626,7 +1622,7 @@ async def _validate_at_tenant_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -1773,7 +1769,7 @@ async def begin_validate_at_tenant_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1831,7 +1827,7 @@ async def _what_if_at_tenant_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -1981,7 +1977,7 @@ async def begin_what_if_at_tenant_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2051,7 +2047,7 @@ async def export_template_at_tenant_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -2107,7 +2103,7 @@ def list_at_tenant_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2176,7 +2172,7 @@ async def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -2190,7 +2186,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _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_deployments_delete_at_management_group_scope_request( @@ -2255,7 +2251,7 @@ async def begin_delete_at_management_group_scope( _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -2296,7 +2292,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -2321,7 +2317,7 @@ async def check_existence_at_management_group_scope( _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_deployments_check_existence_at_management_group_scope_request( @@ -2354,7 +2350,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2368,7 +2364,7 @@ async def _create_or_update_at_management_group_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -2421,7 +2417,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2459,7 +2455,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2497,7 +2493,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2531,7 +2527,7 @@ async def begin_create_or_update_at_management_group_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2602,7 +2598,7 @@ async def get_at_management_group_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2669,7 +2665,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _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_deployments_cancel_at_management_group_scope_request( @@ -2701,7 +2697,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - async def _validate_at_management_group_scope_initial( + async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -2715,7 +2711,7 @@ async def _validate_at_management_group_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -2876,7 +2872,7 @@ async def begin_validate_at_management_group_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2921,7 +2917,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - async def _what_if_at_management_group_scope_initial( + async def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -2935,7 +2931,7 @@ async def _what_if_at_management_group_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -3099,7 +3095,7 @@ async def begin_what_if_at_management_group_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3147,7 +3143,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -3172,7 +3168,7 @@ async def export_template_at_management_group_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -3231,7 +3227,7 @@ def list_at_management_group_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3317,7 +3313,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _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_deployments_delete_at_subscription_scope_request( @@ -3378,7 +3374,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -3439,7 +3435,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _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_deployments_check_existence_at_subscription_scope_request( @@ -3472,7 +3468,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3486,7 +3482,7 @@ async def _create_or_update_at_subscription_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -3539,7 +3535,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -3574,7 +3570,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3604,7 +3600,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3636,7 +3632,7 @@ async def begin_create_or_update_at_subscription_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3702,7 +3698,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3767,7 +3763,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _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_deployments_cancel_at_subscription_scope_request( @@ -3813,7 +3809,7 @@ async def _validate_at_subscription_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3960,7 +3956,7 @@ async def begin_validate_at_subscription_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4018,7 +4014,7 @@ async def _what_if_at_subscription_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4168,7 +4164,7 @@ async def begin_what_if_at_subscription_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4238,7 +4234,7 @@ async def export_template_at_subscription_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -4295,7 +4291,7 @@ def list_at_subscription_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4381,7 +4377,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["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_deployments_delete_request( @@ -4447,7 +4443,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -4512,7 +4508,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _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_deployments_check_existence_request( @@ -4560,7 +4556,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["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.DeploymentExtended] = kwargs.pop("cls", None) @@ -4727,7 +4723,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["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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4797,7 +4793,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4866,7 +4862,7 @@ async def cancel( # 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_deployments_cancel_request( @@ -4913,7 +4909,7 @@ async def _validate_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5077,7 +5073,7 @@ async def begin_validate( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5140,7 +5136,7 @@ async def _what_if_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5311,7 +5307,7 @@ async def begin_what_if( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5385,7 +5381,7 @@ async def export_template( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -5446,7 +5442,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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5541,7 +5537,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -5621,7 +5617,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _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.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -5682,7 +5678,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re _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_providers_register_at_management_group_scope_request( @@ -5737,7 +5733,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _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.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -5793,7 +5789,7 @@ def list( _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5885,7 +5881,7 @@ def list_at_tenant_scope( _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5981,7 +5977,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.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -6043,7 +6039,7 @@ async def get_at_tenant_scope( _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -6124,7 +6120,7 @@ async def list( _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.ProviderResourceTypeListResult] = kwargs.pop("cls", None) request = build_provider_resource_types_list_request( @@ -6225,7 +6221,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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -6313,7 +6309,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _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[None] = kwargs.pop("cls", None) @@ -6461,7 +6457,7 @@ async def begin_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6517,7 +6513,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _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[None] = kwargs.pop("cls", None) @@ -6671,7 +6667,7 @@ async def begin_validate_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6752,7 +6748,7 @@ def list( _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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -8359,7 +8355,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _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_resource_groups_check_existence_request( @@ -8469,7 +8465,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.ResourceGroup] = kwargs.pop("cls", None) @@ -8533,7 +8529,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["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_resource_groups_delete_request( @@ -8588,7 +8584,7 @@ async def begin_delete(self, resource_group_name: str, **kwargs: Any) -> AsyncLR _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -8648,7 +8644,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _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.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -8771,7 +8767,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.ResourceGroup] = kwargs.pop("cls", None) @@ -8831,7 +8827,7 @@ async def _export_template_initial( _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[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -8976,7 +8972,7 @@ async def begin_export_template( _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.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -9044,7 +9040,7 @@ def list( _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.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -9164,7 +9160,7 @@ async def delete_value( # 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_tags_delete_value_request( @@ -9222,7 +9218,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _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.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -9288,7 +9284,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _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.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -9352,7 +9348,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _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_tags_delete_request( @@ -9400,7 +9396,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _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.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -9544,7 +9540,7 @@ async def create_or_update_at_scope( _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.TagsResource] = kwargs.pop("cls", None) @@ -9682,7 +9678,7 @@ async def update_at_scope( _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.TagsResource] = kwargs.pop("cls", None) @@ -9751,7 +9747,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _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.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -9810,7 +9806,7 @@ async def delete_at_scope( # 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_tags_delete_at_scope_request( @@ -9887,7 +9883,7 @@ async def get_at_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -9945,7 +9941,7 @@ def list_at_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10041,7 +10037,7 @@ async def get_at_tenant_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -10096,7 +10092,7 @@ def list_at_tenant_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10193,7 +10189,7 @@ async def get_at_management_group_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -10251,7 +10247,7 @@ def list_at_management_group_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10349,7 +10345,7 @@ async def get_at_subscription_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -10405,7 +10401,7 @@ def list_at_subscription_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10506,7 +10502,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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -10566,7 +10562,7 @@ def list( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_operations.py index 03df5a948343e..ccbc399e88345 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2020_10_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -67,11 +63,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -92,11 +90,13 @@ def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -117,11 +117,13 @@ def build_deployments_check_existence_at_scope_request(scope: str, deployment_na return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -149,7 +151,7 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k _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 @@ -170,11 +172,13 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -195,11 +199,13 @@ def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -223,11 +229,13 @@ def build_deployments_validate_at_scope_request(scope: str, deployment_name: str return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -256,7 +264,7 @@ def build_deployments_list_at_scope_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 @@ -280,11 +288,13 @@ def build_deployments_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -304,11 +314,13 @@ def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -328,11 +340,13 @@ def build_deployments_check_existence_at_tenant_scope_request(deployment_name: s return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -355,11 +369,13 @@ def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_get_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -379,11 +395,13 @@ def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -403,11 +421,13 @@ def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -430,11 +450,13 @@ def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **k return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_what_if_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -457,11 +479,13 @@ def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kw return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -481,13 +505,13 @@ def build_deployments_export_template_at_tenant_scope_request(deployment_name: s return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_tenant_scope_request( +def build_deployments_list_at_tenant_scope_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -506,13 +530,13 @@ def build_deployments_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -536,13 +560,13 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -566,13 +590,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -599,13 +623,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -629,13 +653,13 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -659,13 +683,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -692,13 +716,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_management_group_scope_request( +def build_deployments_what_if_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -725,13 +749,13 @@ def build_deployments_what_if_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -755,13 +779,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -788,13 +812,13 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -817,13 +841,13 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -846,13 +870,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -878,13 +902,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -907,13 +931,13 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -937,13 +961,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -970,13 +994,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_subscription_scope_request( +def build_deployments_what_if_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1003,13 +1027,13 @@ def build_deployments_what_if_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1033,13 +1057,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -1069,7 +1093,7 @@ def build_deployments_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 @@ -1096,13 +1120,13 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1129,13 +1153,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1171,7 +1195,7 @@ def build_deployments_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 @@ -1204,7 +1228,7 @@ def build_deployments_cancel_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 @@ -1237,7 +1261,7 @@ def build_deployments_validate_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") @@ -1273,7 +1297,7 @@ def build_deployments_what_if_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") @@ -1303,13 +1327,13 @@ def build_deployments_what_if_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1336,7 +1360,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1347,7 +1371,7 @@ def build_deployments_list_by_resource_group_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 @@ -1377,11 +1401,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _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") @@ -1405,7 +1431,7 @@ def build_providers_unregister_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 @@ -1428,13 +1454,13 @@ def build_providers_unregister_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_register_at_management_group_scope_request( +def build_providers_register_at_management_group_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, 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-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 @@ -1464,7 +1490,7 @@ def build_providers_register_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 @@ -1491,7 +1517,7 @@ def build_providers_list_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 @@ -1515,13 +1541,13 @@ def build_providers_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_list_at_tenant_scope_request( +def build_providers_list_at_tenant_scope_request( # pylint: disable=name-too-long *, top: Optional[int] = None, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -1546,7 +1572,7 @@ def build_providers_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 @@ -1569,13 +1595,13 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_get_at_tenant_scope_request( +def build_providers_get_at_tenant_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -1597,13 +1623,13 @@ def build_providers_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_provider_resource_types_list_request( +def build_provider_resource_types_list_request( # pylint: disable=name-too-long resource_provider_namespace: str, subscription_id: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -1628,7 +1654,7 @@ def build_provider_resource_types_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1640,7 +1666,7 @@ def build_resources_list_by_resource_group_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 @@ -1675,7 +1701,7 @@ def build_resources_move_resources_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") @@ -1703,13 +1729,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1748,7 +1774,7 @@ def build_resources_list_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 @@ -1995,7 +2021,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2041,7 +2069,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2116,13 +2146,13 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -2145,13 +2175,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -2181,7 +2211,7 @@ def build_resource_groups_delete_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 @@ -2208,7 +2238,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _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 @@ -2235,7 +2265,7 @@ def build_resource_groups_update_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2261,13 +2291,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -2301,7 +2331,7 @@ def build_resource_groups_list_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 @@ -2329,7 +2359,7 @@ def build_tags_delete_value_request(tag_name: str, tag_value: 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 @@ -2351,13 +2381,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -2383,7 +2413,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _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 @@ -2408,7 +2438,7 @@ def build_tags_delete_request(tag_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["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 @@ -2433,7 +2463,7 @@ def build_tags_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["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 @@ -2453,11 +2483,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: +def build_tags_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, **kwargs: Any +) -> HttpRequest: _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") @@ -2484,7 +2516,7 @@ def build_tags_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _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") @@ -2511,7 +2543,7 @@ def build_tags_get_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: _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 @@ -2535,7 +2567,7 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _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 @@ -2555,13 +2587,13 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_scope_request( +def build_deployment_operations_get_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, operation_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-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 @@ -2585,13 +2617,13 @@ def build_deployment_operations_get_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_scope_request( +def build_deployment_operations_list_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -2614,13 +2646,13 @@ def build_deployment_operations_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_tenant_scope_request( +def build_deployment_operations_get_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_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-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 @@ -2643,13 +2675,13 @@ def build_deployment_operations_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_tenant_scope_request( +def build_deployment_operations_list_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -2671,13 +2703,13 @@ def build_deployment_operations_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_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-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 @@ -2702,13 +2734,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -2734,13 +2766,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -2765,13 +2797,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -2803,7 +2835,7 @@ def build_deployment_operations_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 @@ -2837,7 +2869,7 @@ def build_deployment_operations_list_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 @@ -2898,7 +2930,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["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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -2999,7 +3031,7 @@ def _delete_at_scope_initial( # 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_deployments_delete_at_scope_request( @@ -3060,7 +3092,7 @@ def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -3122,7 +3154,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A _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_deployments_check_existence_at_scope_request( @@ -3167,7 +3199,7 @@ def _create_or_update_at_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -3324,7 +3356,7 @@ def begin_create_or_update_at_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3393,7 +3425,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -3458,7 +3490,7 @@ def cancel_at_scope( # 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_deployments_cancel_at_scope_request( @@ -3502,7 +3534,7 @@ def _validate_at_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3656,7 +3688,7 @@ def begin_validate_at_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3727,7 +3759,7 @@ def export_template_at_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -3786,7 +3818,7 @@ def list_at_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3870,7 +3902,7 @@ def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-stat _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_deployments_delete_at_tenant_scope_request( @@ -3928,7 +3960,7 @@ def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> L _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -3987,7 +4019,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _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_deployments_check_existence_at_tenant_scope_request( @@ -4017,7 +4049,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - def _create_or_update_at_tenant_scope_initial( + def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -4031,7 +4063,7 @@ def _create_or_update_at_tenant_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -4180,7 +4212,7 @@ def begin_create_or_update_at_tenant_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4246,7 +4278,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -4308,7 +4340,7 @@ def cancel_at_tenant_scope( # 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_deployments_cancel_at_tenant_scope_request( @@ -4351,7 +4383,7 @@ def _validate_at_tenant_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -4498,7 +4530,7 @@ def begin_validate_at_tenant_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4556,7 +4588,7 @@ def _what_if_at_tenant_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4706,7 +4738,7 @@ def begin_what_if_at_tenant_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4774,7 +4806,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -4830,7 +4862,7 @@ def list_at_tenant_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4899,7 +4931,7 @@ def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -4913,7 +4945,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _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_deployments_delete_at_management_group_scope_request( @@ -4978,7 +5010,7 @@ def begin_delete_at_management_group_scope( _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -5019,7 +5051,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -5042,7 +5076,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _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_deployments_check_existence_at_management_group_scope_request( @@ -5075,7 +5109,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -5089,7 +5123,7 @@ def _create_or_update_at_management_group_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -5142,7 +5176,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5180,7 +5214,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5218,7 +5252,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -5252,7 +5286,7 @@ def begin_create_or_update_at_management_group_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5323,7 +5357,7 @@ def get_at_management_group_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -5390,7 +5424,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _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_deployments_cancel_at_management_group_scope_request( @@ -5422,7 +5456,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - def _validate_at_management_group_scope_initial( + def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -5436,7 +5470,7 @@ def _validate_at_management_group_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5597,7 +5631,7 @@ def begin_validate_at_management_group_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5642,7 +5676,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - def _what_if_at_management_group_scope_initial( + def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -5656,7 +5690,7 @@ def _what_if_at_management_group_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5820,7 +5854,7 @@ def begin_what_if_at_management_group_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5868,7 +5902,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -5893,7 +5927,7 @@ def export_template_at_management_group_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -5952,7 +5986,7 @@ def list_at_management_group_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -6038,7 +6072,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _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_deployments_delete_at_subscription_scope_request( @@ -6099,7 +6133,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -6160,7 +6194,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _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_deployments_check_existence_at_subscription_scope_request( @@ -6193,7 +6227,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -6207,7 +6241,7 @@ def _create_or_update_at_subscription_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -6260,7 +6294,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -6295,7 +6329,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6325,7 +6359,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6357,7 +6391,7 @@ def begin_create_or_update_at_subscription_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6423,7 +6457,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -6488,7 +6522,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _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_deployments_cancel_at_subscription_scope_request( @@ -6534,7 +6568,7 @@ def _validate_at_subscription_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -6681,7 +6715,7 @@ def begin_validate_at_subscription_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6739,7 +6773,7 @@ def _what_if_at_subscription_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -6889,7 +6923,7 @@ def begin_what_if_at_subscription_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6959,7 +6993,7 @@ def export_template_at_subscription_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -7016,7 +7050,7 @@ def list_at_subscription_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -7102,7 +7136,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["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_deployments_delete_request( @@ -7168,7 +7202,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -7233,7 +7267,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _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_deployments_check_existence_request( @@ -7281,7 +7315,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["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.DeploymentExtended] = kwargs.pop("cls", None) @@ -7448,7 +7482,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["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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7518,7 +7552,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -7587,7 +7621,7 @@ def cancel( # 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_deployments_cancel_request( @@ -7634,7 +7668,7 @@ def _validate_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -7798,7 +7832,7 @@ def begin_validate( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7861,7 +7895,7 @@ def _what_if_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -8032,7 +8066,7 @@ def begin_what_if( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8106,7 +8140,7 @@ def export_template( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -8167,7 +8201,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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -8262,7 +8296,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -8342,7 +8376,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _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.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -8403,7 +8437,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s _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_providers_register_at_management_group_scope_request( @@ -8458,7 +8492,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _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.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -8514,7 +8548,7 @@ def list( _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8606,7 +8640,7 @@ def list_at_tenant_scope( _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8700,7 +8734,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -8762,7 +8796,7 @@ def get_at_tenant_scope( _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -8843,7 +8877,7 @@ def list( _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.ProviderResourceTypeListResult] = kwargs.pop("cls", None) request = build_provider_resource_types_list_request( @@ -8944,7 +8978,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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -9032,7 +9066,7 @@ def _move_resources_initial( # pylint: disable=inconsistent-return-statements _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[None] = kwargs.pop("cls", None) @@ -9180,7 +9214,7 @@ def begin_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9236,7 +9270,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _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[None] = kwargs.pop("cls", None) @@ -9390,7 +9424,7 @@ def begin_validate_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9471,7 +9505,7 @@ def list( _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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -11078,7 +11112,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _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_resource_groups_check_existence_request( @@ -11188,7 +11222,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.ResourceGroup] = kwargs.pop("cls", None) @@ -11252,7 +11286,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["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_resource_groups_delete_request( @@ -11307,7 +11341,7 @@ def begin_delete(self, resource_group_name: str, **kwargs: Any) -> LROPoller[Non _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -11367,7 +11401,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _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.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -11490,7 +11524,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.ResourceGroup] = kwargs.pop("cls", None) @@ -11550,7 +11584,7 @@ def _export_template_initial( _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[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -11695,7 +11729,7 @@ def begin_export_template( _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.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -11763,7 +11797,7 @@ def list( _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.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -11883,7 +11917,7 @@ def delete_value( # 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_tags_delete_value_request( @@ -11941,7 +11975,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _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.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -12007,7 +12041,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _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.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -12071,7 +12105,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _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_tags_delete_request( @@ -12119,7 +12153,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _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.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -12263,7 +12297,7 @@ def create_or_update_at_scope( _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.TagsResource] = kwargs.pop("cls", None) @@ -12401,7 +12435,7 @@ def update_at_scope( _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.TagsResource] = kwargs.pop("cls", None) @@ -12470,7 +12504,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _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.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -12527,7 +12561,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable _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_tags_delete_at_scope_request( @@ -12604,7 +12638,7 @@ def get_at_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -12662,7 +12696,7 @@ def list_at_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -12758,7 +12792,7 @@ def get_at_tenant_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -12813,7 +12847,7 @@ def list_at_tenant_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -12910,7 +12944,7 @@ def get_at_management_group_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -12968,7 +13002,7 @@ def list_at_management_group_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13066,7 +13100,7 @@ def get_at_subscription_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -13122,7 +13156,7 @@ def list_at_subscription_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13223,7 +13257,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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -13283,7 +13317,7 @@ def list( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_configuration.py index 528605133943a..14ff7dc571c6a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", "2021-01-01") + api_version: str = kwargs.pop("api_version", "2021-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/_configuration.py index d31f36f7af06e..5bf910e3ba4f6 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", "2021-01-01") + api_version: str = kwargs.pop("api_version", "2021-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/operations/_operations.py index 79f6deb72c665..05dda20a7258d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/aio/operations/_operations.py @@ -132,10 +132,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -173,7 +169,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -274,7 +270,7 @@ async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -335,7 +331,7 @@ async def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -397,7 +393,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -442,7 +438,7 @@ async def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -599,7 +595,7 @@ async def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -668,7 +664,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -733,7 +729,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -777,7 +773,7 @@ async def _validate_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -931,7 +927,7 @@ async def begin_validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1002,7 +998,7 @@ async def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -1061,7 +1057,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1145,7 +1141,7 @@ async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -1203,7 +1199,7 @@ async def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -1262,7 +1258,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -1292,7 +1288,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - async def _create_or_update_at_tenant_scope_initial( + async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1306,7 +1302,7 @@ async def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1455,7 +1451,7 @@ async def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1521,7 +1517,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -1583,7 +1579,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -1626,7 +1622,7 @@ async def _validate_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -1773,7 +1769,7 @@ async def begin_validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1831,7 +1827,7 @@ async def _what_if_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -1981,7 +1977,7 @@ async def begin_what_if_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2051,7 +2047,7 @@ async def export_template_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -2107,7 +2103,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2176,7 +2172,7 @@ async def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -2190,7 +2186,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -2255,7 +2251,7 @@ async def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -2296,7 +2292,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -2321,7 +2317,7 @@ async def check_existence_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -2354,7 +2350,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2368,7 +2364,7 @@ async def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2421,7 +2417,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2459,7 +2455,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2497,7 +2493,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2531,7 +2527,7 @@ async def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2602,7 +2598,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2669,7 +2665,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -2701,7 +2697,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - async def _validate_at_management_group_scope_initial( + async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -2715,7 +2711,7 @@ async def _validate_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -2876,7 +2872,7 @@ async def begin_validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2921,7 +2917,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - async def _what_if_at_management_group_scope_initial( + async def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -2935,7 +2931,7 @@ async def _what_if_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -3099,7 +3095,7 @@ async def begin_what_if_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3147,7 +3143,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -3172,7 +3168,7 @@ async def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -3231,7 +3227,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3317,7 +3313,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -3378,7 +3374,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -3439,7 +3435,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -3472,7 +3468,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3486,7 +3482,7 @@ async def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3539,7 +3535,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -3574,7 +3570,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3604,7 +3600,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3636,7 +3632,7 @@ async def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3702,7 +3698,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3767,7 +3763,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -3813,7 +3809,7 @@ async def _validate_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3960,7 +3956,7 @@ async def begin_validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4018,7 +4014,7 @@ async def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4168,7 +4164,7 @@ async def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4238,7 +4234,7 @@ async def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -4295,7 +4291,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4381,7 +4377,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -4447,7 +4443,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -4512,7 +4508,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -4560,7 +4556,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4727,7 +4723,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4797,7 +4793,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4866,7 +4862,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -4913,7 +4909,7 @@ async def _validate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5077,7 +5073,7 @@ async def begin_validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5140,7 +5136,7 @@ async def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5311,7 +5307,7 @@ async def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5385,7 +5381,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -5446,7 +5442,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5541,7 +5537,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -5621,7 +5617,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -5682,7 +5678,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_providers_register_at_management_group_scope_request( @@ -5737,7 +5733,7 @@ async def register(self, resource_provider_namespace: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -5793,7 +5789,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5885,7 +5881,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -5981,7 +5977,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -6043,7 +6039,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -6124,7 +6120,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ProviderResourceTypeListResult] = kwargs.pop("cls", None) request = build_provider_resource_types_list_request( @@ -6225,7 +6221,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -6313,7 +6309,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -6461,7 +6457,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6517,7 +6513,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -6671,7 +6667,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6752,7 +6748,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -8359,7 +8355,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -8469,7 +8465,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -8533,7 +8529,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -8596,7 +8592,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -8657,7 +8653,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -8780,7 +8776,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -8840,7 +8836,7 @@ async def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -8985,7 +8981,7 @@ async def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -9053,7 +9049,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -9173,7 +9169,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -9231,7 +9227,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -9297,7 +9293,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -9361,7 +9357,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -9409,7 +9405,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -9553,7 +9549,7 @@ async def create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -9691,7 +9687,7 @@ async def update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -9760,7 +9756,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -9819,7 +9815,7 @@ async def delete_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_at_scope_request( @@ -9896,7 +9892,7 @@ async def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -9954,7 +9950,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10050,7 +10046,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -10105,7 +10101,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10202,7 +10198,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -10260,7 +10256,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10358,7 +10354,7 @@ async def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -10414,7 +10410,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10515,7 +10511,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -10575,7 +10571,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_operations.py index 3e57c45018e17..e20430a102367 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_01_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,11 +63,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -94,11 +92,13 @@ def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -121,11 +121,13 @@ def build_deployments_check_existence_at_scope_request(scope: str, deployment_na return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -155,7 +157,7 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,11 +180,13 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -205,11 +209,13 @@ def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -235,11 +241,13 @@ def build_deployments_validate_at_scope_request(scope: str, deployment_name: str return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -270,7 +278,7 @@ def build_deployments_list_at_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -294,11 +302,13 @@ def build_deployments_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -320,11 +330,13 @@ def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -346,11 +358,13 @@ def build_deployments_check_existence_at_tenant_scope_request(deployment_name: s return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -375,11 +389,13 @@ def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_get_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -401,11 +417,13 @@ def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -427,11 +445,13 @@ def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -456,11 +476,13 @@ def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **k return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_what_if_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -485,11 +507,13 @@ def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kw return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -511,13 +535,13 @@ def build_deployments_export_template_at_tenant_scope_request(deployment_name: s return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_tenant_scope_request( +def build_deployments_list_at_tenant_scope_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -536,13 +560,13 @@ def build_deployments_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -568,13 +592,13 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -600,13 +624,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -635,13 +659,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -667,13 +691,13 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -699,13 +723,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -734,13 +758,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_management_group_scope_request( +def build_deployments_what_if_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -769,13 +793,13 @@ def build_deployments_what_if_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -801,13 +825,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -834,13 +858,13 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -865,13 +889,13 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -896,13 +920,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -930,13 +954,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -961,13 +985,13 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -993,13 +1017,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1028,13 +1052,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_subscription_scope_request( +def build_deployments_what_if_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1063,13 +1087,13 @@ def build_deployments_what_if_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1095,13 +1119,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1131,7 +1155,7 @@ def build_deployments_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1160,13 +1184,13 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1195,13 +1219,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1239,7 +1263,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1274,7 +1298,7 @@ def build_deployments_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1309,7 +1333,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1347,7 +1371,7 @@ def build_deployments_what_if_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1379,13 +1403,13 @@ def build_deployments_what_if_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1414,7 +1438,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1425,7 +1449,7 @@ def build_deployments_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1455,11 +1479,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1483,7 +1509,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1506,13 +1532,13 @@ def build_providers_unregister_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_register_at_management_group_scope_request( +def build_providers_register_at_management_group_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, 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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1542,7 +1568,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1569,7 +1595,7 @@ def build_providers_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1593,13 +1619,13 @@ def build_providers_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_list_at_tenant_scope_request( +def build_providers_list_at_tenant_scope_request( # pylint: disable=name-too-long *, top: Optional[int] = None, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1624,7 +1650,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1647,13 +1673,13 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_get_at_tenant_scope_request( +def build_providers_get_at_tenant_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1675,13 +1701,13 @@ def build_providers_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_provider_resource_types_list_request( +def build_provider_resource_types_list_request( # pylint: disable=name-too-long resource_provider_namespace: str, subscription_id: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1706,7 +1732,7 @@ def build_provider_resource_types_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1718,7 +1744,7 @@ def build_resources_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1753,7 +1779,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1786,13 +1812,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1836,7 +1862,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2083,7 +2109,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2129,7 +2157,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2204,13 +2234,13 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2233,13 +2263,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2271,7 +2301,7 @@ def build_resource_groups_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2300,7 +2330,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2327,7 +2357,7 @@ def build_resource_groups_update_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2353,13 +2383,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2393,7 +2423,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2421,7 +2451,7 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2443,13 +2473,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2475,7 +2505,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2500,7 +2530,7 @@ def build_tags_delete_request(tag_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["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2525,7 +2555,7 @@ def build_tags_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2545,11 +2575,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: +def build_tags_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2576,7 +2608,7 @@ def build_tags_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2603,7 +2635,7 @@ def build_tags_get_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2627,7 +2659,7 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2647,13 +2679,13 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_scope_request( +def build_deployment_operations_get_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, operation_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2679,13 +2711,13 @@ def build_deployment_operations_get_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_scope_request( +def build_deployment_operations_list_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2710,13 +2742,13 @@ def build_deployment_operations_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_tenant_scope_request( +def build_deployment_operations_get_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2741,13 +2773,13 @@ def build_deployment_operations_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_tenant_scope_request( +def build_deployment_operations_list_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2771,13 +2803,13 @@ def build_deployment_operations_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2804,13 +2836,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2838,13 +2870,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2871,13 +2903,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2911,7 +2943,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2947,7 +2979,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3010,7 +3042,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -3111,7 +3143,7 @@ def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -3172,7 +3204,7 @@ def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -3234,7 +3266,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -3279,7 +3311,7 @@ def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3436,7 +3468,7 @@ def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3505,7 +3537,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -3570,7 +3602,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -3614,7 +3646,7 @@ def _validate_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3768,7 +3800,7 @@ def begin_validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3839,7 +3871,7 @@ def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -3898,7 +3930,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3982,7 +4014,7 @@ def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-stat _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -4040,7 +4072,7 @@ def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> L _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -4099,7 +4131,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -4129,7 +4161,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - def _create_or_update_at_tenant_scope_initial( + def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -4143,7 +4175,7 @@ def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4292,7 +4324,7 @@ def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4358,7 +4390,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -4420,7 +4452,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -4463,7 +4495,7 @@ def _validate_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -4610,7 +4642,7 @@ def begin_validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4668,7 +4700,7 @@ def _what_if_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4818,7 +4850,7 @@ def begin_what_if_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4886,7 +4918,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -4942,7 +4974,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5011,7 +5043,7 @@ def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -5025,7 +5057,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -5090,7 +5122,7 @@ def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -5131,7 +5163,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -5154,7 +5188,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -5187,7 +5221,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -5201,7 +5235,7 @@ def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -5254,7 +5288,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5292,7 +5326,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5330,7 +5364,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -5364,7 +5398,7 @@ def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5435,7 +5469,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -5502,7 +5536,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -5534,7 +5568,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - def _validate_at_management_group_scope_initial( + def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -5548,7 +5582,7 @@ def _validate_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5709,7 +5743,7 @@ def begin_validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5754,7 +5788,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - def _what_if_at_management_group_scope_initial( + def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -5768,7 +5802,7 @@ def _what_if_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5932,7 +5966,7 @@ def begin_what_if_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5980,7 +6014,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -6005,7 +6039,7 @@ def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -6064,7 +6098,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -6150,7 +6184,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -6211,7 +6245,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -6272,7 +6306,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -6305,7 +6339,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -6319,7 +6353,7 @@ def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -6372,7 +6406,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -6407,7 +6441,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6437,7 +6471,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6469,7 +6503,7 @@ def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6535,7 +6569,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -6600,7 +6634,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -6646,7 +6680,7 @@ def _validate_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -6793,7 +6827,7 @@ def begin_validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6851,7 +6885,7 @@ def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -7001,7 +7035,7 @@ def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7071,7 +7105,7 @@ def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -7128,7 +7162,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -7214,7 +7248,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -7280,7 +7314,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -7345,7 +7379,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -7393,7 +7427,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -7560,7 +7594,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7630,7 +7664,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -7699,7 +7733,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -7746,7 +7780,7 @@ def _validate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -7910,7 +7944,7 @@ def begin_validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7973,7 +8007,7 @@ def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -8144,7 +8178,7 @@ def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8218,7 +8252,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -8279,7 +8313,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -8374,7 +8408,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -8454,7 +8488,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -8515,7 +8549,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_providers_register_at_management_group_scope_request( @@ -8570,7 +8604,7 @@ def register(self, resource_provider_namespace: str, **kwargs: Any) -> _models.P _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_register_request( @@ -8626,7 +8660,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8718,7 +8752,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8812,7 +8846,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -8874,7 +8908,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -8955,7 +8989,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ProviderResourceTypeListResult] = kwargs.pop("cls", None) request = build_provider_resource_types_list_request( @@ -9056,7 +9090,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -9144,7 +9178,7 @@ def _move_resources_initial( # 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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -9292,7 +9326,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9348,7 +9382,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -9502,7 +9536,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9583,7 +9617,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -11190,7 +11224,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -11300,7 +11334,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -11364,7 +11398,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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -11427,7 +11461,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) 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) @@ -11488,7 +11522,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -11611,7 +11645,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -11671,7 +11705,7 @@ def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -11816,7 +11850,7 @@ def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -11884,7 +11918,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -12004,7 +12038,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -12062,7 +12096,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -12128,7 +12162,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -12192,7 +12226,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -12240,7 +12274,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -12384,7 +12418,7 @@ def create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -12522,7 +12556,7 @@ def update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) @@ -12591,7 +12625,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -12648,7 +12682,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_at_scope_request( @@ -12725,7 +12759,7 @@ def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -12783,7 +12817,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -12879,7 +12913,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -12934,7 +12968,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13031,7 +13065,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -13089,7 +13123,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13187,7 +13221,7 @@ def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -13243,7 +13277,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13344,7 +13378,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -13404,7 +13438,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_configuration.py index 6857a6862429a..45f86d53383a2 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/_configuration.py index 0591eec7a9ced..15933595888f6 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_operations.py index 15ce6da50ff57..ee383d7dce87c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/aio/operations/_operations.py @@ -133,10 +133,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -174,7 +170,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-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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +271,7 @@ async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-state _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_deployments_delete_at_scope_request( @@ -336,7 +332,7 @@ async def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -398,7 +394,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa _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_deployments_check_existence_at_scope_request( @@ -443,7 +439,7 @@ async def _create_or_update_at_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -600,7 +596,7 @@ async def begin_create_or_update_at_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -669,7 +665,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -734,7 +730,7 @@ async def cancel_at_scope( # 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_deployments_cancel_at_scope_request( @@ -778,7 +774,7 @@ async def _validate_at_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -932,7 +928,7 @@ async def begin_validate_at_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1003,7 +999,7 @@ async def export_template_at_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -1062,7 +1058,7 @@ def list_at_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1146,7 +1142,7 @@ async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-retur _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_deployments_delete_at_tenant_scope_request( @@ -1204,7 +1200,7 @@ async def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1263,7 +1259,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: _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_deployments_check_existence_at_tenant_scope_request( @@ -1293,7 +1289,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - async def _create_or_update_at_tenant_scope_initial( + async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1307,7 +1303,7 @@ async def _create_or_update_at_tenant_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -1456,7 +1452,7 @@ async def begin_create_or_update_at_tenant_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1522,7 +1518,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -1584,7 +1580,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme _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_deployments_cancel_at_tenant_scope_request( @@ -1627,7 +1623,7 @@ async def _validate_at_tenant_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -1774,7 +1770,7 @@ async def begin_validate_at_tenant_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1832,7 +1828,7 @@ async def _what_if_at_tenant_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -1982,7 +1978,7 @@ async def begin_what_if_at_tenant_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2052,7 +2048,7 @@ async def export_template_at_tenant_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -2108,7 +2104,7 @@ def list_at_tenant_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2177,7 +2173,7 @@ async def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -2191,7 +2187,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _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_deployments_delete_at_management_group_scope_request( @@ -2256,7 +2252,7 @@ async def begin_delete_at_management_group_scope( _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -2297,7 +2293,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -2322,7 +2318,7 @@ async def check_existence_at_management_group_scope( _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_deployments_check_existence_at_management_group_scope_request( @@ -2355,7 +2351,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2369,7 +2365,7 @@ async def _create_or_update_at_management_group_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -2422,7 +2418,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2460,7 +2456,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2498,7 +2494,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2532,7 +2528,7 @@ async def begin_create_or_update_at_management_group_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2603,7 +2599,7 @@ async def get_at_management_group_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2670,7 +2666,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _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_deployments_cancel_at_management_group_scope_request( @@ -2702,7 +2698,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - async def _validate_at_management_group_scope_initial( + async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -2716,7 +2712,7 @@ async def _validate_at_management_group_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -2877,7 +2873,7 @@ async def begin_validate_at_management_group_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2922,7 +2918,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - async def _what_if_at_management_group_scope_initial( + async def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -2936,7 +2932,7 @@ async def _what_if_at_management_group_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -3100,7 +3096,7 @@ async def begin_what_if_at_management_group_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3148,7 +3144,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -3173,7 +3169,7 @@ async def export_template_at_management_group_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -3232,7 +3228,7 @@ def list_at_management_group_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3318,7 +3314,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _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_deployments_delete_at_subscription_scope_request( @@ -3379,7 +3375,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -3440,7 +3436,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _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_deployments_check_existence_at_subscription_scope_request( @@ -3473,7 +3469,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3487,7 +3483,7 @@ async def _create_or_update_at_subscription_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -3540,7 +3536,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -3575,7 +3571,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3605,7 +3601,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3637,7 +3633,7 @@ async def begin_create_or_update_at_subscription_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3703,7 +3699,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3768,7 +3764,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _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_deployments_cancel_at_subscription_scope_request( @@ -3814,7 +3810,7 @@ async def _validate_at_subscription_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3961,7 +3957,7 @@ async def begin_validate_at_subscription_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4019,7 +4015,7 @@ async def _what_if_at_subscription_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4169,7 +4165,7 @@ async def begin_what_if_at_subscription_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4239,7 +4235,7 @@ async def export_template_at_subscription_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -4296,7 +4292,7 @@ def list_at_subscription_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4382,7 +4378,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-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_deployments_delete_request( @@ -4448,7 +4444,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -4513,7 +4509,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _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_deployments_check_existence_request( @@ -4561,7 +4557,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-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.DeploymentExtended] = kwargs.pop("cls", None) @@ -4728,7 +4724,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-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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4798,7 +4794,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4867,7 +4863,7 @@ async def cancel( # 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_deployments_cancel_request( @@ -4914,7 +4910,7 @@ async def _validate_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5078,7 +5074,7 @@ async def begin_validate( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5141,7 +5137,7 @@ async def _what_if_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5312,7 +5308,7 @@ async def begin_what_if( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5386,7 +5382,7 @@ async def export_template( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -5447,7 +5443,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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5542,7 +5538,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -5622,7 +5618,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _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.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -5686,7 +5682,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re _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_providers_register_at_management_group_scope_request( @@ -5742,7 +5738,7 @@ async def provider_permissions( _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.ProviderPermissionListResult] = kwargs.pop("cls", None) request = build_providers_provider_permissions_request( @@ -5863,7 +5859,7 @@ async def register( _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.Provider] = kwargs.pop("cls", None) @@ -5929,7 +5925,7 @@ def list(self, expand: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -6015,7 +6011,7 @@ def list_at_tenant_scope(self, expand: Optional[str] = None, **kwargs: Any) -> A _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -6110,7 +6106,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.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -6172,7 +6168,7 @@ async def get_at_tenant_scope( _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -6253,7 +6249,7 @@ async def list( _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.ProviderResourceTypeListResult] = kwargs.pop("cls", None) request = build_provider_resource_types_list_request( @@ -6354,7 +6350,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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -6442,7 +6438,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _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[None] = kwargs.pop("cls", None) @@ -6590,7 +6586,7 @@ async def begin_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6646,7 +6642,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _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[None] = kwargs.pop("cls", None) @@ -6800,7 +6796,7 @@ async def begin_validate_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6891,7 +6887,7 @@ def list( _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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -8501,7 +8497,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _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_resource_groups_check_existence_request( @@ -8611,7 +8607,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-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.ResourceGroup] = kwargs.pop("cls", None) @@ -8675,7 +8671,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-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_resource_groups_delete_request( @@ -8738,7 +8734,7 @@ async def begin_delete( _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) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -8799,7 +8795,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.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.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -8922,7 +8918,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.ResourceGroup] = kwargs.pop("cls", None) @@ -8982,7 +8978,7 @@ async def _export_template_initial( _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[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -9127,7 +9123,7 @@ async def begin_export_template( _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.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -9195,7 +9191,7 @@ def list( _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.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -9315,7 +9311,7 @@ async def delete_value( # 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_tags_delete_value_request( @@ -9373,7 +9369,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _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.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -9439,7 +9435,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _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.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -9503,7 +9499,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _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_tags_delete_request( @@ -9551,7 +9547,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _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.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -9695,7 +9691,7 @@ async def create_or_update_at_scope( _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.TagsResource] = kwargs.pop("cls", None) @@ -9833,7 +9829,7 @@ async def update_at_scope( _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.TagsResource] = kwargs.pop("cls", None) @@ -9902,7 +9898,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _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.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -9961,7 +9957,7 @@ async def delete_at_scope( # 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_tags_delete_at_scope_request( @@ -10038,7 +10034,7 @@ async def get_at_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -10096,7 +10092,7 @@ def list_at_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10192,7 +10188,7 @@ async def get_at_tenant_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -10247,7 +10243,7 @@ def list_at_tenant_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10344,7 +10340,7 @@ async def get_at_management_group_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -10402,7 +10398,7 @@ def list_at_management_group_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10500,7 +10496,7 @@ async def get_at_subscription_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -10556,7 +10552,7 @@ def list_at_subscription_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10657,7 +10653,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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -10717,7 +10713,7 @@ def list( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py index 977f1bcca41b7..bbbded00dc4a9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -67,11 +63,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -94,11 +92,13 @@ def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -121,11 +121,13 @@ def build_deployments_check_existence_at_scope_request(scope: str, deployment_na return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -155,7 +157,7 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k _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 @@ -178,11 +180,13 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -205,11 +209,13 @@ def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -235,11 +241,13 @@ def build_deployments_validate_at_scope_request(scope: str, deployment_name: str return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -270,7 +278,7 @@ def build_deployments_list_at_scope_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 @@ -294,11 +302,13 @@ def build_deployments_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -320,11 +330,13 @@ def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -346,11 +358,13 @@ def build_deployments_check_existence_at_tenant_scope_request(deployment_name: s return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -375,11 +389,13 @@ def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_get_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -401,11 +417,13 @@ def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -427,11 +445,13 @@ def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -456,11 +476,13 @@ def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **k return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_what_if_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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") @@ -485,11 +507,13 @@ def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kw return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _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 @@ -511,13 +535,13 @@ def build_deployments_export_template_at_tenant_scope_request(deployment_name: s return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_tenant_scope_request( +def build_deployments_list_at_tenant_scope_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -536,13 +560,13 @@ def build_deployments_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -568,13 +592,13 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -600,13 +624,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -635,13 +659,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -667,13 +691,13 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -699,13 +723,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -734,13 +758,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_management_group_scope_request( +def build_deployments_what_if_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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") @@ -769,13 +793,13 @@ def build_deployments_what_if_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _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 @@ -801,13 +825,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -834,13 +858,13 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -865,13 +889,13 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -896,13 +920,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -930,13 +954,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -961,13 +985,13 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -993,13 +1017,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1028,13 +1052,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_subscription_scope_request( +def build_deployments_what_if_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1063,13 +1087,13 @@ def build_deployments_what_if_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1095,13 +1119,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -1131,7 +1155,7 @@ def build_deployments_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 @@ -1160,13 +1184,13 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1195,13 +1219,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1239,7 +1263,7 @@ def build_deployments_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 @@ -1274,7 +1298,7 @@ def build_deployments_cancel_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 @@ -1309,7 +1333,7 @@ def build_deployments_validate_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") @@ -1347,7 +1371,7 @@ def build_deployments_what_if_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") @@ -1379,13 +1403,13 @@ def build_deployments_what_if_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1414,7 +1438,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1425,7 +1449,7 @@ def build_deployments_list_by_resource_group_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 @@ -1455,11 +1479,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _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") @@ -1483,7 +1509,7 @@ def build_providers_unregister_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 @@ -1506,13 +1532,13 @@ def build_providers_unregister_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_register_at_management_group_scope_request( +def build_providers_register_at_management_group_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, 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-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 @@ -1536,13 +1562,13 @@ def build_providers_register_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_provider_permissions_request( +def build_providers_provider_permissions_request( # pylint: disable=name-too-long resource_provider_namespace: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -1571,7 +1597,7 @@ def build_providers_register_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") @@ -1599,7 +1625,7 @@ def build_providers_list_request(subscription_id: str, *, expand: Optional[str] _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 @@ -1621,11 +1647,13 @@ def build_providers_list_request(subscription_id: str, *, expand: Optional[str] return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_list_at_tenant_scope_request(*, expand: Optional[str] = None, **kwargs: Any) -> HttpRequest: +def build_providers_list_at_tenant_scope_request( # pylint: disable=name-too-long + *, expand: Optional[str] = None, **kwargs: Any +) -> HttpRequest: _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 @@ -1648,7 +1676,7 @@ def build_providers_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 @@ -1671,13 +1699,13 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_get_at_tenant_scope_request( +def build_providers_get_at_tenant_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -1699,13 +1727,13 @@ def build_providers_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_provider_resource_types_list_request( +def build_provider_resource_types_list_request( # pylint: disable=name-too-long resource_provider_namespace: str, subscription_id: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -1730,7 +1758,7 @@ def build_provider_resource_types_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1742,7 +1770,7 @@ def build_resources_list_by_resource_group_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 @@ -1777,7 +1805,7 @@ def build_resources_move_resources_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") @@ -1810,13 +1838,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -1860,7 +1888,7 @@ def build_resources_list_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 @@ -2107,7 +2135,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2153,7 +2183,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2228,13 +2260,13 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -2257,13 +2289,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -2295,7 +2327,7 @@ def build_resource_groups_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 @@ -2324,7 +2356,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _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 @@ -2351,7 +2383,7 @@ def build_resource_groups_update_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")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2377,13 +2409,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -2417,7 +2449,7 @@ def build_resource_groups_list_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 @@ -2445,7 +2477,7 @@ def build_tags_delete_value_request(tag_name: str, tag_value: 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 @@ -2467,13 +2499,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -2499,7 +2531,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _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 @@ -2524,7 +2556,7 @@ def build_tags_delete_request(tag_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["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 @@ -2549,7 +2581,7 @@ def build_tags_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-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 @@ -2569,11 +2601,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: +def build_tags_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, **kwargs: Any +) -> HttpRequest: _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") @@ -2600,7 +2634,7 @@ def build_tags_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _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") @@ -2627,7 +2661,7 @@ def build_tags_get_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: _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 @@ -2651,7 +2685,7 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _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 @@ -2671,13 +2705,13 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_scope_request( +def build_deployment_operations_get_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, operation_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-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 @@ -2703,13 +2737,13 @@ def build_deployment_operations_get_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_scope_request( +def build_deployment_operations_list_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -2734,13 +2768,13 @@ def build_deployment_operations_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_tenant_scope_request( +def build_deployment_operations_get_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_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-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 @@ -2765,13 +2799,13 @@ def build_deployment_operations_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_tenant_scope_request( +def build_deployment_operations_list_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -2795,13 +2829,13 @@ def build_deployment_operations_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_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-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 @@ -2828,13 +2862,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -2862,13 +2896,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -2895,13 +2929,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _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 @@ -2935,7 +2969,7 @@ def build_deployment_operations_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 @@ -2971,7 +3005,7 @@ def build_deployment_operations_list_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 @@ -3034,7 +3068,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-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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -3135,7 +3169,7 @@ def _delete_at_scope_initial( # 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_deployments_delete_at_scope_request( @@ -3196,7 +3230,7 @@ def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -3258,7 +3292,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A _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_deployments_check_existence_at_scope_request( @@ -3303,7 +3337,7 @@ def _create_or_update_at_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -3460,7 +3494,7 @@ def begin_create_or_update_at_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3529,7 +3563,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -3594,7 +3628,7 @@ def cancel_at_scope( # 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_deployments_cancel_at_scope_request( @@ -3638,7 +3672,7 @@ def _validate_at_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3792,7 +3826,7 @@ def begin_validate_at_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3863,7 +3897,7 @@ def export_template_at_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -3922,7 +3956,7 @@ def list_at_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4006,7 +4040,7 @@ def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-stat _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_deployments_delete_at_tenant_scope_request( @@ -4064,7 +4098,7 @@ def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> L _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -4123,7 +4157,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _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_deployments_check_existence_at_tenant_scope_request( @@ -4153,7 +4187,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - def _create_or_update_at_tenant_scope_initial( + def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -4167,7 +4201,7 @@ def _create_or_update_at_tenant_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -4316,7 +4350,7 @@ def begin_create_or_update_at_tenant_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4382,7 +4416,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -4444,7 +4478,7 @@ def cancel_at_tenant_scope( # 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_deployments_cancel_at_tenant_scope_request( @@ -4487,7 +4521,7 @@ def _validate_at_tenant_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -4634,7 +4668,7 @@ def begin_validate_at_tenant_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4692,7 +4726,7 @@ def _what_if_at_tenant_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4842,7 +4876,7 @@ def begin_what_if_at_tenant_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4910,7 +4944,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -4966,7 +5000,7 @@ def list_at_tenant_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5035,7 +5069,7 @@ def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -5049,7 +5083,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _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_deployments_delete_at_management_group_scope_request( @@ -5114,7 +5148,7 @@ def begin_delete_at_management_group_scope( _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -5155,7 +5189,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -5178,7 +5214,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _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_deployments_check_existence_at_management_group_scope_request( @@ -5211,7 +5247,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -5225,7 +5261,7 @@ def _create_or_update_at_management_group_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -5278,7 +5314,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5316,7 +5352,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5354,7 +5390,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -5388,7 +5424,7 @@ def begin_create_or_update_at_management_group_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5459,7 +5495,7 @@ def get_at_management_group_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -5526,7 +5562,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _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_deployments_cancel_at_management_group_scope_request( @@ -5558,7 +5594,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - def _validate_at_management_group_scope_initial( + def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -5572,7 +5608,7 @@ def _validate_at_management_group_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5733,7 +5769,7 @@ def begin_validate_at_management_group_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5778,7 +5814,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - def _what_if_at_management_group_scope_initial( + def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -5792,7 +5828,7 @@ def _what_if_at_management_group_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5956,7 +5992,7 @@ def begin_what_if_at_management_group_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6004,7 +6040,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -6029,7 +6065,7 @@ def export_template_at_management_group_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -6088,7 +6124,7 @@ def list_at_management_group_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -6174,7 +6210,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _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_deployments_delete_at_subscription_scope_request( @@ -6235,7 +6271,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -6296,7 +6332,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _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_deployments_check_existence_at_subscription_scope_request( @@ -6329,7 +6365,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -6343,7 +6379,7 @@ def _create_or_update_at_subscription_scope_initial( _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.DeploymentExtended] = kwargs.pop("cls", None) @@ -6396,7 +6432,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -6431,7 +6467,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6461,7 +6497,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6493,7 +6529,7 @@ def begin_create_or_update_at_subscription_scope( _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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6559,7 +6595,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -6624,7 +6660,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _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_deployments_cancel_at_subscription_scope_request( @@ -6670,7 +6706,7 @@ def _validate_at_subscription_scope_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -6817,7 +6853,7 @@ def begin_validate_at_subscription_scope( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6875,7 +6911,7 @@ def _what_if_at_subscription_scope_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -7025,7 +7061,7 @@ def begin_what_if_at_subscription_scope( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7095,7 +7131,7 @@ def export_template_at_subscription_scope( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -7152,7 +7188,7 @@ def list_at_subscription_scope( _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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -7238,7 +7274,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-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_deployments_delete_request( @@ -7304,7 +7340,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -7369,7 +7405,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _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_deployments_check_existence_request( @@ -7417,7 +7453,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-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.DeploymentExtended] = kwargs.pop("cls", None) @@ -7584,7 +7620,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-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.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7654,7 +7690,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _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.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -7723,7 +7759,7 @@ def cancel( # 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_deployments_cancel_request( @@ -7770,7 +7806,7 @@ def _validate_initial( _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[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -7934,7 +7970,7 @@ def begin_validate( _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.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7997,7 +8033,7 @@ def _what_if_initial( _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[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -8168,7 +8204,7 @@ def begin_what_if( _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.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8242,7 +8278,7 @@ def export_template( _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.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -8303,7 +8339,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.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -8398,7 +8434,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _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: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -8478,7 +8514,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _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.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -8542,7 +8578,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s _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_providers_register_at_management_group_scope_request( @@ -8598,7 +8634,7 @@ def provider_permissions( _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.ProviderPermissionListResult] = kwargs.pop("cls", None) request = build_providers_provider_permissions_request( @@ -8719,7 +8755,7 @@ def register( _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.Provider] = kwargs.pop("cls", None) @@ -8785,7 +8821,7 @@ def list(self, expand: Optional[str] = None, **kwargs: Any) -> Iterable["_models _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8871,7 +8907,7 @@ def list_at_tenant_scope(self, expand: Optional[str] = None, **kwargs: Any) -> I _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.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8964,7 +9000,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -9026,7 +9062,7 @@ def get_at_tenant_scope( _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.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -9107,7 +9143,7 @@ def list( _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.ProviderResourceTypeListResult] = kwargs.pop("cls", None) request = build_provider_resource_types_list_request( @@ -9208,7 +9244,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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -9296,7 +9332,7 @@ def _move_resources_initial( # 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-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[None] = kwargs.pop("cls", None) @@ -9444,7 +9480,7 @@ def begin_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9500,7 +9536,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _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[None] = kwargs.pop("cls", None) @@ -9654,7 +9690,7 @@ def begin_validate_move_resources( _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[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9745,7 +9781,7 @@ def list( _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.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -11355,7 +11391,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _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_resource_groups_check_existence_request( @@ -11465,7 +11501,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-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.ResourceGroup] = kwargs.pop("cls", None) @@ -11529,7 +11565,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-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_resource_groups_delete_request( @@ -11592,7 +11628,7 @@ def begin_delete( _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) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -11653,7 +11689,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _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.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -11776,7 +11812,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.ResourceGroup] = kwargs.pop("cls", None) @@ -11836,7 +11872,7 @@ def _export_template_initial( _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[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -11981,7 +12017,7 @@ def begin_export_template( _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.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -12049,7 +12085,7 @@ def list( _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.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -12169,7 +12205,7 @@ def delete_value( # 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_tags_delete_value_request( @@ -12227,7 +12263,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _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.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -12293,7 +12329,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _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.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -12357,7 +12393,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _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_tags_delete_request( @@ -12405,7 +12441,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _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.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -12549,7 +12585,7 @@ def create_or_update_at_scope( _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.TagsResource] = kwargs.pop("cls", None) @@ -12687,7 +12723,7 @@ def update_at_scope( _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.TagsResource] = kwargs.pop("cls", None) @@ -12756,7 +12792,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _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.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -12813,7 +12849,7 @@ def delete_at_scope(self, scope: str, **kwargs: Any) -> None: # pylint: disable _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_tags_delete_at_scope_request( @@ -12890,7 +12926,7 @@ def get_at_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -12948,7 +12984,7 @@ def list_at_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13044,7 +13080,7 @@ def get_at_tenant_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -13099,7 +13135,7 @@ def list_at_tenant_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13196,7 +13232,7 @@ def get_at_management_group_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -13254,7 +13290,7 @@ def list_at_management_group_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13352,7 +13388,7 @@ def get_at_subscription_scope( _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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -13408,7 +13444,7 @@ def list_at_subscription_scope( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13509,7 +13545,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.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -13569,7 +13605,7 @@ def list( _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.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_configuration.py index 6564371187483..baee04f939654 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", "2022-09-01") + api_version: str = kwargs.pop("api_version", "2022-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/_configuration.py index 4fd70f8bf22c4..36b7eb4de3454 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_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 ResourceManagementClientConfiguration(Configuration): # pylint: disable=t def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(ResourceManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", "2022-09-01") + api_version: str = kwargs.pop("api_version", "2022-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/operations/_operations.py index fee28354ae162..ad5fad930e37e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/aio/operations/_operations.py @@ -133,10 +133,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -174,7 +170,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +271,7 @@ async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -336,7 +332,7 @@ async def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -398,7 +394,7 @@ async def check_existence_at_scope(self, scope: str, deployment_name: str, **kwa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -443,7 +439,7 @@ async def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -600,7 +596,7 @@ async def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -669,7 +665,7 @@ async def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -734,7 +730,7 @@ async def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -778,7 +774,7 @@ async def _validate_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -932,7 +928,7 @@ async def begin_validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1003,7 +999,7 @@ async def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -1062,7 +1058,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -1146,7 +1142,7 @@ async def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -1204,7 +1200,7 @@ async def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -1263,7 +1259,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -1293,7 +1289,7 @@ async def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - async def _create_or_update_at_tenant_scope_initial( + async def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -1307,7 +1303,7 @@ async def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -1456,7 +1452,7 @@ async def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1522,7 +1518,7 @@ async def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -1584,7 +1580,7 @@ async def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -1627,7 +1623,7 @@ async def _validate_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -1774,7 +1770,7 @@ async def begin_validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1832,7 +1828,7 @@ async def _what_if_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -1982,7 +1978,7 @@ async def begin_what_if_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2052,7 +2048,7 @@ async def export_template_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -2108,7 +2104,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -2177,7 +2173,7 @@ async def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + async def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -2191,7 +2187,7 @@ async def _delete_at_management_group_scope_initial( # pylint: disable=inconsis _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -2256,7 +2252,7 @@ async def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -2297,7 +2293,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace_async - async def check_existence_at_management_group_scope( + async def check_existence_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> bool: """Checks whether the deployment exists. @@ -2322,7 +2318,7 @@ async def check_existence_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -2355,7 +2351,7 @@ async def check_existence_at_management_group_scope( "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_management_group_scope_initial( + async def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -2369,7 +2365,7 @@ async def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -2422,7 +2418,7 @@ async def _create_or_update_at_management_group_scope_initial( } @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2460,7 +2456,7 @@ async def begin_create_or_update_at_management_group_scope( """ @overload - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -2498,7 +2494,7 @@ async def begin_create_or_update_at_management_group_scope( """ @distributed_trace_async - async def begin_create_or_update_at_management_group_scope( + async def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -2532,7 +2528,7 @@ async def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2603,7 +2599,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -2670,7 +2666,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -2702,7 +2698,7 @@ async def cancel_at_management_group_scope( # pylint: disable=inconsistent-retu "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - async def _validate_at_management_group_scope_initial( + async def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -2716,7 +2712,7 @@ async def _validate_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -2877,7 +2873,7 @@ async def begin_validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2922,7 +2918,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - async def _what_if_at_management_group_scope_initial( + async def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -2936,7 +2932,7 @@ async def _what_if_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -3100,7 +3096,7 @@ async def begin_what_if_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3148,7 +3144,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace_async - async def export_template_at_management_group_scope( + async def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -3173,7 +3169,7 @@ async def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -3232,7 +3228,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -3318,7 +3314,7 @@ async def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -3379,7 +3375,7 @@ async def begin_delete_at_subscription_scope(self, deployment_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -3440,7 +3436,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -3473,7 +3469,7 @@ async def check_existence_at_subscription_scope(self, deployment_name: str, **kw "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - async def _create_or_update_at_subscription_scope_initial( + async def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -3487,7 +3483,7 @@ async def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3540,7 +3536,7 @@ async def _create_or_update_at_subscription_scope_initial( } @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -3575,7 +3571,7 @@ async def begin_create_or_update_at_subscription_scope( """ @overload - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3605,7 +3601,7 @@ async def begin_create_or_update_at_subscription_scope( """ @distributed_trace_async - async def begin_create_or_update_at_subscription_scope( + async def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> AsyncLROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -3637,7 +3633,7 @@ async def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3703,7 +3699,7 @@ async def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -3768,7 +3764,7 @@ async def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -3814,7 +3810,7 @@ async def _validate_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3961,7 +3957,7 @@ async def begin_validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4019,7 +4015,7 @@ async def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4169,7 +4165,7 @@ async def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4239,7 +4235,7 @@ async def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -4296,7 +4292,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4382,7 +4378,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -4448,7 +4444,7 @@ async def begin_delete(self, resource_group_name: str, deployment_name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -4513,7 +4509,7 @@ async def check_existence(self, resource_group_name: str, deployment_name: str, _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -4561,7 +4557,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4728,7 +4724,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4798,7 +4794,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -4867,7 +4863,7 @@ async def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -4914,7 +4910,7 @@ async def _validate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5078,7 +5074,7 @@ async def begin_validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5141,7 +5137,7 @@ async def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5312,7 +5308,7 @@ async def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -5386,7 +5382,7 @@ async def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -5447,7 +5443,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5542,7 +5538,7 @@ async def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _model _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -5622,7 +5618,7 @@ async def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -5686,7 +5682,7 @@ async def register_at_management_group_scope( # pylint: disable=inconsistent-re _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_providers_register_at_management_group_scope_request( @@ -5742,7 +5738,7 @@ async def provider_permissions( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ProviderPermissionListResult] = kwargs.pop("cls", None) request = build_providers_provider_permissions_request( @@ -5863,7 +5859,7 @@ async def register( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) @@ -5929,7 +5925,7 @@ def list(self, expand: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -6015,7 +6011,7 @@ def list_at_tenant_scope(self, expand: Optional[str] = None, **kwargs: Any) -> A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -6110,7 +6106,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -6172,7 +6168,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -6253,7 +6249,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ProviderResourceTypeListResult] = kwargs.pop("cls", None) request = build_provider_resource_types_list_request( @@ -6354,7 +6350,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -6442,7 +6438,7 @@ async def _move_resources_initial( # pylint: disable=inconsistent-return-statem _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -6590,7 +6586,7 @@ async def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6646,7 +6642,7 @@ async def _validate_move_resources_initial( # pylint: disable=inconsistent-retu _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -6800,7 +6796,7 @@ async def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -6891,7 +6887,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -8501,7 +8497,7 @@ async def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -8611,7 +8607,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -8675,7 +8671,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -8738,7 +8734,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -8799,7 +8795,7 @@ async def get(self, resource_group_name: str, **kwargs: Any) -> _models.Resource _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -8922,7 +8918,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -8982,7 +8978,7 @@ async def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -9127,7 +9123,7 @@ async def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -9195,7 +9191,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -9315,7 +9311,7 @@ async def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -9373,7 +9369,7 @@ async def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -9439,7 +9435,7 @@ async def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDet _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -9503,7 +9499,7 @@ async def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -9551,7 +9547,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -9633,7 +9629,7 @@ async def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TagsResource]] = kwargs.pop("cls", None) @@ -9779,7 +9775,7 @@ async def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -9835,7 +9831,7 @@ async def _update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TagsResource]] = kwargs.pop("cls", None) @@ -9998,7 +9994,7 @@ async def begin_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -10064,7 +10060,7 @@ async def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -10111,7 +10107,7 @@ async def _delete_at_scope_initial( # pylint: disable=inconsistent-return-state _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_at_scope_request( @@ -10167,7 +10163,7 @@ async def begin_delete_at_scope(self, scope: str, **kwargs: Any) -> AsyncLROPoll _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -10247,7 +10243,7 @@ async def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -10305,7 +10301,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10401,7 +10397,7 @@ async def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -10456,7 +10452,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10553,7 +10549,7 @@ async def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -10611,7 +10607,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10709,7 +10705,7 @@ async def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -10765,7 +10761,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -10866,7 +10862,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -10926,7 +10922,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py index 5542fc943ae4f..3fdb01eede64b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py @@ -36,10 +36,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +48,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,11 +63,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -94,11 +92,13 @@ def build_deployments_delete_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -121,11 +121,13 @@ def build_deployments_check_existence_at_scope_request(scope: str, deployment_na return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -155,7 +157,7 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,11 +180,13 @@ def build_deployments_get_at_scope_request(scope: str, deployment_name: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -205,11 +209,13 @@ def build_deployments_cancel_at_scope_request(scope: str, deployment_name: str, return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -235,11 +241,13 @@ def build_deployments_validate_at_scope_request(scope: str, deployment_name: str return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_scope_request(scope: str, deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_scope_request( # pylint: disable=name-too-long + scope: str, deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -270,7 +278,7 @@ def build_deployments_list_at_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -294,11 +302,13 @@ def build_deployments_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_delete_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -320,11 +330,13 @@ def build_deployments_delete_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_check_existence_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -346,11 +358,13 @@ def build_deployments_check_existence_at_tenant_scope_request(deployment_name: s return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_create_or_update_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -375,11 +389,13 @@ def build_deployments_create_or_update_at_tenant_scope_request(deployment_name: return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_get_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -401,11 +417,13 @@ def build_deployments_get_at_tenant_scope_request(deployment_name: str, **kwargs return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_cancel_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -427,11 +445,13 @@ def build_deployments_cancel_at_tenant_scope_request(deployment_name: str, **kwa return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_validate_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -456,11 +476,13 @@ def build_deployments_validate_at_tenant_scope_request(deployment_name: str, **k return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_what_if_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -485,11 +507,13 @@ def build_deployments_what_if_at_tenant_scope_request(deployment_name: str, **kw return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_tenant_scope_request(deployment_name: str, **kwargs: Any) -> HttpRequest: +def build_deployments_export_template_at_tenant_scope_request( # pylint: disable=name-too-long + deployment_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -511,13 +535,13 @@ def build_deployments_export_template_at_tenant_scope_request(deployment_name: s return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_tenant_scope_request( +def build_deployments_list_at_tenant_scope_request( # pylint: disable=name-too-long *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -536,13 +560,13 @@ def build_deployments_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_management_group_scope_request( +def build_deployments_delete_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -568,13 +592,13 @@ def build_deployments_delete_at_management_group_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_management_group_scope_request( +def build_deployments_check_existence_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -600,13 +624,13 @@ def build_deployments_check_existence_at_management_group_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_management_group_scope_request( +def build_deployments_create_or_update_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -635,13 +659,13 @@ def build_deployments_create_or_update_at_management_group_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_management_group_scope_request( +def build_deployments_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -667,13 +691,13 @@ def build_deployments_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_management_group_scope_request( +def build_deployments_cancel_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -699,13 +723,13 @@ def build_deployments_cancel_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_management_group_scope_request( +def build_deployments_validate_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -734,13 +758,13 @@ def build_deployments_validate_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_management_group_scope_request( +def build_deployments_what_if_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -769,13 +793,13 @@ def build_deployments_what_if_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_management_group_scope_request( +def build_deployments_export_template_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -801,13 +825,13 @@ def build_deployments_export_template_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_management_group_scope_request( +def build_deployments_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -834,13 +858,13 @@ def build_deployments_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_delete_at_subscription_scope_request( +def build_deployments_delete_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -865,13 +889,13 @@ def build_deployments_delete_at_subscription_scope_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_at_subscription_scope_request( +def build_deployments_check_existence_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -896,13 +920,13 @@ def build_deployments_check_existence_at_subscription_scope_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_at_subscription_scope_request( +def build_deployments_create_or_update_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -930,13 +954,13 @@ def build_deployments_create_or_update_at_subscription_scope_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_get_at_subscription_scope_request( +def build_deployments_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -961,13 +985,13 @@ def build_deployments_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_cancel_at_subscription_scope_request( +def build_deployments_cancel_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -993,13 +1017,13 @@ def build_deployments_cancel_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_validate_at_subscription_scope_request( +def build_deployments_validate_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1028,13 +1052,13 @@ def build_deployments_validate_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_what_if_at_subscription_scope_request( +def build_deployments_what_if_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1063,13 +1087,13 @@ def build_deployments_what_if_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_at_subscription_scope_request( +def build_deployments_export_template_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1095,13 +1119,13 @@ def build_deployments_export_template_at_subscription_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_at_subscription_scope_request( +def build_deployments_list_at_subscription_scope_request( # pylint: disable=name-too-long subscription_id: str, *, filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1131,7 +1155,7 @@ def build_deployments_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1160,13 +1184,13 @@ def build_deployments_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_check_existence_request( +def build_deployments_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1195,13 +1219,13 @@ def build_deployments_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_create_or_update_request( +def build_deployments_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1239,7 +1263,7 @@ def build_deployments_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1274,7 +1298,7 @@ def build_deployments_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1309,7 +1333,7 @@ def build_deployments_validate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1347,7 +1371,7 @@ def build_deployments_what_if_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1379,13 +1403,13 @@ def build_deployments_what_if_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_export_template_request( +def build_deployments_export_template_request( # pylint: disable=name-too-long resource_group_name: str, deployment_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1414,7 +1438,7 @@ def build_deployments_export_template_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_list_by_resource_group_request( +def build_deployments_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1425,7 +1449,7 @@ def build_deployments_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1455,11 +1479,13 @@ def build_deployments_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployments_calculate_template_hash_request(*, json: JSON, **kwargs: Any) -> HttpRequest: +def build_deployments_calculate_template_hash_request( # pylint: disable=name-too-long + *, json: JSON, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1483,7 +1509,7 @@ def build_providers_unregister_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1506,13 +1532,13 @@ def build_providers_unregister_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_register_at_management_group_scope_request( +def build_providers_register_at_management_group_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, 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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1536,13 +1562,13 @@ def build_providers_register_at_management_group_scope_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_provider_permissions_request( +def build_providers_provider_permissions_request( # pylint: disable=name-too-long resource_provider_namespace: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1571,7 +1597,7 @@ def build_providers_register_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1599,7 +1625,7 @@ def build_providers_list_request(subscription_id: str, *, expand: Optional[str] _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1621,11 +1647,13 @@ def build_providers_list_request(subscription_id: str, *, expand: Optional[str] return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_list_at_tenant_scope_request(*, expand: Optional[str] = None, **kwargs: Any) -> HttpRequest: +def build_providers_list_at_tenant_scope_request( # pylint: disable=name-too-long + *, expand: Optional[str] = None, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1648,7 +1676,7 @@ def build_providers_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1671,13 +1699,13 @@ def build_providers_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_providers_get_at_tenant_scope_request( +def build_providers_get_at_tenant_scope_request( # pylint: disable=name-too-long resource_provider_namespace: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1699,13 +1727,13 @@ def build_providers_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_provider_resource_types_list_request( +def build_provider_resource_types_list_request( # pylint: disable=name-too-long resource_provider_namespace: str, subscription_id: str, *, expand: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1730,7 +1758,7 @@ def build_provider_resource_types_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_list_by_resource_group_request( +def build_resources_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -1742,7 +1770,7 @@ def build_resources_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1777,7 +1805,7 @@ def build_resources_move_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1810,13 +1838,13 @@ def build_resources_move_resources_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_validate_move_resources_request( +def build_resources_validate_move_resources_request( # pylint: disable=name-too-long source_resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1860,7 +1888,7 @@ def build_resources_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2107,7 +2135,9 @@ def build_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_check_existence_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_check_existence_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2153,7 +2183,9 @@ def build_resources_delete_by_id_request(resource_id: str, *, api_version: str, return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_resources_create_or_update_by_id_request(resource_id: str, *, api_version: str, **kwargs: Any) -> HttpRequest: +def build_resources_create_or_update_by_id_request( # pylint: disable=name-too-long + resource_id: str, *, api_version: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -2228,13 +2260,13 @@ def build_resources_get_by_id_request(resource_id: str, *, api_version: str, **k return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_check_existence_request( +def build_resource_groups_check_existence_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2257,13 +2289,13 @@ def build_resource_groups_check_existence_request( return HttpRequest(method="HEAD", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_create_or_update_request( +def build_resource_groups_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2295,7 +2327,7 @@ def build_resource_groups_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2324,7 +2356,7 @@ def build_resource_groups_get_request(resource_group_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2351,7 +2383,7 @@ def build_resource_groups_update_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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2377,13 +2409,13 @@ def build_resource_groups_update_request(resource_group_name: str, subscription_ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_resource_groups_export_template_request( +def build_resource_groups_export_template_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2417,7 +2449,7 @@ def build_resource_groups_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2445,7 +2477,7 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2467,13 +2499,13 @@ def build_tags_delete_value_request(tag_name: str, tag_value: str, subscription_ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_value_request( +def build_tags_create_or_update_value_request( # pylint: disable=name-too-long tag_name: str, tag_value: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2499,7 +2531,7 @@ def build_tags_create_or_update_request(tag_name: str, subscription_id: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2524,7 +2556,7 @@ def build_tags_delete_request(tag_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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2549,7 +2581,7 @@ def build_tags_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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2569,11 +2601,13 @@ def build_tags_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_tags_create_or_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: +def build_tags_create_or_update_at_scope_request( # pylint: disable=name-too-long + scope: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2600,7 +2634,7 @@ def build_tags_update_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -2627,7 +2661,7 @@ def build_tags_get_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2651,7 +2685,7 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2671,13 +2705,13 @@ def build_tags_delete_at_scope_request(scope: str, **kwargs: Any) -> HttpRequest return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_scope_request( +def build_deployment_operations_get_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, operation_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2703,13 +2737,13 @@ def build_deployment_operations_get_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_scope_request( +def build_deployment_operations_list_at_scope_request( # pylint: disable=name-too-long scope: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2734,13 +2768,13 @@ def build_deployment_operations_list_at_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_tenant_scope_request( +def build_deployment_operations_get_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2765,13 +2799,13 @@ def build_deployment_operations_get_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_tenant_scope_request( +def build_deployment_operations_list_at_tenant_scope_request( # pylint: disable=name-too-long deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2795,13 +2829,13 @@ def build_deployment_operations_list_at_tenant_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_management_group_scope_request( +def build_deployment_operations_get_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, operation_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2828,13 +2862,13 @@ def build_deployment_operations_get_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_management_group_scope_request( +def build_deployment_operations_list_at_management_group_scope_request( # pylint: disable=name-too-long group_id: str, deployment_name: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2862,13 +2896,13 @@ def build_deployment_operations_list_at_management_group_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_get_at_subscription_scope_request( +def build_deployment_operations_get_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, operation_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2895,13 +2929,13 @@ def build_deployment_operations_get_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_deployment_operations_list_at_subscription_scope_request( +def build_deployment_operations_list_at_subscription_scope_request( # pylint: disable=name-too-long deployment_name: str, subscription_id: str, *, top: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2935,7 +2969,7 @@ def build_deployment_operations_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -2971,7 +3005,7 @@ def build_deployment_operations_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -3034,7 +3068,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -3135,7 +3169,7 @@ def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_scope_request( @@ -3196,7 +3230,7 @@ def begin_delete_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -3258,7 +3292,7 @@ def check_existence_at_scope(self, scope: str, deployment_name: str, **kwargs: A _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_scope_request( @@ -3303,7 +3337,7 @@ def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -3460,7 +3494,7 @@ def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3529,7 +3563,7 @@ def get_at_scope(self, scope: str, deployment_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_scope_request( @@ -3594,7 +3628,7 @@ def cancel_at_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_scope_request( @@ -3638,7 +3672,7 @@ def _validate_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -3792,7 +3826,7 @@ def begin_validate_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3863,7 +3897,7 @@ def export_template_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_scope_request( @@ -3922,7 +3956,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -4006,7 +4040,7 @@ def _delete_at_tenant_scope_initial( # pylint: disable=inconsistent-return-stat _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_tenant_scope_request( @@ -4064,7 +4098,7 @@ def begin_delete_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> L _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -4123,7 +4157,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_tenant_scope_request( @@ -4153,7 +4187,7 @@ def check_existence_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - check_existence_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/{deploymentName}"} - def _create_or_update_at_tenant_scope_initial( + def _create_or_update_at_tenant_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -4167,7 +4201,7 @@ def _create_or_update_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -4316,7 +4350,7 @@ def begin_create_or_update_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4382,7 +4416,7 @@ def get_at_tenant_scope(self, deployment_name: str, **kwargs: Any) -> _models.De _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_tenant_scope_request( @@ -4444,7 +4478,7 @@ def cancel_at_tenant_scope( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_tenant_scope_request( @@ -4487,7 +4521,7 @@ def _validate_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -4634,7 +4668,7 @@ def begin_validate_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4692,7 +4726,7 @@ def _what_if_at_tenant_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -4842,7 +4876,7 @@ def begin_what_if_at_tenant_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4910,7 +4944,7 @@ def export_template_at_tenant_scope(self, deployment_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_tenant_scope_request( @@ -4966,7 +5000,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -5035,7 +5069,7 @@ def get_next(next_link=None): list_at_tenant_scope.metadata = {"url": "/providers/Microsoft.Resources/deployments/"} - def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements + def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-return-statements,name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> None: error_map = { @@ -5049,7 +5083,7 @@ def _delete_at_management_group_scope_initial( # pylint: disable=inconsistent-r _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_management_group_scope_request( @@ -5114,7 +5148,7 @@ def begin_delete_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -5155,7 +5189,9 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- } @distributed_trace - def check_existence_at_management_group_scope(self, group_id: str, deployment_name: str, **kwargs: Any) -> bool: + def check_existence_at_management_group_scope( # pylint: disable=name-too-long + self, group_id: str, deployment_name: str, **kwargs: Any + ) -> bool: """Checks whether the deployment exists. :param group_id: The management group ID. Required. @@ -5178,7 +5214,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_management_group_scope_request( @@ -5211,7 +5247,7 @@ def check_existence_at_management_group_scope(self, group_id: str, deployment_na "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_management_group_scope_initial( + def _create_or_update_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -5225,7 +5261,7 @@ def _create_or_update_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -5278,7 +5314,7 @@ def _create_or_update_at_management_group_scope_initial( } @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5316,7 +5352,7 @@ def begin_create_or_update_at_management_group_scope( """ @overload - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, @@ -5354,7 +5390,7 @@ def begin_create_or_update_at_management_group_scope( """ @distributed_trace - def begin_create_or_update_at_management_group_scope( + def begin_create_or_update_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at management group scope. @@ -5388,7 +5424,7 @@ def begin_create_or_update_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5459,7 +5495,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_management_group_scope_request( @@ -5526,7 +5562,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_management_group_scope_request( @@ -5558,7 +5594,7 @@ def cancel_at_management_group_scope( # pylint: disable=inconsistent-return-sta "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel" } - def _validate_at_management_group_scope_initial( + def _validate_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeployment, IO], **kwargs: Any ) -> Optional[_models.DeploymentValidateResult]: error_map = { @@ -5572,7 +5608,7 @@ def _validate_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -5733,7 +5769,7 @@ def begin_validate_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5778,7 +5814,7 @@ def get_long_running_output(pipeline_response): "url": "/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/validate" } - def _what_if_at_management_group_scope_initial( + def _what_if_at_management_group_scope_initial( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, parameters: Union[_models.ScopedDeploymentWhatIf, IO], **kwargs: Any ) -> Optional[_models.WhatIfOperationResult]: error_map = { @@ -5792,7 +5828,7 @@ def _what_if_at_management_group_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -5956,7 +5992,7 @@ def begin_what_if_at_management_group_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6004,7 +6040,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace - def export_template_at_management_group_scope( + def export_template_at_management_group_scope( # pylint: disable=name-too-long self, group_id: str, deployment_name: str, **kwargs: Any ) -> _models.DeploymentExportResult: """Exports the template used for specified deployment. @@ -6029,7 +6065,7 @@ def export_template_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_management_group_scope_request( @@ -6088,7 +6124,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -6174,7 +6210,7 @@ def _delete_at_subscription_scope_initial( # pylint: disable=inconsistent-retur _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_at_subscription_scope_request( @@ -6235,7 +6271,7 @@ def begin_delete_at_subscription_scope(self, deployment_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -6296,7 +6332,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_at_subscription_scope_request( @@ -6329,7 +6365,7 @@ def check_existence_at_subscription_scope(self, deployment_name: str, **kwargs: "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}" } - def _create_or_update_at_subscription_scope_initial( + def _create_or_update_at_subscription_scope_initial( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> _models.DeploymentExtended: error_map = { @@ -6343,7 +6379,7 @@ def _create_or_update_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -6396,7 +6432,7 @@ def _create_or_update_at_subscription_scope_initial( } @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: _models.Deployment, @@ -6431,7 +6467,7 @@ def begin_create_or_update_at_subscription_scope( """ @overload - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: IO, *, content_type: str = "application/json", **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6461,7 +6497,7 @@ def begin_create_or_update_at_subscription_scope( """ @distributed_trace - def begin_create_or_update_at_subscription_scope( + def begin_create_or_update_at_subscription_scope( # pylint: disable=name-too-long self, deployment_name: str, parameters: Union[_models.Deployment, IO], **kwargs: Any ) -> LROPoller[_models.DeploymentExtended]: """Deploys resources at subscription scope. @@ -6493,7 +6529,7 @@ def begin_create_or_update_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6559,7 +6595,7 @@ def get_at_subscription_scope(self, deployment_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_at_subscription_scope_request( @@ -6624,7 +6660,7 @@ def cancel_at_subscription_scope( # pylint: disable=inconsistent-return-stateme _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_at_subscription_scope_request( @@ -6670,7 +6706,7 @@ def _validate_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -6817,7 +6853,7 @@ def begin_validate_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -6875,7 +6911,7 @@ def _what_if_at_subscription_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -7025,7 +7061,7 @@ def begin_what_if_at_subscription_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7095,7 +7131,7 @@ def export_template_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_at_subscription_scope_request( @@ -7152,7 +7188,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -7238,7 +7274,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_delete_request( @@ -7304,7 +7340,7 @@ def begin_delete(self, resource_group_name: str, deployment_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -7369,7 +7405,7 @@ def check_existence(self, resource_group_name: str, deployment_name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_check_existence_request( @@ -7417,7 +7453,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) @@ -7584,7 +7620,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7654,7 +7690,7 @@ def get(self, resource_group_name: str, deployment_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExtended] = kwargs.pop("cls", None) request = build_deployments_get_request( @@ -7723,7 +7759,7 @@ def cancel( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_deployments_cancel_request( @@ -7770,7 +7806,7 @@ def _validate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DeploymentValidateResult]] = kwargs.pop("cls", None) @@ -7934,7 +7970,7 @@ def begin_validate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DeploymentValidateResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -7997,7 +8033,7 @@ def _what_if_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.WhatIfOperationResult]] = kwargs.pop("cls", None) @@ -8168,7 +8204,7 @@ def begin_what_if( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.WhatIfOperationResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -8242,7 +8278,7 @@ def export_template( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentExportResult] = kwargs.pop("cls", None) request = build_deployments_export_template_request( @@ -8303,7 +8339,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentListResult] = kwargs.pop("cls", None) error_map = { @@ -8398,7 +8434,7 @@ def calculate_template_hash(self, template: JSON, **kwargs: Any) -> _models.Temp _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: str = kwargs.pop("content_type", _headers.pop("Content-Type", "application/json")) cls: ClsType[_models.TemplateHashResult] = kwargs.pop("cls", None) @@ -8478,7 +8514,7 @@ def unregister(self, resource_provider_namespace: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_unregister_request( @@ -8542,7 +8578,7 @@ def register_at_management_group_scope( # pylint: disable=inconsistent-return-s _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_providers_register_at_management_group_scope_request( @@ -8598,7 +8634,7 @@ def provider_permissions( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ProviderPermissionListResult] = kwargs.pop("cls", None) request = build_providers_provider_permissions_request( @@ -8719,7 +8755,7 @@ def register( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) @@ -8785,7 +8821,7 @@ def list(self, expand: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8871,7 +8907,7 @@ def list_at_tenant_scope(self, expand: Optional[str] = None, **kwargs: Any) -> I _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ProviderListResult] = kwargs.pop("cls", None) error_map = { @@ -8964,7 +9000,7 @@ def get(self, resource_provider_namespace: str, expand: Optional[str] = None, ** _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_request( @@ -9026,7 +9062,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.Provider] = kwargs.pop("cls", None) request = build_providers_get_at_tenant_scope_request( @@ -9107,7 +9143,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ProviderResourceTypeListResult] = kwargs.pop("cls", None) request = build_provider_resource_types_list_request( @@ -9208,7 +9244,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -9296,7 +9332,7 @@ def _move_resources_initial( # 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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -9444,7 +9480,7 @@ def begin_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9500,7 +9536,7 @@ def _validate_move_resources_initial( # pylint: disable=inconsistent-return-sta _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -9654,7 +9690,7 @@ def begin_validate_move_resources( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -9745,7 +9781,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -11355,7 +11391,7 @@ def check_existence(self, resource_group_name: str, **kwargs: Any) -> bool: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_check_existence_request( @@ -11465,7 +11501,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-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -11529,7 +11565,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["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resource_groups_delete_request( @@ -11592,7 +11628,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -11653,7 +11689,7 @@ def get(self, resource_group_name: str, **kwargs: Any) -> _models.ResourceGroup: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) request = build_resource_groups_get_request( @@ -11776,7 +11812,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroup] = kwargs.pop("cls", None) @@ -11836,7 +11872,7 @@ def _export_template_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ResourceGroupExportResult]] = kwargs.pop("cls", None) @@ -11981,7 +12017,7 @@ def begin_export_template( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ResourceGroupExportResult] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -12049,7 +12085,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.ResourceGroupListResult] = kwargs.pop("cls", None) error_map = { @@ -12169,7 +12205,7 @@ def delete_value( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_value_request( @@ -12227,7 +12263,7 @@ def create_or_update_value(self, tag_name: str, tag_value: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.TagValue] = kwargs.pop("cls", None) request = build_tags_create_or_update_value_request( @@ -12293,7 +12329,7 @@ def create_or_update(self, tag_name: str, **kwargs: Any) -> _models.TagDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.TagDetails] = kwargs.pop("cls", None) request = build_tags_create_or_update_request( @@ -12357,7 +12393,7 @@ def delete(self, tag_name: str, **kwargs: Any) -> None: # pylint: disable=incon _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_request( @@ -12405,7 +12441,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TagDetails"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.TagsListResult] = kwargs.pop("cls", None) error_map = { @@ -12487,7 +12523,7 @@ def _create_or_update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TagsResource]] = kwargs.pop("cls", None) @@ -12633,7 +12669,7 @@ def begin_create_or_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -12689,7 +12725,7 @@ def _update_at_scope_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TagsResource]] = kwargs.pop("cls", None) @@ -12852,7 +12888,7 @@ def begin_update_at_scope( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -12918,7 +12954,7 @@ def get_at_scope(self, scope: str, **kwargs: Any) -> _models.TagsResource: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.TagsResource] = kwargs.pop("cls", None) request = build_tags_get_at_scope_request( @@ -12965,7 +13001,7 @@ def _delete_at_scope_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_tags_delete_at_scope_request( @@ -13021,7 +13057,7 @@ def begin_delete_at_scope(self, scope: str, **kwargs: Any) -> LROPoller[None]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) 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) @@ -13101,7 +13137,7 @@ def get_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_scope_request( @@ -13159,7 +13195,7 @@ def list_at_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13255,7 +13291,7 @@ def get_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_tenant_scope_request( @@ -13310,7 +13346,7 @@ def list_at_tenant_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13407,7 +13443,7 @@ def get_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_management_group_scope_request( @@ -13465,7 +13501,7 @@ def list_at_management_group_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13563,7 +13599,7 @@ def get_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_at_subscription_scope_request( @@ -13619,7 +13655,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { @@ -13720,7 +13756,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperation] = kwargs.pop("cls", None) request = build_deployment_operations_get_request( @@ -13780,7 +13816,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-01")) cls: ClsType[_models.DeploymentOperationsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_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/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_configuration.py index a43ef88fc083a..742c59d75f297 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_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 @@ -40,7 +34,7 @@ class SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", "2016-06-01") + api_version: str = kwargs.pop("api_version", "2016-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/_configuration.py index c2f9b60b512ea..c0ac5dd89db16 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_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 @@ -40,7 +34,7 @@ class SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", "2016-06-01") + api_version: str = kwargs.pop("api_version", "2016-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/operations/_operations.py index aa33df15828ae..71682b51d59fe 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -40,10 +39,6 @@ ) from .._vendor import SubscriptionClientMixinABC -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(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -185,7 +180,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> AsyncIterable[" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +270,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -321,7 +316,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -462,7 +457,7 @@ async def check_zone_peers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -541,7 +536,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -689,7 +684,7 @@ async def check_resource_name( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/_operations.py index ae4ac5dbdcac0..afb5b1ed1bc3a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_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, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -60,11 +55,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscriptions_list_locations_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_subscriptions_list_locations_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -88,7 +85,7 @@ def build_subscriptions_get_request(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["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +109,7 @@ def build_subscriptions_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -127,11 +124,13 @@ def build_subscriptions_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscriptions_check_zone_peers_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_subscriptions_check_zone_peers_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -158,7 +157,7 @@ def build_tenants_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -173,11 +172,11 @@ def build_tenants_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: +def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -227,7 +226,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["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -332,7 +331,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> Iterable["_mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -422,7 +421,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -468,7 +467,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -609,7 +608,7 @@ def check_zone_peers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -688,7 +687,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -836,7 +835,7 @@ def check_resource_name( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_configuration.py index 73abdf8514bc9..446a3b1305077 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_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 @@ -40,7 +34,7 @@ class SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", "2018-06-01") + api_version: str = kwargs.pop("api_version", "2018-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/aio/_configuration.py index 706959f0f3ad2..d044fb4a0f109 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_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 @@ -40,7 +34,7 @@ class SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", "2018-06-01") + api_version: str = kwargs.pop("api_version", "2018-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/aio/operations/_operations.py index fbf43afed27ec..ef6a5996cb22e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -40,10 +39,6 @@ ) from .._vendor import SubscriptionClientMixinABC -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(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -185,7 +180,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> AsyncIterable[" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +270,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -321,7 +316,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -462,7 +457,7 @@ async def check_zone_peers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -541,7 +536,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -689,7 +684,7 @@ async def check_resource_name( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/operations/_operations.py index 2cbcc0386612a..18dbfa365e95b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_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, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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_operations_list_request(**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"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -60,11 +55,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscriptions_list_locations_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_subscriptions_list_locations_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -88,7 +85,7 @@ def build_subscriptions_get_request(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["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +109,7 @@ def build_subscriptions_list_request(**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"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -127,11 +124,13 @@ def build_subscriptions_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscriptions_check_zone_peers_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_subscriptions_check_zone_peers_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -158,7 +157,7 @@ def build_tenants_list_request(**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"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -173,11 +172,11 @@ def build_tenants_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: +def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -227,7 +226,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["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -332,7 +331,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> Iterable["_mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -422,7 +421,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -468,7 +467,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -609,7 +608,7 @@ def check_zone_peers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -688,7 +687,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -836,7 +835,7 @@ def check_resource_name( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_configuration.py index a947beaac221a..4948e07eab985 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/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 @@ -40,7 +34,7 @@ class SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/_configuration.py index 244436b88d10a..1ede0e574b21b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/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 @@ -40,7 +34,7 @@ class SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/operations/_operations.py index 166b345eb172a..f1e8e7a4e338d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -40,10 +39,6 @@ ) from .._vendor import SubscriptionClientMixinABC -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(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -185,7 +180,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> AsyncIterable[" _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.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +270,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription _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.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -321,7 +316,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: _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.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -462,7 +457,7 @@ async def check_zone_peers( _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.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -541,7 +536,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: _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.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -689,7 +684,7 @@ async def check_resource_name( _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.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/operations/_operations.py index f1a4e721f289e..92b08c9ddcbb0 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_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, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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_operations_list_request(**kwargs: Any) -> HttpRequest: _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 @@ -60,11 +55,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscriptions_list_locations_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_subscriptions_list_locations_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -88,7 +85,7 @@ def build_subscriptions_get_request(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["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 @@ -112,7 +109,7 @@ def build_subscriptions_list_request(**kwargs: Any) -> HttpRequest: _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 @@ -127,11 +124,13 @@ def build_subscriptions_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscriptions_check_zone_peers_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_subscriptions_check_zone_peers_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -158,7 +157,7 @@ def build_tenants_list_request(**kwargs: Any) -> HttpRequest: _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 @@ -173,11 +172,11 @@ def build_tenants_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: +def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _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") @@ -227,7 +226,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["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.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -332,7 +331,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> Iterable["_mode _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.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -422,7 +421,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: _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.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -468,7 +467,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: _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.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -609,7 +608,7 @@ def check_zone_peers( _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.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -688,7 +687,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: _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.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -836,7 +835,7 @@ def check_resource_name( _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.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_configuration.py index 1054ac414b28f..b7d3c5ed8a3a8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_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 SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", "2019-11-01") + api_version: str = kwargs.pop("api_version", "2019-11-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/aio/_configuration.py index a9a57c31898f0..03e702a9a6756 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_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 SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", "2019-11-01") + api_version: str = kwargs.pop("api_version", "2019-11-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/aio/operations/_operations.py index 80f279f005277..f8f12ada1ab78 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -40,10 +39,6 @@ ) from .._vendor import SubscriptionClientMixinABC -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(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -185,7 +180,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> AsyncIterable[" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -275,7 +270,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -321,7 +316,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -462,7 +457,7 @@ async def check_zone_peers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -541,7 +536,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -689,7 +684,7 @@ async def check_resource_name( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py index cdc41937f08af..2b54f1843339b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_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, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -60,11 +55,13 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscriptions_list_locations_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_subscriptions_list_locations_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -88,7 +85,7 @@ def build_subscriptions_get_request(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["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +109,7 @@ def build_subscriptions_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -127,11 +124,13 @@ def build_subscriptions_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscriptions_check_zone_peers_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_subscriptions_check_zone_peers_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -158,7 +157,7 @@ def build_tenants_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -173,11 +172,11 @@ def build_tenants_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: +def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -227,7 +226,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["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -332,7 +331,7 @@ def list_locations(self, subscription_id: str, **kwargs: Any) -> Iterable["_mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -422,7 +421,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -468,7 +467,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -609,7 +608,7 @@ def check_zone_peers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -688,7 +687,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -836,7 +835,7 @@ def check_resource_name( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_configuration.py index 709100fabb3f2..ba111d10ce6e5 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_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 SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", "2021-01-01") + api_version: str = kwargs.pop("api_version", "2021-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/_configuration.py index 6446fe8c44bdc..0a37948b9672d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_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 SubscriptionClientConfiguration(Configuration): # pylint: disable=too-man def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(SubscriptionClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", "2021-01-01") + api_version: str = kwargs.pop("api_version", "2021-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_operations.py index da22447fe97d8..83d906a5ab767 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ ) from .._vendor import SubscriptionClientMixinABC -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]] @@ -89,7 +84,7 @@ def list_locations( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -180,7 +175,7 @@ async def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -226,7 +221,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Subscription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -367,7 +362,7 @@ async def check_zone_peers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -446,7 +441,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.TenantIdDescription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -594,7 +589,7 @@ async def check_resource_name( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_operations.py index cf327456326f7..98fb8f8816cf3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2021_01_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, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import SubscriptionClientMixinABC, _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]] @@ -41,13 +36,13 @@ _SERIALIZER.client_side_validation = False -def build_subscriptions_list_locations_request( +def build_subscriptions_list_locations_request( # pylint: disable=name-too-long subscription_id: str, *, include_extended_locations: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_subscriptions_get_request(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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -99,7 +94,7 @@ def build_subscriptions_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,11 +109,13 @@ def build_subscriptions_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscriptions_check_zone_peers_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_subscriptions_check_zone_peers_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -145,7 +142,7 @@ def build_tenants_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-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -160,11 +157,11 @@ def build_tenants_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: +def build_subscription_check_resource_name_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -224,7 +221,7 @@ def list_locations( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.LocationListResult] = kwargs.pop("cls", None) error_map = { @@ -315,7 +312,7 @@ def get(self, subscription_id: str, **kwargs: Any) -> _models.Subscription: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.Subscription] = kwargs.pop("cls", None) request = build_subscriptions_get_request( @@ -361,7 +358,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Subscription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.SubscriptionListResult] = kwargs.pop("cls", None) error_map = { @@ -502,7 +499,7 @@ def check_zone_peers( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckZonePeersResult] = kwargs.pop("cls", None) @@ -581,7 +578,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.TenantIdDescription"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) cls: ClsType[_models.TenantListResult] = kwargs.pop("cls", None) error_map = { @@ -729,7 +726,7 @@ def check_resource_name( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.CheckResourceNameResult] = kwargs.pop("cls", None) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/_serialization.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/_serialization.py index 25467dfc00bbe..e3cc6ce6ed6f8 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/_serialization.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/_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/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/_version.py index d4fc54da50838..a30a458f8b5b3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "0.1.0" \ No newline at end of file diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_configuration.py index fab2fa684862b..83042940e636a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_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 @@ -43,7 +37,7 @@ class TemplateSpecsClientConfiguration(Configuration): # pylint: disable=too-ma def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(TemplateSpecsClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-06-01-preview"] = kwargs.pop("api_version", "2019-06-01-preview") + api_version: str = kwargs.pop("api_version", "2019-06-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/_configuration.py index f033e354ce0d7..c1728e5259e98 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_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 @@ -43,7 +37,7 @@ class TemplateSpecsClientConfiguration(Configuration): # pylint: disable=too-ma def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(TemplateSpecsClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-06-01-preview"] = kwargs.pop("api_version", "2019-06-01-preview") + api_version: str = kwargs.pop("api_version", "2019-06-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/operations/_operations.py index 4ec825f02c3b1..15e6f5d0ed5ee 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -43,10 +42,6 @@ build_template_specs_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]] @@ -164,9 +159,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -317,9 +310,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -407,9 +398,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_request( @@ -476,9 +465,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_specs_delete_request( @@ -531,9 +518,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -630,9 +615,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -829,9 +812,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -993,9 +974,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1078,9 +1057,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_request( @@ -1149,9 +1126,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_spec_versions_delete_request( @@ -1206,9 +1181,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/operations/_operations.py index fdcb15ef42c6d..b7212efb15e6b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2019_06_01_preview/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, 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]] @@ -41,15 +36,13 @@ _SERIALIZER.client_side_validation = False -def build_template_specs_create_or_update_request( +def build_template_specs_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -87,9 +80,7 @@ def build_template_specs_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -132,9 +123,7 @@ def build_template_specs_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -171,9 +160,7 @@ def build_template_specs_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -202,15 +189,13 @@ def build_template_specs_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_list_by_subscription_request( +def build_template_specs_list_by_subscription_request( # pylint: disable=name-too-long subscription_id: str, *, expand: Optional[Union[str, _models.TemplateSpecExpandKind]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -232,7 +217,7 @@ def build_template_specs_list_by_subscription_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_list_by_resource_group_request( +def build_template_specs_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -242,9 +227,7 @@ def build_template_specs_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -272,15 +255,13 @@ def build_template_specs_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_create_or_update_request( +def build_template_spec_versions_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -320,15 +301,13 @@ def build_template_spec_versions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_update_request( +def build_template_spec_versions_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -374,9 +353,7 @@ def build_template_spec_versions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -413,15 +390,13 @@ def build_template_spec_versions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_delete_request( +def build_template_spec_versions_delete_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -458,15 +433,13 @@ def build_template_spec_versions_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_list_request( +def build_template_spec_versions_list_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -608,9 +581,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -761,9 +732,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -851,9 +820,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_request( @@ -920,9 +887,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_specs_delete_request( @@ -975,9 +940,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -1074,9 +1037,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -1273,9 +1234,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1437,9 +1396,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1522,9 +1479,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_request( @@ -1593,9 +1548,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-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_spec_versions_delete_request( @@ -1650,9 +1603,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01-preview")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_configuration.py index f2764f8d5b9d4..6c046fbba4b70 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_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 @@ -43,7 +37,7 @@ class TemplateSpecsClientConfiguration(Configuration): # pylint: disable=too-ma def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(TemplateSpecsClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-03-01-preview"] = kwargs.pop("api_version", "2021-03-01-preview") + api_version: str = kwargs.pop("api_version", "2021-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/aio/_configuration.py index 61cb9875bf46f..ac1aade4b3702 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_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 @@ -43,7 +37,7 @@ class TemplateSpecsClientConfiguration(Configuration): # pylint: disable=too-ma def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(TemplateSpecsClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-03-01-preview"] = kwargs.pop("api_version", "2021-03-01-preview") + api_version: str = kwargs.pop("api_version", "2021-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/aio/operations/_operations.py index 3e2a8ae8311d7..0adff08350d9b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -43,10 +42,6 @@ build_template_specs_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]] @@ -164,9 +159,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-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -317,9 +310,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -407,9 +398,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_request( @@ -476,9 +465,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-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_specs_delete_request( @@ -531,9 +518,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -630,9 +615,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -829,9 +812,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-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -993,9 +974,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1078,9 +1057,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_request( @@ -1149,9 +1126,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-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_spec_versions_delete_request( @@ -1206,9 +1181,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/operations/_operations.py index 20b82baa746be..f93b5a1d80d3a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_03_01_preview/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, 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]] @@ -41,15 +36,13 @@ _SERIALIZER.client_side_validation = False -def build_template_specs_create_or_update_request( +def build_template_specs_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -87,9 +80,7 @@ def build_template_specs_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -132,9 +123,7 @@ def build_template_specs_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -171,9 +160,7 @@ def build_template_specs_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -202,15 +189,13 @@ def build_template_specs_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_list_by_subscription_request( +def build_template_specs_list_by_subscription_request( # pylint: disable=name-too-long subscription_id: str, *, expand: Optional[Union[str, _models.TemplateSpecExpandKind]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -232,7 +217,7 @@ def build_template_specs_list_by_subscription_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_list_by_resource_group_request( +def build_template_specs_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -242,9 +227,7 @@ def build_template_specs_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -272,15 +255,13 @@ def build_template_specs_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_create_or_update_request( +def build_template_spec_versions_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -320,15 +301,13 @@ def build_template_spec_versions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_update_request( +def build_template_spec_versions_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -374,9 +353,7 @@ def build_template_spec_versions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -413,15 +390,13 @@ def build_template_spec_versions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_delete_request( +def build_template_spec_versions_delete_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -458,15 +433,13 @@ def build_template_spec_versions_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_list_request( +def build_template_spec_versions_list_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -608,9 +581,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-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -761,9 +732,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -851,9 +820,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_request( @@ -920,9 +887,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-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_specs_delete_request( @@ -975,9 +940,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -1074,9 +1037,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -1273,9 +1234,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-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1437,9 +1396,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1522,9 +1479,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_request( @@ -1593,9 +1548,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-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_spec_versions_delete_request( @@ -1650,9 +1603,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-03-01-preview")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_configuration.py index b4cf8f7b8a3b7..2701fcbc3c9b5 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/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 @@ -43,7 +37,7 @@ class TemplateSpecsClientConfiguration(Configuration): # pylint: disable=too-ma def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(TemplateSpecsClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/_configuration.py index 91e7591d2856b..26f1237aaaa4c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/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 @@ -43,7 +37,7 @@ class TemplateSpecsClientConfiguration(Configuration): # pylint: disable=too-ma def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(TemplateSpecsClientConfiguration, 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/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/operations/_operations.py index 7660f85aeda02..568ca422f7cfd 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -43,10 +42,6 @@ build_template_specs_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["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.TemplateSpec] = kwargs.pop("cls", None) @@ -314,7 +309,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"] = 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.TemplateSpec] = kwargs.pop("cls", None) @@ -402,7 +397,7 @@ async def get( _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.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_request( @@ -469,7 +464,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"] = 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[None] = kwargs.pop("cls", None) request = build_template_specs_delete_request( @@ -522,7 +517,7 @@ def list_by_subscription( _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.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -619,7 +614,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"] = 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.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -816,7 +811,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"] = 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.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -977,7 +972,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"] = 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.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1060,7 +1055,7 @@ async def get( _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.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_request( @@ -1129,7 +1124,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"] = 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[None] = kwargs.pop("cls", None) request = build_template_spec_versions_delete_request( @@ -1184,7 +1179,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.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/operations/_operations.py index 08cf2b4c5c59f..d460a7d31bb0f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2021_05_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/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, 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]] @@ -41,13 +36,13 @@ _SERIALIZER.client_side_validation = False -def build_template_specs_create_or_update_request( +def build_template_specs_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -85,7 +80,7 @@ def build_template_specs_update_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") @@ -128,7 +123,7 @@ def build_template_specs_get_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 @@ -165,7 +160,7 @@ def build_template_specs_delete_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 @@ -194,13 +189,13 @@ def build_template_specs_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_list_by_subscription_request( +def build_template_specs_list_by_subscription_request( # pylint: disable=name-too-long subscription_id: str, *, expand: Optional[Union[str, _models.TemplateSpecExpandKind]] = None, **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 @@ -222,7 +217,7 @@ def build_template_specs_list_by_subscription_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_list_by_resource_group_request( +def build_template_specs_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -232,7 +227,7 @@ def build_template_specs_list_by_resource_group_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 @@ -260,13 +255,13 @@ def build_template_specs_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_create_or_update_request( +def build_template_spec_versions_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -306,13 +301,13 @@ def build_template_spec_versions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_update_request( +def build_template_spec_versions_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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") @@ -358,7 +353,7 @@ def build_template_spec_versions_get_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 @@ -395,13 +390,13 @@ def build_template_spec_versions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_delete_request( +def build_template_spec_versions_delete_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -438,13 +433,13 @@ def build_template_spec_versions_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_list_request( +def build_template_spec_versions_list_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: 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 @@ -585,7 +580,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"] = 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.TemplateSpec] = kwargs.pop("cls", None) @@ -736,7 +731,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"] = 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.TemplateSpec] = kwargs.pop("cls", None) @@ -824,7 +819,7 @@ def get( _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.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_request( @@ -891,7 +886,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"] = 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[None] = kwargs.pop("cls", None) request = build_template_specs_delete_request( @@ -944,7 +939,7 @@ def list_by_subscription( _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.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -1041,7 +1036,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"] = 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.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -1238,7 +1233,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"] = 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.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1399,7 +1394,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"] = 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.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1482,7 +1477,7 @@ def get( _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.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_request( @@ -1551,7 +1546,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"] = 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[None] = kwargs.pop("cls", None) request = build_template_spec_versions_delete_request( @@ -1606,7 +1601,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.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_configuration.py index b1603036d873f..8b2794fab00c5 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_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 @@ -43,7 +37,7 @@ class TemplateSpecsClientConfiguration(Configuration): # pylint: disable=too-ma def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(TemplateSpecsClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", "2022-02-01") + api_version: str = kwargs.pop("api_version", "2022-02-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_version.py index ef35ba89b90b7..e5754a47ce68f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_version.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/aio/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/aio/_configuration.py index eda6c5975da39..9e8ae9d01567f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/aio/_configuration.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_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 @@ -43,7 +37,7 @@ class TemplateSpecsClientConfiguration(Configuration): # pylint: disable=too-ma def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(TemplateSpecsClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", "2022-02-01") + api_version: str = kwargs.pop("api_version", "2022-02-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/aio/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/aio/operations/_operations.py index 467707dce5701..5cba50e799332 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/aio/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_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, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -47,10 +46,6 @@ build_template_specs_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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -318,7 +313,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -406,7 +401,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_request( @@ -473,7 +468,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_specs_delete_request( @@ -526,7 +521,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -623,7 +618,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -727,7 +722,7 @@ async def get_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_built_in_request( @@ -781,7 +776,7 @@ def list_built_ins( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -974,7 +969,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1135,7 +1130,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1218,7 +1213,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_request( @@ -1287,7 +1282,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_spec_versions_delete_request( @@ -1342,7 +1337,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { @@ -1430,7 +1425,7 @@ def list_built_ins(self, template_spec_name: str, **kwargs: Any) -> AsyncIterabl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { @@ -1525,7 +1520,7 @@ async def get_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_built_in_request( diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/operations/_operations.py index 25b3100da12a8..8068a3b81fcfa 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_01/operations/_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/templatespecs/v2022_02_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, 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]] @@ -41,13 +36,13 @@ _SERIALIZER.client_side_validation = False -def build_template_specs_create_or_update_request( +def build_template_specs_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-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_template_specs_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -128,7 +123,7 @@ def build_template_specs_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -165,7 +160,7 @@ def build_template_specs_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -194,13 +189,13 @@ def build_template_specs_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_list_by_subscription_request( +def build_template_specs_list_by_subscription_request( # pylint: disable=name-too-long subscription_id: str, *, expand: Optional[Union[str, _models.TemplateSpecExpandKind]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -222,7 +217,7 @@ def build_template_specs_list_by_subscription_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_list_by_resource_group_request( +def build_template_specs_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, *, @@ -232,7 +227,7 @@ def build_template_specs_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -260,13 +255,13 @@ def build_template_specs_list_by_resource_group_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_get_built_in_request( +def build_template_specs_get_built_in_request( # pylint: disable=name-too-long template_spec_name: str, *, expand: Optional[Union[str, _models.TemplateSpecExpandKind]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -290,13 +285,13 @@ def build_template_specs_get_built_in_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_specs_list_built_ins_request( +def build_template_specs_list_built_ins_request( # pylint: disable=name-too-long *, expand: Optional[Union[str, _models.TemplateSpecExpandKind]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -313,13 +308,13 @@ def build_template_specs_list_built_ins_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_create_or_update_request( +def build_template_spec_versions_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -359,13 +354,13 @@ def build_template_spec_versions_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_update_request( +def build_template_spec_versions_update_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -411,7 +406,7 @@ def build_template_spec_versions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -448,13 +443,13 @@ def build_template_spec_versions_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_delete_request( +def build_template_spec_versions_delete_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, template_spec_version: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -491,13 +486,13 @@ def build_template_spec_versions_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_list_request( +def build_template_spec_versions_list_request( # pylint: disable=name-too-long resource_group_name: str, template_spec_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -526,11 +521,13 @@ def build_template_spec_versions_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_list_built_ins_request(template_spec_name: str, **kwargs: Any) -> HttpRequest: +def build_template_spec_versions_list_built_ins_request( # pylint: disable=name-too-long + template_spec_name: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -552,13 +549,13 @@ def build_template_spec_versions_list_built_ins_request(template_spec_name: str, return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_template_spec_versions_get_built_in_request( +def build_template_spec_versions_get_built_in_request( # pylint: disable=name-too-long template_spec_name: str, template_spec_version: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -703,7 +700,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -854,7 +851,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) @@ -942,7 +939,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_request( @@ -1009,7 +1006,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_specs_delete_request( @@ -1062,7 +1059,7 @@ def list_by_subscription( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -1159,7 +1156,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -1263,7 +1260,7 @@ def get_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpec] = kwargs.pop("cls", None) request = build_template_specs_get_built_in_request( @@ -1317,7 +1314,7 @@ def list_built_ins( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecsListResult] = kwargs.pop("cls", None) error_map = { @@ -1510,7 +1507,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1671,7 +1668,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) @@ -1754,7 +1751,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_request( @@ -1823,7 +1820,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-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_template_spec_versions_delete_request( @@ -1878,7 +1875,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { @@ -1966,7 +1963,7 @@ def list_built_ins(self, template_spec_name: str, **kwargs: Any) -> Iterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecVersionsListResult] = kwargs.pop("cls", None) error_map = { @@ -2061,7 +2058,7 @@ def get_built_in( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-02-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01")) cls: ClsType[_models.TemplateSpecVersion] = kwargs.pop("cls", None) request = build_template_spec_versions_get_built_in_request(