@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * Permanently deletes a product and its reference images. * * <p>Metadata of the product and all its images will be deleted right away, but search queries * against ProductSets containing the product may still work until all related caches are * refreshed. * * <p>Possible errors: * * <p>* Returns NOT_FOUND if the product does not exist. * * <p>Sample code: * * <pre><code> * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { * String formattedName = ProductSearchClient.formatProductName("[PROJECT]", "[LOCATION]", "[PRODUCT]"); * productSearchClient.deleteProduct(formattedName); * } * </code></pre> * * @param name Resource name of product to delete. * <p>Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteProduct(String name) { PRODUCT_PATH_TEMPLATE.validate(name, "deleteProduct"); DeleteProductRequest request = DeleteProductRequest.newBuilder().setName(name).build(); deleteProduct(request); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * Permanently deletes a product and its reference images. * * <p>Metadata of the product and all its images will be deleted right away, but search queries * against ProductSets containing the product may still work until all related caches are * refreshed. * * <p>Possible errors: * * <p>* Returns NOT_FOUND if the product does not exist. * * <p>Sample code: * * <pre><code> * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { * String formattedName = ProductSearchClient.formatProductName("[PROJECT]", "[LOCATION]", "[PRODUCT]"); * productSearchClient.deleteProduct(formattedName); * } * </code></pre> * * @param name Resource name of product to delete. * <p>Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteProduct(String name) { PRODUCT_PATH_TEMPLATE.validate(name, "deleteProduct"); DeleteProductRequest request = DeleteProductRequest.newBuilder().setName(name).build(); deleteProduct(request); }