def add_face_from_stream(<EOL>self, person_group_id, person_id, image, user_data=None, target_face=None, custom_headers=None, raw=False, callback=None, **operation_config):

<EOL>url = self.add_face_from_stream.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if user_data is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_data, '<STR_LIT:str>', max_length=<NUM_LIT>)<EOL><DEDENT>if target_face is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", target_face, '<STR_LIT>', div='<STR_LIT:U+002C>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._client.stream_upload(image, callback)<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Add a representative face to a person for identification. The input
        face is specified as an image with a targetFace rectangle.

        :param person_group_id: Id referencing a particular person group.
        :type person_group_id: str
        :param person_id: Id referencing a particular person.
        :type person_id: str
        :param image: An image stream.
        :type image: Generator
        :param user_data: User-specified data about the face for any purpose.
         The maximum length is 1KB.
        :type user_data: str
        :param target_face: A face rectangle to specify the target face to be
         added to a person in the format of "targetFace=left,top,width,height".
         E.g. "targetFace=10,10,100,100". If there is more than one face in the
         image, targetFace is required to specify which face to add. No
         targetFace means there is only one face detected in the entire image.
        :type target_face: list[int]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param callback: When specified, will be called with each chunk of
         data that is streamed. The callback should take two arguments, the
         bytes of the current chunk of data and the response object. If the
         data is uploading, response will be None.
        :type callback: Callable[Bytes, response=None]
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PersistedFace or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.PersistedFace or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def create(<EOL>self, person_group_id, name=None, user_data=None, recognition_model="<STR_LIT>", custom_headers=None, raw=False, **operation_config):

body = models.MetaDataContract(name=name, user_data=user_data, recognition_model=recognition_model)<EOL>url = self.create.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Create a new person group with specified personGroupId, name,
        user-provided userData and recognitionModel.

 A person group is the container of the uploaded person data,
        including face images and face recognition features.

 After creation, use [PersonGroup Person -
        Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523c)
        to add persons into the group, and then call [PersonGroup -
        Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249)
        to get this group ready for [Face -
        Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239).

 The person's face, image, and userData will be stored on server
        until [PersonGroup Person -
        Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d)
        or [PersonGroup -
        Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245)
        is called.

        * Free-tier subscription quota: 1,000 person groups. Each holds up to
        1,000 persons.
        * S0-tier subscription quota: 1,000,000 person groups. Each holds up to
        10,000 persons.
        * to handle larger scale face identification problem, please consider
        using
        [LargePersonGroup](/docs/services/563879b61984550e40cbbe8d/operations/599acdee6ac60f11b48b5a9d).

        'recognitionModel' should be specified to associate with this person
        group. The default value for 'recognitionModel' is 'recognition_01', if
        the latest model needed, please explicitly specify the model you need
        in this parameter. New faces that are added to an existing person group
        will use the recognition model that's already associated with the
        collection. Existing face features in a person group can't be updated
        to features extracted by another version of recognition model.
        .

        :param person_group_id: Id referencing a particular person group.
        :type person_group_id: str
        :param name: User defined name, maximum length is 128.
        :type name: str
        :param user_data: User specified data. Length should not exceed 16KB.
        :type user_data: str
        :param recognition_model: Possible values include: 'recognition_01',
         'recognition_02'
        :type recognition_model: str or
         ~azure.cognitiveservices.vision.face.models.RecognitionModel
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def delete(<EOL>self, person_group_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Delete an existing person group. Persisted face features of all people
        in the person group will also be deleted.

        :param person_group_id: Id referencing a particular person group.
        :type person_group_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def get(<EOL>self, person_group_id, return_recognition_model=False, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if return_recognition_model is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_recognition_model, '<STR_LIT:bool>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Retrieve person group name, userData and recognitionModel. To get
        person information under this personGroup, use [PersonGroup Person -
        List](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395241).

        :param person_group_id: Id referencing a particular person group.
        :type person_group_id: str
        :param return_recognition_model: A value indicating whether the
         operation should return 'recognitionModel' in response.
        :type return_recognition_model: bool
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PersonGroup or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.PersonGroup or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def update(<EOL>self, person_group_id, name=None, user_data=None, custom_headers=None, raw=False, **operation_config):

body = models.NameAndUserDataContract(name=name, user_data=user_data)<EOL>url = self.update.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.patch(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Update an existing person group's display name and userData. The
        properties which does not appear in request body will not be updated.

        :param person_group_id: Id referencing a particular person group.
        :type person_group_id: str
        :param name: User defined name, maximum length is 128.
        :type name: str
        :param user_data: User specified data. Length should not exceed 16KB.
        :type user_data: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def get_training_status(<EOL>self, person_group_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_training_status.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Retrieve the training status of a person group (completed or ongoing).

        :param person_group_id: Id referencing a particular person group.
        :type person_group_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: TrainingStatus or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.TrainingStatus or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def list(<EOL>self, start=None, top=<NUM_LIT:1000>, return_recognition_model=False, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if start is not None:<EOL><INDENT>query_parameters['<STR_LIT:start>'] = self._serialize.query("<STR_LIT:start>", start, '<STR_LIT:str>', max_length=<NUM_LIT:64>)<EOL><DEDENT>if top is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", top, '<STR_LIT:int>', maximum=<NUM_LIT:1000>, minimum=<NUM_LIT:1>)<EOL><DEDENT>if return_recognition_model is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_recognition_model, '<STR_LIT:bool>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

List person groups’ personGroupId, name, userData and
        recognitionModel.

        * Person groups are stored in alphabetical order of personGroupId.
        * "start" parameter (string, optional) is a user-provided personGroupId
        value that returned entries have larger ids by string comparison.
        "start" set to empty to indicate return from the first item.
        * "top" parameter (int, optional) specifies the number of entries to
        return. A maximal of 1000 entries can be returned in one call. To fetch
        more, you can specify "start" with the last returned entry’s Id of the
        current call.

        For example, total 5 person groups: "group1", ..., "group5".

 "start=&top=" will return all 5 groups.

 "start=&top=2" will return "group1", "group2".

 "start=group2&top=3" will return "group3", "group4", "group5".
        .

        :param start: List person groups from the least personGroupId greater
         than the "start".
        :type start: str
        :param top: The number of person groups to list.
        :type top: int
        :param return_recognition_model: A value indicating whether the
         operation should return 'recognitionModel' in response.
        :type return_recognition_model: bool
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: list or ClientRawResponse if raw=true
        :rtype: list[~azure.cognitiveservices.vision.face.models.PersonGroup]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def train(<EOL>self, person_group_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.train.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.post(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Queue a person group training task, the training task may not be
        started immediately.

        :param person_group_id: Id referencing a particular person group.
        :type person_group_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def find_similar(<EOL>self, face_id, face_list_id=None, large_face_list_id=None, face_ids=None, max_num_of_candidates_returned=<NUM_LIT:20>, mode="<STR_LIT>", custom_headers=None, raw=False, **operation_config):

body = models.FindSimilarRequest(face_id=face_id, face_list_id=face_list_id, large_face_list_id=large_face_list_id, face_ids=face_ids, max_num_of_candidates_returned=max_num_of_candidates_returned, mode=mode)<EOL>url = self.find_similar.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Given query face's faceId, to search the similar-looking faces from a
        faceId array, a face list or a large face list. faceId array contains
        the faces created by [Face -
        Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236),
        which will expire 24 hours after creation. A "faceListId" is created by
        [FaceList -
        Create](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039524b)
        containing persistedFaceIds that will not expire. And a
        "largeFaceListId" is created by [LargeFaceList -
        Create](/docs/services/563879b61984550e40cbbe8d/operations/5a157b68d2de3616c086f2cc)
        containing persistedFaceIds that will also not expire. Depending on the
        input the returned similar faces list contains faceIds or
        persistedFaceIds ranked by similarity.

Find similar has two working modes, "matchPerson" and "matchFace".
        "matchPerson" is the default mode that it tries to find faces of the
        same person as possible by using internal same-person thresholds. It is
        useful to find a known person's other photos. Note that an empty list
        will be returned if no faces pass the internal thresholds. "matchFace"
        mode ignores same-person thresholds and returns ranked similar faces
        anyway, even the similarity is low. It can be used in the cases like
        searching celebrity-looking faces.

The 'recognitionModel' associated with the query face's faceId
        should be the same as the 'recognitionModel' used by the target faceId
        array, face list or large face list.
        .

        :param face_id: FaceId of the query face. User needs to call Face -
         Detect first to get a valid faceId. Note that this faceId is not
         persisted and will expire 24 hours after the detection call
        :type face_id: str
        :param face_list_id: An existing user-specified unique candidate face
         list, created in Face List - Create a Face List. Face list contains a
         set of persistedFaceIds which are persisted and will never expire.
         Parameter faceListId, largeFaceListId and faceIds should not be
         provided at the same time.
        :type face_list_id: str
        :param large_face_list_id: An existing user-specified unique candidate
         large face list, created in LargeFaceList - Create. Large face list
         contains a set of persistedFaceIds which are persisted and will never
         expire. Parameter faceListId, largeFaceListId and faceIds should not
         be provided at the same time.
        :type large_face_list_id: str
        :param face_ids: An array of candidate faceIds. All of them are
         created by Face - Detect and the faceIds will expire 24 hours after
         the detection call. The number of faceIds is limited to 1000.
         Parameter faceListId, largeFaceListId and faceIds should not be
         provided at the same time.
        :type face_ids: list[str]
        :param max_num_of_candidates_returned: The number of top similar faces
         returned. The valid range is [1, 1000].
        :type max_num_of_candidates_returned: int
        :param mode: Similar face searching mode. It can be "matchPerson" or
         "matchFace". Possible values include: 'matchPerson', 'matchFace'
        :type mode: str or
         ~azure.cognitiveservices.vision.face.models.FindSimilarMatchMode
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: list or ClientRawResponse if raw=true
        :rtype: list[~azure.cognitiveservices.vision.face.models.SimilarFace]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def group(<EOL>self, face_ids, custom_headers=None, raw=False, **operation_config):

body = models.GroupRequest(face_ids=face_ids)<EOL>url = self.group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Divide candidate faces into groups based on face similarity.<br />
        * The output is one or more disjointed face groups and a messyGroup. A
        face group contains faces that have similar looking, often of the same
        person. Face groups are ranked by group size, i.e. number of faces.
        Notice that faces belonging to a same person might be split into
        several groups in the result.
        * MessyGroup is a special face group containing faces that cannot find
        any similar counterpart face from original faces. The messyGroup will
        not appear in the result if all faces found their counterparts.
        * Group API needs at least 2 candidate faces and 1000 at most. We
        suggest to try [Face -
        Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a)
        when you only have 2 candidate faces.
        * The 'recognitionModel' associated with the query faces' faceIds
        should be the same.
        .

        :param face_ids: Array of candidate faceId created by Face - Detect.
         The maximum is 1000 faces
        :type face_ids: list[str]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: GroupResult or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.GroupResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def identify(<EOL>self, face_ids, person_group_id=None, large_person_group_id=None, max_num_of_candidates_returned=<NUM_LIT:1>, confidence_threshold=None, custom_headers=None, raw=False, **operation_config):

body = models.IdentifyRequest(face_ids=face_ids, person_group_id=person_group_id, large_person_group_id=large_person_group_id, max_num_of_candidates_returned=max_num_of_candidates_returned, confidence_threshold=confidence_threshold)<EOL>url = self.identify.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

1-to-many identification to find the closest matches of the specific
        query person face from a person group or large person group.

 For each face in the faceIds array, Face Identify will compute
        similarities between the query face and all the faces in the person
        group (given by personGroupId) or large person group (given by
        largePersonGroupId), and return candidate person(s) for that face
        ranked by similarity confidence. The person group/large person group
        should be trained to make it ready for identification. See more in
        [PersonGroup -
        Train](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395249)
        and [LargePersonGroup -
        Train](/docs/services/563879b61984550e40cbbe8d/operations/599ae2d16ac60f11b48b5aa4).

        Remarks:

        * The algorithm allows more than one face to be identified
        independently at the same request, but no more than 10 faces.
        * Each person in the person group/large person group could have more
        than one face, but no more than 248 faces.
        * Higher face image quality means better identification precision.
        Please consider high-quality faces: frontal, clear, and face size is
        200x200 pixels (100 pixels between eyes) or bigger.
        * Number of candidates returned is restricted by
        maxNumOfCandidatesReturned and confidenceThreshold. If no person is
        identified, the returned candidates will be an empty array.
        * Try [Face - Find
        Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237)
        when you need to find similar faces from a face list/large face list
        instead of a person group/large person group.
        * The 'recognitionModel' associated with the query faces' faceIds
        should be the same as the 'recognitionModel' used by the target person
        group or large person group.
        .

        :param face_ids: Array of query faces faceIds, created by the Face -
         Detect. Each of the faces are identified independently. The valid
         number of faceIds is between [1, 10].
        :type face_ids: list[str]
        :param person_group_id: PersonGroupId of the target person group,
         created by PersonGroup - Create. Parameter personGroupId and
         largePersonGroupId should not be provided at the same time.
        :type person_group_id: str
        :param large_person_group_id: LargePersonGroupId of the target large
         person group, created by LargePersonGroup - Create. Parameter
         personGroupId and largePersonGroupId should not be provided at the
         same time.
        :type large_person_group_id: str
        :param max_num_of_candidates_returned: The range of
         maxNumOfCandidatesReturned is between 1 and 5 (default is 1).
        :type max_num_of_candidates_returned: int
        :param confidence_threshold: Confidence threshold of identification,
         used to judge whether one face belong to one person. The range of
         confidenceThreshold is [0, 1] (default specified by algorithm).
        :type confidence_threshold: float
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: list or ClientRawResponse if raw=true
        :rtype:
         list[~azure.cognitiveservices.vision.face.models.IdentifyResult] or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def verify_face_to_face(<EOL>self, face_id1, face_id2, custom_headers=None, raw=False, **operation_config):

body = models.VerifyFaceToFaceRequest(face_id1=face_id1, face_id2=face_id2)<EOL>url = self.verify_face_to_face.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Verify whether two faces belong to a same person or whether one face
        belongs to a person.

        Remarks:

        * Higher face image quality means better identification precision.
        Please consider high-quality faces: frontal, clear, and face size is
        200x200 pixels (100 pixels between eyes) or bigger.
        * For the scenarios that are sensitive to accuracy please make your own
        judgment.
        * The 'recognitionModel' associated with the query faces' faceIds
        should be the same as the 'recognitionModel' used by the target face,
        person group or large person group.
        .

        :param face_id1: FaceId of the first face, comes from Face - Detect
        :type face_id1: str
        :param face_id2: FaceId of the second face, comes from Face - Detect
        :type face_id2: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: VerifyResult or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.VerifyResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def detect_with_url(<EOL>self, url, return_face_id=True, return_face_landmarks=False, return_face_attributes=None, recognition_model="<STR_LIT>", return_recognition_model=False, custom_headers=None, raw=False, **operation_config):

image_url = models.ImageUrl(url=url)<EOL>url = self.detect_with_url.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if return_face_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_face_id, '<STR_LIT:bool>')<EOL><DEDENT>if return_face_landmarks is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_face_landmarks, '<STR_LIT:bool>')<EOL><DEDENT>if return_face_attributes is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_face_attributes, '<STR_LIT>', div='<STR_LIT:U+002C>')<EOL><DEDENT>if recognition_model is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", recognition_model, '<STR_LIT:str>')<EOL><DEDENT>if return_recognition_model is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_recognition_model, '<STR_LIT:bool>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(image_url, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Detect human faces in an image, return face rectangles, and optionally
        with faceIds, landmarks, and attributes.<br />
        * Optional parameters including faceId, landmarks, and attributes.
        Attributes include age, gender, headPose, smile, facialHair, glasses,
        emotion, hair, makeup, occlusion, accessories, blur, exposure and
        noise.
        * The extracted face feature, instead of the actual image, will be
        stored on server. The faceId is an identifier of the face feature and
        will be used in [Face -
        Identify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395239),
        [Face -
        Verify](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523a),
        and [Face - Find
        Similar](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237).
        It will expire 24 hours after the detection call.
        * Higher face image quality means better detection and recognition
        precision. Please consider high-quality faces: frontal, clear, and face
        size is 200x200 pixels (100 pixels between eyes) or bigger.
        * JPEG, PNG, GIF (the first frame), and BMP format are supported. The
        allowed image file size is from 1KB to 6MB.
        * Faces are detectable when its size is 36x36 to 4096x4096 pixels. If
        need to detect very small but clear faces, please try to enlarge the
        input image.
        * Up to 64 faces can be returned for an image. Faces are ranked by face
        rectangle size from large to small.
        * Face detector prefer frontal and near-frontal faces. There are cases
        that faces may not be detected, e.g. exceptionally large face angles
        (head-pose) or being occluded, or wrong image orientation.
        * Attributes (age, gender, headPose, smile, facialHair, glasses,
        emotion, hair, makeup, occlusion, accessories, blur, exposure and
        noise) may not be perfectly accurate. HeadPose's pitch value is a
        reserved field and will always return 0.
        * Different 'recognitionModel' values are provided. If follow-up
        operations like Verify, Identify, Find Similar are needed, please
        specify the recognition model with 'recognitionModel' parameter. The
        default value for 'recognitionModel' is 'recognition_01', if latest
        model needed, please explicitly specify the model you need in this
        parameter. Once specified, the detected faceIds will be associated with
        the specified recognition model. More details, please refer to [How to
        specify a recognition
        model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-recognition-model)
        .

        :param url: Publicly reachable URL of an image
        :type url: str
        :param return_face_id: A value indicating whether the operation should
         return faceIds of detected faces.
        :type return_face_id: bool
        :param return_face_landmarks: A value indicating whether the operation
         should return landmarks of the detected faces.
        :type return_face_landmarks: bool
        :param return_face_attributes: Analyze and return the one or more
         specified face attributes in the comma-separated string like
         "returnFaceAttributes=age,gender". Supported face attributes include
         age, gender, headPose, smile, facialHair, glasses and emotion. Note
         that each face attribute analysis has additional computational and
         time cost.
        :type return_face_attributes: list[str or
         ~azure.cognitiveservices.vision.face.models.FaceAttributeType]
        :param recognition_model: Name of recognition model. Recognition model
         is used when the face features are extracted and associated with
         detected faceIds, (Large)FaceList or (Large)PersonGroup. A recognition
         model name can be provided when performing Face - Detect or
         (Large)FaceList - Create or (Large)PersonGroup - Create. The default
         value is 'recognition_01', if latest model needed, please explicitly
         specify the model you need. Possible values include: 'recognition_01',
         'recognition_02'
        :type recognition_model: str or
         ~azure.cognitiveservices.vision.face.models.RecognitionModel
        :param return_recognition_model: A value indicating whether the
         operation should return 'recognitionModel' in response.
        :type return_recognition_model: bool
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: list or ClientRawResponse if raw=true
        :rtype: list[~azure.cognitiveservices.vision.face.models.DetectedFace]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def verify_face_to_person(<EOL>self, face_id, person_id, person_group_id=None, large_person_group_id=None, custom_headers=None, raw=False, **operation_config):

body = models.VerifyFaceToPersonRequest(face_id=face_id, person_group_id=person_group_id, large_person_group_id=large_person_group_id, person_id=person_id)<EOL>url = self.verify_face_to_person.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Verify whether two faces belong to a same person. Compares a face Id
        with a Person Id.

        :param face_id: FaceId of the face, comes from Face - Detect
        :type face_id: str
        :param person_id: Specify a certain person in a person group or a
         large person group. personId is created in PersonGroup Person - Create
         or LargePersonGroup Person - Create.
        :type person_id: str
        :param person_group_id: Using existing personGroupId and personId for
         fast loading a specified person. personGroupId is created in
         PersonGroup - Create. Parameter personGroupId and largePersonGroupId
         should not be provided at the same time.
        :type person_group_id: str
        :param large_person_group_id: Using existing largePersonGroupId and
         personId for fast loading a specified person. largePersonGroupId is
         created in LargePersonGroup - Create. Parameter personGroupId and
         largePersonGroupId should not be provided at the same time.
        :type large_person_group_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: VerifyResult or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.VerifyResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def detect_with_stream(<EOL>self, image, return_face_id=True, return_face_landmarks=False, return_face_attributes=None, recognition_model="<STR_LIT>", return_recognition_model=False, custom_headers=None, raw=False, callback=None, **operation_config):

<EOL>url = self.detect_with_stream.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if return_face_id is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_face_id, '<STR_LIT:bool>')<EOL><DEDENT>if return_face_landmarks is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_face_landmarks, '<STR_LIT:bool>')<EOL><DEDENT>if return_face_attributes is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_face_attributes, '<STR_LIT>', div='<STR_LIT:U+002C>')<EOL><DEDENT>if recognition_model is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", recognition_model, '<STR_LIT:str>')<EOL><DEDENT>if return_recognition_model is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", return_recognition_model, '<STR_LIT:bool>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._client.stream_upload(image, callback)<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Detect human faces in an image and returns face locations, and
        optionally with faceIds, landmarks, and attributes.

        :param image: An image stream.
        :type image: Generator
        :param return_face_id: A value indicating whether the operation should
         return faceIds of detected faces.
        :type return_face_id: bool
        :param return_face_landmarks: A value indicating whether the operation
         should return landmarks of the detected faces.
        :type return_face_landmarks: bool
        :param return_face_attributes: Analyze and return the one or more
         specified face attributes in the comma-separated string like
         "returnFaceAttributes=age,gender". Supported face attributes include
         age, gender, headPose, smile, facialHair, glasses and emotion. Note
         that each face attribute analysis has additional computational and
         time cost.
        :type return_face_attributes: list[str or
         ~azure.cognitiveservices.vision.face.models.FaceAttributeType]
        :param recognition_model: Name of recognition model. Recognition model
         is used when the face features are extracted and associated with
         detected faceIds, (Large)FaceList or (Large)PersonGroup. A recognition
         model name can be provided when performing Face - Detect or
         (Large)FaceList - Create or (Large)PersonGroup - Create. The default
         value is 'recognition_01', if latest model needed, please explicitly
         specify the model you need. Possible values include: 'recognition_01',
         'recognition_02'
        :type recognition_model: str or
         ~azure.cognitiveservices.vision.face.models.RecognitionModel
        :param return_recognition_model: A value indicating whether the
         operation should return 'recognitionModel' in response.
        :type return_recognition_model: bool
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param callback: When specified, will be called with each chunk of
         data that is streamed. The callback should take two arguments, the
         bytes of the current chunk of data and the response object. If the
         data is uploading, response will be None.
        :type callback: Callable[Bytes, response=None]
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: list or ClientRawResponse if raw=true
        :rtype: list[~azure.cognitiveservices.vision.face.models.DetectedFace]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def take(<EOL>self, type, object_id, apply_scope, user_data=None, custom_headers=None, raw=False, **operation_config):

body = models.TakeSnapshotRequest(type=type, object_id=object_id, apply_scope=apply_scope, user_data=user_data)<EOL>url = self.take.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Submit an operation to take a snapshot of face list, large face list,
        person group or large person group, with user-specified snapshot type,
        source object id, apply scope and an optional user data.

        The snapshot interfaces are for users to backup and restore their face
        data from one face subscription to another, inside same region or
        across regions. The workflow contains two phases, user first calls
        Snapshot - Take to create a copy of the source object and store it as a
        snapshot, then calls Snapshot - Apply to paste the snapshot to target
        subscription. The snapshots are stored in a centralized location (per
        Azure instance), so that they can be applied cross accounts and
        regions.

        Taking snapshot is an asynchronous operation. An operation id can be
        obtained from the "Operation-Location" field in response header, to be
        used in OperationStatus - Get for tracking the progress of creating the
        snapshot. The snapshot id will be included in the "resourceLocation"
        field in OperationStatus - Get response when the operation status is
        "succeeded".

        Snapshot taking time depends on the number of person and face entries
        in the source object. It could be in seconds, or up to several hours
        for 1,000,000 persons with multiple faces.

        Snapshots will be automatically expired and cleaned in 48 hours after
        it is created by Snapshot - Take. User can delete the snapshot using
        Snapshot - Delete by themselves any time before expiration.

        Taking snapshot for a certain object will not block any other
        operations against the object. All read-only operations (Get/List and
        Identify/FindSimilar/Verify) can be conducted as usual. For all
        writable operations, including Add/Update/Delete the source object or
        its persons/faces and Train, they are not blocked but not recommended
        because writable updates may not be reflected on the snapshot during
        its taking. After snapshot taking is completed, all readable and
        writable operations can work as normal. Snapshot will also include the
        training results of the source object, which means target subscription
        the snapshot applied to does not need re-train the target object before
        calling Identify/FindSimilar.

        * Free-tier subscription quota: 100 take operations per month.
        * S0-tier subscription quota: 100 take operations per day.

        :param type: User specified type for the source object to take
         snapshot from. Currently FaceList, PersonGroup, LargeFaceList and
         LargePersonGroup are supported. Possible values include: 'FaceList',
         'LargeFaceList', 'LargePersonGroup', 'PersonGroup'
        :type type: str or
         ~azure.cognitiveservices.vision.face.models.SnapshotObjectType
        :param object_id: User specified source object id to take snapshot
         from.
        :type object_id: str
        :param apply_scope: User specified array of target Face subscription
         ids for the snapshot. For each snapshot, only subscriptions included
         in the applyScope of Snapshot - Take can apply it.
        :type apply_scope: list[str]
        :param user_data: User specified data about the snapshot for any
         purpose. Length should not exceed 16KB.
        :type user_data: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def list(<EOL>self, type=None, apply_scope=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if type is not None:<EOL><INDENT>query_parameters['<STR_LIT:type>'] = self._serialize.query("<STR_LIT:type>", type, '<STR_LIT>')<EOL><DEDENT>if apply_scope is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", apply_scope, '<STR_LIT>', div='<STR_LIT:U+002C>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

List all accessible snapshots with related information, including
        snapshots that were taken by the user, or snapshots to be applied to
        the user (subscription id was included in the applyScope in Snapshot -
        Take).

        :param type: User specified object type as a search filter. Possible
         values include: 'FaceList', 'LargeFaceList', 'LargePersonGroup',
         'PersonGroup'
        :type type: str or
         ~azure.cognitiveservices.vision.face.models.SnapshotObjectType
        :param apply_scope: User specified snapshot apply scopes as a search
         filter. ApplyScope is an array of the target Azure subscription ids
         for the snapshot, specified by the user who created the snapshot by
         Snapshot - Take.
        :type apply_scope: list[str]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: list or ClientRawResponse if raw=true
        :rtype: list[~azure.cognitiveservices.vision.face.models.Snapshot] or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def get(<EOL>self, snapshot_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", snapshot_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Retrieve information about a snapshot. Snapshot is only accessible to
        the source subscription who took it, and target subscriptions included
        in the applyScope in Snapshot - Take.

        :param snapshot_id: Id referencing a particular snapshot.
        :type snapshot_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: Snapshot or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.Snapshot or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def update(<EOL>self, snapshot_id, apply_scope=None, user_data=None, custom_headers=None, raw=False, **operation_config):

body = models.UpdateSnapshotRequest(apply_scope=apply_scope, user_data=user_data)<EOL>url = self.update.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", snapshot_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.patch(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Update the information of a snapshot. Only the source subscription who
        took the snapshot can update the snapshot.

        :param snapshot_id: Id referencing a particular snapshot.
        :type snapshot_id: str
        :param apply_scope: Array of the target Face subscription ids for the
         snapshot, specified by the user who created the snapshot when calling
         Snapshot - Take. For each snapshot, only subscriptions included in the
         applyScope of Snapshot - Take can apply it.
        :type apply_scope: list[str]
        :param user_data: User specified data about the snapshot for any
         purpose. Length should not exceed 16KB.
        :type user_data: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def delete(<EOL>self, snapshot_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", snapshot_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Delete an existing snapshot according to the snapshotId. All object
        data and information in the snapshot will also be deleted. Only the
        source subscription who took the snapshot can delete the snapshot. If
        the user does not delete a snapshot with this API, the snapshot will
        still be automatically deleted in 48 hours after creation.

        :param snapshot_id: Id referencing a particular snapshot.
        :type snapshot_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def apply(<EOL>self, snapshot_id, object_id, mode="<STR_LIT>", custom_headers=None, raw=False, **operation_config):

body = models.ApplySnapshotRequest(object_id=object_id, mode=mode)<EOL>url = self.apply.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", snapshot_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>client_raw_response.add_headers({<EOL>'<STR_LIT>': '<STR_LIT:str>',<EOL>})<EOL>return client_raw_response<EOL><DEDENT>

Submit an operation to apply a snapshot to current subscription. For
        each snapshot, only subscriptions included in the applyScope of
        Snapshot - Take can apply it.

        The snapshot interfaces are for users to backup and restore their face
        data from one face subscription to another, inside same region or
        across regions. The workflow contains two phases, user first calls
        Snapshot - Take to create a copy of the source object and store it as a
        snapshot, then calls Snapshot - Apply to paste the snapshot to target
        subscription. The snapshots are stored in a centralized location (per
        Azure instance), so that they can be applied cross accounts and
        regions.

        Applying snapshot is an asynchronous operation. An operation id can be
        obtained from the "Operation-Location" field in response header, to be
        used in OperationStatus - Get for tracking the progress of applying the
        snapshot. The target object id will be included in the
        "resourceLocation" field in OperationStatus - Get response when the
        operation status is "succeeded".

        Snapshot applying time depends on the number of person and face entries
        in the snapshot object. It could be in seconds, or up to 1 hour for
        1,000,000 persons with multiple faces.

        Snapshots will be automatically expired and cleaned in 48 hours after
        it is created by Snapshot - Take. So the target subscription is
        required to apply the snapshot in 48 hours since its creation.

        Applying a snapshot will not block any other operations against the
        target object, however it is not recommended because the correctness
        cannot be guaranteed during snapshot applying. After snapshot applying
        is completed, all operations towards the target object can work as
        normal. Snapshot also includes the training results of the source
        object, which means target subscription the snapshot applied to does
        not need re-train the target object before calling
        Identify/FindSimilar.

        One snapshot can be applied multiple times in parallel, while currently
        only CreateNew apply mode is supported, which means the apply operation
        will fail if target subscription already contains an object of same
        type and using the same objectId. Users can specify the "objectId" in
        request body to avoid such conflicts.

        * Free-tier subscription quota: 100 apply operations per month.
        * S0-tier subscription quota: 100 apply operations per day.

        :param snapshot_id: Id referencing a particular snapshot.
        :type snapshot_id: str
        :param object_id: User specified target object id to be created from
         the snapshot.
        :type object_id: str
        :param mode: Snapshot applying mode. Currently only CreateNew is
         supported, which means the apply operation will fail if target
         subscription already contains an object of same type and using the
         same objectId. Users can specify the "objectId" in request body to
         avoid such conflicts. Possible values include: 'CreateNew'
        :type mode: str or
         ~azure.cognitiveservices.vision.face.models.SnapshotApplyMode
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def get_operation_status(<EOL>self, operation_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_operation_status.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", operation_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Retrieve the status of a take/apply snapshot operation.

        :param operation_id: Id referencing a particular take/apply snapshot
         operation.
        :type operation_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: OperationStatus or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.OperationStatus or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def create(<EOL>self, large_person_group_id, name=None, user_data=None, custom_headers=None, raw=False, **operation_config):

body = models.NameAndUserDataContract(name=name, user_data=user_data)<EOL>url = self.create.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", large_person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Create a new person in a specified large person group.

        :param large_person_group_id: Id referencing a particular large person
         group.
        :type large_person_group_id: str
        :param name: User defined name, maximum length is 128.
        :type name: str
        :param user_data: User specified data. Length should not exceed 16KB.
        :type user_data: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: Person or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.Person or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def list(<EOL>self, large_person_group_id, start=None, top=None, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", large_person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if start is not None:<EOL><INDENT>query_parameters['<STR_LIT:start>'] = self._serialize.query("<STR_LIT:start>", start, '<STR_LIT:str>')<EOL><DEDENT>if top is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", top, '<STR_LIT:int>', maximum=<NUM_LIT:1000>, minimum=<NUM_LIT:1>)<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

List all persons in a large person group, and retrieve person
        information (including personId, name, userData and persistedFaceIds of
        registered faces of the person).

        :param large_person_group_id: Id referencing a particular large person
         group.
        :type large_person_group_id: str
        :param start: Starting person id to return (used to list a range of
         persons).
        :type start: str
        :param top: Number of persons to return starting with the person id
         indicated by the 'start' parameter.
        :type top: int
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: list or ClientRawResponse if raw=true
        :rtype: list[~azure.cognitiveservices.vision.face.models.Person] or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def delete(<EOL>self, large_person_group_id, person_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", large_person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Delete an existing person from a large person group. All stored person
        data, and face features in the person entry will be deleted.

        :param large_person_group_id: Id referencing a particular large person
         group.
        :type large_person_group_id: str
        :param person_id: Id referencing a particular person.
        :type person_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def get(<EOL>self, large_person_group_id, person_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", large_person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Retrieve a person's information, including registered persisted faces,
        name and userData.

        :param large_person_group_id: Id referencing a particular large person
         group.
        :type large_person_group_id: str
        :param person_id: Id referencing a particular person.
        :type person_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: Person or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.Person or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def update(<EOL>self, large_person_group_id, person_id, name=None, user_data=None, custom_headers=None, raw=False, **operation_config):

body = models.NameAndUserDataContract(name=name, user_data=user_data)<EOL>url = self.update.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", large_person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.patch(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Update name or userData of a person.

        :param large_person_group_id: Id referencing a particular large person
         group.
        :type large_person_group_id: str
        :param person_id: Id referencing a particular person.
        :type person_id: str
        :param name: User defined name, maximum length is 128.
        :type name: str
        :param user_data: User specified data. Length should not exceed 16KB.
        :type user_data: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def delete_face(<EOL>self, large_person_group_id, person_id, persisted_face_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete_face.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", large_person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", persisted_face_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Delete a face from a person. Relative feature for the persisted face
        will also be deleted.

        :param large_person_group_id: Id referencing a particular large person
         group.
        :type large_person_group_id: str
        :param person_id: Id referencing a particular person.
        :type person_id: str
        :param persisted_face_id: Id referencing a particular persistedFaceId
         of an existing face.
        :type persisted_face_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def get_face(<EOL>self, large_person_group_id, person_id, persisted_face_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_face.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", large_person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", persisted_face_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Retrieve information about a persisted face (specified by
        persistedFaceId, personId and its belonging largePersonGroupId).

        :param large_person_group_id: Id referencing a particular large person
         group.
        :type large_person_group_id: str
        :param person_id: Id referencing a particular person.
        :type person_id: str
        :param persisted_face_id: Id referencing a particular persistedFaceId
         of an existing face.
        :type persisted_face_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PersistedFace or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.PersistedFace or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def update_face(<EOL>self, large_person_group_id, person_id, persisted_face_id, user_data=None, custom_headers=None, raw=False, **operation_config):

body = models.UpdateFaceRequest(user_data=user_data)<EOL>url = self.update_face.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", large_person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", persisted_face_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(body, '<STR_LIT>')<EOL>request = self._client.patch(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Update a person persisted face's userData field.

        :param large_person_group_id: Id referencing a particular large person
         group.
        :type large_person_group_id: str
        :param person_id: Id referencing a particular person.
        :type person_id: str
        :param persisted_face_id: Id referencing a particular persistedFaceId
         of an existing face.
        :type persisted_face_id: str
        :param user_data: User-provided data attached to the face. The size
         limit is 1KB.
        :type user_data: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`


def add_face_from_url(<EOL>self, large_person_group_id, person_id, url, user_data=None, target_face=None, custom_headers=None, raw=False, **operation_config):

image_url = models.ImageUrl(url=url)<EOL>url = self.add_face_from_url.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.endpoint, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", large_person_group_id, '<STR_LIT:str>', max_length=<NUM_LIT:64>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", person_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if user_data is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", user_data, '<STR_LIT:str>', max_length=<NUM_LIT>)<EOL><DEDENT>if target_face is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", target_face, '<STR_LIT>', div='<STR_LIT:U+002C>')<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>body_content = self._serialize.body(image_url, '<STR_LIT>')<EOL>request = self._client.post(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.APIErrorException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Add a representative face to a person for identification. The input
        face is specified as an image with a targetFace rectangle.

        :param large_person_group_id: Id referencing a particular large person
         group.
        :type large_person_group_id: str
        :param person_id: Id referencing a particular person.
        :type person_id: str
        :param url: Publicly reachable URL of an image
        :type url: str
        :param user_data: User-specified data about the face for any purpose.
         The maximum length is 1KB.
        :type user_data: str
        :param target_face: A face rectangle to specify the target face to be
         added to a person in the format of "targetFace=left,top,width,height".
         E.g. "targetFace=10,10,100,100". If there is more than one face in the
         image, targetFace is required to specify which face to add. No
         targetFace means there is only one face detected in the entire image.
        :type target_face: list[int]
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PersistedFace or ClientRawResponse if raw=true
        :rtype: ~azure.cognitiveservices.vision.face.models.PersistedFace or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`APIErrorException<azure.cognitiveservices.vision.face.models.APIErrorException>`