Skip to content

Commit fb17191

Browse files
author
SDKAuto
committed
CodeGen from PR 20130 in Azure/azure-rest-api-specs
Merge fd3740520302f8432b55a6b6727082bdafc31607 into 80065490402157d0df0dd37ab347c651b22eb576
1 parent dc08d2e commit fb17191

33 files changed

+1883
-1422
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.13.0",
4+
"@autorest/python@5.16.0",
55
"@autorest/modelerfour@4.19.3"
66
],
7-
"commit": "b1bbbab2f04c23e279c717f955d9a86bc4757946",
7+
"commit": "0c24cf7941c25c9fe4f0fcecd49720ac7b08191a",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/reservations/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
9+
"autorest_command": "autorest specification/reservations/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
1010
"readme": "specification/reservations/resource-manager/readme.md"
1111
}

sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/__init__.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
13+
14+
try:
15+
from ._patch import __all__ as _patch_all
16+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
17+
except ImportError:
18+
_patch_all = []
19+
from ._patch import patch_sdk as _patch_sdk
1320
__all__ = ['AzureReservationAPI']
21+
__all__.extend([p for p in _patch_all if p not in __all__])
1422

15-
# `._patch.py` is used for handwritten extensions to the generated code
16-
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
17-
from ._patch import patch_sdk
18-
patch_sdk()
23+
_patch_sdk()

sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_azure_reservation_api.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,27 @@ def __init__(
6060
self._serialize = Serializer(client_models)
6161
self._deserialize = Deserializer(client_models)
6262
self._serialize.client_side_validation = False
63-
self.reservation = ReservationOperations(self._client, self._config, self._serialize, self._deserialize)
64-
self.reservation_order = ReservationOrderOperations(self._client, self._config, self._serialize, self._deserialize)
65-
self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize)
66-
self.calculate_exchange = CalculateExchangeOperations(self._client, self._config, self._serialize, self._deserialize)
67-
self.exchange = ExchangeOperations(self._client, self._config, self._serialize, self._deserialize)
68-
self.quota = QuotaOperations(self._client, self._config, self._serialize, self._deserialize)
69-
self.quota_request_status = QuotaRequestStatusOperations(self._client, self._config, self._serialize, self._deserialize)
63+
self.reservation = ReservationOperations(
64+
self._client, self._config, self._serialize, self._deserialize
65+
)
66+
self.reservation_order = ReservationOrderOperations(
67+
self._client, self._config, self._serialize, self._deserialize
68+
)
69+
self.operation = OperationOperations(
70+
self._client, self._config, self._serialize, self._deserialize
71+
)
72+
self.calculate_exchange = CalculateExchangeOperations(
73+
self._client, self._config, self._serialize, self._deserialize
74+
)
75+
self.exchange = ExchangeOperations(
76+
self._client, self._config, self._serialize, self._deserialize
77+
)
78+
self.quota = QuotaOperations(
79+
self._client, self._config, self._serialize, self._deserialize
80+
)
81+
self.quota_request_status = QuotaRequestStatusOperations(
82+
self._client, self._config, self._serialize, self._deserialize
83+
)
7084

7185

7286
def _send_request(

sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_metadata.json

Lines changed: 0 additions & 126 deletions
This file was deleted.

sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_vendor.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,19 @@
55
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
66
# --------------------------------------------------------------------------
77

8+
from abc import ABC
9+
from typing import TYPE_CHECKING
10+
811
from azure.core.pipeline.transport import HttpRequest
912

13+
from ._configuration import AzureReservationAPIConfiguration
14+
15+
if TYPE_CHECKING:
16+
# pylint: disable=unused-import,ungrouped-imports
17+
from msrest import Deserializer, Serializer
18+
19+
from azure.core import PipelineClient
20+
1021
def _convert_request(request, files=None):
1122
data = request.content if not files else None
1223
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
@@ -25,3 +36,10 @@ def _format_url_section(template, **kwargs):
2536
c for c in formatted_components if "{}".format(key.args[0]) not in c
2637
]
2738
template = "/".join(components)
39+
40+
class MixinABC(ABC):
41+
"""DO NOT use this class. It is for internal typing use only."""
42+
_client: "PipelineClient"
43+
_config: AzureReservationAPIConfiguration
44+
_serialize: "Serializer"
45+
_deserialize: "Deserializer"

sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/_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 = "2.0.0"
9+
VERSION = "1.0.0b1"

sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/__init__.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@
77
# --------------------------------------------------------------------------
88

99
from ._azure_reservation_api import AzureReservationAPI
10+
11+
try:
12+
from ._patch import __all__ as _patch_all
13+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
14+
except ImportError:
15+
_patch_all = []
16+
from ._patch import patch_sdk as _patch_sdk
1017
__all__ = ['AzureReservationAPI']
18+
__all__.extend([p for p in _patch_all if p not in __all__])
1119

12-
# `._patch.py` is used for handwritten extensions to the generated code
13-
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
14-
from ._patch import patch_sdk
15-
patch_sdk()
20+
_patch_sdk()

sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/aio/_azure_reservation_api.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,27 @@ def __init__(
6161
self._serialize = Serializer(client_models)
6262
self._deserialize = Deserializer(client_models)
6363
self._serialize.client_side_validation = False
64-
self.reservation = ReservationOperations(self._client, self._config, self._serialize, self._deserialize)
65-
self.reservation_order = ReservationOrderOperations(self._client, self._config, self._serialize, self._deserialize)
66-
self.operation = OperationOperations(self._client, self._config, self._serialize, self._deserialize)
67-
self.calculate_exchange = CalculateExchangeOperations(self._client, self._config, self._serialize, self._deserialize)
68-
self.exchange = ExchangeOperations(self._client, self._config, self._serialize, self._deserialize)
69-
self.quota = QuotaOperations(self._client, self._config, self._serialize, self._deserialize)
70-
self.quota_request_status = QuotaRequestStatusOperations(self._client, self._config, self._serialize, self._deserialize)
64+
self.reservation = ReservationOperations(
65+
self._client, self._config, self._serialize, self._deserialize
66+
)
67+
self.reservation_order = ReservationOrderOperations(
68+
self._client, self._config, self._serialize, self._deserialize
69+
)
70+
self.operation = OperationOperations(
71+
self._client, self._config, self._serialize, self._deserialize
72+
)
73+
self.calculate_exchange = CalculateExchangeOperations(
74+
self._client, self._config, self._serialize, self._deserialize
75+
)
76+
self.exchange = ExchangeOperations(
77+
self._client, self._config, self._serialize, self._deserialize
78+
)
79+
self.quota = QuotaOperations(
80+
self._client, self._config, self._serialize, self._deserialize
81+
)
82+
self.quota_request_status = QuotaRequestStatusOperations(
83+
self._client, self._config, self._serialize, self._deserialize
84+
)
7185

7286

7387
def _send_request(

0 commit comments

Comments
 (0)