88
99from copy import deepcopy
1010from typing import Any , TYPE_CHECKING
11+ from typing_extensions import Self
1112
1213from azure .core .pipeline import policies
1314from azure .core .rest import HttpRequest , HttpResponse
2021from .operations import (
2122 AdminKeysOperations ,
2223 NetworkSecurityPerimeterConfigurationsOperations ,
24+ OfferingsOperations ,
2325 Operations ,
2426 PrivateEndpointConnectionsOperations ,
2527 PrivateLinkResourcesOperations ,
2628 QueryKeysOperations ,
2729 SearchManagementClientOperationsMixin ,
30+ ServiceOperations ,
2831 ServicesOperations ,
2932 SharedPrivateLinkResourcesOperations ,
3033 UsagesOperations ,
3134)
3235
3336if TYPE_CHECKING :
34- # pylint: disable=unused-import,ungrouped-imports
3537 from azure .core .credentials import TokenCredential
3638
3739
38- class SearchManagementClient (
39- SearchManagementClientOperationsMixin
40- ): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
40+ class SearchManagementClient (SearchManagementClientOperationsMixin ): # pylint: disable=too-many-instance-attributes
4141 """Client that can be used to manage Azure AI Search services and API keys.
4242
4343 :ivar operations: Operations operations
4444 :vartype operations: azure.mgmt.search.operations.Operations
45+ :ivar offerings: OfferingsOperations operations
46+ :vartype offerings: azure.mgmt.search.operations.OfferingsOperations
4547 :ivar admin_keys: AdminKeysOperations operations
4648 :vartype admin_keys: azure.mgmt.search.operations.AdminKeysOperations
4749 :ivar query_keys: QueryKeysOperations operations
@@ -62,14 +64,16 @@ class SearchManagementClient(
6264 NetworkSecurityPerimeterConfigurationsOperations operations
6365 :vartype network_security_perimeter_configurations:
6466 azure.mgmt.search.operations.NetworkSecurityPerimeterConfigurationsOperations
67+ :ivar service: ServiceOperations operations
68+ :vartype service: azure.mgmt.search.operations.ServiceOperations
6569 :param credential: Credential needed for the client to connect to Azure. Required.
6670 :type credential: ~azure.core.credentials.TokenCredential
6771 :param subscription_id: The unique identifier for a Microsoft Azure subscription. You can
6872 obtain this value from the Azure Resource Manager API or the portal. Required.
6973 :type subscription_id: str
7074 :param base_url: Service URL. Default value is "https://management.azure.com".
7175 :type base_url: str
72- :keyword api_version: Api Version. Default value is "2024-06 -01-preview". Note that overriding
76+ :keyword api_version: Api Version. Default value is "2025-02 -01-preview". Note that overriding
7377 this default value may result in unsupported behavior.
7478 :paramtype api_version: str
7579 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -111,6 +115,7 @@ def __init__(
111115 self ._deserialize = Deserializer (client_models )
112116 self ._serialize .client_side_validation = False
113117 self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
118+ self .offerings = OfferingsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
114119 self .admin_keys = AdminKeysOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
115120 self .query_keys = QueryKeysOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
116121 self .services = ServicesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
@@ -127,6 +132,7 @@ def __init__(
127132 self .network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations (
128133 self ._client , self ._config , self ._serialize , self ._deserialize
129134 )
135+ self .service = ServiceOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
130136
131137 def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
132138 """Runs the network request through the client's chained policies.
@@ -153,7 +159,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
153159 def close (self ) -> None :
154160 self ._client .close ()
155161
156- def __enter__ (self ) -> "SearchManagementClient" :
162+ def __enter__ (self ) -> Self :
157163 self ._client .__enter__ ()
158164 return self
159165
0 commit comments