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,11 +30,11 @@ 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+ :keyword api_version: The API version to use for this operation. Default value is "2024-09 -01".
3738 Note that overriding this default value may result in unsupported behavior.
3839 :paramtype api_version: str
3940 """
@@ -84,7 +85,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
8485
8586 request_copy = deepcopy (request )
8687 path_format_arguments = {
87- "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , "str" , skip_quote = True ),
88+ "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , "str" ),
8889 }
8990
9091 request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
@@ -93,7 +94,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
9394 def close (self ) -> None :
9495 self ._client .close ()
9596
96- def __enter__ (self ) -> "ContentSafetyClient" :
97+ def __enter__ (self ) -> Self :
9798 self ._client .__enter__ ()
9899 return self
99100
@@ -107,11 +108,11 @@ class BlocklistClient(BlocklistClientOperationsMixin): # pylint: disable=client
107108 :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example:
108109 https://:code:`<resource-name>`.cognitiveservices.azure.com). Required.
109110 :type endpoint: str
110- :param credential: Credential needed for the client to connect to Azure . Is either a
111+ :param credential: Credential used to authenticate requests to the service . Is either a
111112 AzureKeyCredential type or a TokenCredential type. Required.
112113 :type credential: ~azure.core.credentials.AzureKeyCredential or
113114 ~azure.core.credentials.TokenCredential
114- :keyword api_version: The API version to use for this operation. Default value is "2023-10 -01".
115+ :keyword api_version: The API version to use for this operation. Default value is "2024-09 -01".
115116 Note that overriding this default value may result in unsupported behavior.
116117 :paramtype api_version: str
117118 """
@@ -162,7 +163,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
162163
163164 request_copy = deepcopy (request )
164165 path_format_arguments = {
165- "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , "str" , skip_quote = True ),
166+ "endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , "str" ),
166167 }
167168
168169 request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
@@ -171,7 +172,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
171172 def close (self ) -> None :
172173 self ._client .close ()
173174
174- def __enter__ (self ) -> "BlocklistClient" :
175+ def __enter__ (self ) -> Self :
175176 self ._client .__enter__ ()
176177 return self
177178
0 commit comments