2020 FaceClientConfiguration ,
2121 FaceSessionClientConfiguration ,
2222)
23- from ._serialization import Deserializer , Serializer
23+ from ._utils . serialization import Deserializer , Serializer
2424from .operations import (
2525 FaceClientOperationsMixin ,
2626 FaceSessionClientOperationsMixin ,
3232 from azure .core .credentials import TokenCredential
3333
3434
35- class FaceAdministrationClient :
36- """FaceAdministrationClient .
35+ class FaceClient ( FaceClientOperationsMixin ) :
36+ """FaceClient .
3737
38- :ivar large_face_list: LargeFaceListOperations operations
39- :vartype large_face_list: azure.ai.vision.face.operations.LargeFaceListOperations
40- :ivar large_person_group: LargePersonGroupOperations operations
41- :vartype large_person_group: azure.ai.vision.face.operations.LargePersonGroupOperations
4238 :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example:
4339 https://{resource-name}.cognitiveservices.azure.com). Required.
4440 :type endpoint: str
45- :param credential: Credential used to authenticate requests to the service. Is either a
46- AzureKeyCredential type or a TokenCredential type. Required.
41+ :param credential: Credential used to authenticate requests to the service. Is either a key
42+ credential type or a token credential type. Required.
4743 :type credential: ~azure.core.credentials.AzureKeyCredential or
4844 ~azure.core.credentials.TokenCredential
49- :keyword api_version: API Version. Known values are "v1.2-preview.1 " and None. Default value is
50- "v1.2-preview.1". Note that overriding this default value may result in unsupported behavior.
45+ :keyword api_version: API Version. Known values are "v1.2" and None. Default value is "v1.2".
46+ Note that overriding this default value may result in unsupported behavior.
5147 :paramtype api_version: str or ~azure.ai.vision.face.models.Versions
52- :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
53- Retry-After header is present.
5448 """
5549
5650 def __init__ (self , endpoint : str , credential : Union [AzureKeyCredential , "TokenCredential" ], ** kwargs : Any ) -> None :
5751 _endpoint = "{endpoint}/face/{apiVersion}"
58- self ._config = FaceAdministrationClientConfiguration (endpoint = endpoint , credential = credential , ** kwargs )
52+ self ._config = FaceClientConfiguration (endpoint = endpoint , credential = credential , ** kwargs )
53+
5954 _policies = kwargs .pop ("policies" , None )
6055 if _policies is None :
6156 _policies = [
@@ -78,10 +73,6 @@ def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCr
7873 self ._serialize = Serializer ()
7974 self ._deserialize = Deserializer ()
8075 self ._serialize .client_side_validation = False
81- self .large_face_list = LargeFaceListOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
82- self .large_person_group = LargePersonGroupOperations (
83- self ._client , self ._config , self ._serialize , self ._deserialize
84- )
8576
8677 def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
8778 """Runs the network request through the client's chained policies.
@@ -121,24 +112,25 @@ def __exit__(self, *exc_details: Any) -> None:
121112 self ._client .__exit__ (* exc_details )
122113
123114
124- class FaceClient ( FaceClientOperationsMixin ):
125- """FaceClient .
115+ class FaceSessionClient ( FaceSessionClientOperationsMixin ):
116+ """FaceSessionClient .
126117
127118 :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example:
128119 https://{resource-name}.cognitiveservices.azure.com). Required.
129120 :type endpoint: str
130- :param credential: Credential used to authenticate requests to the service. Is either a
131- AzureKeyCredential type or a TokenCredential type. Required.
121+ :param credential: Credential used to authenticate requests to the service. Is either a key
122+ credential type or a token credential type. Required.
132123 :type credential: ~azure.core.credentials.AzureKeyCredential or
133124 ~azure.core.credentials.TokenCredential
134- :keyword api_version: API Version. Known values are "v1.2-preview.1 " and None. Default value is
135- "v1.2-preview.1". Note that overriding this default value may result in unsupported behavior.
125+ :keyword api_version: API Version. Known values are "v1.2" and None. Default value is "v1.2".
126+ Note that overriding this default value may result in unsupported behavior.
136127 :paramtype api_version: str or ~azure.ai.vision.face.models.Versions
137128 """
138129
139130 def __init__ (self , endpoint : str , credential : Union [AzureKeyCredential , "TokenCredential" ], ** kwargs : Any ) -> None :
140131 _endpoint = "{endpoint}/face/{apiVersion}"
141- self ._config = FaceClientConfiguration (endpoint = endpoint , credential = credential , ** kwargs )
132+ self ._config = FaceSessionClientConfiguration (endpoint = endpoint , credential = credential , ** kwargs )
133+
142134 _policies = kwargs .pop ("policies" , None )
143135 if _policies is None :
144136 _policies = [
@@ -200,24 +192,31 @@ def __exit__(self, *exc_details: Any) -> None:
200192 self ._client .__exit__ (* exc_details )
201193
202194
203- class FaceSessionClient ( FaceSessionClientOperationsMixin ) :
204- """FaceSessionClient .
195+ class FaceAdministrationClient :
196+ """FaceAdministrationClient .
205197
198+ :ivar large_face_list: LargeFaceListOperations operations
199+ :vartype large_face_list: azure.ai.vision.face.operations.LargeFaceListOperations
200+ :ivar large_person_group: LargePersonGroupOperations operations
201+ :vartype large_person_group: azure.ai.vision.face.operations.LargePersonGroupOperations
206202 :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example:
207203 https://{resource-name}.cognitiveservices.azure.com). Required.
208204 :type endpoint: str
209- :param credential: Credential used to authenticate requests to the service. Is either a
210- AzureKeyCredential type or a TokenCredential type. Required.
205+ :param credential: Credential used to authenticate requests to the service. Is either a key
206+ credential type or a token credential type. Required.
211207 :type credential: ~azure.core.credentials.AzureKeyCredential or
212208 ~azure.core.credentials.TokenCredential
213- :keyword api_version: API Version. Known values are "v1.2-preview.1 " and None. Default value is
214- "v1.2-preview.1". Note that overriding this default value may result in unsupported behavior.
209+ :keyword api_version: API Version. Known values are "v1.2" and None. Default value is "v1.2".
210+ Note that overriding this default value may result in unsupported behavior.
215211 :paramtype api_version: str or ~azure.ai.vision.face.models.Versions
212+ :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
213+ Retry-After header is present.
216214 """
217215
218216 def __init__ (self , endpoint : str , credential : Union [AzureKeyCredential , "TokenCredential" ], ** kwargs : Any ) -> None :
219217 _endpoint = "{endpoint}/face/{apiVersion}"
220- self ._config = FaceSessionClientConfiguration (endpoint = endpoint , credential = credential , ** kwargs )
218+ self ._config = FaceAdministrationClientConfiguration (endpoint = endpoint , credential = credential , ** kwargs )
219+
221220 _policies = kwargs .pop ("policies" , None )
222221 if _policies is None :
223222 _policies = [
@@ -240,6 +239,10 @@ def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCr
240239 self ._serialize = Serializer ()
241240 self ._deserialize = Deserializer ()
242241 self ._serialize .client_side_validation = False
242+ self .large_face_list = LargeFaceListOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
243+ self .large_person_group = LargePersonGroupOperations (
244+ self ._client , self ._config , self ._serialize , self ._deserialize
245+ )
243246
244247 def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
245248 """Runs the network request through the client's chained policies.
0 commit comments