Skip to content

Commit

Permalink
CodeGen from PR 23107 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge efd14026bfec95785c54647fbbd156cbac00b7d5 into fdf43f2fdacf17bd78c0621df44a5c024b61db82
  • Loading branch information
SDKAuto committed Apr 17, 2023
1 parent c35ccfa commit 466ef4d
Show file tree
Hide file tree
Showing 265 changed files with 1,260 additions and 3,368 deletions.
6 changes: 3 additions & 3 deletions sdk/monitor/azure-mgmt-monitor/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "7d313ecb6a58a51046a3916ee5ea6b6d29973522",
"commit": "309b50f5329300cfae09dc39d3e324c393980e97",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/[email protected].3",
"@autorest/[email protected].8",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/monitor/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected].3 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/monitor/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected].8 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/monitor/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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


Expand All @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "6.0.0"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand All @@ -29,10 +28,6 @@
from ..._vendor import _convert_request
from ...operations._activity_logs_operations import build_list_request

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -93,7 +88,7 @@ def list(self, filter: str, select: Optional[str] = None, **kwargs: Any) -> Asyn
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None)

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -37,10 +36,6 @@
build_update_request,
)

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -153,7 +148,7 @@ async def create_or_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None)

Expand Down Expand Up @@ -234,7 +229,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
cls: ClsType[None] = kwargs.pop("cls", None)

request = build_delete_request(
Expand Down Expand Up @@ -293,7 +288,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) ->
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None)

request = build_get_request(
Expand Down Expand Up @@ -428,7 +423,7 @@ async def update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None)

Expand Down Expand Up @@ -500,7 +495,7 @@ def list_by_resource_group(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None)

error_map = {
Expand Down Expand Up @@ -574,7 +569,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AlertRul
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01"))
cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None)

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -37,10 +36,6 @@
build_update_request,
)

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -83,7 +78,7 @@ def list_by_resource_group(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None)

error_map = {
Expand Down Expand Up @@ -237,7 +232,7 @@ async def create_or_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None)

Expand Down Expand Up @@ -318,7 +313,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
cls: ClsType[None] = kwargs.pop("cls", None)

request = build_delete_request(
Expand Down Expand Up @@ -379,7 +374,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None)

request = build_get_request(
Expand Down Expand Up @@ -515,7 +510,7 @@ async def update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None)

Expand Down Expand Up @@ -579,7 +574,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Autoscal
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None)

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand All @@ -29,10 +28,6 @@
from ..._vendor import _convert_request
from ...operations._event_categories_operations import build_list_request

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -71,7 +66,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.LocalizableString"]:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
cls: ClsType[_models.EventCategoryCollection] = kwargs.pop("cls", None)

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core.exceptions import (
Expand All @@ -28,10 +27,6 @@
from ..._vendor import _convert_request
from ...operations._operations import build_list_request

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -75,7 +70,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None)

request = build_list_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand All @@ -29,10 +28,6 @@
from ..._vendor import _convert_request
from ...operations._tenant_activity_logs_operations import build_list_request

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -100,7 +95,7 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None)

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, Callable, Dict, Iterable, Optional, TypeVar

from azure.core.exceptions import (
Expand All @@ -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]]

Expand All @@ -46,7 +41,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
accept = _headers.pop("Accept", "application/json")

# Construct URL
Expand Down Expand Up @@ -126,7 +121,7 @@ def list(self, filter: str, select: Optional[str] = None, **kwargs: Any) -> Iter
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None)

error_map = {
Expand Down
Loading

0 comments on commit 466ef4d

Please sign in to comment.