Skip to content

Commit 2828538

Browse files
author
SDKAuto
committed
CodeGen from PR 22885 in Azure/azure-rest-api-specs
Merge 1f92ce25799269c9e20f91b7b36d0731f2702d82 into f0e86b9b4ab51cddbc451c9ead25781b552342f0
1 parent c5954d4 commit 2828538

File tree

1,479 files changed

+28085
-28535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,479 files changed

+28085
-28535
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "51d4c24a011e300b9713179e0515fef35bf3f678",
2+
"commit": "f4003b773db7450aeb13804d79799b7abdd06d7a",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/python@6.4.0",
6+
"@autorest/python@6.4.6",
77
"@autorest/modelerfour@4.24.3"
88
],
9-
"autorest_command": "autorest specification/compute/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.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/compute/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.6 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/compute/resource-manager/readme.md"
1111
}

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_serialization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
631631
if xml_desc.get("attr", False):
632632
if xml_ns:
633633
ET.register_namespace(xml_prefix, xml_ns)
634-
xml_name = "{}{}".format(xml_ns, xml_name)
634+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
635635
serialized.set(xml_name, new_attr) # type: ignore
636636
continue
637637
if xml_desc.get("text", False):
@@ -1273,7 +1273,7 @@ def _extract_name_from_internal_type(internal_type):
12731273
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
12741274
xml_ns = internal_type_xml_map.get("ns", None)
12751275
if xml_ns:
1276-
xml_name = "{}{}".format(xml_ns, xml_name)
1276+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12771277
return xml_name
12781278

12791279

@@ -1297,7 +1297,7 @@ def xml_key_extractor(attr, attr_desc, data):
12971297
# Integrate namespace if necessary
12981298
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
12991299
if xml_ns:
1300-
xml_name = "{}{}".format(xml_ns, xml_name)
1300+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
13011301

13021302
# If it's an attribute, that's simple
13031303
if xml_desc.get("attr", False):

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "29.2.0b1"
8+
VERSION = "0.1.0"

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_compute_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(
8484
self._config = ComputeManagementClientConfiguration(
8585
credential=credential, subscription_id=subscription_id, **kwargs
8686
)
87-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
87+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8888

8989
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
9090
self._serialize = Serializer(client_models)

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_configuration.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -43,7 +37,7 @@ class ComputeManagementClientConfiguration(Configuration): # pylint: disable=to
4337

4438
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4539
super(ComputeManagementClientConfiguration, self).__init__(**kwargs)
46-
api_version: Literal["2015-06-15"] = kwargs.pop("api_version", "2015-06-15")
40+
api_version: str = kwargs.pop("api_version", "2015-06-15")
4741

4842
if credential is None:
4943
raise ValueError("Parameter 'credential' must not be None.")
Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
1-
# coding=utf-8
2-
# --------------------------------------------------------------------------
3-
#
4-
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
#
6-
# The MIT License (MIT)
7-
#
8-
# Permission is hereby granted, free of charge, to any person obtaining a copy
9-
# of this software and associated documentation files (the ""Software""), to
10-
# deal in the Software without restriction, including without limitation the
11-
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12-
# sell copies of the Software, and to permit persons to whom the Software is
13-
# furnished to do so, subject to the following conditions:
14-
#
15-
# The above copyright notice and this permission notice shall be included in
16-
# all copies or substantial portions of the Software.
17-
#
18-
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23-
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24-
# IN THE SOFTWARE.
25-
#
26-
# --------------------------------------------------------------------------
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
5+
"""Customize generated code here.
6+
7+
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
8+
"""
9+
from typing import List
10+
11+
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
12+
2713

28-
# This file is used for handwritten extensions to the generated code. Example:
29-
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3014
def patch_sdk():
31-
pass
15+
"""Do not remove from this file.
16+
17+
`patch_sdk` is a last resort escape hatch that allows you to do customizations
18+
you can't accomplish using the techniques described in
19+
https://aka.ms/azsdk/python/dpcodegen/python/customize
20+
"""

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "29.2.0b1"
9+
VERSION = "1.0.0b1"

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/_compute_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(
8585
self._config = ComputeManagementClientConfiguration(
8686
credential=credential, subscription_id=subscription_id, **kwargs
8787
)
88-
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
88+
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8989

9090
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
9191
self._serialize = Serializer(client_models)

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/aio/_configuration.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from .._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials_async import AsyncTokenCredential
@@ -43,7 +37,7 @@ class ComputeManagementClientConfiguration(Configuration): # pylint: disable=to
4337

4438
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
4539
super(ComputeManagementClientConfiguration, self).__init__(**kwargs)
46-
api_version: Literal["2015-06-15"] = kwargs.pop("api_version", "2015-06-15")
40+
api_version: str = kwargs.pop("api_version", "2015-06-15")
4741

4842
if credential is None:
4943
raise ValueError("Parameter 'credential' must not be None.")
Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
1-
# coding=utf-8
2-
# --------------------------------------------------------------------------
3-
#
4-
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
#
6-
# The MIT License (MIT)
7-
#
8-
# Permission is hereby granted, free of charge, to any person obtaining a copy
9-
# of this software and associated documentation files (the ""Software""), to
10-
# deal in the Software without restriction, including without limitation the
11-
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12-
# sell copies of the Software, and to permit persons to whom the Software is
13-
# furnished to do so, subject to the following conditions:
14-
#
15-
# The above copyright notice and this permission notice shall be included in
16-
# all copies or substantial portions of the Software.
17-
#
18-
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23-
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24-
# IN THE SOFTWARE.
25-
#
26-
# --------------------------------------------------------------------------
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
5+
"""Customize generated code here.
6+
7+
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
8+
"""
9+
from typing import List
10+
11+
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
12+
2713

28-
# This file is used for handwritten extensions to the generated code. Example:
29-
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3014
def patch_sdk():
31-
pass
15+
"""Do not remove from this file.
16+
17+
`patch_sdk` is a last resort escape hatch that allows you to do customizations
18+
you can't accomplish using the techniques described in
19+
https://aka.ms/azsdk/python/dpcodegen/python/customize
20+
"""

0 commit comments

Comments
 (0)