(projectId, location, productSetId)
| 15 | 'use strict'; |
| 16 | |
| 17 | function main(projectId, location, productSetId) { |
| 18 | // [START vision_product_search_delete_product_set] |
| 19 | // Imports the Google Cloud client library |
| 20 | const vision = require('@google-cloud/vision'); |
| 21 | |
| 22 | // Creates a client |
| 23 | const client = new vision.ProductSearchClient(); |
| 24 | |
| 25 | async function deleteProductSet() { |
| 26 | /** |
| 27 | * TODO(developer): Uncomment the following line before running the sample. |
| 28 | */ |
| 29 | // const projectId = 'Your Google Cloud project Id'; |
| 30 | // const location = 'A compute region name'; |
| 31 | // const productSetId = 'Id of the product set'; |
| 32 | |
| 33 | // Resource path that represents full path to the product set. |
| 34 | const productSetPath = client.productSetPath( |
| 35 | projectId, |
| 36 | location, |
| 37 | productSetId |
| 38 | ); |
| 39 | |
| 40 | await client.deleteProductSet({name: productSetPath}); |
| 41 | console.log('Product set deleted.'); |
| 42 | } |
| 43 | deleteProductSet(); |
| 44 | // [END vision_product_search_delete_product_set] |
| 45 | } |
| 46 | |
| 47 | process.on('unhandledRejection', err => { |
| 48 | console.error(err.message); |
no test coverage detected