Skip to content

Commit 5295010

Browse files
author
SDKAuto
committed
CodeGen from PR 34139 in Azure/azure-rest-api-specs
Merge 4549eaf8d0685deddf80c998523a4f2653040e86 into 50f369c3c9650c5c4dfd31788c6b6f070a6c3da3
1 parent 1d19d94 commit 5295010

File tree

122 files changed

+4230
-1539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+4230
-1539
lines changed

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

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

3+
## 2.2.0b1 (2025-04-22)
4+
5+
### Features Added
6+
7+
- Model `StorageConfiguration` added property `storage_indexing_configuration`
8+
- Added model `StorageIndexingConfiguration`
9+
310
## 2.1.0 (2024-04-22)
411

512
### Features Added

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Health Care Apis Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "0e1d8ac4d5ca8a76479870db0a04aebe4fc3eab0",
2+
"commit": "5fa740c71e4715e4c1db141a2bd8fd34bbe0ff6c",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.7",
6+
"@autorest/python@6.33.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/healthcareapis/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.13.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/healthcareapis/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.33.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/healthcareapis/resource-manager/readme.md"
1111
}

sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._healthcare_apis_management_client import HealthcareApisManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._healthcare_apis_management_client import HealthcareApisManagementClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"HealthcareApisManagementClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_configuration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

@@ -28,13 +27,13 @@ class HealthcareApisManagementClientConfiguration: # pylint: disable=too-many-i
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-03-31". Note that overriding this
32-
default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2025-04-01-preview". Note that overriding
31+
this default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-03-31")
36+
api_version: str = kwargs.pop("api_version", "2025-04-01-preview")
3837

3938
if credential is None:
4039
raise ValueError("Parameter 'credential' must not be None.")

sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/_healthcare_apis_management_client.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1416
from azure.mgmt.core import ARMPipelineClient
1517
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1619

1720
from . import models as _models
1821
from ._configuration import HealthcareApisManagementClientConfiguration
@@ -34,11 +37,10 @@
3437
)
3538

3639
if TYPE_CHECKING:
37-
# pylint: disable=unused-import,ungrouped-imports
3840
from azure.core.credentials import TokenCredential
3941

4042

41-
class HealthcareApisManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
43+
class HealthcareApisManagementClient: # pylint: disable=too-many-instance-attributes
4244
"""Azure Healthcare APIs Client.
4345
4446
:ivar services: ServicesOperations operations
@@ -77,25 +79,27 @@ class HealthcareApisManagementClient: # pylint: disable=client-accepts-api-vers
7779
:type credential: ~azure.core.credentials.TokenCredential
7880
:param subscription_id: The ID of the target subscription. Required.
7981
:type subscription_id: str
80-
:param base_url: Service URL. Default value is "https://management.azure.com".
82+
:param base_url: Service URL. Default value is None.
8183
:type base_url: str
82-
:keyword api_version: Api Version. Default value is "2024-03-31". Note that overriding this
83-
default value may result in unsupported behavior.
84+
:keyword api_version: Api Version. Default value is "2025-04-01-preview". Note that overriding
85+
this default value may result in unsupported behavior.
8486
:paramtype api_version: str
8587
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
8688
Retry-After header is present.
8789
"""
8890

8991
def __init__(
90-
self,
91-
credential: "TokenCredential",
92-
subscription_id: str,
93-
base_url: str = "https://management.azure.com",
94-
**kwargs: Any
92+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
9593
) -> None:
94+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
95+
_endpoints = get_arm_endpoints(_cloud)
96+
if not base_url:
97+
base_url = _endpoints["resource_manager"]
98+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
9699
self._config = HealthcareApisManagementClientConfiguration(
97-
credential=credential, subscription_id=subscription_id, **kwargs
100+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
98101
)
102+
99103
_policies = kwargs.pop("policies", None)
100104
if _policies is None:
101105
_policies = [
@@ -114,7 +118,7 @@ def __init__(
114118
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
115119
self._config.http_logging_policy,
116120
]
117-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
121+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
118122

119123
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
120124
self._serialize = Serializer(client_models)
@@ -173,7 +177,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
173177
def close(self) -> None:
174178
self._client.close()
175179

176-
def __enter__(self) -> "HealthcareApisManagementClient":
180+
def __enter__(self) -> Self:
177181
self._client.__enter__()
178182
return self
179183

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#
2626
# --------------------------------------------------------------------------
2727

28+
2829
# This file is used for handwritten extensions to the generated code. Example:
2930
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3031
def patch_sdk():

0 commit comments

Comments
 (0)