com.microsoft.azure.cognitiveservices.vision.faceapi.PersonGroupPersons Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-cognitiveservices-faceapi Show documentation
Show all versions of azure-cognitiveservices-faceapi Show documentation
This package contains Microsoft Cognitive Service Face API SDK.
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.cognitiveservices.vision.faceapi;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.CreatePersonOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.ListPersonOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.UpdatePersonOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.UpdateFaceOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.AddPersonFaceFromUrlOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.AddPersonFaceFromStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.APIErrorException;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.PersistedFace;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.Person;
import java.util.List;
import java.util.UUID;
import rx.Observable;
/**
* An instance of this class provides access to all the operations defined
* in PersonGroupPersons.
*/
public interface PersonGroupPersons {
/**
* Create a new person in a specified person group.
*
* @param personGroupId Id referencing a particular person group.
* @param createPersonOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the Person object if successful.
*/
Person createPerson(String personGroupId, CreatePersonOptionalParameter createPersonOptionalParameter);
/**
* Create a new person in a specified person group.
*
* @param personGroupId Id referencing a particular person group.
* @param createPersonOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the Person object
*/
Observable createPersonAsync(String personGroupId, CreatePersonOptionalParameter createPersonOptionalParameter);
/**
* List all persons in a person group, and retrieve person information (including personId, name, userData and
* persistedFaceIds of registered faces of the person).
*
* @param personGroupId Id referencing a particular person group.
* @param listPersonOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the List<Person> object if successful.
*/
List listPerson(String personGroupId, ListPersonOptionalParameter listPersonOptionalParameter);
/**
* List all persons in a person group, and retrieve person information (including personId, name, userData and
* persistedFaceIds of registered faces of the person).
*
* @param personGroupId Id referencing a particular person group.
* @param listPersonOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List<Person> object
*/
Observable> listPersonAsync(String personGroupId, ListPersonOptionalParameter listPersonOptionalParameter);
/**
* Delete an existing person from a person group. Persisted face images of the person will also be deleted.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
void delete(String personGroupId, UUID personId);
/**
* Delete an existing person from a person group. Persisted face images of the person will also be deleted.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return a representation of the deferred computation of this call if successful.
*/
Observable deleteAsync(String personGroupId, UUID personId);
/**
* Retrieve a person's information, including registered persisted faces, name and userData.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the Person object if successful.
*/
Person get(String personGroupId, UUID personId);
/**
* Retrieve a person's information, including registered persisted faces, name and userData.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the Person object
*/
Observable getAsync(String personGroupId, UUID personId);
/**
* Update name or userData of a person.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param updatePersonOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
void updatePerson(String personGroupId, UUID personId, UpdatePersonOptionalParameter updatePersonOptionalParameter);
/**
* Update name or userData of a person.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param updatePersonOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return a representation of the deferred computation of this call if successful.
*/
Observable updatePersonAsync(String personGroupId, UUID personId, UpdatePersonOptionalParameter updatePersonOptionalParameter);
/**
* Delete a face from a person. Relative image for the persisted face will also be deleted.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param persistedFaceId Id referencing a particular persistedFaceId of an existing face.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
void deleteFace(String personGroupId, UUID personId, UUID persistedFaceId);
/**
* Delete a face from a person. Relative image for the persisted face will also be deleted.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param persistedFaceId Id referencing a particular persistedFaceId of an existing face.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return a representation of the deferred computation of this call if successful.
*/
Observable deleteFaceAsync(String personGroupId, UUID personId, UUID persistedFaceId);
/**
* Retrieve information about a persisted face (specified by persistedFaceId, personId and its belonging personGroupId).
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param persistedFaceId Id referencing a particular persistedFaceId of an existing face.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the PersistedFace object if successful.
*/
PersistedFace getFace(String personGroupId, UUID personId, UUID persistedFaceId);
/**
* Retrieve information about a persisted face (specified by persistedFaceId, personId and its belonging personGroupId).
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param persistedFaceId Id referencing a particular persistedFaceId of an existing face.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PersistedFace object
*/
Observable getFaceAsync(String personGroupId, UUID personId, UUID persistedFaceId);
/**
* Update a person persisted face's userData field.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param persistedFaceId Id referencing a particular persistedFaceId of an existing face.
* @param updateFaceOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
void updateFace(String personGroupId, UUID personId, UUID persistedFaceId, UpdateFaceOptionalParameter updateFaceOptionalParameter);
/**
* Update a person persisted face's userData field.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param persistedFaceId Id referencing a particular persistedFaceId of an existing face.
* @param updateFaceOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return a representation of the deferred computation of this call if successful.
*/
Observable updateFaceAsync(String personGroupId, UUID personId, UUID persistedFaceId, UpdateFaceOptionalParameter updateFaceOptionalParameter);
/**
* Add a representative face to a person for identification. The input face is specified as an image with a
* targetFace rectangle.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param url the String value
* @param addPersonFaceFromUrlOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the PersistedFace object if successful.
*/
PersistedFace addPersonFaceFromUrl(String personGroupId, UUID personId, String url, AddPersonFaceFromUrlOptionalParameter addPersonFaceFromUrlOptionalParameter);
/**
* Add a representative face to a person for identification. The input face is specified as an image with a
* targetFace rectangle.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param url the String value
* @param addPersonFaceFromUrlOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PersistedFace object
*/
Observable addPersonFaceFromUrlAsync(String personGroupId, UUID personId, String url, AddPersonFaceFromUrlOptionalParameter addPersonFaceFromUrlOptionalParameter);
/**
* Add a representative face to a person for identification. The input face is specified as an image with a
* targetFace rectangle.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param image An image stream.
* @param addPersonFaceFromStreamOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the PersistedFace object if successful.
*/
PersistedFace addPersonFaceFromStream(String personGroupId, UUID personId, byte[] image, AddPersonFaceFromStreamOptionalParameter addPersonFaceFromStreamOptionalParameter);
/**
* Add a representative face to a person for identification. The input face is specified as an image with a
* targetFace rectangle.
*
* @param personGroupId Id referencing a particular person group.
* @param personId Id referencing a particular person.
* @param image An image stream.
* @param addPersonFaceFromStreamOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PersistedFace object
*/
Observable addPersonFaceFromStreamAsync(String personGroupId, UUID personId, byte[] image, AddPersonFaceFromStreamOptionalParameter addPersonFaceFromStreamOptionalParameter);
}