Skip to content

Commit 4151e0d

Browse files
author
SDKAuto
committed
CodeGen from PR 25320 in Azure/azure-rest-api-specs
Merge 76beafbe96c121f2560e476036650eeb889a21a5 into 895c9c994480fb8e9d34b0d1973d57717ab0c979
1 parent 1782484 commit 4151e0d

File tree

314 files changed

+19945
-4431
lines changed

Some content is hidden

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

314 files changed

+19945
-4431
lines changed
Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
{
2-
"commit": "396209531039d3e211cb1ec0982606dbbdf64ac2",
2+
"commit": "bcddb87efe7168f472d73482e1185881857be47e",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.9.7",
55
"use": [
6-
"@autorest/python@6.4.3",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.7.1",
7+
"@autorest/modelerfour@4.26.2"
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/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
10-
"readme": "specification/iothub/resource-manager/readme.md"
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/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
10+
"readme": "specification/iothub/resource-manager/readme.md",
11+
"package-preview-2023-06": "2023-08-14 22:58:07 -0700 d99f18b18405cd446f7abc2c9e6b3884f5c549f8 Microsoft.Devices/preview/2023-06-30-preview/iothub.json",
12+
"package-preview-2022-11": "2023-03-14 21:37:19 -0700 7e5861ad01a796a72617080e89e42f428e66242e Microsoft.Devices/preview/2022-11-15-preview/iothub.json",
13+
"package-preview-2022-04-30": "2022-08-09 20:31:29 -0700 1f75c8b5d3f55387d6e07e7f2f879a88f529180d Microsoft.Devices/preview/2022-04-30-preview/iothub.json",
14+
"package-2021-07-02": "2023-01-27 19:16:47 -0800 0b0f8d5b088da606ffbb8b2828dc366982f106e5 Microsoft.Devices/stable/2021-07-02/iothub.json",
15+
"package-2021-07": "2023-01-27 19:16:47 -0800 0b0f8d5b088da606ffbb8b2828dc366982f106e5 Microsoft.Devices/stable/2021-07-02/iothub.json",
16+
"package-2021-03": "2021-05-07 19:43:30 -0700 4b7dca50a9a7559865803927a87a06ad0d73ff06 Microsoft.Devices/stable/2021-03-31/iothub.json",
17+
"package-preview-2021-03": "2021-04-05 22:04:32 -0700 2331a635ead0549b8c0f3891bf9bf2e5e5ad76bc Microsoft.Devices/preview/2021-03-03-preview/iothub.json",
18+
"package-2020-03": "2021-05-05 01:19:33 -0700 8c76ee1ab76c977e1bdd4abc5369704684576111 Microsoft.Devices/stable/2020-03-01/iothub.json",
19+
"package-2019-11": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2019-11-04/iothub.json",
20+
"package-preview-2019-07": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/preview/2019-07-01-preview/iothub.json",
21+
"package-2019-03": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2019-03-22/iothub.json",
22+
"package-2018-04": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2018-04-01/iothub.json",
23+
"package-2018-01": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2018-01-22/iothub.json",
24+
"package-2017-07": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2017-07-01/iothub.json",
25+
"package-2017-01": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2017-01-19/iothub.json",
26+
"package-2016-02": "2021-04-27 02:22:18 -0700 8873dabb56a800c037ca56beab11dd5a9ed988ad Microsoft.Devices/stable/2016-02-03/iothub.json"
1127
}

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

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def __init__(
7171
profile: KnownProfiles=KnownProfiles.default,
7272
**kwargs: Any
7373
):
74+
if api_version:
75+
kwargs.setdefault('api_version', api_version)
7476
self._config = IotHubClientConfiguration(credential, subscription_id, **kwargs)
7577
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
7678
super(IotHubClient, self).__init__(
@@ -101,6 +103,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
101103
* 2021-07-02: :mod:`v2021_07_02.models<azure.mgmt.iothub.v2021_07_02.models>`
102104
* 2022-04-30-preview: :mod:`v2022_04_30_preview.models<azure.mgmt.iothub.v2022_04_30_preview.models>`
103105
* 2022-11-15-preview: :mod:`v2022_11_15_preview.models<azure.mgmt.iothub.v2022_11_15_preview.models>`
106+
* 2023-06-30-preview: :mod:`v2023_06_30_preview.models<azure.mgmt.iothub.v2023_06_30_preview.models>`
104107
"""
105108
if api_version == '2016-02-03':
106109
from .v2016_02_03 import models
@@ -147,6 +150,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
147150
elif api_version == '2022-11-15-preview':
148151
from .v2022_11_15_preview import models
149152
return models
153+
elif api_version == '2023-06-30-preview':
154+
from .v2023_06_30_preview import models
155+
return models
150156
raise ValueError("API version {} is not available".format(api_version))
151157

152158
@property
@@ -166,6 +172,7 @@ def certificates(self):
166172
* 2021-07-02: :class:`CertificatesOperations<azure.mgmt.iothub.v2021_07_02.operations.CertificatesOperations>`
167173
* 2022-04-30-preview: :class:`CertificatesOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.CertificatesOperations>`
168174
* 2022-11-15-preview: :class:`CertificatesOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.CertificatesOperations>`
175+
* 2023-06-30-preview: :class:`CertificatesOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.CertificatesOperations>`
169176
"""
170177
api_version = self._get_api_version('certificates')
171178
if api_version == '2017-07-01':
@@ -194,10 +201,12 @@ def certificates(self):
194201
from .v2022_04_30_preview.operations import CertificatesOperations as OperationClass
195202
elif api_version == '2022-11-15-preview':
196203
from .v2022_11_15_preview.operations import CertificatesOperations as OperationClass
204+
elif api_version == '2023-06-30-preview':
205+
from .v2023_06_30_preview.operations import CertificatesOperations as OperationClass
197206
else:
198207
raise ValueError("API version {} does not have operation group 'certificates'".format(api_version))
199208
self._config.api_version = api_version
200-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
209+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
201210

202211
@property
203212
def iot_hub(self):
@@ -213,6 +222,7 @@ def iot_hub(self):
213222
* 2021-07-02: :class:`IotHubOperations<azure.mgmt.iothub.v2021_07_02.operations.IotHubOperations>`
214223
* 2022-04-30-preview: :class:`IotHubOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.IotHubOperations>`
215224
* 2022-11-15-preview: :class:`IotHubOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.IotHubOperations>`
225+
* 2023-06-30-preview: :class:`IotHubOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.IotHubOperations>`
216226
"""
217227
api_version = self._get_api_version('iot_hub')
218228
if api_version == '2019-03-22':
@@ -235,10 +245,12 @@ def iot_hub(self):
235245
from .v2022_04_30_preview.operations import IotHubOperations as OperationClass
236246
elif api_version == '2022-11-15-preview':
237247
from .v2022_11_15_preview.operations import IotHubOperations as OperationClass
248+
elif api_version == '2023-06-30-preview':
249+
from .v2023_06_30_preview.operations import IotHubOperations as OperationClass
238250
else:
239251
raise ValueError("API version {} does not have operation group 'iot_hub'".format(api_version))
240252
self._config.api_version = api_version
241-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
253+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
242254

243255
@property
244256
def iot_hub_resource(self):
@@ -259,6 +271,7 @@ def iot_hub_resource(self):
259271
* 2021-07-02: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2021_07_02.operations.IotHubResourceOperations>`
260272
* 2022-04-30-preview: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.IotHubResourceOperations>`
261273
* 2022-11-15-preview: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.IotHubResourceOperations>`
274+
* 2023-06-30-preview: :class:`IotHubResourceOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.IotHubResourceOperations>`
262275
"""
263276
api_version = self._get_api_version('iot_hub_resource')
264277
if api_version == '2016-02-03':
@@ -291,10 +304,12 @@ def iot_hub_resource(self):
291304
from .v2022_04_30_preview.operations import IotHubResourceOperations as OperationClass
292305
elif api_version == '2022-11-15-preview':
293306
from .v2022_11_15_preview.operations import IotHubResourceOperations as OperationClass
307+
elif api_version == '2023-06-30-preview':
308+
from .v2023_06_30_preview.operations import IotHubResourceOperations as OperationClass
294309
else:
295310
raise ValueError("API version {} does not have operation group 'iot_hub_resource'".format(api_version))
296311
self._config.api_version = api_version
297-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
312+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
298313

299314
@property
300315
def operations(self):
@@ -313,6 +328,7 @@ def operations(self):
313328
* 2021-07-02: :class:`Operations<azure.mgmt.iothub.v2021_07_02.operations.Operations>`
314329
* 2022-04-30-preview: :class:`Operations<azure.mgmt.iothub.v2022_04_30_preview.operations.Operations>`
315330
* 2022-11-15-preview: :class:`Operations<azure.mgmt.iothub.v2022_11_15_preview.operations.Operations>`
331+
* 2023-06-30-preview: :class:`Operations<azure.mgmt.iothub.v2023_06_30_preview.operations.Operations>`
316332
"""
317333
api_version = self._get_api_version('operations')
318334
if api_version == '2017-07-01':
@@ -341,10 +357,12 @@ def operations(self):
341357
from .v2022_04_30_preview.operations import Operations as OperationClass
342358
elif api_version == '2022-11-15-preview':
343359
from .v2022_11_15_preview.operations import Operations as OperationClass
360+
elif api_version == '2023-06-30-preview':
361+
from .v2023_06_30_preview.operations import Operations as OperationClass
344362
else:
345363
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
346364
self._config.api_version = api_version
347-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
365+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
348366

349367
@property
350368
def private_endpoint_connections(self):
@@ -357,6 +375,7 @@ def private_endpoint_connections(self):
357375
* 2021-07-02: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2021_07_02.operations.PrivateEndpointConnectionsOperations>`
358376
* 2022-04-30-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.PrivateEndpointConnectionsOperations>`
359377
* 2022-11-15-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.PrivateEndpointConnectionsOperations>`
378+
* 2023-06-30-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.PrivateEndpointConnectionsOperations>`
360379
"""
361380
api_version = self._get_api_version('private_endpoint_connections')
362381
if api_version == '2020-03-01':
@@ -373,10 +392,12 @@ def private_endpoint_connections(self):
373392
from .v2022_04_30_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
374393
elif api_version == '2022-11-15-preview':
375394
from .v2022_11_15_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
395+
elif api_version == '2023-06-30-preview':
396+
from .v2023_06_30_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
376397
else:
377398
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
378399
self._config.api_version = api_version
379-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
400+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
380401

381402
@property
382403
def private_link_resources(self):
@@ -389,6 +410,7 @@ def private_link_resources(self):
389410
* 2021-07-02: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2021_07_02.operations.PrivateLinkResourcesOperations>`
390411
* 2022-04-30-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.PrivateLinkResourcesOperations>`
391412
* 2022-11-15-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.PrivateLinkResourcesOperations>`
413+
* 2023-06-30-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.PrivateLinkResourcesOperations>`
392414
"""
393415
api_version = self._get_api_version('private_link_resources')
394416
if api_version == '2020-03-01':
@@ -405,10 +427,12 @@ def private_link_resources(self):
405427
from .v2022_04_30_preview.operations import PrivateLinkResourcesOperations as OperationClass
406428
elif api_version == '2022-11-15-preview':
407429
from .v2022_11_15_preview.operations import PrivateLinkResourcesOperations as OperationClass
430+
elif api_version == '2023-06-30-preview':
431+
from .v2023_06_30_preview.operations import PrivateLinkResourcesOperations as OperationClass
408432
else:
409433
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
410434
self._config.api_version = api_version
411-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
435+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
412436

413437
@property
414438
def resource_provider_common(self):
@@ -425,6 +449,7 @@ def resource_provider_common(self):
425449
* 2021-07-02: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2021_07_02.operations.ResourceProviderCommonOperations>`
426450
* 2022-04-30-preview: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2022_04_30_preview.operations.ResourceProviderCommonOperations>`
427451
* 2022-11-15-preview: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2022_11_15_preview.operations.ResourceProviderCommonOperations>`
452+
* 2023-06-30-preview: :class:`ResourceProviderCommonOperations<azure.mgmt.iothub.v2023_06_30_preview.operations.ResourceProviderCommonOperations>`
428453
"""
429454
api_version = self._get_api_version('resource_provider_common')
430455
if api_version == '2018-04-01':
@@ -449,10 +474,12 @@ def resource_provider_common(self):
449474
from .v2022_04_30_preview.operations import ResourceProviderCommonOperations as OperationClass
450475
elif api_version == '2022-11-15-preview':
451476
from .v2022_11_15_preview.operations import ResourceProviderCommonOperations as OperationClass
477+
elif api_version == '2023-06-30-preview':
478+
from .v2023_06_30_preview.operations import ResourceProviderCommonOperations as OperationClass
452479
else:
453480
raise ValueError("API version {} does not have operation group 'resource_provider_common'".format(api_version))
454481
self._config.api_version = api_version
455-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
482+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version)
456483

457484
def close(self):
458485
self._client.close()

0 commit comments

Comments
 (0)