FaceLists Interface

public interface FaceLists

An instance of this class provides access to all the operations defined in FaceLists.

Method Summary

Modifier and Type Method and Description
FaceListsAddFaceFromStreamDefinitionStages.WithFaceListId addFaceFromStream()

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

PersistedFace addFaceFromStream(String faceListId, byte[] image, AddFaceFromStreamOptionalParameter addFaceFromStreamOptionalParameter)

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

Observable<PersistedFace> addFaceFromStreamAsync(String faceListId, byte[] image, AddFaceFromStreamOptionalParameter addFaceFromStreamOptionalParameter)

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

FaceListsAddFaceFromUrlDefinitionStages.WithFaceListId addFaceFromUrl()

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

PersistedFace addFaceFromUrl(String faceListId, String url, AddFaceFromUrlOptionalParameter addFaceFromUrlOptionalParameter)

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

Observable<PersistedFace> addFaceFromUrlAsync(String faceListId, String url, AddFaceFromUrlOptionalParameter addFaceFromUrlOptionalParameter)

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

FaceListsCreateDefinitionStages.WithFaceListId create()

Create an empty face list. Up to 64 face lists are allowed to exist in one subscription.

void create(String faceListId, CreateFaceListsOptionalParameter createOptionalParameter)

Create an empty face list. Up to 64 face lists are allowed to exist in one subscription.

Observable<Void> createAsync(String faceListId, CreateFaceListsOptionalParameter createOptionalParameter)

Create an empty face list. Up to 64 face lists are allowed to exist in one subscription.

void delete(String faceListId)

Delete an existing face list according to faceListId. Persisted face images in the face list will also be deleted.

Observable<Void> deleteAsync(String faceListId)

Delete an existing face list according to faceListId. Persisted face images in the face list will also be deleted.

void deleteFace(String faceListId, UUID persistedFaceId)

Delete an existing face from a face list (given by a persisitedFaceId and a faceListId). Persisted image related to the face will also be deleted.

Observable<Void> deleteFaceAsync(String faceListId, UUID persistedFaceId)

Delete an existing face from a face list (given by a persisitedFaceId and a faceListId). Persisted image related to the face will also be deleted.

FaceList get(String faceListId)

Retrieve a face list's information.

Observable<FaceList> getAsync(String faceListId)

Retrieve a face list's information.

List<FaceList> list()

Retrieve information about all existing face lists. Only faceListId, name and userData will be returned.

Observable<List<FaceList>> listAsync()

Retrieve information about all existing face lists. Only faceListId, name and userData will be returned.

FaceListsUpdateDefinitionStages.WithFaceListId update()

Update information of a face list.

void update(String faceListId, UpdateFaceListsOptionalParameter updateOptionalParameter)

Update information of a face list.

Observable<Void> updateAsync(String faceListId, UpdateFaceListsOptionalParameter updateOptionalParameter)

Update information of a face list.

Method Details

addFaceFromStream

public FaceListsAddFaceFromStreamDefinitionStages.WithFaceListId addFaceFromStream()

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

Returns:

the first stage of the addFaceFromStream call

addFaceFromStream

public PersistedFace addFaceFromStream(String faceListId, byte[] image, AddFaceFromStreamOptionalParameter addFaceFromStreamOptionalParameter)

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

Parameters:

faceListId - Id referencing a particular face list.
image - An image stream.
addFaceFromStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the PersistedFace object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

addFaceFromStreamAsync

public Observable addFaceFromStreamAsync(String faceListId, byte[] image, AddFaceFromStreamOptionalParameter addFaceFromStreamOptionalParameter)

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

Parameters:

faceListId - Id referencing a particular face list.
image - An image stream.
addFaceFromStreamOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the PersistedFace object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

addFaceFromUrl

public FaceListsAddFaceFromUrlDefinitionStages.WithFaceListId addFaceFromUrl()

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

Returns:

the first stage of the addFaceFromUrl call

addFaceFromUrl

public PersistedFace addFaceFromUrl(String faceListId, String url, AddFaceFromUrlOptionalParameter addFaceFromUrlOptionalParameter)

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

Parameters:

faceListId - Id referencing a particular face list.
url - Publicly reachable URL of an image.
addFaceFromUrlOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the PersistedFace object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

addFaceFromUrlAsync

public Observable addFaceFromUrlAsync(String faceListId, String url, AddFaceFromUrlOptionalParameter addFaceFromUrlOptionalParameter)

Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.

Parameters:

faceListId - Id referencing a particular face list.
url - Publicly reachable URL of an image.
addFaceFromUrlOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the PersistedFace object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

create

public FaceListsCreateDefinitionStages.WithFaceListId create()

Create an empty face list. Up to 64 face lists are allowed to exist in one subscription.

Returns:

the first stage of the create call

create

public void create(String faceListId, CreateFaceListsOptionalParameter createOptionalParameter)

Create an empty face list. Up to 64 face lists are allowed to exist in one subscription.

Parameters:

faceListId - Id referencing a particular face list.
createOptionalParameter - the object representing the optional parameters to be set before calling this API

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

createAsync

public Observable createAsync(String faceListId, CreateFaceListsOptionalParameter createOptionalParameter)

Create an empty face list. Up to 64 face lists are allowed to exist in one subscription.

Parameters:

faceListId - Id referencing a particular face list.
createOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

a representation of the deferred computation of this call if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

delete

public void delete(String faceListId)

Delete an existing face list according to faceListId. Persisted face images in the face list will also be deleted.

Parameters:

faceListId - Id referencing a particular face list.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

deleteAsync

public Observable deleteAsync(String faceListId)

Delete an existing face list according to faceListId. Persisted face images in the face list will also be deleted.

Parameters:

faceListId - Id referencing a particular face list.

Returns:

a representation of the deferred computation of this call if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

deleteFace

public void deleteFace(String faceListId, UUID persistedFaceId)

Delete an existing face from a face list (given by a persisitedFaceId and a faceListId). Persisted image related to the face will also be deleted.

Parameters:

faceListId - Id referencing a particular face list.
persistedFaceId - Id referencing a particular persistedFaceId of an existing face.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

deleteFaceAsync

public Observable deleteFaceAsync(String faceListId, UUID persistedFaceId)

Delete an existing face from a face list (given by a persisitedFaceId and a faceListId). Persisted image related to the face will also be deleted.

Parameters:

faceListId - Id referencing a particular face list.
persistedFaceId - Id referencing a particular persistedFaceId of an existing face.

Returns:

a representation of the deferred computation of this call if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

get

public FaceList get(String faceListId)

Retrieve a face list's information.

Parameters:

faceListId - Id referencing a particular face list.

Returns:

the FaceList object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

getAsync

public Observable getAsync(String faceListId)

Retrieve a face list's information.

Parameters:

faceListId - Id referencing a particular face list.

Returns:

the observable to the FaceList object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

list

public List list()

Retrieve information about all existing face lists. Only faceListId, name and userData will be returned.

Returns:

the List<FaceList> object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

listAsync

public Observable<>> listAsync()

Retrieve information about all existing face lists. Only faceListId, name and userData will be returned.

Returns:

the observable to the List<FaceList> object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

update

public FaceListsUpdateDefinitionStages.WithFaceListId update()

Update information of a face list.

Returns:

the first stage of the update call

update

public void update(String faceListId, UpdateFaceListsOptionalParameter updateOptionalParameter)

Update information of a face list.

Parameters:

faceListId - Id referencing a particular face list.
updateOptionalParameter - the object representing the optional parameters to be set before calling this API

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

updateAsync

public Observable updateAsync(String faceListId, UpdateFaceListsOptionalParameter updateOptionalParameter)

Update information of a face list.

Parameters:

faceListId - Id referencing a particular face list.
updateOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

a representation of the deferred computation of this call if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

Applies to