88
99from copy import deepcopy
1010from typing import Any , TYPE_CHECKING , Union
11+ from typing_extensions import Self
1112
1213from azure .core import PipelineClient
1314from azure .core .credentials import AzureKeyCredential
@@ -29,12 +30,13 @@ class ContentSafetyClient(ContentSafetyClientOperationsMixin): # pylint: disabl
2930 :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example:
3031 https://:code:`<resource-name>`.cognitiveservices.azure.com). Required.
3132 :type endpoint: str
32- :param credential: Credential needed for the client to connect to Azure . Is either a
33+ :param credential: Credential used to authenticate requests to the service . Is either a
3334 AzureKeyCredential type or a TokenCredential type. Required.
3435 :type credential: ~azure.core.credentials.AzureKeyCredential or
3536 ~azure.core.credentials.TokenCredential
36- :keyword api_version: The API version to use for this operation. Default value is "2023-10-01".
37- Note that overriding this default value may result in unsupported behavior.
37+ :keyword api_version: The API version to use for this operation. Default value is
38+ "2024-09-15-preview". Note that overriding this default value may result in unsupported
39+ behavior.
3840 :paramtype api_version: str
3941 """
4042
@@ -84,7 +86,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
8486
8587 request_copy = deepcopy (request )
8688 path_format_arguments = {
87- "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , "str" , skip_quote = True ),
89+ "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , "str" ),
8890 }
8991
9092 request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
@@ -93,7 +95,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
9395 def close (self ) -> None :
9496 self ._client .close ()
9597
96- def __enter__ (self ) -> "ContentSafetyClient" :
98+ def __enter__ (self ) -> Self :
9799 self ._client .__enter__ ()
98100 return self
99101
@@ -107,12 +109,13 @@ class BlocklistClient(BlocklistClientOperationsMixin): # pylint: disable=client
107109 :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example:
108110 https://:code:`<resource-name>`.cognitiveservices.azure.com). Required.
109111 :type endpoint: str
110- :param credential: Credential needed for the client to connect to Azure . Is either a
112+ :param credential: Credential used to authenticate requests to the service . Is either a
111113 AzureKeyCredential type or a TokenCredential type. Required.
112114 :type credential: ~azure.core.credentials.AzureKeyCredential or
113115 ~azure.core.credentials.TokenCredential
114- :keyword api_version: The API version to use for this operation. Default value is "2023-10-01".
115- Note that overriding this default value may result in unsupported behavior.
116+ :keyword api_version: The API version to use for this operation. Default value is
117+ "2024-09-15-preview". Note that overriding this default value may result in unsupported
118+ behavior.
116119 :paramtype api_version: str
117120 """
118121
@@ -162,7 +165,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
162165
163166 request_copy = deepcopy (request )
164167 path_format_arguments = {
165- "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , "str" , skip_quote = True ),
168+ "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , "str" ),
166169 }
167170
168171 request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
@@ -171,7 +174,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
171174 def close (self ) -> None :
172175 self ._client .close ()
173176
174- def __enter__ (self ) -> "BlocklistClient" :
177+ def __enter__ (self ) -> Self :
175178 self ._client .__enter__ ()
176179 return self
177180
0 commit comments