8
8
9
9
from copy import deepcopy
10
10
from typing import Any , TYPE_CHECKING
11
+ from typing_extensions import Self
11
12
12
13
from azure .core .pipeline import policies
13
14
from azure .core .rest import HttpRequest , HttpResponse
20
21
from .operations import (
21
22
AdminKeysOperations ,
22
23
NetworkSecurityPerimeterConfigurationsOperations ,
24
+ OfferingsOperations ,
23
25
Operations ,
24
26
PrivateEndpointConnectionsOperations ,
25
27
PrivateLinkResourcesOperations ,
26
28
QueryKeysOperations ,
27
29
SearchManagementClientOperationsMixin ,
30
+ ServiceOperations ,
28
31
ServicesOperations ,
29
32
SharedPrivateLinkResourcesOperations ,
30
33
UsagesOperations ,
31
34
)
32
35
33
36
if TYPE_CHECKING :
34
- # pylint: disable=unused-import,ungrouped-imports
35
37
from azure .core .credentials import TokenCredential
36
38
37
39
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
41
41
"""Client that can be used to manage Azure AI Search services and API keys.
42
42
43
43
:ivar operations: Operations operations
44
44
:vartype operations: azure.mgmt.search.operations.Operations
45
+ :ivar offerings: OfferingsOperations operations
46
+ :vartype offerings: azure.mgmt.search.operations.OfferingsOperations
45
47
:ivar admin_keys: AdminKeysOperations operations
46
48
:vartype admin_keys: azure.mgmt.search.operations.AdminKeysOperations
47
49
:ivar query_keys: QueryKeysOperations operations
@@ -62,14 +64,16 @@ class SearchManagementClient(
62
64
NetworkSecurityPerimeterConfigurationsOperations operations
63
65
:vartype network_security_perimeter_configurations:
64
66
azure.mgmt.search.operations.NetworkSecurityPerimeterConfigurationsOperations
67
+ :ivar service: ServiceOperations operations
68
+ :vartype service: azure.mgmt.search.operations.ServiceOperations
65
69
:param credential: Credential needed for the client to connect to Azure. Required.
66
70
:type credential: ~azure.core.credentials.TokenCredential
67
71
:param subscription_id: The unique identifier for a Microsoft Azure subscription. You can
68
72
obtain this value from the Azure Resource Manager API or the portal. Required.
69
73
:type subscription_id: str
70
74
:param base_url: Service URL. Default value is "https://management.azure.com".
71
75
: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
73
77
this default value may result in unsupported behavior.
74
78
:paramtype api_version: str
75
79
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -111,6 +115,7 @@ def __init__(
111
115
self ._deserialize = Deserializer (client_models )
112
116
self ._serialize .client_side_validation = False
113
117
self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
118
+ self .offerings = OfferingsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
114
119
self .admin_keys = AdminKeysOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
115
120
self .query_keys = QueryKeysOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
116
121
self .services = ServicesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
@@ -127,6 +132,7 @@ def __init__(
127
132
self .network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations (
128
133
self ._client , self ._config , self ._serialize , self ._deserialize
129
134
)
135
+ self .service = ServiceOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
130
136
131
137
def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
132
138
"""Runs the network request through the client's chained policies.
@@ -153,7 +159,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
153
159
def close (self ) -> None :
154
160
self ._client .close ()
155
161
156
- def __enter__ (self ) -> "SearchManagementClient" :
162
+ def __enter__ (self ) -> Self :
157
163
self ._client .__enter__ ()
158
164
return self
159
165
0 commit comments