Skip to content

Commit 433d116

Browse files
author
SDKAuto
committed
CodeGen from PR 22067 in Azure/azure-rest-api-specs
Merge 4694f6b82d0210249881a5109b2dbbd6d60dd078 into 3de956a007e6b8629617b8968409311253927947
1 parent cb8a936 commit 433d116

File tree

208 files changed

+2300
-1695
lines changed

Some content is hidden

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

208 files changed

+2300
-1695
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "d37b3db5ec88a9fc2afcae36bf8d2004b1c5b537",
2+
"commit": "9c70cfee55905a5b755a7b056c6fa12b2a16a7be",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/[email protected].0",
6+
"@autorest/[email protected].3",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/iothub/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].0 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/iothub/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].3 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/iothub/resource-manager/readme.md"
1111
}
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
6-
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
76
# --------------------------------------------------------------------------
87

9-
VERSION = "2.4.0b1"
8+
VERSION = "0.1.0"

sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/_iot_hub_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848
**kwargs: Any
4949
) -> None:
5050
self._config = IotHubClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
51-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
51+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
5252

5353
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
5454
self._serialize = Serializer(client_models)
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/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/_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.4.0b1"
9+
VERSION = "1.0.0b1"

sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/aio/_iot_hub_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(
4949
**kwargs: Any
5050
) -> None:
5151
self._config = IotHubClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
52-
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
52+
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
5353

5454
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
5555
self._serialize = Serializer(client_models)
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/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/aio/operations/_iot_hub_resource_operations.py

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any)
121121
request = _convert_request(request)
122122
request.url = self._client.format_url(request.url)
123123

124+
_stream = False
124125
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
125-
request, stream=False, **kwargs
126+
request, stream=_stream, **kwargs
126127
)
127128

128129
response = pipeline_response.http_response
@@ -188,8 +189,9 @@ async def _create_or_update_initial(
188189
request = _convert_request(request)
189190
request.url = self._client.format_url(request.url)
190191

192+
_stream = False
191193
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
192-
request, stream=False, **kwargs
194+
request, stream=_stream, **kwargs
193195
)
194196

195197
response = pipeline_response.http_response
@@ -415,8 +417,9 @@ async def _delete_initial(
415417
request = _convert_request(request)
416418
request.url = self._client.format_url(request.url)
417419

420+
_stream = False
418421
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
419-
request, stream=False, **kwargs
422+
request, stream=_stream, **kwargs
420423
)
421424

422425
response = pipeline_response.http_response
@@ -584,8 +587,9 @@ async def extract_data(pipeline_response):
584587
async def get_next(next_link=None):
585588
request = prepare_request(next_link)
586589

590+
_stream = False
587591
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
588-
request, stream=False, **kwargs
592+
request, stream=_stream, **kwargs
589593
)
590594
response = pipeline_response.http_response
591595

@@ -673,8 +677,9 @@ async def extract_data(pipeline_response):
673677
async def get_next(next_link=None):
674678
request = prepare_request(next_link)
675679

680+
_stream = False
676681
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
677-
request, stream=False, **kwargs
682+
request, stream=_stream, **kwargs
678683
)
679684
response = pipeline_response.http_response
680685

@@ -734,8 +739,9 @@ async def get_stats(
734739
request = _convert_request(request)
735740
request.url = self._client.format_url(request.url)
736741

742+
_stream = False
737743
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
738-
request, stream=False, **kwargs
744+
request, stream=_stream, **kwargs
739745
)
740746

741747
response = pipeline_response.http_response
@@ -832,8 +838,9 @@ async def extract_data(pipeline_response):
832838
async def get_next(next_link=None):
833839
request = prepare_request(next_link)
834840

841+
_stream = False
835842
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
836-
request, stream=False, **kwargs
843+
request, stream=_stream, **kwargs
837844
)
838845
response = pipeline_response.http_response
839846

@@ -929,8 +936,9 @@ async def extract_data(pipeline_response):
929936
async def get_next(next_link=None):
930937
request = prepare_request(next_link)
931938

939+
_stream = False
932940
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
933-
request, stream=False, **kwargs
941+
request, stream=_stream, **kwargs
934942
)
935943
response = pipeline_response.http_response
936944

@@ -997,8 +1005,9 @@ async def get_event_hub_consumer_group(
9971005
request = _convert_request(request)
9981006
request.url = self._client.format_url(request.url)
9991007

1008+
_stream = False
10001009
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1001-
request, stream=False, **kwargs
1010+
request, stream=_stream, **kwargs
10021011
)
10031012

10041013
response = pipeline_response.http_response
@@ -1069,8 +1078,9 @@ async def create_event_hub_consumer_group(
10691078
request = _convert_request(request)
10701079
request.url = self._client.format_url(request.url)
10711080

1081+
_stream = False
10721082
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1073-
request, stream=False, **kwargs
1083+
request, stream=_stream, **kwargs
10741084
)
10751085

10761086
response = pipeline_response.http_response
@@ -1141,8 +1151,9 @@ async def delete_event_hub_consumer_group( # pylint: disable=inconsistent-retur
11411151
request = _convert_request(request)
11421152
request.url = self._client.format_url(request.url)
11431153

1154+
_stream = False
11441155
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1145-
request, stream=False, **kwargs
1156+
request, stream=_stream, **kwargs
11461157
)
11471158

11481159
response = pipeline_response.http_response
@@ -1236,8 +1247,9 @@ async def extract_data(pipeline_response):
12361247
async def get_next(next_link=None):
12371248
request = prepare_request(next_link)
12381249

1250+
_stream = False
12391251
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1240-
request, stream=False, **kwargs
1252+
request, stream=_stream, **kwargs
12411253
)
12421254
response = pipeline_response.http_response
12431255

@@ -1302,8 +1314,9 @@ async def get_job(
13021314
request = _convert_request(request)
13031315
request.url = self._client.format_url(request.url)
13041316

1317+
_stream = False
13051318
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1306-
request, stream=False, **kwargs
1319+
request, stream=_stream, **kwargs
13071320
)
13081321

13091322
response = pipeline_response.http_response
@@ -1400,8 +1413,9 @@ async def extract_data(pipeline_response):
14001413
async def get_next(next_link=None):
14011414
request = prepare_request(next_link)
14021415

1416+
_stream = False
14031417
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1404-
request, stream=False, **kwargs
1418+
request, stream=_stream, **kwargs
14051419
)
14061420
response = pipeline_response.http_response
14071421

@@ -1513,8 +1527,9 @@ async def check_name_availability(
15131527
request = _convert_request(request)
15141528
request.url = self._client.format_url(request.url)
15151529

1530+
_stream = False
15161531
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1517-
request, stream=False, **kwargs
1532+
request, stream=_stream, **kwargs
15181533
)
15191534

15201535
response = pipeline_response.http_response
@@ -1613,8 +1628,9 @@ async def extract_data(pipeline_response):
16131628
async def get_next(next_link=None):
16141629
request = prepare_request(next_link)
16151630

1631+
_stream = False
16161632
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1617-
request, stream=False, **kwargs
1633+
request, stream=_stream, **kwargs
16181634
)
16191635
response = pipeline_response.http_response
16201636

@@ -1679,8 +1695,9 @@ async def get_keys_for_key_name(
16791695
request = _convert_request(request)
16801696
request.url = self._client.format_url(request.url)
16811697

1698+
_stream = False
16821699
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1683-
request, stream=False, **kwargs
1700+
request, stream=_stream, **kwargs
16841701
)
16851702

16861703
response = pipeline_response.http_response
@@ -1839,8 +1856,9 @@ async def export_devices(
18391856
request = _convert_request(request)
18401857
request.url = self._client.format_url(request.url)
18411858

1859+
_stream = False
18421860
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1843-
request, stream=False, **kwargs
1861+
request, stream=_stream, **kwargs
18441862
)
18451863

18461864
response = pipeline_response.http_response
@@ -1999,8 +2017,9 @@ async def import_devices(
19992017
request = _convert_request(request)
20002018
request.url = self._client.format_url(request.url)
20012019

2020+
_stream = False
20022021
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
2003-
request, stream=False, **kwargs
2022+
request, stream=_stream, **kwargs
20042023
)
20052024

20062025
response = pipeline_response.http_response

0 commit comments

Comments
 (0)