Skip to content

Commit 628a597

Browse files
author
SDKAuto
committed
CodeGen from PR 33240 in Azure/azure-rest-api-specs
Merge 933efc21342dbe3e5a61a94c48a8cc7578a95457 into abb839b726184aa10f8d1eaac8e9fe590833619c
1 parent 7f8d21c commit 628a597

File tree

17 files changed

+411
-334
lines changed

17 files changed

+411
-334
lines changed

sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 1.1.0 (2025-04-08)
4+
5+
### Features Added
6+
7+
- Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])`
8+
39
## 1.0.0 (2024-11-21)
410

511
### Breaking Changes

sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "0410d404c68289cb1737d06bba92133bb84b515c",
2+
"commit": "ab072b2effd79895e3ab4ff1c120e61e1c2ea7ba",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/healthdataaiservices/HealthDataAIServices.Management",
5-
"@azure-tools/typespec-python": "0.36.1"
5+
"@azure-tools/typespec-python": "0.42.2"
66
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.HealthDataAIServices",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.healthdataaiservices.models.DeidPropertiesUpdate": "Microsoft.HealthDataAIServices.DeidPropertiesUpdate",
5+
"azure.mgmt.healthdataaiservices.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
6+
"azure.mgmt.healthdataaiservices.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
7+
"azure.mgmt.healthdataaiservices.models.DeidService": "Microsoft.HealthDataAIServices.DeidService",
8+
"azure.mgmt.healthdataaiservices.models.DeidServiceProperties": "Microsoft.HealthDataAIServices.DeidServiceProperties",
9+
"azure.mgmt.healthdataaiservices.models.DeidUpdate": "Microsoft.HealthDataAIServices.DeidUpdate",
10+
"azure.mgmt.healthdataaiservices.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
11+
"azure.mgmt.healthdataaiservices.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
12+
"azure.mgmt.healthdataaiservices.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
13+
"azure.mgmt.healthdataaiservices.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity",
14+
"azure.mgmt.healthdataaiservices.models.ManagedServiceIdentityUpdate": "Microsoft.HealthDataAIServices.ManagedServiceIdentityUpdate",
15+
"azure.mgmt.healthdataaiservices.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
16+
"azure.mgmt.healthdataaiservices.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
17+
"azure.mgmt.healthdataaiservices.models.PrivateEndpoint": "Azure.ResourceManager.CommonTypes.PrivateEndpoint",
18+
"azure.mgmt.healthdataaiservices.models.PrivateEndpointConnection": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnection",
19+
"azure.mgmt.healthdataaiservices.models.PrivateEndpointConnectionProperties": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties",
20+
"azure.mgmt.healthdataaiservices.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
21+
"azure.mgmt.healthdataaiservices.models.PrivateEndpointConnectionResource": "Microsoft.HealthDataAIServices.PrivateEndpointConnectionResource",
22+
"azure.mgmt.healthdataaiservices.models.PrivateLinkResource": "Microsoft.HealthDataAIServices.PrivateLinkResource",
23+
"azure.mgmt.healthdataaiservices.models.PrivateLinkResourceProperties": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties",
24+
"azure.mgmt.healthdataaiservices.models.PrivateLinkServiceConnectionState": "Azure.ResourceManager.CommonTypes.PrivateLinkServiceConnectionState",
25+
"azure.mgmt.healthdataaiservices.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
26+
"azure.mgmt.healthdataaiservices.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity",
27+
"azure.mgmt.healthdataaiservices.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
28+
"azure.mgmt.healthdataaiservices.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
29+
"azure.mgmt.healthdataaiservices.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
30+
"azure.mgmt.healthdataaiservices.models.ProvisioningState": "Microsoft.HealthDataAIServices.ProvisioningState",
31+
"azure.mgmt.healthdataaiservices.models.PrivateEndpointServiceConnectionStatus": "Azure.ResourceManager.CommonTypes.PrivateEndpointServiceConnectionStatus",
32+
"azure.mgmt.healthdataaiservices.models.PrivateEndpointConnectionProvisioningState": "Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProvisioningState",
33+
"azure.mgmt.healthdataaiservices.models.PublicNetworkAccess": "Microsoft.HealthDataAIServices.PublicNetworkAccess",
34+
"azure.mgmt.healthdataaiservices.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType",
35+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.operations.list": "Azure.ResourceManager.Operations.list",
36+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.deid_services.get": "Microsoft.HealthDataAIServices.DeidServices.get",
37+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.deid_services.list_by_resource_group": "Microsoft.HealthDataAIServices.DeidServices.listByResourceGroup",
38+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.deid_services.list_by_subscription": "Microsoft.HealthDataAIServices.DeidServices.listBySubscription",
39+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.deid_services.begin_create": "Microsoft.HealthDataAIServices.DeidServices.create",
40+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.deid_services.begin_update": "Microsoft.HealthDataAIServices.DeidServices.update",
41+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.deid_services.begin_delete": "Microsoft.HealthDataAIServices.DeidServices.delete",
42+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.private_endpoint_connections.get": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.get",
43+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.private_endpoint_connections.begin_create": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.create",
44+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.private_endpoint_connections.begin_delete": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.delete",
45+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.private_endpoint_connections.list_by_deid_service": "Microsoft.HealthDataAIServices.PrivateEndpointConnections.listByDeidService",
46+
"azure.mgmt.healthdataaiservices.HealthDataAIServicesMgmtClient.private_links.list_by_deid_service": "Microsoft.HealthDataAIServices.PrivateLinks.listByDeidService"
47+
}
48+
}

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

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
# Licensed under the MIT License. See License.txt in the project root for
6-
# license information.
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) Python Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
78
# --------------------------------------------------------------------------
89
# pylint: disable=protected-access, broad-except
910

@@ -373,15 +374,34 @@ def __ne__(self, other: typing.Any) -> bool:
373374
return not self.__eq__(other)
374375

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

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

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

384397
def get(self, key: str, default: typing.Any = None) -> typing.Any:
398+
"""
399+
Get the value for key if key is in the dictionary, else default.
400+
:param str key: The key to look up.
401+
:param any default: The value to return if key is not in the dictionary. Defaults to None
402+
:returns: D[k] if k in D, else d.
403+
:rtype: any
404+
"""
385405
try:
386406
return self[key]
387407
except KeyError:
@@ -397,17 +417,38 @@ def pop(self, key: str, default: _T) -> _T: ...
397417
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
398418

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

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

407441
def clear(self) -> None:
442+
"""
443+
Remove all items from D.
444+
"""
408445
self._data.clear()
409446

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

413454
@typing.overload
@@ -417,6 +458,13 @@ def setdefault(self, key: str, default: None = None) -> None: ...
417458
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
418459

419460
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
461+
"""
462+
Same as calling D.get(k, d), and setting D[k]=d if k not found
463+
:param str key: The key to look up.
464+
:param any default: The value to set if key is not in the dictionary
465+
:returns: D[k] if k in D, else d.
466+
:rtype: any
467+
"""
420468
if default is _UNSET:
421469
return self._data.setdefault(key)
422470
return self._data.setdefault(key, default)
@@ -754,7 +802,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur
754802
except AttributeError:
755803
model_name = annotation
756804
if module is not None:
757-
annotation = _get_model(module, model_name)
805+
annotation = _get_model(module, model_name) # type: ignore
758806

759807
try:
760808
if module and _is_model(annotation):
@@ -894,6 +942,35 @@ def _deserialize(
894942
return _deserialize_with_callable(deserializer, value)
895943

896944

945+
def _failsafe_deserialize(
946+
deserializer: typing.Any,
947+
value: typing.Any,
948+
module: typing.Optional[str] = None,
949+
rf: typing.Optional["_RestField"] = None,
950+
format: typing.Optional[str] = None,
951+
) -> typing.Any:
952+
try:
953+
return _deserialize(deserializer, value, module, rf, format)
954+
except DeserializationError:
955+
_LOGGER.warning(
956+
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
957+
)
958+
return None
959+
960+
961+
def _failsafe_deserialize_xml(
962+
deserializer: typing.Any,
963+
value: typing.Any,
964+
) -> typing.Any:
965+
try:
966+
return _deserialize_xml(deserializer, value)
967+
except DeserializationError:
968+
_LOGGER.warning(
969+
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
970+
)
971+
return None
972+
973+
897974
class _RestField:
898975
def __init__(
899976
self,

sdk/healthdataaiservices/azure-mgmt-healthdataaiservices/azure/mgmt/healthdataaiservices/_patch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize

0 commit comments

Comments
 (0)