Skip to content

Commit d94f4ca

Browse files
author
SDK Automation
committed
Generated from 82be65aa8f7c606bb6d88c2a424983b22dc9eafc
Sort API's and defintions
1 parent 06f5c8c commit d94f4ca

11 files changed

+824
-752
lines changed

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@
140140
ProvisioningState,
141141
Status,
142142
InvitationStatus,
143-
ShareKind,
144143
SynchronizationMode,
145144
DataSetType,
146145
ShareSubscriptionStatus,
146+
ShareKind,
147147
RecurrenceInterval,
148148
TriggerStatus,
149149
DataSetMappingStatus,
@@ -211,24 +211,24 @@
211211
'DataSetMappingPaged',
212212
'InvitationPaged',
213213
'OperationModelPaged',
214-
'SharePaged',
215-
'ShareSynchronizationPaged',
216214
'SynchronizationDetailsPaged',
215+
'ShareSynchronizationPaged',
216+
'SharePaged',
217217
'ProviderShareSubscriptionPaged',
218-
'ShareSubscriptionPaged',
219218
'SourceShareSynchronizationSettingPaged',
220219
'ShareSubscriptionSynchronizationPaged',
220+
'ShareSubscriptionPaged',
221221
'ConsumerSourceDataSetPaged',
222222
'SynchronizationSettingPaged',
223223
'TriggerPaged',
224224
'Type',
225225
'ProvisioningState',
226226
'Status',
227227
'InvitationStatus',
228-
'ShareKind',
229228
'SynchronizationMode',
230229
'DataSetType',
231230
'ShareSubscriptionStatus',
231+
'ShareKind',
232232
'RecurrenceInterval',
233233
'TriggerStatus',
234234
'DataSetMappingStatus',

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ class InvitationStatus(str, Enum):
4444
withdrawn = "Withdrawn"
4545

4646

47-
class ShareKind(str, Enum):
48-
49-
copy_based = "CopyBased"
50-
in_place = "InPlace"
51-
52-
5347
class SynchronizationMode(str, Enum):
5448

5549
incremental = "Incremental"
@@ -80,6 +74,12 @@ class ShareSubscriptionStatus(str, Enum):
8074
revoking = "Revoking"
8175

8276

77+
class ShareKind(str, Enum):
78+
79+
copy_based = "CopyBased"
80+
in_place = "InPlace"
81+
82+
8383
class RecurrenceInterval(str, Enum):
8484

8585
hour = "Hour"

sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_paged_models.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,19 @@ class OperationModelPaged(Paged):
9090
def __init__(self, *args, **kwargs):
9191

9292
super(OperationModelPaged, self).__init__(*args, **kwargs)
93-
class SharePaged(Paged):
93+
class SynchronizationDetailsPaged(Paged):
9494
"""
95-
A paging container for iterating over a list of :class:`Share <azure.mgmt.datashare.models.Share>` object
95+
A paging container for iterating over a list of :class:`SynchronizationDetails <azure.mgmt.datashare.models.SynchronizationDetails>` object
9696
"""
9797

9898
_attribute_map = {
9999
'next_link': {'key': 'nextLink', 'type': 'str'},
100-
'current_page': {'key': 'value', 'type': '[Share]'}
100+
'current_page': {'key': 'value', 'type': '[SynchronizationDetails]'}
101101
}
102102

103103
def __init__(self, *args, **kwargs):
104104

105-
super(SharePaged, self).__init__(*args, **kwargs)
105+
super(SynchronizationDetailsPaged, self).__init__(*args, **kwargs)
106106
class ShareSynchronizationPaged(Paged):
107107
"""
108108
A paging container for iterating over a list of :class:`ShareSynchronization <azure.mgmt.datashare.models.ShareSynchronization>` object
@@ -116,19 +116,19 @@ class ShareSynchronizationPaged(Paged):
116116
def __init__(self, *args, **kwargs):
117117

118118
super(ShareSynchronizationPaged, self).__init__(*args, **kwargs)
119-
class SynchronizationDetailsPaged(Paged):
119+
class SharePaged(Paged):
120120
"""
121-
A paging container for iterating over a list of :class:`SynchronizationDetails <azure.mgmt.datashare.models.SynchronizationDetails>` object
121+
A paging container for iterating over a list of :class:`Share <azure.mgmt.datashare.models.Share>` object
122122
"""
123123

124124
_attribute_map = {
125125
'next_link': {'key': 'nextLink', 'type': 'str'},
126-
'current_page': {'key': 'value', 'type': '[SynchronizationDetails]'}
126+
'current_page': {'key': 'value', 'type': '[Share]'}
127127
}
128128

129129
def __init__(self, *args, **kwargs):
130130

131-
super(SynchronizationDetailsPaged, self).__init__(*args, **kwargs)
131+
super(SharePaged, self).__init__(*args, **kwargs)
132132
class ProviderShareSubscriptionPaged(Paged):
133133
"""
134134
A paging container for iterating over a list of :class:`ProviderShareSubscription <azure.mgmt.datashare.models.ProviderShareSubscription>` object
@@ -142,45 +142,45 @@ class ProviderShareSubscriptionPaged(Paged):
142142
def __init__(self, *args, **kwargs):
143143

144144
super(ProviderShareSubscriptionPaged, self).__init__(*args, **kwargs)
145-
class ShareSubscriptionPaged(Paged):
145+
class SourceShareSynchronizationSettingPaged(Paged):
146146
"""
147-
A paging container for iterating over a list of :class:`ShareSubscription <azure.mgmt.datashare.models.ShareSubscription>` object
147+
A paging container for iterating over a list of :class:`SourceShareSynchronizationSetting <azure.mgmt.datashare.models.SourceShareSynchronizationSetting>` object
148148
"""
149149

150150
_attribute_map = {
151151
'next_link': {'key': 'nextLink', 'type': 'str'},
152-
'current_page': {'key': 'value', 'type': '[ShareSubscription]'}
152+
'current_page': {'key': 'value', 'type': '[SourceShareSynchronizationSetting]'}
153153
}
154154

155155
def __init__(self, *args, **kwargs):
156156

157-
super(ShareSubscriptionPaged, self).__init__(*args, **kwargs)
158-
class SourceShareSynchronizationSettingPaged(Paged):
157+
super(SourceShareSynchronizationSettingPaged, self).__init__(*args, **kwargs)
158+
class ShareSubscriptionSynchronizationPaged(Paged):
159159
"""
160-
A paging container for iterating over a list of :class:`SourceShareSynchronizationSetting <azure.mgmt.datashare.models.SourceShareSynchronizationSetting>` object
160+
A paging container for iterating over a list of :class:`ShareSubscriptionSynchronization <azure.mgmt.datashare.models.ShareSubscriptionSynchronization>` object
161161
"""
162162

163163
_attribute_map = {
164164
'next_link': {'key': 'nextLink', 'type': 'str'},
165-
'current_page': {'key': 'value', 'type': '[SourceShareSynchronizationSetting]'}
165+
'current_page': {'key': 'value', 'type': '[ShareSubscriptionSynchronization]'}
166166
}
167167

168168
def __init__(self, *args, **kwargs):
169169

170-
super(SourceShareSynchronizationSettingPaged, self).__init__(*args, **kwargs)
171-
class ShareSubscriptionSynchronizationPaged(Paged):
170+
super(ShareSubscriptionSynchronizationPaged, self).__init__(*args, **kwargs)
171+
class ShareSubscriptionPaged(Paged):
172172
"""
173-
A paging container for iterating over a list of :class:`ShareSubscriptionSynchronization <azure.mgmt.datashare.models.ShareSubscriptionSynchronization>` object
173+
A paging container for iterating over a list of :class:`ShareSubscription <azure.mgmt.datashare.models.ShareSubscription>` object
174174
"""
175175

176176
_attribute_map = {
177177
'next_link': {'key': 'nextLink', 'type': 'str'},
178-
'current_page': {'key': 'value', 'type': '[ShareSubscriptionSynchronization]'}
178+
'current_page': {'key': 'value', 'type': '[ShareSubscription]'}
179179
}
180180

181181
def __init__(self, *args, **kwargs):
182182

183-
super(ShareSubscriptionSynchronizationPaged, self).__init__(*args, **kwargs)
183+
super(ShareSubscriptionPaged, self).__init__(*args, **kwargs)
184184
class ConsumerSourceDataSetPaged(Paged):
185185
"""
186186
A paging container for iterating over a list of :class:`ConsumerSourceDataSet <azure.mgmt.datashare.models.ConsumerSourceDataSet>` object

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

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,77 @@ def __init__(self, client, config, serializer, deserializer):
4040

4141
self.config = config
4242

43+
def list_by_subscription(
44+
self, skip_token=None, custom_headers=None, raw=False, **operation_config):
45+
"""List Accounts in a subscription.
46+
47+
List Accounts in Subscription.
48+
49+
:param skip_token: Continuation token
50+
:type skip_token: str
51+
:param dict custom_headers: headers that will be added to the request
52+
:param bool raw: returns the direct response alongside the
53+
deserialized response
54+
:param operation_config: :ref:`Operation configuration
55+
overrides<msrest:optionsforoperations>`.
56+
:return: An iterator like instance of Account
57+
:rtype:
58+
~azure.mgmt.datashare.models.AccountPaged[~azure.mgmt.datashare.models.Account]
59+
:raises:
60+
:class:`DataShareErrorException<azure.mgmt.datashare.models.DataShareErrorException>`
61+
"""
62+
def prepare_request(next_link=None):
63+
if not next_link:
64+
# Construct URL
65+
url = self.list_by_subscription.metadata['url']
66+
path_format_arguments = {
67+
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
68+
}
69+
url = self._client.format_url(url, **path_format_arguments)
70+
71+
# Construct parameters
72+
query_parameters = {}
73+
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
74+
if skip_token is not None:
75+
query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str')
76+
77+
else:
78+
url = next_link
79+
query_parameters = {}
80+
81+
# Construct headers
82+
header_parameters = {}
83+
header_parameters['Accept'] = 'application/json'
84+
if self.config.generate_client_request_id:
85+
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
86+
if custom_headers:
87+
header_parameters.update(custom_headers)
88+
if self.config.accept_language is not None:
89+
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
90+
91+
# Construct and send request
92+
request = self._client.get(url, query_parameters, header_parameters)
93+
return request
94+
95+
def internal_paging(next_link=None):
96+
request = prepare_request(next_link)
97+
98+
response = self._client.send(request, stream=False, **operation_config)
99+
100+
if response.status_code not in [200]:
101+
raise models.DataShareErrorException(self._deserialize, response)
102+
103+
return response
104+
105+
# Deserialize response
106+
header_dict = None
107+
if raw:
108+
header_dict = {}
109+
deserialized = models.AccountPaged(internal_paging, self._deserialize.dependencies, header_dict)
110+
111+
return deserialized
112+
list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts'}
113+
43114
def get(
44115
self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config):
45116
"""Get an account under a resource group.
@@ -369,77 +440,6 @@ def update(
369440
return deserialized
370441
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'}
371442

372-
def list_by_subscription(
373-
self, skip_token=None, custom_headers=None, raw=False, **operation_config):
374-
"""List Accounts in a subscription.
375-
376-
List Accounts in Subscription.
377-
378-
:param skip_token: Continuation token
379-
:type skip_token: str
380-
:param dict custom_headers: headers that will be added to the request
381-
:param bool raw: returns the direct response alongside the
382-
deserialized response
383-
:param operation_config: :ref:`Operation configuration
384-
overrides<msrest:optionsforoperations>`.
385-
:return: An iterator like instance of Account
386-
:rtype:
387-
~azure.mgmt.datashare.models.AccountPaged[~azure.mgmt.datashare.models.Account]
388-
:raises:
389-
:class:`DataShareErrorException<azure.mgmt.datashare.models.DataShareErrorException>`
390-
"""
391-
def prepare_request(next_link=None):
392-
if not next_link:
393-
# Construct URL
394-
url = self.list_by_subscription.metadata['url']
395-
path_format_arguments = {
396-
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
397-
}
398-
url = self._client.format_url(url, **path_format_arguments)
399-
400-
# Construct parameters
401-
query_parameters = {}
402-
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
403-
if skip_token is not None:
404-
query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str')
405-
406-
else:
407-
url = next_link
408-
query_parameters = {}
409-
410-
# Construct headers
411-
header_parameters = {}
412-
header_parameters['Accept'] = 'application/json'
413-
if self.config.generate_client_request_id:
414-
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
415-
if custom_headers:
416-
header_parameters.update(custom_headers)
417-
if self.config.accept_language is not None:
418-
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
419-
420-
# Construct and send request
421-
request = self._client.get(url, query_parameters, header_parameters)
422-
return request
423-
424-
def internal_paging(next_link=None):
425-
request = prepare_request(next_link)
426-
427-
response = self._client.send(request, stream=False, **operation_config)
428-
429-
if response.status_code not in [200]:
430-
raise models.DataShareErrorException(self._deserialize, response)
431-
432-
return response
433-
434-
# Deserialize response
435-
header_dict = None
436-
if raw:
437-
header_dict = {}
438-
deserialized = models.AccountPaged(internal_paging, self._deserialize.dependencies, header_dict)
439-
440-
return deserialized
441-
list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts'}
442-
443443
def list_by_resource_group(
444444
self, resource_group_name, skip_token=None, custom_headers=None, raw=False, **operation_config):
445445
"""List Accounts in a resource group.

0 commit comments

Comments
 (0)