Skip to content

Commit 52c73d3

Browse files
author
SDKAuto
committed
CodeGen from PR 3616 in test-repo-billy/azure-rest-api-specs
Merge b577ee2fa864118f597fea4104255975cf72ac1b into 2ad8682f2fcef60f83807b0d0d09c799eea426bd
1 parent 460aac0 commit 52c73d3

File tree

9 files changed

+214
-154
lines changed

9 files changed

+214
-154
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "58740206b853320974ef5e4864f7be8120b15a27",
3-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
2+
"commit": "3cf4e3486139ea687e909cb85779d31ae2ebfc2d",
3+
"repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs",
44
"typespec_src": "specification/playwrighttesting/PlaywrightTesting.Management",
5-
"@azure-tools/typespec-python": "0.37.1"
5+
"@azure-tools/typespec-python": "0.38.2"
66
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.AzurePlaywrightService",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.playwrighttesting.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
5+
"azure.mgmt.playwrighttesting.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
6+
"azure.mgmt.playwrighttesting.models.Account": "Microsoft.AzurePlaywrightService.Account",
7+
"azure.mgmt.playwrighttesting.models.AccountFreeTrialProperties": "Microsoft.AzurePlaywrightService.AccountFreeTrialProperties",
8+
"azure.mgmt.playwrighttesting.models.AccountProperties": "Microsoft.AzurePlaywrightService.AccountProperties",
9+
"azure.mgmt.playwrighttesting.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
10+
"azure.mgmt.playwrighttesting.models.AccountQuota": "Microsoft.AzurePlaywrightService.AccountQuota",
11+
"azure.mgmt.playwrighttesting.models.AccountQuotaProperties": "Microsoft.AzurePlaywrightService.AccountQuotaProperties",
12+
"azure.mgmt.playwrighttesting.models.AccountUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
13+
"azure.mgmt.playwrighttesting.models.AccountUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
14+
"azure.mgmt.playwrighttesting.models.CheckNameAvailabilityRequest": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest",
15+
"azure.mgmt.playwrighttesting.models.CheckNameAvailabilityResponse": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse",
16+
"azure.mgmt.playwrighttesting.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
17+
"azure.mgmt.playwrighttesting.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
18+
"azure.mgmt.playwrighttesting.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
19+
"azure.mgmt.playwrighttesting.models.FreeTrialProperties": "Microsoft.AzurePlaywrightService.FreeTrialProperties",
20+
"azure.mgmt.playwrighttesting.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
21+
"azure.mgmt.playwrighttesting.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
22+
"azure.mgmt.playwrighttesting.models.Quota": "Microsoft.AzurePlaywrightService.Quota",
23+
"azure.mgmt.playwrighttesting.models.QuotaProperties": "Microsoft.AzurePlaywrightService.QuotaProperties",
24+
"azure.mgmt.playwrighttesting.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
25+
"azure.mgmt.playwrighttesting.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
26+
"azure.mgmt.playwrighttesting.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
27+
"azure.mgmt.playwrighttesting.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
28+
"azure.mgmt.playwrighttesting.models.EnablementStatus": "Microsoft.AzurePlaywrightService.EnablementStatus",
29+
"azure.mgmt.playwrighttesting.models.ProvisioningState": "Microsoft.AzurePlaywrightService.ProvisioningState",
30+
"azure.mgmt.playwrighttesting.models.CheckNameAvailabilityReason": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason",
31+
"azure.mgmt.playwrighttesting.models.FreeTrialState": "Microsoft.AzurePlaywrightService.FreeTrialState",
32+
"azure.mgmt.playwrighttesting.models.OfferingType": "Microsoft.AzurePlaywrightService.OfferingType",
33+
"azure.mgmt.playwrighttesting.models.QuotaNames": "Microsoft.AzurePlaywrightService.QuotaNames",
34+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.operations.list": "Azure.ResourceManager.Operations.list",
35+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.accounts.get": "Azure.ResourceManager.Accounts.get",
36+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.accounts.begin_create_or_update": "Microsoft.AzurePlaywrightService.Accounts.createOrUpdate",
37+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.accounts.update": "Microsoft.AzurePlaywrightService.Accounts.update",
38+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.accounts.begin_delete": "Microsoft.AzurePlaywrightService.Accounts.delete",
39+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.accounts.list_by_resource_group": "Azure.ResourceManager.Accounts.listByResourceGroup",
40+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.accounts.list_by_subscription": "Azure.ResourceManager.Accounts.listBySubscription",
41+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.accounts.check_name_availability": "Microsoft.AzurePlaywrightService.Accounts.checkNameAvailability",
42+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.quotas.get": "Microsoft.AzurePlaywrightService.Quotas.get",
43+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.quotas.list_by_subscription": "Microsoft.AzurePlaywrightService.Quotas.listBySubscription",
44+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.account_quotas.get": "Microsoft.AzurePlaywrightService.AccountQuotas.get",
45+
"azure.mgmt.playwrighttesting.PlaywrightTestingMgmtClient.account_quotas.list_by_account": "Microsoft.AzurePlaywrightService.AccountQuotas.listByAccount"
46+
}
47+
}

sdk/playwrighttesting/azure-mgmt-playwrighttesting/azure/mgmt/playwrighttesting/_model_base.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,34 @@ def __ne__(self, other: typing.Any) -> bool:
373373
return not self.__eq__(other)
374374

375375
def keys(self) -> typing.KeysView[str]:
376+
"""
377+
:returns: a set-like object providing a view on D's keys
378+
:rtype: ~typing.KeysView
379+
"""
376380
return self._data.keys()
377381

378382
def values(self) -> typing.ValuesView[typing.Any]:
383+
"""
384+
:returns: an object providing a view on D's values
385+
:rtype: ~typing.ValuesView
386+
"""
379387
return self._data.values()
380388

381389
def items(self) -> typing.ItemsView[str, typing.Any]:
390+
"""
391+
:returns: set-like object providing a view on D's items
392+
:rtype: ~typing.ItemsView
393+
"""
382394
return self._data.items()
383395

384396
def get(self, key: str, default: typing.Any = None) -> typing.Any:
397+
"""
398+
Get the value for key if key is in the dictionary, else default.
399+
:param str key: The key to look up.
400+
:param any default: The value to return if key is not in the dictionary. Defaults to None
401+
:returns: D[k] if k in D, else d.
402+
:rtype: any
403+
"""
385404
try:
386405
return self[key]
387406
except KeyError:
@@ -397,17 +416,38 @@ def pop(self, key: str, default: _T) -> _T: ...
397416
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
398417

399418
def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
419+
"""
420+
Removes specified key and return the corresponding value.
421+
:param str key: The key to pop.
422+
:param any default: The value to return if key is not in the dictionary
423+
:returns: The value corresponding to the key.
424+
:rtype: any
425+
:raises KeyError: If key is not found and default is not given.
426+
"""
400427
if default is _UNSET:
401428
return self._data.pop(key)
402429
return self._data.pop(key, default)
403430

404431
def popitem(self) -> typing.Tuple[str, typing.Any]:
432+
"""
433+
Removes and returns some (key, value) pair
434+
:returns: The (key, value) pair.
435+
:rtype: tuple
436+
:raises KeyError: if D is empty.
437+
"""
405438
return self._data.popitem()
406439

407440
def clear(self) -> None:
441+
"""
442+
Remove all items from D.
443+
"""
408444
self._data.clear()
409445

410446
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
447+
"""
448+
Updates D from mapping/iterable E and F.
449+
:param any args: Either a mapping object or an iterable of key-value pairs.
450+
"""
411451
self._data.update(*args, **kwargs)
412452

413453
@typing.overload
@@ -417,6 +457,13 @@ def setdefault(self, key: str, default: None = None) -> None: ...
417457
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
418458

419459
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
460+
"""
461+
Same as calling D.get(k, d), and setting D[k]=d if k not found
462+
:param str key: The key to look up.
463+
:param any default: The value to set if key is not in the dictionary
464+
:returns: D[k] if k in D, else d.
465+
:rtype: any
466+
"""
420467
if default is _UNSET:
421468
return self._data.setdefault(key)
422469
return self._data.setdefault(key, default)
@@ -910,6 +957,19 @@ def _failsafe_deserialize(
910957
return None
911958

912959

960+
def _failsafe_deserialize_xml(
961+
deserializer: typing.Any,
962+
value: typing.Any,
963+
) -> typing.Any:
964+
try:
965+
return _deserialize_xml(deserializer, value)
966+
except DeserializationError:
967+
_LOGGER.warning(
968+
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
969+
)
970+
return None
971+
972+
913973
class _RestField:
914974
def __init__(
915975
self,

0 commit comments

Comments
 (0)