Skip to content

Commit 205e6f7

Browse files
author
SDKAuto
committed
CodeGen from PR 33104 in Azure/azure-rest-api-specs
Merge 97231ef03f8b269cfa382c0c38e8e5c0bccc994d into ccd81286de0c73a1053e9c0b72a73f934ec7570d
1 parent 9ad050f commit 205e6f7

File tree

106 files changed

+3074
-1101
lines changed

Some content is hidden

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

106 files changed

+3074
-1101
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "32f566eb38af9593cfc1ed183362471c50d67fb2",
2+
"commit": "7c5f26aad6994b392a1a81d72d13978af84d3792",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.16",
6+
"@autorest/python@6.27.4",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/search/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.16 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/search/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.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/search/resource-manager/readme.md"
1111
}

sdk/search/azure-mgmt-search/azure/mgmt/search/__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 ._search_management_client import SearchManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._search_management_client import SearchManagementClient # 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
"SearchManagementClient",
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/search/azure-mgmt-search/azure/mgmt/search/_configuration.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
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

21-
class SearchManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class SearchManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for SearchManagementClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -27,15 +26,16 @@ class SearchManagementClientConfiguration: # pylint: disable=too-many-instance-
2726
:param credential: Credential needed for the client to connect to Azure. Required.
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The unique identifier for a Microsoft Azure subscription. You can
30-
obtain this value from the Azure Resource Manager API or the portal. Required.
29+
obtain this value from the Azure Resource Manager API, command line tools, or the portal.
30+
Required.
3131
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2024-06-01-preview". Note that overriding
33-
this default value may result in unsupported behavior.
32+
:keyword api_version: Api Version. Default value is "2025-05-01". Note that overriding this
33+
default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

3737
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38-
api_version: str = kwargs.pop("api_version", "2024-06-01-preview")
38+
api_version: str = kwargs.pop("api_version", "2025-05-01")
3939

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

sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
@@ -25,20 +26,18 @@
2526
PrivateLinkResourcesOperations,
2627
QueryKeysOperations,
2728
SearchManagementClientOperationsMixin,
29+
ServiceOperations,
2830
ServicesOperations,
2931
SharedPrivateLinkResourcesOperations,
3032
UsagesOperations,
3133
)
3234

3335
if TYPE_CHECKING:
34-
# pylint: disable=unused-import,ungrouped-imports
3536
from azure.core.credentials import TokenCredential
3637

3738

38-
class SearchManagementClient(
39-
SearchManagementClientOperationsMixin
40-
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
41-
"""Client that can be used to manage Azure AI Search services and API keys.
39+
class SearchManagementClient(SearchManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes
40+
"""Client that can be used to manage search services and API keys.
4241
4342
:ivar operations: Operations operations
4443
:vartype operations: azure.mgmt.search.operations.Operations
@@ -62,15 +61,18 @@ class SearchManagementClient(
6261
NetworkSecurityPerimeterConfigurationsOperations operations
6362
:vartype network_security_perimeter_configurations:
6463
azure.mgmt.search.operations.NetworkSecurityPerimeterConfigurationsOperations
64+
:ivar service: ServiceOperations operations
65+
:vartype service: azure.mgmt.search.operations.ServiceOperations
6566
:param credential: Credential needed for the client to connect to Azure. Required.
6667
:type credential: ~azure.core.credentials.TokenCredential
6768
:param subscription_id: The unique identifier for a Microsoft Azure subscription. You can
68-
obtain this value from the Azure Resource Manager API or the portal. Required.
69+
obtain this value from the Azure Resource Manager API, command line tools, or the portal.
70+
Required.
6971
:type subscription_id: str
7072
:param base_url: Service URL. Default value is "https://management.azure.com".
7173
:type base_url: str
72-
:keyword api_version: Api Version. Default value is "2024-06-01-preview". Note that overriding
73-
this default value may result in unsupported behavior.
74+
:keyword api_version: Api Version. Default value is "2025-05-01". Note that overriding this
75+
default value may result in unsupported behavior.
7476
:paramtype api_version: str
7577
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
7678
Retry-After header is present.
@@ -127,6 +129,7 @@ def __init__(
127129
self.network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations(
128130
self._client, self._config, self._serialize, self._deserialize
129131
)
132+
self.service = ServiceOperations(self._client, self._config, self._serialize, self._deserialize)
130133

131134
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
132135
"""Runs the network request through the client's chained policies.
@@ -153,7 +156,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
153156
def close(self) -> None:
154157
self._client.close()
155158

156-
def __enter__(self) -> "SearchManagementClient":
159+
def __enter__(self) -> Self:
157160
self._client.__enter__()
158161
return self
159162

0 commit comments

Comments
 (0)