Skip to content

Commit b36562e

Browse files
author
SDKAuto
committed
CodeGen from PR 33581 in Azure/azure-rest-api-specs
Merge 54772594db79974841efa55b3f2e0dc497586457 into eb9abbcdb08fe6c2faca5c2a6182568b52a3b1ce
1 parent 8fcb2d2 commit b36562e

20 files changed

+284
-241
lines changed

sdk/databasewatcher/azure-mgmt-databasewatcher/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "07da438f8dc690946b39511467744ed889434de5",
2+
"commit": "97849587351381820da57e022831a3591b3cb0b2",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/databasewatcher/DatabaseWatcher.Management",
5-
"@azure-tools/typespec-python": "0.38.2"
5+
"@azure-tools/typespec-python": "0.42.2"
66
}

sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/_model_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
# Licensed under the MIT License. See License.txt in the project root for
6-
# license information.
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) Python Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
78
# --------------------------------------------------------------------------
89
# pylint: disable=protected-access, broad-except
910

sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/_patch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize

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

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,10 @@
1-
# pylint: disable=too-many-lines
1+
# pylint: disable=line-too-long,useless-suppression,too-many-lines
2+
# coding=utf-8
23
# --------------------------------------------------------------------------
3-
#
44
# 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-
#
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) Python Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
268
# --------------------------------------------------------------------------
279

2810
# pyright: reportUnnecessaryTypeIgnoreComment=false
@@ -411,7 +393,7 @@ def from_dict(
411393
:param function key_extractors: A key extractor function.
412394
:param str content_type: JSON by default, set application/xml if XML.
413395
:returns: An instance of this model
414-
:raises: DeserializationError if something went wrong
396+
:raises DeserializationError: if something went wrong
415397
:rtype: Self
416398
"""
417399
deserializer = Deserializer(cls._infer_class_models())
@@ -1361,7 +1343,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
13611343
# Iter and wrapped, should have found one node only (the wrap one)
13621344
if len(children) != 1:
13631345
raise DeserializationError(
1364-
"Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long
1346+
"Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
13651347
xml_name
13661348
)
13671349
)

sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/_patch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize

sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/operations/_operations.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def prepare_request(next_link=None):
151151

152152
async def extract_data(pipeline_response):
153153
deserialized = pipeline_response.http_response.json()
154-
list_of_elem = _deserialize(List[_models.Operation], deserialized["value"])
154+
list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", []))
155155
if cls:
156156
list_of_elem = cls(list_of_elem) # type: ignore
157157
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -894,7 +894,7 @@ def prepare_request(next_link=None):
894894

895895
async def extract_data(pipeline_response):
896896
deserialized = pipeline_response.http_response.json()
897-
list_of_elem = _deserialize(List[_models.Watcher], deserialized["value"])
897+
list_of_elem = _deserialize(List[_models.Watcher], deserialized.get("value", []))
898898
if cls:
899899
list_of_elem = cls(list_of_elem) # type: ignore
900900
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -978,7 +978,7 @@ def prepare_request(next_link=None):
978978

979979
async def extract_data(pipeline_response):
980980
deserialized = pipeline_response.http_response.json()
981-
list_of_elem = _deserialize(List[_models.Watcher], deserialized["value"])
981+
list_of_elem = _deserialize(List[_models.Watcher], deserialized.get("value", []))
982982
if cls:
983983
list_of_elem = cls(list_of_elem) # type: ignore
984984
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -1669,7 +1669,7 @@ def prepare_request(next_link=None):
16691669

16701670
async def extract_data(pipeline_response):
16711671
deserialized = pipeline_response.http_response.json()
1672-
list_of_elem = _deserialize(List[_models.AlertRuleResource], deserialized["value"])
1672+
list_of_elem = _deserialize(List[_models.AlertRuleResource], deserialized.get("value", []))
16731673
if cls:
16741674
list_of_elem = cls(list_of_elem) # type: ignore
16751675
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -1871,7 +1871,7 @@ def prepare_request(next_link=None):
18711871

18721872
async def extract_data(pipeline_response):
18731873
deserialized = pipeline_response.http_response.json()
1874-
list_of_elem = _deserialize(List[_models.HealthValidation], deserialized["value"])
1874+
list_of_elem = _deserialize(List[_models.HealthValidation], deserialized.get("value", []))
18751875
if cls:
18761876
list_of_elem = cls(list_of_elem) # type: ignore
18771877
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -2443,7 +2443,7 @@ def prepare_request(next_link=None):
24432443

24442444
async def extract_data(pipeline_response):
24452445
deserialized = pipeline_response.http_response.json()
2446-
list_of_elem = _deserialize(List[_models.Target], deserialized["value"])
2446+
list_of_elem = _deserialize(List[_models.Target], deserialized.get("value", []))
24472447
if cls:
24482448
list_of_elem = cls(list_of_elem) # type: ignore
24492449
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -2996,7 +2996,7 @@ def prepare_request(next_link=None):
29962996

29972997
async def extract_data(pipeline_response):
29982998
deserialized = pipeline_response.http_response.json()
2999-
list_of_elem = _deserialize(List[_models.SharedPrivateLinkResource], deserialized["value"])
2999+
list_of_elem = _deserialize(List[_models.SharedPrivateLinkResource], deserialized.get("value", []))
30003000
if cls:
30013001
list_of_elem = cls(list_of_elem) # type: ignore
30023002
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)

sdk/databasewatcher/azure-mgmt-databasewatcher/azure/mgmt/databasewatcher/aio/operations/_patch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize

0 commit comments

Comments
 (0)