use of com.google.cloud.vision.v1.RemoveProductFromProductSetRequest 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();
}
Aggregations