Skip to content

Commit

Permalink
CodeGen from PR 24349 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 222556f13a3dcf447bdc0b7344e55beef22cc801 into 04d4d832025900d3fb31f4afc20f480840511e5e
  • Loading branch information
SDKAuto committed Jun 8, 2023
1 parent d228a27 commit d1ca8ad
Show file tree
Hide file tree
Showing 965 changed files with 27,426 additions and 28,666 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": "3e6d63f449c0b7b277f73bbdbf8389c5b16d543b",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.3",
"@autorest/python@6.5.0",
"@autorest/modelerfour@4.24.3"
],
"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/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --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/python@6.5.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/sql/resource-manager/readme.md"
}
6 changes: 6 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,23 @@ class SqlManagementClientConfiguration(Configuration): # pylint: disable=too-ma
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The subscription ID that identifies an Azure subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-02-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(SqlManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-02-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-sql/{}".format(VERSION))
self._configure(**kwargs)
Expand Down
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
701 changes: 343 additions & 358 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py

Large diffs are not rendered by default.

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"
6 changes: 6 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,23 @@ class SqlManagementClientConfiguration(Configuration): # pylint: disable=too-ma
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The subscription ID that identifies an Azure subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-02-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(SqlManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-02-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-sql/{}".format(VERSION))
self._configure(**kwargs)
Expand Down
Loading

0 comments on commit d1ca8ad

Please sign in to comment.