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
2627class ContentSafetyClient (ContentSafetyClientOperationsMixin ): # pylint: disable=client-accepts-api-version-keyword
2728 """ContentSafetyClient.
2829
29- :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example:
30+ :param endpoint: test
31+ Supported Cognitive Services endpoints (protocol and hostname, for example:
3032 https://:code:`<resource-name>`.cognitiveservices.azure.com). Required.
3133 :type endpoint: str
32- :param credential: Credential needed for the client to connect to Azure . Is either a
34+ :param credential: Credential used to authenticate requests to the service . Is either a
3335 AzureKeyCredential type or a TokenCredential type. Required.
3436 :type credential: ~azure.core.credentials.AzureKeyCredential or
3537 ~azure.core.credentials.TokenCredential
36- :keyword api_version: The API version to use for this operation. Default value is "2023-10 -01".
38+ :keyword api_version: The API version to use for this operation. Default value is "2024-09 -01".
3739 Note that overriding this default value may result in unsupported behavior.
3840 :paramtype api_version: str
3941 """
@@ -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
@@ -104,14 +106,15 @@ def __exit__(self, *exc_details: Any) -> None:
104106class BlocklistClient (BlocklistClientOperationsMixin ): # pylint: disable=client-accepts-api-version-keyword
105107 """BlocklistClient.
106108
107- :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example:
109+ :param endpoint: test
110+ Supported Cognitive Services endpoints (protocol and hostname, for example:
108111 https://:code:`<resource-name>`.cognitiveservices.azure.com). Required.
109112 :type endpoint: str
110- :param credential: Credential needed for the client to connect to Azure . Is either a
113+ :param credential: Credential used to authenticate requests to the service . Is either a
111114 AzureKeyCredential type or a TokenCredential type. Required.
112115 :type credential: ~azure.core.credentials.AzureKeyCredential or
113116 ~azure.core.credentials.TokenCredential
114- :keyword api_version: The API version to use for this operation. Default value is "2023-10 -01".
117+ :keyword api_version: The API version to use for this operation. Default value is "2024-09 -01".
115118 Note that overriding this default value may result in unsupported behavior.
116119 :paramtype api_version: str
117120 """
@@ -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