Skip to content

Commit

Permalink
CodeGen from PR 23781 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 29f3f70919ca1276ae07b4e9cf099ecdac42affc into 4f6418dca8c15697489bbe6f855558bb79ca5bf5
  • Loading branch information
SDKAuto committed May 4, 2023
1 parent 17f950a commit fcb54ec
Show file tree
Hide file tree
Showing 303 changed files with 1,895 additions and 6,840 deletions.
6 changes: 3 additions & 3 deletions sdk/sql/azure-mgmt-sql/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "f66499b77cd90144ceb0d118c1bd8bda7dbd4cfc",
"commit": "de137067084e8b66e538834d19cfec6f5f253b04",
"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/sql/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/sql/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/sql/resource-manager/readme.md"
}
6 changes: 3 additions & 3 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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


Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py
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 = "4.0.0b10"
VERSION = "0.9.0"
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, cast, 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 @@ -100,9 +95,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
cls: ClsType[_models.BackupShortTermRetentionPolicy] = kwargs.pop("cls", None)

request = build_get_request(
Expand Down Expand Up @@ -161,9 +154,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-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Optional[_models.BackupShortTermRetentionPolicy]] = kwargs.pop("cls", None)

Expand Down Expand Up @@ -346,9 +337,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-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.BackupShortTermRetentionPolicy] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
Expand Down Expand Up @@ -415,9 +404,7 @@ async def _update_initial(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

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

Expand Down Expand Up @@ -600,9 +587,7 @@ async def begin_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.BackupShortTermRetentionPolicy] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
Expand Down Expand Up @@ -672,9 +657,7 @@ def list_by_database(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
cls: ClsType[_models.BackupShortTermRetentionPolicyListResult] = 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, Union

from azure.core.exceptions import (
Expand All @@ -28,10 +27,6 @@
from ..._vendor import _convert_request
from ...operations._capabilities_operations import build_list_by_location_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 @@ -84,9 +79,7 @@ async def list_by_location(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2020-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview"))
cls: ClsType[_models.LocationCapabilities] = kwargs.pop("cls", None)

request = build_list_by_location_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,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"))
data_masking_policy_name: Literal["Default"] = kwargs.pop("data_masking_policy_name", "Default")
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DataMaskingPolicy] = kwargs.pop("cls", None)
Expand Down Expand Up @@ -254,7 +254,7 @@ async def get(
_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"))
data_masking_policy_name: Literal["Default"] = kwargs.pop("data_masking_policy_name", "Default")
cls: ClsType[_models.DataMaskingPolicy] = kwargs.pop("cls", None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,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"))
data_masking_policy_name: Literal["Default"] = kwargs.pop("data_masking_policy_name", "Default")
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DataMaskingRule] = kwargs.pop("cls", None)
Expand Down Expand Up @@ -264,7 +264,7 @@ def list_by_database(
_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"))
data_masking_policy_name: Literal["Default"] = kwargs.pop("data_masking_policy_name", "Default")
cls: ClsType[_models.DataMaskingRuleListResult] = kwargs.pop("cls", None)

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, Union

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand All @@ -30,10 +29,6 @@
from ..._vendor import _convert_request
from ...operations._data_warehouse_user_activities_operations import build_get_request, build_list_by_database_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 @@ -95,9 +90,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2020-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview"))
cls: ClsType[_models.DataWarehouseUserActivities] = kwargs.pop("cls", None)

request = build_get_request(
Expand Down Expand Up @@ -159,9 +152,7 @@ def list_by_database(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2020-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview"))
cls: ClsType[_models.DataWarehouseUserActivitiesListResult] = 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 @@ -34,10 +33,6 @@
build_list_by_database_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 @@ -84,9 +79,7 @@ def list_by_database(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
cls: ClsType[_models.DatabaseAdvancedThreatProtectionListResult] = kwargs.pop("cls", None)

error_map = {
Expand Down Expand Up @@ -186,9 +179,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
cls: ClsType[_models.DatabaseAdvancedThreatProtection] = kwargs.pop("cls", None)

request = build_get_request(
Expand Down Expand Up @@ -344,9 +335,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-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-11-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DatabaseAdvancedThreatProtection] = kwargs.pop("cls", None)

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, IO, List, Optional, TypeVar, Union, overload

from azure.core.exceptions import (
Expand All @@ -32,10 +31,6 @@
build_update_request,
)

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

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

api_version: Literal["2020-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview"))
cls: ClsType[List[_models.Advisor]] = kwargs.pop("cls", None)

request = build_list_by_database_request(
Expand Down Expand Up @@ -167,9 +160,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2020-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview"))
cls: ClsType[_models.Advisor] = kwargs.pop("cls", None)

request = build_get_request(
Expand Down Expand Up @@ -319,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["2020-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Advisor] = kwargs.pop("cls", None)

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, IO, Optional, TypeVar, Union, overload

from azure.core.exceptions import (
Expand All @@ -28,10 +27,6 @@
from ..._vendor import _convert_request
from ...operations._database_automatic_tuning_operations import build_get_request, 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 @@ -84,9 +79,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2020-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview"))
cls: ClsType[_models.DatabaseAutomaticTuning] = kwargs.pop("cls", None)

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

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

Expand Down
Loading

0 comments on commit fcb54ec

Please sign in to comment.