Skip to content

Commit 7cd29c3

Browse files
author
SDKAuto
committed
CodeGen from PR 15205 in Azure/azure-rest-api-specs
Merge b6cf0319631b68f0bc73af00dbd2ac184dc1049f into e7682aa
1 parent cb05bec commit 7cd29c3

File tree

10 files changed

+77
-43
lines changed

10 files changed

+77
-43
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"autorest": "3.0.6369",
3-
"use": "@autorest/[email protected]",
4-
"commit": "58f2489b1dc4752b6470d45e30ed1bd2469741f3",
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "affc19e0aa7ecf6652d3b41e2da5225872fd6da2",
58
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6-
"autorest_command": "autorest specification/hanaonazure/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/python@5.6.2 --version=3.0.6369",
9+
"autorest_command": "autorest specification/hanaonazure/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/python@5.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
710
"readme": "specification/hanaonazure/resource-manager/readme.md"
811
}

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_hana_management_client.py

Lines changed: 19 additions & 0 deletions
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 HanaManagementClientConfiguration
2122
from .operations import Operations
@@ -66,6 +67,24 @@ def __init__(
6667
self.provider_instances = ProviderInstancesOperations(
6768
self._client, self._config, self._serialize, self._deserialize)
6869

70+
def _send_request(self, http_request, **kwargs):
71+
# type: (HttpRequest, Any) -> HttpResponse
72+
"""Runs the network request through the client's chained policies.
73+
74+
:param http_request: The network request you want to make. Required.
75+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
76+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
77+
:return: The response of your network call. Does not do error handling on your response.
78+
:rtype: ~azure.core.pipeline.transport.HttpResponse
79+
"""
80+
path_format_arguments = {
81+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
82+
}
83+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
84+
stream = kwargs.pop("stream", True)
85+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
86+
return pipeline_response.http_response
87+
6988
def close(self):
7089
# type: () -> None
7190
self._client.close()

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_metadata.json

Lines changed: 2 additions & 8 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\": [\"HanaManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
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\": [\"HanaManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
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\": [\"HanaManagementClientConfiguration\"]}}, \"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\": [\"HanaManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -101,11 +101,5 @@
101101
"operations": "Operations",
102102
"sap_monitors": "SapMonitorsOperations",
103103
"provider_instances": "ProviderInstancesOperations"
104-
},
105-
"operation_mixins": {
106-
"sync_imports": "None",
107-
"async_imports": "None",
108-
"operations": {
109-
}
110104
}
111105
}

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_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.0"
9+
VERSION = "1.0.0b1"

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/_hana_management_client.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -63,6 +64,23 @@ def __init__(
6364
self.provider_instances = ProviderInstancesOperations(
6465
self._client, self._config, self._serialize, self._deserialize)
6566

67+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
68+
"""Runs the network request through the client's chained policies.
69+
70+
:param http_request: The network request you want to make. Required.
71+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
72+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
73+
:return: The response of your network call. Does not do error handling on your response.
74+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
75+
"""
76+
path_format_arguments = {
77+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
78+
}
79+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
80+
stream = kwargs.pop("stream", True)
81+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
82+
return pipeline_response.http_response
83+
6684
async def close(self) -> None:
6785
await self._client.close()
6886

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4343

4444
def list(
4545
self,
46-
**kwargs
46+
**kwargs: Any
4747
) -> AsyncIterable["_models.OperationList"]:
4848
"""Gets a list of SAP HANA management operations.
4949

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/operations/_provider_instances_operations.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def list(
4747
self,
4848
resource_group_name: str,
4949
sap_monitor_name: str,
50-
**kwargs
50+
**kwargs: Any
5151
) -> AsyncIterable["_models.ProviderInstanceListResult"]:
5252
"""Gets a list of provider instances in the specified SAP monitor.
5353
@@ -126,7 +126,7 @@ async def get(
126126
resource_group_name: str,
127127
sap_monitor_name: str,
128128
provider_instance_name: str,
129-
**kwargs
129+
**kwargs: Any
130130
) -> "_models.ProviderInstance":
131131
"""Gets properties of a provider instance.
132132
@@ -193,7 +193,7 @@ async def _create_initial(
193193
sap_monitor_name: str,
194194
provider_instance_name: str,
195195
provider_instance_parameter: "_models.ProviderInstance",
196-
**kwargs
196+
**kwargs: Any
197197
) -> "_models.ProviderInstance":
198198
cls = kwargs.pop('cls', None) # type: ClsType["_models.ProviderInstance"]
199199
error_map = {
@@ -253,7 +253,7 @@ async def begin_create(
253253
sap_monitor_name: str,
254254
provider_instance_name: str,
255255
provider_instance_parameter: "_models.ProviderInstance",
256-
**kwargs
256+
**kwargs: Any
257257
) -> AsyncLROPoller["_models.ProviderInstance"]:
258258
"""Creates a provider instance.
259259
@@ -270,8 +270,8 @@ async def begin_create(
270270
:type provider_instance_parameter: ~azure.mgmt.hanaonazure.models.ProviderInstance
271271
:keyword callable cls: A custom type or function that will be passed the direct response
272272
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
273-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
274-
False for no polling, or your own initialized polling object for a personal polling strategy.
273+
:keyword polling: By default, your polling method will be AsyncARMPolling.
274+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
275275
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
276276
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
277277
:return: An instance of AsyncLROPoller that returns either ProviderInstance or the result of cls(response)
@@ -331,7 +331,7 @@ async def _delete_initial(
331331
resource_group_name: str,
332332
sap_monitor_name: str,
333333
provider_instance_name: str,
334-
**kwargs
334+
**kwargs: Any
335335
) -> None:
336336
cls = kwargs.pop('cls', None) # type: ClsType[None]
337337
error_map = {
@@ -378,7 +378,7 @@ async def begin_delete(
378378
resource_group_name: str,
379379
sap_monitor_name: str,
380380
provider_instance_name: str,
381-
**kwargs
381+
**kwargs: Any
382382
) -> AsyncLROPoller[None]:
383383
"""Deletes a provider instance.
384384
@@ -393,8 +393,8 @@ async def begin_delete(
393393
:type provider_instance_name: str
394394
:keyword callable cls: A custom type or function that will be passed the direct response
395395
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
396-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
397-
False for no polling, or your own initialized polling object for a personal polling strategy.
396+
:keyword polling: By default, your polling method will be AsyncARMPolling.
397+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
398398
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
399399
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
400400
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/aio/operations/_sap_monitors_operations.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4545

4646
def list(
4747
self,
48-
**kwargs
48+
**kwargs: Any
4949
) -> AsyncIterable["_models.SapMonitorListResult"]:
5050
"""Gets a list of SAP monitors in the specified subscription.
5151
@@ -117,7 +117,7 @@ async def get(
117117
self,
118118
resource_group_name: str,
119119
sap_monitor_name: str,
120-
**kwargs
120+
**kwargs: Any
121121
) -> "_models.SapMonitor":
122122
"""Gets properties of a SAP monitor.
123123
@@ -180,7 +180,7 @@ async def _create_initial(
180180
resource_group_name: str,
181181
sap_monitor_name: str,
182182
sap_monitor_parameter: "_models.SapMonitor",
183-
**kwargs
183+
**kwargs: Any
184184
) -> "_models.SapMonitor":
185185
cls = kwargs.pop('cls', None) # type: ClsType["_models.SapMonitor"]
186186
error_map = {
@@ -238,7 +238,7 @@ async def begin_create(
238238
resource_group_name: str,
239239
sap_monitor_name: str,
240240
sap_monitor_parameter: "_models.SapMonitor",
241-
**kwargs
241+
**kwargs: Any
242242
) -> AsyncLROPoller["_models.SapMonitor"]:
243243
"""Creates a SAP monitor.
244244
@@ -252,8 +252,8 @@ async def begin_create(
252252
:type sap_monitor_parameter: ~azure.mgmt.hanaonazure.models.SapMonitor
253253
:keyword callable cls: A custom type or function that will be passed the direct response
254254
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
255-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
256-
False for no polling, or your own initialized polling object for a personal polling strategy.
255+
:keyword polling: By default, your polling method will be AsyncARMPolling.
256+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
257257
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
258258
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
259259
:return: An instance of AsyncLROPoller that returns either SapMonitor or the result of cls(response)
@@ -310,7 +310,7 @@ async def _delete_initial(
310310
self,
311311
resource_group_name: str,
312312
sap_monitor_name: str,
313-
**kwargs
313+
**kwargs: Any
314314
) -> None:
315315
cls = kwargs.pop('cls', None) # type: ClsType[None]
316316
error_map = {
@@ -355,7 +355,7 @@ async def begin_delete(
355355
self,
356356
resource_group_name: str,
357357
sap_monitor_name: str,
358-
**kwargs
358+
**kwargs: Any
359359
) -> AsyncLROPoller[None]:
360360
"""Deletes a SAP monitor.
361361
@@ -367,8 +367,8 @@ async def begin_delete(
367367
:type sap_monitor_name: str
368368
:keyword callable cls: A custom type or function that will be passed the direct response
369369
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
370-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
371-
False for no polling, or your own initialized polling object for a personal polling strategy.
370+
:keyword polling: By default, your polling method will be AsyncARMPolling.
371+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
372372
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
373373
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
374374
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
@@ -422,7 +422,7 @@ async def update(
422422
resource_group_name: str,
423423
sap_monitor_name: str,
424424
tags_parameter: "_models.Tags",
425-
**kwargs
425+
**kwargs: Any
426426
) -> "_models.SapMonitor":
427427
"""Patches the Tags field of a SAP monitor.
428428

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_provider_instances_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ def begin_create(
278278
:type provider_instance_parameter: ~azure.mgmt.hanaonazure.models.ProviderInstance
279279
:keyword callable cls: A custom type or function that will be passed the direct response
280280
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
281-
:keyword polling: Pass in True if you'd like the ARMPolling polling method,
282-
False for no polling, or your own initialized polling object for a personal polling strategy.
281+
:keyword polling: By default, your polling method will be ARMPolling.
282+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
283283
:paramtype polling: bool or ~azure.core.polling.PollingMethod
284284
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
285285
:return: An instance of LROPoller that returns either ProviderInstance or the result of cls(response)
@@ -403,8 +403,8 @@ def begin_delete(
403403
:type provider_instance_name: str
404404
:keyword callable cls: A custom type or function that will be passed the direct response
405405
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
406-
:keyword polling: Pass in True if you'd like the ARMPolling polling method,
407-
False for no polling, or your own initialized polling object for a personal polling strategy.
406+
:keyword polling: By default, your polling method will be ARMPolling.
407+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
408408
:paramtype polling: bool or ~azure.core.polling.PollingMethod
409409
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
410410
:return: An instance of LROPoller that returns either None or the result of cls(response)

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/operations/_sap_monitors_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ def begin_create(
260260
:type sap_monitor_parameter: ~azure.mgmt.hanaonazure.models.SapMonitor
261261
:keyword callable cls: A custom type or function that will be passed the direct response
262262
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
263-
:keyword polling: Pass in True if you'd like the ARMPolling polling method,
264-
False for no polling, or your own initialized polling object for a personal polling strategy.
263+
:keyword polling: By default, your polling method will be ARMPolling.
264+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
265265
:paramtype polling: bool or ~azure.core.polling.PollingMethod
266266
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
267267
:return: An instance of LROPoller that returns either SapMonitor or the result of cls(response)
@@ -377,8 +377,8 @@ def begin_delete(
377377
:type sap_monitor_name: str
378378
:keyword callable cls: A custom type or function that will be passed the direct response
379379
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
380-
:keyword polling: Pass in True if you'd like the ARMPolling polling method,
381-
False for no polling, or your own initialized polling object for a personal polling strategy.
380+
:keyword polling: By default, your polling method will be ARMPolling.
381+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
382382
:paramtype polling: bool or ~azure.core.polling.PollingMethod
383383
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
384384
:return: An instance of LROPoller that returns either None or the result of cls(response)

0 commit comments

Comments
 (0)