Skip to content

Commit cd0058e

Browse files
author
SDKAuto
committed
CodeGen from PR 18743 in Azure/azure-rest-api-specs
Merge 8827e4e3f3ce528c8c690761b01fc561e96600c7 into 6f0c7d58c0a923917c2b3467ee756f21dbd2f8e2
1 parent 8c49f9a commit cd0058e

File tree

335 files changed

+29783
-16352
lines changed

Some content is hidden

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

335 files changed

+29783
-16352
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.12.0",
4+
"@autorest/python@5.16.0",
55
"@autorest/[email protected]"
66
],
7-
"commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb",
7+
"commit": "234e79c235f2bfdf9d97f0a8f8ed44b3ac8dda50",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/iothub/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/[email protected] --version=3.7.2",
9+
"autorest_command": "autorest specification/iothub/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/[email protected] --version=3.7.2",
1010
"readme": "specification/iothub/resource-manager/readme.md"
1111
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
from typing import TYPE_CHECKING
1313

14+
from msrest import Deserializer, Serializer
15+
1416
from azure.mgmt.core import ARMPipelineClient
1517
from azure.profiles import KnownProfiles, ProfileDefinition
1618
from azure.profiles.multiapiclient import MultiApiClientMixin
17-
from msrest import Deserializer, Serializer
1819

1920
from ._configuration import IotHubClientConfiguration
2021

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
from typing import Any, Optional, TYPE_CHECKING
1313

14+
from msrest import Deserializer, Serializer
15+
1416
from azure.mgmt.core import AsyncARMPipelineClient
1517
from azure.profiles import KnownProfiles, ProfileDefinition
1618
from azure.profiles.multiapiclient import MultiApiClientMixin
17-
from msrest import Deserializer, Serializer
1819

1920
from ._configuration import IotHubClientConfiguration
2021

sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/__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__ = ['IotHubClient']
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/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/_configuration.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from azure.core.credentials import TokenCredential
2020

2121

22-
class IotHubClientConfiguration(Configuration):
22+
class IotHubClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for IotHubClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
@@ -29,6 +29,9 @@ class IotHubClientConfiguration(Configuration):
2929
:type credential: ~azure.core.credentials.TokenCredential
3030
:param subscription_id: The subscription identifier.
3131
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2016-02-03". Note that overriding this
33+
default value may result in unsupported behavior.
34+
:paramtype api_version: str
3235
"""
3336

3437
def __init__(
@@ -38,14 +41,16 @@ def __init__(
3841
**kwargs: Any
3942
) -> None:
4043
super(IotHubClientConfiguration, self).__init__(**kwargs)
44+
api_version = kwargs.pop('api_version', "2016-02-03") # type: str
45+
4146
if credential is None:
4247
raise ValueError("Parameter 'credential' must not be None.")
4348
if subscription_id is None:
4449
raise ValueError("Parameter 'subscription_id' must not be None.")
4550

4651
self.credential = credential
4752
self.subscription_id = subscription_id
48-
self.api_version = "2016-02-03"
53+
self.api_version = api_version
4954
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5055
kwargs.setdefault('sdk_moniker', 'mgmt-iothub/{}'.format(VERSION))
5156
self._configure(**kwargs)

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Optional, TYPE_CHECKING
10+
from typing import Any, TYPE_CHECKING
11+
12+
from msrest import Deserializer, Serializer
1113

1214
from azure.core.rest import HttpRequest, HttpResponse
1315
from azure.mgmt.core import ARMPipelineClient
14-
from msrest import Deserializer, Serializer
1516

1617
from . import models
1718
from ._configuration import IotHubClientConfiguration
@@ -30,8 +31,11 @@ class IotHubClient:
3031
:type credential: ~azure.core.credentials.TokenCredential
3132
:param subscription_id: The subscription identifier.
3233
:type subscription_id: str
33-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
34+
:param base_url: Service URL. Default value is "https://management.azure.com".
3435
:type base_url: str
36+
:keyword api_version: Api Version. Default value is "2016-02-03". Note that overriding this
37+
default value may result in unsupported behavior.
38+
:paramtype api_version: str
3539
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
3640
Retry-After header is present.
3741
"""
@@ -50,12 +54,14 @@ def __init__(
5054
self._serialize = Serializer(client_models)
5155
self._deserialize = Deserializer(client_models)
5256
self._serialize.client_side_validation = False
53-
self.iot_hub_resource = IotHubResourceOperations(self._client, self._config, self._serialize, self._deserialize)
57+
self.iot_hub_resource = IotHubResourceOperations(
58+
self._client, self._config, self._serialize, self._deserialize
59+
)
5460

5561

5662
def _send_request(
5763
self,
58-
request, # type: HttpRequest
64+
request: HttpRequest,
5965
**kwargs: Any
6066
) -> HttpResponse:
6167
"""Runs the network request through the client's chained policies.

sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/_metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"client_side_validation": false,
13-
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"IotHubClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14-
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"IotHubClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"IotHubClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"IotHubClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {

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.2.0"
9+
VERSION = "1.0.0b1"

sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/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 ._iot_hub_client import IotHubClient
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__ = ['IotHubClient']
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/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/aio/_configuration.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from azure.core.credentials_async import AsyncTokenCredential
2020

2121

22-
class IotHubClientConfiguration(Configuration):
22+
class IotHubClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for IotHubClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
@@ -29,6 +29,9 @@ class IotHubClientConfiguration(Configuration):
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3030
:param subscription_id: The subscription identifier.
3131
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2016-02-03". Note that overriding this
33+
default value may result in unsupported behavior.
34+
:paramtype api_version: str
3235
"""
3336

3437
def __init__(
@@ -38,14 +41,16 @@ def __init__(
3841
**kwargs: Any
3942
) -> None:
4043
super(IotHubClientConfiguration, self).__init__(**kwargs)
44+
api_version = kwargs.pop('api_version', "2016-02-03") # type: str
45+
4146
if credential is None:
4247
raise ValueError("Parameter 'credential' must not be None.")
4348
if subscription_id is None:
4449
raise ValueError("Parameter 'subscription_id' must not be None.")
4550

4651
self.credential = credential
4752
self.subscription_id = subscription_id
48-
self.api_version = "2016-02-03"
53+
self.api_version = api_version
4954
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5055
kwargs.setdefault('sdk_moniker', 'mgmt-iothub/{}'.format(VERSION))
5156
self._configure(**kwargs)

0 commit comments

Comments
 (0)