Skip to content

Commit 291c4ff

Browse files
SDKAutoMelvin Bosnjak
andcommitted
CodeGen from PR 13354 in Azure/azure-rest-api-specs
Updated the models to include systemData and removed the supression f… (Azure#13354) * Updated the models to include systemData and removed the supression for systemData * removed the deleted account examples and the package-lock.json * ran prettier locally to try and fix prettier validation error when making a PR * removing unecessary changes from last commit * Revert "removed the deleted account examples and the package-lock.json" This reverts commit 9a0b368a7aad1fc43460b329fcb4de32c1670606. * Revert "ran prettier locally to try and fix prettier validation error when making a PR" This reverts commit 3f11b97fdeef719f622120ba68e5d9cf68d89102. * Revert "ran prettier locally to try and fix prettier validation error when making a PR" This reverts commit 3f11b97fdeef719f622120ba68e5d9cf68d89102. * reverted the package-lock.json and .vscode/launch.json * reverted older commit * Removed unecessary files This reverts commit 708bc8700c8a13c408a232903e14cae57fd136ee. * Revert "Removed unecessary files" This reverts commit a27ce012bf115a486d87d6d2b1d7e8416f6473a3. * Removed deleted account examples and package-lock.json * Ran prettier to format the json files Co-authored-by: Melvin Bosnjak <[email protected]>
1 parent 824665d commit 291c4ff

19 files changed

+684
-700
lines changed

sdk/purview/azure-mgmt-purview/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.0.6369",
3+
"use": "@autorest/[email protected]",
4+
"commit": "45e04eb4a56c64a767bf5895cabc951faa39b9fa",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/purview/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.0.6369",
7+
"readme": "specification/purview/resource-manager/readme.md"
8+
}

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

Lines changed: 56 additions & 8 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": true
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\": [\"PurviewManagementClientConfiguration\"]}}, \"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\": [\"PurviewManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
1315
},
1416
"global_parameters": {
1517
"sync": {
@@ -28,28 +30,72 @@
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
"accounts": "AccountsOperations",
@@ -59,7 +105,9 @@
59105
"private_link_resources": "PrivateLinkResourcesOperations"
60106
},
61107
"operation_mixins": {
62-
},
63-
"sync_imports": "None",
64-
"async_imports": "None"
108+
"sync_imports": "None",
109+
"async_imports": "None",
110+
"operations": {
111+
}
112+
}
65113
}

sdk/purview/azure-mgmt-purview/azure/mgmt/purview/_purview_management_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def __init__(
6262

6363
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
6464
self._serialize = Serializer(client_models)
65+
self._serialize.client_side_validation = False
6566
self._deserialize = Deserializer(client_models)
6667

6768
self.accounts = AccountsOperations(

sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/_purview_management_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def __init__(
5959

6060
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
6161
self._serialize = Serializer(client_models)
62+
self._serialize.client_side_validation = False
6263
self._deserialize = Deserializer(client_models)
6364

6465
self.accounts = AccountsOperations(

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ async def get_next(next_link=None):
110110
response = pipeline_response.http_response
111111

112112
if response.status_code not in [200]:
113-
error = self._deserialize(_models.ErrorResponseModel, response)
113+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
114114
map_error(status_code=response.status_code, response=response, error_map=error_map)
115115
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
116116

@@ -184,7 +184,7 @@ async def get_next(next_link=None):
184184
response = pipeline_response.http_response
185185

186186
if response.status_code not in [200]:
187-
error = self._deserialize(_models.ErrorResponseModel, response)
187+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
188188
map_error(status_code=response.status_code, response=response, error_map=error_map)
189189
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
190190

@@ -245,7 +245,7 @@ async def get(
245245

246246
if response.status_code not in [200]:
247247
map_error(status_code=response.status_code, response=response, error_map=error_map)
248-
error = self._deserialize(_models.ErrorResponseModel, response)
248+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
249249
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
250250

251251
deserialized = self._deserialize('Account', pipeline_response)
@@ -299,7 +299,7 @@ async def _create_or_update_initial(
299299

300300
if response.status_code not in [200, 201]:
301301
map_error(status_code=response.status_code, response=response, error_map=error_map)
302-
error = self._deserialize(_models.ErrorResponseModel, response)
302+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
303303
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
304304

305305
if response.status_code == 200:
@@ -333,8 +333,8 @@ async def begin_create_or_update(
333333
:type account: ~azure.mgmt.purview.models.Account
334334
:keyword callable cls: A custom type or function that will be passed the direct response
335335
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
336-
:keyword polling: True for ARMPolling, False for no polling, or a
337-
polling object for personal polling strategy
336+
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
337+
False for no polling, or your own initialized polling object for a personal polling strategy.
338338
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
339339
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
340340
:return: An instance of AsyncLROPoller that returns either Account or the result of cls(response)
@@ -424,7 +424,7 @@ async def _delete_initial(
424424

425425
if response.status_code not in [200, 202, 204]:
426426
map_error(status_code=response.status_code, response=response, error_map=error_map)
427-
error = self._deserialize(_models.ErrorResponseModel, response)
427+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
428428
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
429429

430430
if cls:
@@ -448,8 +448,8 @@ async def begin_delete(
448448
:type account_name: str
449449
:keyword callable cls: A custom type or function that will be passed the direct response
450450
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
451-
:keyword polling: True for ARMPolling, False for no polling, or a
452-
polling object for personal polling strategy
451+
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
452+
False for no polling, or your own initialized polling object for a personal polling strategy.
453453
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
454454
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
455455
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
@@ -541,7 +541,7 @@ async def _update_initial(
541541

542542
if response.status_code not in [200, 202]:
543543
map_error(status_code=response.status_code, response=response, error_map=error_map)
544-
error = self._deserialize(_models.ErrorResponseModel, response)
544+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
545545
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
546546

547547
if response.status_code == 200:
@@ -575,8 +575,8 @@ async def begin_update(
575575
:type account_update_parameters: ~azure.mgmt.purview.models.AccountUpdateParameters
576576
:keyword callable cls: A custom type or function that will be passed the direct response
577577
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
578-
:keyword polling: True for ARMPolling, False for no polling, or a
579-
polling object for personal polling strategy
578+
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
579+
False for no polling, or your own initialized polling object for a personal polling strategy.
580580
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
581581
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
582582
:return: An instance of AsyncLROPoller that returns either Account or the result of cls(response)
@@ -679,7 +679,7 @@ async def list_keys(
679679

680680
if response.status_code not in [200]:
681681
map_error(status_code=response.status_code, response=response, error_map=error_map)
682-
error = self._deserialize(_models.ErrorResponseModel, response)
682+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
683683
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
684684

685685
deserialized = self._deserialize('AccessKeys', pipeline_response)
@@ -740,7 +740,7 @@ async def check_name_availability(
740740

741741
if response.status_code not in [200]:
742742
map_error(status_code=response.status_code, response=response, error_map=error_map)
743-
error = self._deserialize(_models.ErrorResponseModel, response)
743+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
744744
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
745745

746746
deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response)

sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_default_accounts_operations.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def get(
9292

9393
if response.status_code not in [200]:
9494
map_error(status_code=response.status_code, response=response, error_map=error_map)
95-
error = self._deserialize(_models.ErrorResponseModel, response)
95+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
9696
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
9797

9898
deserialized = self._deserialize('DefaultAccountPayload', pipeline_response)
@@ -110,7 +110,7 @@ async def set(
110110
) -> "_models.DefaultAccountPayload":
111111
"""Sets the default account for the scope.
112112
113-
Set the default account for the scope.
113+
Sets the default account for the scope.
114114
115115
:param default_account_payload: The payload containing the default account information and the
116116
scope.
@@ -150,7 +150,7 @@ async def set(
150150

151151
if response.status_code not in [200]:
152152
map_error(status_code=response.status_code, response=response, error_map=error_map)
153-
error = self._deserialize(_models.ErrorResponseModel, response)
153+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
154154
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
155155

156156
deserialized = self._deserialize('DefaultAccountPayload', pipeline_response)
@@ -170,7 +170,7 @@ async def remove(
170170
) -> None:
171171
"""Removes the default account from the scope.
172172
173-
Remove the default account from the scope.
173+
Removes the default account from the scope.
174174
175175
:param scope_tenant_id: The tenant ID.
176176
:type scope_tenant_id: str
@@ -213,7 +213,7 @@ async def remove(
213213

214214
if response.status_code not in [200, 204]:
215215
map_error(status_code=response.status_code, response=response, error_map=error_map)
216-
error = self._deserialize(_models.ErrorResponseModel, response)
216+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
217217
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
218218

219219
if cls:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async def get_next(next_link=None):
9595
response = pipeline_response.http_response
9696

9797
if response.status_code not in [200]:
98-
error = self._deserialize(_models.ErrorResponseModel, response)
98+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
9999
map_error(status_code=response.status_code, response=response, error_map=error_map)
100100
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
101101

sdk/purview/azure-mgmt-purview/azure/mgmt/purview/aio/operations/_private_endpoint_connections_operations.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ async def get_next(next_link=None):
114114
response = pipeline_response.http_response
115115

116116
if response.status_code not in [200]:
117-
error = self._deserialize(_models.ErrorResponseModel, response)
117+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
118118
map_error(status_code=response.status_code, response=response, error_map=error_map)
119119
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
120120

@@ -179,7 +179,7 @@ async def get(
179179

180180
if response.status_code not in [200]:
181181
map_error(status_code=response.status_code, response=response, error_map=error_map)
182-
error = self._deserialize(_models.ErrorResponseModel, response)
182+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
183183
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
184184

185185
deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response)
@@ -252,7 +252,7 @@ async def create_or_update(
252252

253253
if response.status_code not in [200, 201]:
254254
map_error(status_code=response.status_code, response=response, error_map=error_map)
255-
error = self._deserialize(_models.ErrorResponseModel, response)
255+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
256256
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
257257

258258
if response.status_code == 200:
@@ -306,7 +306,7 @@ async def _delete_initial(
306306

307307
if response.status_code not in [200, 202, 204]:
308308
map_error(status_code=response.status_code, response=response, error_map=error_map)
309-
error = self._deserialize(_models.ErrorResponseModel, response)
309+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseModel, response)
310310
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
311311

312312
if cls:
@@ -333,8 +333,8 @@ async def begin_delete(
333333
:type private_endpoint_connection_name: str
334334
:keyword callable cls: A custom type or function that will be passed the direct response
335335
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
336-
:keyword polling: True for ARMPolling, False for no polling, or a
337-
polling object for personal polling strategy
336+
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
337+
False for no polling, or your own initialized polling object for a personal polling strategy.
338338
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
339339
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
340340
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)

0 commit comments

Comments
 (0)