Skip to content

Commit cec80b1

Browse files
author
SDKAuto
committed
CodeGen from PR 16207 in Azure/azure-rest-api-specs
Merge b1a793fd9dd9b427efd4297ff926c7a0cc9c3a53 into 0e16aa6
1 parent b9211fb commit cec80b1

32 files changed

+602
-120
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/python@5.6.2",
4-
"commit": "36084f10aacb98d77af2f67c9d57fca2bbe68e97",
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/python@5.8.4",
5+
"@autorest/modelerfour@4.19.2"
6+
],
7+
"commit": "678d5a1994e1c1f888abd26b26f9cefc4b706ec3",
58
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6-
"autorest_command": "autorest specification/datashare/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/datashare/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/modelerfour@4.19.2 --version=3.4.5",
710
"readme": "specification/datashare/resource-manager/readme.md"
811
}

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
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 DataShareManagementClientConfiguration
2122
from .operations import AccountsOperations
2223
from .operations import ConsumerInvitationsOperations
2324
from .operations import DataSetsOperations
2425
from .operations import DataSetMappingsOperations
26+
from .operations import EmailRegistrationsOperations
2527
from .operations import InvitationsOperations
2628
from .operations import Operations
2729
from .operations import SharesOperations
@@ -44,6 +46,8 @@ class DataShareManagementClient(object):
4446
:vartype data_sets: azure.mgmt.datashare.operations.DataSetsOperations
4547
:ivar data_set_mappings: DataSetMappingsOperations operations
4648
:vartype data_set_mappings: azure.mgmt.datashare.operations.DataSetMappingsOperations
49+
:ivar email_registrations: EmailRegistrationsOperations operations
50+
:vartype email_registrations: azure.mgmt.datashare.operations.EmailRegistrationsOperations
4751
:ivar invitations: InvitationsOperations operations
4852
:vartype invitations: azure.mgmt.datashare.operations.InvitationsOperations
4953
:ivar operations: Operations operations
@@ -94,6 +98,8 @@ def __init__(
9498
self._client, self._config, self._serialize, self._deserialize)
9599
self.data_set_mappings = DataSetMappingsOperations(
96100
self._client, self._config, self._serialize, self._deserialize)
101+
self.email_registrations = EmailRegistrationsOperations(
102+
self._client, self._config, self._serialize, self._deserialize)
97103
self.invitations = InvitationsOperations(
98104
self._client, self._config, self._serialize, self._deserialize)
99105
self.operations = Operations(
@@ -111,6 +117,24 @@ def __init__(
111117
self.triggers = TriggersOperations(
112118
self._client, self._config, self._serialize, self._deserialize)
113119

120+
def _send_request(self, http_request, **kwargs):
121+
# type: (HttpRequest, Any) -> HttpResponse
122+
"""Runs the network request through the client's chained policies.
123+
124+
:param http_request: The network request you want to make. Required.
125+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
126+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
127+
:return: The response of your network call. Does not do error handling on your response.
128+
:rtype: ~azure.core.pipeline.transport.HttpResponse
129+
"""
130+
path_format_arguments = {
131+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
132+
}
133+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
134+
stream = kwargs.pop("stream", True)
135+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
136+
return pipeline_response.http_response
137+
114138
def close(self):
115139
# type: () -> None
116140
self._client.close()

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

Lines changed: 3 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\": [\"DataShareManagementClientConfiguration\"]}}, \"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\": [\"DataShareManagementClientConfiguration\"]}}, \"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\": [\"DataShareManagementClientConfiguration\"]}}, \"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\": [\"DataShareManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -102,6 +102,7 @@
102102
"consumer_invitations": "ConsumerInvitationsOperations",
103103
"data_sets": "DataSetsOperations",
104104
"data_set_mappings": "DataSetMappingsOperations",
105+
"email_registrations": "EmailRegistrationsOperations",
105106
"invitations": "InvitationsOperations",
106107
"operations": "Operations",
107108
"shares": "SharesOperations",
@@ -110,11 +111,5 @@
110111
"consumer_source_data_sets": "ConsumerSourceDataSetsOperations",
111112
"synchronization_settings": "SynchronizationSettingsOperations",
112113
"triggers": "TriggersOperations"
113-
},
114-
"operation_mixins": {
115-
"sync_imports": "None",
116-
"async_imports": "None",
117-
"operations": {
118-
}
119114
}
120115
}

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_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/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/_data_share_management_client.py

Lines changed: 23 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

@@ -20,6 +21,7 @@
2021
from .operations import ConsumerInvitationsOperations
2122
from .operations import DataSetsOperations
2223
from .operations import DataSetMappingsOperations
24+
from .operations import EmailRegistrationsOperations
2325
from .operations import InvitationsOperations
2426
from .operations import Operations
2527
from .operations import SharesOperations
@@ -42,6 +44,8 @@ class DataShareManagementClient(object):
4244
:vartype data_sets: azure.mgmt.datashare.aio.operations.DataSetsOperations
4345
:ivar data_set_mappings: DataSetMappingsOperations operations
4446
:vartype data_set_mappings: azure.mgmt.datashare.aio.operations.DataSetMappingsOperations
47+
:ivar email_registrations: EmailRegistrationsOperations operations
48+
:vartype email_registrations: azure.mgmt.datashare.aio.operations.EmailRegistrationsOperations
4549
:ivar invitations: InvitationsOperations operations
4650
:vartype invitations: azure.mgmt.datashare.aio.operations.InvitationsOperations
4751
:ivar operations: Operations operations
@@ -91,6 +95,8 @@ def __init__(
9195
self._client, self._config, self._serialize, self._deserialize)
9296
self.data_set_mappings = DataSetMappingsOperations(
9397
self._client, self._config, self._serialize, self._deserialize)
98+
self.email_registrations = EmailRegistrationsOperations(
99+
self._client, self._config, self._serialize, self._deserialize)
94100
self.invitations = InvitationsOperations(
95101
self._client, self._config, self._serialize, self._deserialize)
96102
self.operations = Operations(
@@ -108,6 +114,23 @@ def __init__(
108114
self.triggers = TriggersOperations(
109115
self._client, self._config, self._serialize, self._deserialize)
110116

117+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
118+
"""Runs the network request through the client's chained policies.
119+
120+
:param http_request: The network request you want to make. Required.
121+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
122+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
123+
:return: The response of your network call. Does not do error handling on your response.
124+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
125+
"""
126+
path_format_arguments = {
127+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
128+
}
129+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
130+
stream = kwargs.pop("stream", True)
131+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
132+
return pipeline_response.http_response
133+
111134
async def close(self) -> None:
112135
await self._client.close()
113136

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from ._consumer_invitations_operations import ConsumerInvitationsOperations
1111
from ._data_sets_operations import DataSetsOperations
1212
from ._data_set_mappings_operations import DataSetMappingsOperations
13+
from ._email_registrations_operations import EmailRegistrationsOperations
1314
from ._invitations_operations import InvitationsOperations
1415
from ._operations import Operations
1516
from ._shares_operations import SharesOperations
@@ -24,6 +25,7 @@
2425
'ConsumerInvitationsOperations',
2526
'DataSetsOperations',
2627
'DataSetMappingsOperations',
28+
'EmailRegistrationsOperations',
2729
'InvitationsOperations',
2830
'Operations',
2931
'SharesOperations',

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_accounts_operations.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4646
def list_by_subscription(
4747
self,
4848
skip_token: Optional[str] = None,
49-
**kwargs
49+
**kwargs: Any
5050
) -> AsyncIterable["_models.AccountList"]:
5151
"""List Accounts in a subscription.
5252
@@ -121,7 +121,7 @@ async def get(
121121
self,
122122
resource_group_name: str,
123123
account_name: str,
124-
**kwargs
124+
**kwargs: Any
125125
) -> "_models.Account":
126126
"""Get an account under a resource group.
127127
@@ -183,7 +183,7 @@ async def _create_initial(
183183
resource_group_name: str,
184184
account_name: str,
185185
account: "_models.Account",
186-
**kwargs
186+
**kwargs: Any
187187
) -> "_models.Account":
188188
cls = kwargs.pop('cls', None) # type: ClsType["_models.Account"]
189189
error_map = {
@@ -241,7 +241,7 @@ async def begin_create(
241241
resource_group_name: str,
242242
account_name: str,
243243
account: "_models.Account",
244-
**kwargs
244+
**kwargs: Any
245245
) -> AsyncLROPoller["_models.Account"]:
246246
"""Create an account in the given resource group.
247247
@@ -255,8 +255,8 @@ async def begin_create(
255255
:type account: ~azure.mgmt.datashare.models.Account
256256
:keyword callable cls: A custom type or function that will be passed the direct response
257257
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
258-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
259-
False for no polling, or your own initialized polling object for a personal polling strategy.
258+
:keyword polling: By default, your polling method will be AsyncARMPolling.
259+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
260260
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
261261
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
262262
:return: An instance of AsyncLROPoller that returns either Account or the result of cls(response)
@@ -313,7 +313,7 @@ async def _delete_initial(
313313
self,
314314
resource_group_name: str,
315315
account_name: str,
316-
**kwargs
316+
**kwargs: Any
317317
) -> Optional["_models.OperationResponse"]:
318318
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResponse"]]
319319
error_map = {
@@ -363,7 +363,7 @@ async def begin_delete(
363363
self,
364364
resource_group_name: str,
365365
account_name: str,
366-
**kwargs
366+
**kwargs: Any
367367
) -> AsyncLROPoller["_models.OperationResponse"]:
368368
"""Delete an account.
369369
@@ -375,8 +375,8 @@ async def begin_delete(
375375
:type account_name: str
376376
:keyword callable cls: A custom type or function that will be passed the direct response
377377
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
378-
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
379-
False for no polling, or your own initialized polling object for a personal polling strategy.
378+
:keyword polling: By default, your polling method will be AsyncARMPolling.
379+
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
380380
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
381381
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
382382
:return: An instance of AsyncLROPoller that returns either OperationResponse or the result of cls(response)
@@ -433,7 +433,7 @@ async def update(
433433
resource_group_name: str,
434434
account_name: str,
435435
account_update_parameters: "_models.AccountUpdateParameters",
436-
**kwargs
436+
**kwargs: Any
437437
) -> "_models.Account":
438438
"""Patch a given account.
439439
@@ -501,7 +501,7 @@ def list_by_resource_group(
501501
self,
502502
resource_group_name: str,
503503
skip_token: Optional[str] = None,
504-
**kwargs
504+
**kwargs: Any
505505
) -> AsyncIterable["_models.AccountList"]:
506506
"""List Accounts in a resource group.
507507

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_invitations_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4444
def list_invitations(
4545
self,
4646
skip_token: Optional[str] = None,
47-
**kwargs
47+
**kwargs: Any
4848
) -> AsyncIterable["_models.ConsumerInvitationList"]:
4949
"""List the invitations.
5050
@@ -115,7 +115,7 @@ async def get(
115115
self,
116116
location: str,
117117
invitation_id: str,
118-
**kwargs
118+
**kwargs: Any
119119
) -> "_models.ConsumerInvitation":
120120
"""Gets the invitation identified by invitationId.
121121
@@ -175,7 +175,7 @@ async def reject_invitation(
175175
self,
176176
location: str,
177177
invitation: "_models.ConsumerInvitation",
178-
**kwargs
178+
**kwargs: Any
179179
) -> "_models.ConsumerInvitation":
180180
"""Rejects the invitation identified by invitationId.
181181

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_consumer_source_data_sets_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def list_by_share_subscription(
4747
account_name: str,
4848
share_subscription_name: str,
4949
skip_token: Optional[str] = None,
50-
**kwargs
50+
**kwargs: Any
5151
) -> AsyncIterable["_models.ConsumerSourceDataSetList"]:
5252
"""Get source dataSets of a shareSubscription.
5353

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_set_mappings_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async def get(
4747
account_name: str,
4848
share_subscription_name: str,
4949
data_set_mapping_name: str,
50-
**kwargs
50+
**kwargs: Any
5151
) -> "_models.DataSetMapping":
5252
"""Get DataSetMapping in a shareSubscription.
5353
@@ -117,7 +117,7 @@ async def create(
117117
share_subscription_name: str,
118118
data_set_mapping_name: str,
119119
data_set_mapping: "_models.DataSetMapping",
120-
**kwargs
120+
**kwargs: Any
121121
) -> "_models.DataSetMapping":
122122
"""Maps a source data set in the source share to a sink data set in the share subscription.
123123
Enables copying the data set from source to destination.
@@ -199,7 +199,7 @@ async def delete(
199199
account_name: str,
200200
share_subscription_name: str,
201201
data_set_mapping_name: str,
202-
**kwargs
202+
**kwargs: Any
203203
) -> None:
204204
"""Delete DataSetMapping in a shareSubscription.
205205
@@ -267,7 +267,7 @@ def list_by_share_subscription(
267267
skip_token: Optional[str] = None,
268268
filter: Optional[str] = None,
269269
orderby: Optional[str] = None,
270-
**kwargs
270+
**kwargs: Any
271271
) -> AsyncIterable["_models.DataSetMappingList"]:
272272
"""List DataSetMappings in a share subscription.
273273

0 commit comments

Comments
 (0)