Skip to content

Commit 6129b8f

Browse files
author
SDKAuto
committed
CodeGen from PR 14349 in Azure/azure-rest-api-specs
iothub readme config (Azure#14349)
1 parent 6aa6fe4 commit 6129b8f

File tree

196 files changed

+43188
-2675
lines changed

Some content is hidden

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

196 files changed

+43188
-2675
lines changed

sdk/iothub/azure-mgmt-iothub/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "3.3.0",
3+
"use": "@autorest/[email protected]",
4+
"commit": "495e6fd12856cf3d909125b1119c83a3a9f18a8a",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"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 --track2 --use=@autorest/[email protected] --version=3.3.0",
7+
"readme": "specification/iothub/resource-manager/readme.md"
8+
}

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import Any
11+
from typing import TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
1515
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1616

1717
from ._version import VERSION
1818

19+
if TYPE_CHECKING:
20+
# pylint: disable=unused-import,ungrouped-imports
21+
from typing import Any
22+
23+
from azure.core.credentials import TokenCredential
1924

2025
class IotHubClientConfiguration(Configuration):
2126
"""Configuration for IotHubClient.

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

Lines changed: 88 additions & 9 deletions
Large diffs are not rendered by default.

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import Any
11+
from typing import Any, TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
1515
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1616

1717
from .._version import VERSION
1818

19+
if TYPE_CHECKING:
20+
# pylint: disable=unused-import,ungrouped-imports
21+
from azure.core.credentials_async import AsyncTokenCredential
1922

2023
class IotHubClientConfiguration(Configuration):
2124
"""Configuration for IotHubClient.
@@ -31,8 +34,8 @@ class IotHubClientConfiguration(Configuration):
3134

3235
def __init__(
3336
self,
34-
credential, # type: "AsyncTokenCredential"
35-
subscription_id, # type: str
37+
credential: "AsyncTokenCredential",
38+
subscription_id: str,
3639
**kwargs # type: Any
3740
) -> None:
3841
if credential is None:

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

Lines changed: 88 additions & 11 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Licensed under the MIT License. See License.txt in the project root for
55
# license information.
66
# --------------------------------------------------------------------------
7-
from .v2020_03_01.models import *
7+
from .v2021_03_31.models import *

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import IotHubClientConfiguration
2122
from .operations import IotHubResourceOperations
@@ -26,7 +27,7 @@ class IotHubClient(object):
2627
"""Use this API to manage the IoT hubs in your Azure subscription.
2728
2829
:ivar iot_hub_resource: IotHubResourceOperations operations
29-
:vartype iot_hub_resource: azure.mgmt.iothub.operations.IotHubResourceOperations
30+
:vartype iot_hub_resource: azure.mgmt.iothub.v2016_02_03.operations.IotHubResourceOperations
3031
:param credential: Credential needed for the client to connect to Azure.
3132
:type credential: ~azure.core.credentials.TokenCredential
3233
:param subscription_id: The subscription identifier.
@@ -56,6 +57,24 @@ def __init__(
5657
self.iot_hub_resource = IotHubResourceOperations(
5758
self._client, self._config, self._serialize, self._deserialize)
5859

60+
def _send_request(self, http_request, **kwargs):
61+
# type: (HttpRequest, Any) -> HttpResponse
62+
"""Runs the network request through the client's chained policies.
63+
64+
:param http_request: The network request you want to make. Required.
65+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
66+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
67+
:return: The response of your network call. Does not do error handling on your response.
68+
:rtype: ~azure.core.pipeline.transport.HttpResponse
69+
"""
70+
path_format_arguments = {
71+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
72+
}
73+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
74+
stream = kwargs.pop("stream", True)
75+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
76+
return pipeline_response.http_response
77+
5978
def close(self):
6079
# type: () -> None
6180
self._client.close()

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

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"custom_base_url": null,
1010
"azure_arm": true,
1111
"has_lro_operations": true,
12-
"client_side_validation": false
12+
"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\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"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\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1315
},
1416
"global_parameters": {
1517
"sync": {
@@ -28,34 +30,74 @@
2830
},
2931
"async": {
3032
"credential": {
31-
"signature": "credential, # type: \"AsyncTokenCredential\"",
33+
"signature": "credential: \"AsyncTokenCredential\",",
3234
"description": "Credential needed for the client to connect to Azure.",
3335
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
3436
"required": true
3537
},
3638
"subscription_id": {
37-
"signature": "subscription_id, # type: str",
39+
"signature": "subscription_id: str,",
3840
"description": "The subscription identifier.",
3941
"docstring_type": "str",
4042
"required": true
4143
}
4244
},
4345
"constant": {
4446
},
45-
"call": "credential, subscription_id"
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
4690
},
4791
"config": {
4892
"credential": true,
4993
"credential_scopes": ["https://management.azure.com/.default"],
5094
"credential_default_policy_type": "BearerTokenCredentialPolicy",
5195
"credential_default_policy_type_has_async_version": true,
52-
"credential_key_header_name": null
96+
"credential_key_header_name": null,
97+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
98+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
5399
},
54100
"operation_groups": {
55101
"iot_hub_resource": "IotHubResourceOperations"
56-
},
57-
"operation_mixins": {
58-
},
59-
"sync_imports": "None",
60-
"async_imports": "None"
102+
}
61103
}

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

0 commit comments

Comments
 (0)