diff --git a/sdk/graphservices/azure-mgmt-graphservices/_meta.json b/sdk/graphservices/azure-mgmt-graphservices/_meta.json index e224b1c18d17..9f5a5bba1bc5 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/_meta.json +++ b/sdk/graphservices/azure-mgmt-graphservices/_meta.json @@ -1,11 +1,11 @@ { - "commit": "d4dfb3388ab40185cf302512268ad1406f666d64", + "commit": "4e5216b0d32a3e041d2fbee8cb5c5d5fff3dd50b", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.4.3", + "@autorest/python@6.4.12", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/graphservicesprod/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/graphservicesprod/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.12 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/graphservicesprod/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_configuration.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_configuration.py index 19476c0133cb..20d7aa624024 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_configuration.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_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 GraphServicesMgmtClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(GraphServicesMgmtClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-09-22-preview"] = kwargs.pop("api_version", "2022-09-22-preview") + api_version: str = kwargs.pop("api_version", "2022-09-22-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_serialization.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_serialization.py index f17c068e833e..842ae727fbbc 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_serialization.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/_serialization.py @@ -629,7 +629,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): @@ -1271,7 +1271,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 @@ -1295,7 +1295,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/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/_configuration.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/_configuration.py index 88247b81df2a..d2ab088ce372 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/_configuration.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/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 GraphServicesMgmtClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(GraphServicesMgmtClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-09-22-preview"] = kwargs.pop("api_version", "2022-09-22-preview") + api_version: str = kwargs.pop("api_version", "2022-09-22-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_account_operations.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_account_operations.py index 38d68eb5a181..ee3955a95c6a 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_account_operations.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_account_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -35,10 +35,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -87,9 +83,7 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccountResource] = kwargs.pop("cls", None) request = build_get_request( @@ -145,16 +139,14 @@ async def _create_and_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(account_resource, (IO, bytes)): + if isinstance(account_resource, (IOBase, bytes)): _content = account_resource else: _json = self._serialize.body(account_resource, "AccountResource") @@ -310,9 +302,7 @@ async def begin_create_and_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -453,16 +443,14 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(account_resource, (IO, bytes)): + if isinstance(account_resource, (IOBase, bytes)): _content = account_resource else: _json = self._serialize.body(account_resource, "AccountPatchResource") @@ -532,9 +520,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-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_accounts_operations.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_accounts_operations.py index ced2e2d12ac4..017fd5419c48 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_accounts_operations.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_accounts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._accounts_operations import build_list_by_resource_group_request, build_list_by_subscription_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -75,9 +70,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccountResourceList] = kwargs.pop("cls", None) error_map = { @@ -162,9 +155,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AccountR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccountResourceList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_operation_operations.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_operation_operations.py index 90ae6f7e4619..23b11451855d 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_operation_operations.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/aio/operations/_operation_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._operation_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -69,9 +64,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-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_account_operations.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_account_operations.py index c1b73f514e7a..42eb0a8dfae3 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_account_operations.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_account_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -30,10 +30,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +41,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-09-22-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-22-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,9 +74,7 @@ def build_create_and_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-09-22-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-22-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -118,9 +110,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-09-22-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-22-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -156,9 +146,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-09-22-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-22-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -229,9 +217,7 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccountResource] = kwargs.pop("cls", None) request = build_get_request( @@ -287,16 +273,14 @@ def _create_and_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(account_resource, (IO, bytes)): + if isinstance(account_resource, (IOBase, bytes)): _content = account_resource else: _json = self._serialize.body(account_resource, "AccountResource") @@ -452,9 +436,7 @@ def begin_create_and_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -594,16 +576,14 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AccountResource] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(account_resource, (IO, bytes)): + if isinstance(account_resource, (IOBase, bytes)): _content = account_resource else: _json = self._serialize.body(account_resource, "AccountPatchResource") @@ -673,9 +653,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-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_accounts_operations.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_accounts_operations.py index b048213d9bbd..2d1b43046af0 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_accounts_operations.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_accounts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-09-22-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-22-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,9 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-09-22-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-22-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -133,9 +124,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["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccountResourceList] = kwargs.pop("cls", None) error_map = { @@ -219,9 +208,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AccountResour _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AccountResourceList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_operation_operations.py b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_operation_operations.py index 3361476432b5..cb36b02350f1 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_operation_operations.py +++ b/sdk/graphservices/azure-mgmt-graphservices/azure/mgmt/graphservices/operations/_operation_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-09-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-09-22-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-09-22-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,9 +86,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-22-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/graphservices/azure-mgmt-graphservices/generated_samples/accounts_create.py b/sdk/graphservices/azure-mgmt-graphservices/generated_samples/accounts_create.py index 4764aa8c04ba..8bea21927d60 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/generated_samples/accounts_create.py +++ b/sdk/graphservices/azure-mgmt-graphservices/generated_samples/accounts_create.py @@ -33,6 +33,7 @@ def main(): resource_group_name="testResourceGroupGRAM", resource_name="11111111-aaaa-1111-bbbb-1111111111111", account_resource={ + "location": "global", "properties": {"appId": "11111111-aaaa-1111-bbbb-111111111111"}, "tags": {"tag1": "value1", "tag2": "value2"}, }, diff --git a/sdk/graphservices/azure-mgmt-graphservices/generated_samples/accounts_delete.py b/sdk/graphservices/azure-mgmt-graphservices/generated_samples/accounts_delete.py index 8d1fbf3070b5..57c459891841 100644 --- a/sdk/graphservices/azure-mgmt-graphservices/generated_samples/accounts_delete.py +++ b/sdk/graphservices/azure-mgmt-graphservices/generated_samples/accounts_delete.py @@ -29,11 +29,10 @@ def main(): subscription_id="11111111-aaaa-1111-bbbb-111111111111", ) - response = client.account.delete( + client.account.delete( resource_group_name="testResourceGroupGRAM", resource_name="11111111-aaaa-1111-bbbb-111111111111", ) - print(response) # x-ms-original-file: specification/graphservicesprod/resource-manager/Microsoft.GraphServices/preview/2022-09-22-preview/examples/Accounts_Delete.json