Search in sources :

Example 1 with DeleteReferenceImageRequest

use of com.google.cloud.vision.v1.DeleteReferenceImageRequest in project java-vision by googleapis.

the class ITSystemTest method tearDown.

@AfterClass
public static void tearDown() {
    /* delete reference image */
    DeleteReferenceImageRequest imageRequest = DeleteReferenceImageRequest.newBuilder().setName(formatReferenceImageName).build();
    productSearchClient.deleteReferenceImage(imageRequest);
    /* remove product from product set */
    RemoveProductFromProductSetRequest removeProductRequest = RemoveProductFromProductSetRequest.newBuilder().setName(formatProductSetName).setProduct(formatProductName).build();
    productSearchClient.removeProductFromProductSet(removeProductRequest);
    /* delete product set */
    DeleteProductSetRequest deleteProductSetRequest = DeleteProductSetRequest.newBuilder().setName(formatProductSetName).build();
    productSearchClient.deleteProductSet(deleteProductSetRequest);
    /* delete product */
    DeleteProductRequest deleteProductRequest = DeleteProductRequest.newBuilder().setName(formatProductName).build();
    productSearchClient.deleteProduct(deleteProductRequest);
    productSearchClient.close();
    imageAnnotatorClient.close();
}
Also used : DeleteProductRequest(com.google.cloud.vision.v1.DeleteProductRequest) DeleteReferenceImageRequest(com.google.cloud.vision.v1.DeleteReferenceImageRequest) DeleteProductSetRequest(com.google.cloud.vision.v1.DeleteProductSetRequest) RemoveProductFromProductSetRequest(com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) AfterClass(org.junit.AfterClass)

Aggregations

DeleteProductRequest (com.google.cloud.vision.v1.DeleteProductRequest)1 DeleteProductSetRequest (com.google.cloud.vision.v1.DeleteProductSetRequest)1 DeleteReferenceImageRequest (com.google.cloud.vision.v1.DeleteReferenceImageRequest)1 RemoveProductFromProductSetRequest (com.google.cloud.vision.v1.RemoveProductFromProductSetRequest)1 AfterClass (org.junit.AfterClass)1