diff --git a/samples/generated/v1/image_annotator.async_batch_annotate_files.js b/samples/generated/v1/image_annotator.async_batch_annotate_files.js index 5eeec885..7d7ed138 100644 --- a/samples/generated/v1/image_annotator.async_batch_annotate_files.js +++ b/samples/generated/v1/image_annotator.async_batch_annotate_files.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/image_annotator.async_batch_annotate_images.js b/samples/generated/v1/image_annotator.async_batch_annotate_images.js index 82011930..70be298e 100644 --- a/samples/generated/v1/image_annotator.async_batch_annotate_images.js +++ b/samples/generated/v1/image_annotator.async_batch_annotate_images.js @@ -23,6 +23,9 @@ function main(requests, outputConfig) { // [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/image_annotator.batch_annotate_files.js b/samples/generated/v1/image_annotator.batch_annotate_files.js index baf8aae8..528c4d1f 100644 --- a/samples/generated/v1/image_annotator.batch_annotate_files.js +++ b/samples/generated/v1/image_annotator.batch_annotate_files.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/image_annotator.batch_annotate_images.js b/samples/generated/v1/image_annotator.batch_annotate_images.js index fb2e8966..2f57a691 100644 --- a/samples/generated/v1/image_annotator.batch_annotate_images.js +++ b/samples/generated/v1/image_annotator.batch_annotate_images.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1_generated_ImageAnnotator_BatchAnnotateImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.add_product_to_product_set.js b/samples/generated/v1/product_search.add_product_to_product_set.js index b2238181..1826ada2 100644 --- a/samples/generated/v1/product_search.add_product_to_product_set.js +++ b/samples/generated/v1/product_search.add_product_to_product_set.js @@ -23,6 +23,9 @@ function main(name, product) { // [START vision_v1_generated_ProductSearch_AddProductToProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.create_product.js b/samples/generated/v1/product_search.create_product.js index fb8b20ad..9e064a95 100644 --- a/samples/generated/v1/product_search.create_product.js +++ b/samples/generated/v1/product_search.create_product.js @@ -23,6 +23,9 @@ function main(parent, product) { // [START vision_v1_generated_ProductSearch_CreateProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.create_product_set.js b/samples/generated/v1/product_search.create_product_set.js index ccce35b4..5c580189 100644 --- a/samples/generated/v1/product_search.create_product_set.js +++ b/samples/generated/v1/product_search.create_product_set.js @@ -23,6 +23,9 @@ function main(parent, productSet) { // [START vision_v1_generated_ProductSearch_CreateProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.create_reference_image.js b/samples/generated/v1/product_search.create_reference_image.js index dfa47dab..6175cef1 100644 --- a/samples/generated/v1/product_search.create_reference_image.js +++ b/samples/generated/v1/product_search.create_reference_image.js @@ -23,6 +23,9 @@ function main(parent, referenceImage) { // [START vision_v1_generated_ProductSearch_CreateReferenceImage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.delete_product.js b/samples/generated/v1/product_search.delete_product.js index ba89afb5..8d58541b 100644 --- a/samples/generated/v1/product_search.delete_product.js +++ b/samples/generated/v1/product_search.delete_product.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1_generated_ProductSearch_DeleteProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.delete_product_set.js b/samples/generated/v1/product_search.delete_product_set.js index 685141b3..5c5b8125 100644 --- a/samples/generated/v1/product_search.delete_product_set.js +++ b/samples/generated/v1/product_search.delete_product_set.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1_generated_ProductSearch_DeleteProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.delete_reference_image.js b/samples/generated/v1/product_search.delete_reference_image.js index bd576339..18a64743 100644 --- a/samples/generated/v1/product_search.delete_reference_image.js +++ b/samples/generated/v1/product_search.delete_reference_image.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1_generated_ProductSearch_DeleteReferenceImage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.get_product.js b/samples/generated/v1/product_search.get_product.js index 37ddc7e8..27e014db 100644 --- a/samples/generated/v1/product_search.get_product.js +++ b/samples/generated/v1/product_search.get_product.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1_generated_ProductSearch_GetProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.get_product_set.js b/samples/generated/v1/product_search.get_product_set.js index 6ebbc94b..fa80ab00 100644 --- a/samples/generated/v1/product_search.get_product_set.js +++ b/samples/generated/v1/product_search.get_product_set.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1_generated_ProductSearch_GetProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.get_reference_image.js b/samples/generated/v1/product_search.get_reference_image.js index 18dba604..b25fb5e6 100644 --- a/samples/generated/v1/product_search.get_reference_image.js +++ b/samples/generated/v1/product_search.get_reference_image.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1_generated_ProductSearch_GetReferenceImage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.import_product_sets.js b/samples/generated/v1/product_search.import_product_sets.js index 01294345..859e0f5a 100644 --- a/samples/generated/v1/product_search.import_product_sets.js +++ b/samples/generated/v1/product_search.import_product_sets.js @@ -23,6 +23,9 @@ function main(parent, inputConfig) { // [START vision_v1_generated_ProductSearch_ImportProductSets_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.list_product_sets.js b/samples/generated/v1/product_search.list_product_sets.js index a0a9f7f5..66a071b0 100644 --- a/samples/generated/v1/product_search.list_product_sets.js +++ b/samples/generated/v1/product_search.list_product_sets.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1_generated_ProductSearch_ListProductSets_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.list_products.js b/samples/generated/v1/product_search.list_products.js index 3f92f87a..8fa795f6 100644 --- a/samples/generated/v1/product_search.list_products.js +++ b/samples/generated/v1/product_search.list_products.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1_generated_ProductSearch_ListProducts_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.list_products_in_product_set.js b/samples/generated/v1/product_search.list_products_in_product_set.js index 20441748..3e9871fc 100644 --- a/samples/generated/v1/product_search.list_products_in_product_set.js +++ b/samples/generated/v1/product_search.list_products_in_product_set.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1_generated_ProductSearch_ListProductsInProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.list_reference_images.js b/samples/generated/v1/product_search.list_reference_images.js index f2c0ec3e..f7175d39 100644 --- a/samples/generated/v1/product_search.list_reference_images.js +++ b/samples/generated/v1/product_search.list_reference_images.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1_generated_ProductSearch_ListReferenceImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.purge_products.js b/samples/generated/v1/product_search.purge_products.js index e3570b65..0dae0b9b 100644 --- a/samples/generated/v1/product_search.purge_products.js +++ b/samples/generated/v1/product_search.purge_products.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1_generated_ProductSearch_PurgeProducts_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.remove_product_from_product_set.js b/samples/generated/v1/product_search.remove_product_from_product_set.js index 011c4714..ad66ef6b 100644 --- a/samples/generated/v1/product_search.remove_product_from_product_set.js +++ b/samples/generated/v1/product_search.remove_product_from_product_set.js @@ -23,6 +23,9 @@ function main(name, product) { // [START vision_v1_generated_ProductSearch_RemoveProductFromProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.update_product.js b/samples/generated/v1/product_search.update_product.js index f229be48..d8fd49f9 100644 --- a/samples/generated/v1/product_search.update_product.js +++ b/samples/generated/v1/product_search.update_product.js @@ -23,6 +23,9 @@ function main(product) { // [START vision_v1_generated_ProductSearch_UpdateProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/product_search.update_product_set.js b/samples/generated/v1/product_search.update_product_set.js index 9eb4229d..26bf5ed6 100644 --- a/samples/generated/v1/product_search.update_product_set.js +++ b/samples/generated/v1/product_search.update_product_set.js @@ -23,6 +23,9 @@ function main(productSet) { // [START vision_v1_generated_ProductSearch_UpdateProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json b/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json index c5cb348b..ba68b3e4 100644 --- a/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json +++ b/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -66,7 +66,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -110,7 +110,7 @@ "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -158,7 +158,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -202,7 +202,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -250,7 +250,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -298,7 +298,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -338,7 +338,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -382,7 +382,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -422,7 +422,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -470,7 +470,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -518,7 +518,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -558,7 +558,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -602,7 +602,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -642,7 +642,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -690,7 +690,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -730,7 +730,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -778,7 +778,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -818,7 +818,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -862,7 +862,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -906,7 +906,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -954,7 +954,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -998,7 +998,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], diff --git a/samples/generated/v1p1beta1/image_annotator.batch_annotate_images.js b/samples/generated/v1p1beta1/image_annotator.batch_annotate_images.js index 1f0ddde0..eb0fe422 100644 --- a/samples/generated/v1p1beta1/image_annotator.batch_annotate_images.js +++ b/samples/generated/v1p1beta1/image_annotator.batch_annotate_images.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json b/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json index 142326c7..56a5028f 100644 --- a/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json +++ b/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], diff --git a/samples/generated/v1p2beta1/image_annotator.async_batch_annotate_files.js b/samples/generated/v1p2beta1/image_annotator.async_batch_annotate_files.js index 6f5474c4..92074c3a 100644 --- a/samples/generated/v1p2beta1/image_annotator.async_batch_annotate_files.js +++ b/samples/generated/v1p2beta1/image_annotator.async_batch_annotate_files.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1p2beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p2beta1/image_annotator.batch_annotate_images.js b/samples/generated/v1p2beta1/image_annotator.batch_annotate_images.js index c3fe0481..793ec83e 100644 --- a/samples/generated/v1p2beta1/image_annotator.batch_annotate_images.js +++ b/samples/generated/v1p2beta1/image_annotator.batch_annotate_images.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1p2beta1_generated_ImageAnnotator_BatchAnnotateImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json b/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json index 044951a4..d0d2660c 100644 --- a/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json +++ b/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -62,7 +62,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], diff --git a/samples/generated/v1p3beta1/image_annotator.async_batch_annotate_files.js b/samples/generated/v1p3beta1/image_annotator.async_batch_annotate_files.js index 5a6a0d5f..900c1b0b 100644 --- a/samples/generated/v1p3beta1/image_annotator.async_batch_annotate_files.js +++ b/samples/generated/v1p3beta1/image_annotator.async_batch_annotate_files.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1p3beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/image_annotator.batch_annotate_images.js b/samples/generated/v1p3beta1/image_annotator.batch_annotate_images.js index 191bb546..1b58eca1 100644 --- a/samples/generated/v1p3beta1/image_annotator.batch_annotate_images.js +++ b/samples/generated/v1p3beta1/image_annotator.batch_annotate_images.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1p3beta1_generated_ImageAnnotator_BatchAnnotateImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.add_product_to_product_set.js b/samples/generated/v1p3beta1/product_search.add_product_to_product_set.js index 095ebc5a..96b4c8ba 100644 --- a/samples/generated/v1p3beta1/product_search.add_product_to_product_set.js +++ b/samples/generated/v1p3beta1/product_search.add_product_to_product_set.js @@ -23,6 +23,9 @@ function main(name, product) { // [START vision_v1p3beta1_generated_ProductSearch_AddProductToProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.create_product.js b/samples/generated/v1p3beta1/product_search.create_product.js index 5245629f..ed6ac1b8 100644 --- a/samples/generated/v1p3beta1/product_search.create_product.js +++ b/samples/generated/v1p3beta1/product_search.create_product.js @@ -23,6 +23,9 @@ function main(parent, product) { // [START vision_v1p3beta1_generated_ProductSearch_CreateProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.create_product_set.js b/samples/generated/v1p3beta1/product_search.create_product_set.js index 1a93791a..90879035 100644 --- a/samples/generated/v1p3beta1/product_search.create_product_set.js +++ b/samples/generated/v1p3beta1/product_search.create_product_set.js @@ -23,6 +23,9 @@ function main(parent, productSet) { // [START vision_v1p3beta1_generated_ProductSearch_CreateProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.create_reference_image.js b/samples/generated/v1p3beta1/product_search.create_reference_image.js index f5e1a797..48848360 100644 --- a/samples/generated/v1p3beta1/product_search.create_reference_image.js +++ b/samples/generated/v1p3beta1/product_search.create_reference_image.js @@ -23,6 +23,9 @@ function main(parent, referenceImage) { // [START vision_v1p3beta1_generated_ProductSearch_CreateReferenceImage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.delete_product.js b/samples/generated/v1p3beta1/product_search.delete_product.js index 92e5c99f..a5872042 100644 --- a/samples/generated/v1p3beta1/product_search.delete_product.js +++ b/samples/generated/v1p3beta1/product_search.delete_product.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p3beta1_generated_ProductSearch_DeleteProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.delete_product_set.js b/samples/generated/v1p3beta1/product_search.delete_product_set.js index 9f7dc7df..7d971bc3 100644 --- a/samples/generated/v1p3beta1/product_search.delete_product_set.js +++ b/samples/generated/v1p3beta1/product_search.delete_product_set.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p3beta1_generated_ProductSearch_DeleteProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.delete_reference_image.js b/samples/generated/v1p3beta1/product_search.delete_reference_image.js index 46211ed7..c97f2727 100644 --- a/samples/generated/v1p3beta1/product_search.delete_reference_image.js +++ b/samples/generated/v1p3beta1/product_search.delete_reference_image.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p3beta1_generated_ProductSearch_DeleteReferenceImage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.get_product.js b/samples/generated/v1p3beta1/product_search.get_product.js index b4597bf1..c62e8ea6 100644 --- a/samples/generated/v1p3beta1/product_search.get_product.js +++ b/samples/generated/v1p3beta1/product_search.get_product.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p3beta1_generated_ProductSearch_GetProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.get_product_set.js b/samples/generated/v1p3beta1/product_search.get_product_set.js index d084b994..4def76dc 100644 --- a/samples/generated/v1p3beta1/product_search.get_product_set.js +++ b/samples/generated/v1p3beta1/product_search.get_product_set.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p3beta1_generated_ProductSearch_GetProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.get_reference_image.js b/samples/generated/v1p3beta1/product_search.get_reference_image.js index 33d14beb..93ee9d82 100644 --- a/samples/generated/v1p3beta1/product_search.get_reference_image.js +++ b/samples/generated/v1p3beta1/product_search.get_reference_image.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p3beta1_generated_ProductSearch_GetReferenceImage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.import_product_sets.js b/samples/generated/v1p3beta1/product_search.import_product_sets.js index 326aa39b..23698c04 100644 --- a/samples/generated/v1p3beta1/product_search.import_product_sets.js +++ b/samples/generated/v1p3beta1/product_search.import_product_sets.js @@ -23,6 +23,9 @@ function main(parent, inputConfig) { // [START vision_v1p3beta1_generated_ProductSearch_ImportProductSets_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.list_product_sets.js b/samples/generated/v1p3beta1/product_search.list_product_sets.js index 84954799..52033c07 100644 --- a/samples/generated/v1p3beta1/product_search.list_product_sets.js +++ b/samples/generated/v1p3beta1/product_search.list_product_sets.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1p3beta1_generated_ProductSearch_ListProductSets_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.list_products.js b/samples/generated/v1p3beta1/product_search.list_products.js index e1769e8c..454672d1 100644 --- a/samples/generated/v1p3beta1/product_search.list_products.js +++ b/samples/generated/v1p3beta1/product_search.list_products.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1p3beta1_generated_ProductSearch_ListProducts_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.list_products_in_product_set.js b/samples/generated/v1p3beta1/product_search.list_products_in_product_set.js index 76ecfd92..65bc35e2 100644 --- a/samples/generated/v1p3beta1/product_search.list_products_in_product_set.js +++ b/samples/generated/v1p3beta1/product_search.list_products_in_product_set.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p3beta1_generated_ProductSearch_ListProductsInProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.list_reference_images.js b/samples/generated/v1p3beta1/product_search.list_reference_images.js index 3bdeba0c..9deb4e05 100644 --- a/samples/generated/v1p3beta1/product_search.list_reference_images.js +++ b/samples/generated/v1p3beta1/product_search.list_reference_images.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1p3beta1_generated_ProductSearch_ListReferenceImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.remove_product_from_product_set.js b/samples/generated/v1p3beta1/product_search.remove_product_from_product_set.js index f0db7e43..45dcddaf 100644 --- a/samples/generated/v1p3beta1/product_search.remove_product_from_product_set.js +++ b/samples/generated/v1p3beta1/product_search.remove_product_from_product_set.js @@ -23,6 +23,9 @@ function main(name, product) { // [START vision_v1p3beta1_generated_ProductSearch_RemoveProductFromProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.update_product.js b/samples/generated/v1p3beta1/product_search.update_product.js index 50f9b2c2..8d98838c 100644 --- a/samples/generated/v1p3beta1/product_search.update_product.js +++ b/samples/generated/v1p3beta1/product_search.update_product.js @@ -23,6 +23,9 @@ function main(product) { // [START vision_v1p3beta1_generated_ProductSearch_UpdateProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/product_search.update_product_set.js b/samples/generated/v1p3beta1/product_search.update_product_set.js index cdd554e0..cfecdb70 100644 --- a/samples/generated/v1p3beta1/product_search.update_product_set.js +++ b/samples/generated/v1p3beta1/product_search.update_product_set.js @@ -23,6 +23,9 @@ function main(productSet) { // [START vision_v1p3beta1_generated_ProductSearch_UpdateProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json b/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json index ba4f98b8..f5f53008 100644 --- a/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json +++ b/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -62,7 +62,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -102,7 +102,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -150,7 +150,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -198,7 +198,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -238,7 +238,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -282,7 +282,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -322,7 +322,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -370,7 +370,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -418,7 +418,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -458,7 +458,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -502,7 +502,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -542,7 +542,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -590,7 +590,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -630,7 +630,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -678,7 +678,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -718,7 +718,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -762,7 +762,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -806,7 +806,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -854,7 +854,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], diff --git a/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_files.js b/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_files.js index b0e97198..199be36a 100644 --- a/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_files.js +++ b/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_files.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_images.js b/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_images.js index 967c01df..8cb5197f 100644 --- a/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_images.js +++ b/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_images.js @@ -23,6 +23,9 @@ function main(requests, outputConfig) { // [START vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/image_annotator.batch_annotate_files.js b/samples/generated/v1p4beta1/image_annotator.batch_annotate_files.js index 2f03ebe3..2fe101f3 100644 --- a/samples/generated/v1p4beta1/image_annotator.batch_annotate_files.js +++ b/samples/generated/v1p4beta1/image_annotator.batch_annotate_files.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateFiles_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/image_annotator.batch_annotate_images.js b/samples/generated/v1p4beta1/image_annotator.batch_annotate_images.js index 3b3d030d..f6aaa34e 100644 --- a/samples/generated/v1p4beta1/image_annotator.batch_annotate_images.js +++ b/samples/generated/v1p4beta1/image_annotator.batch_annotate_images.js @@ -23,6 +23,9 @@ function main(requests) { // [START vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.add_product_to_product_set.js b/samples/generated/v1p4beta1/product_search.add_product_to_product_set.js index d3cdf6e8..c6ef04f0 100644 --- a/samples/generated/v1p4beta1/product_search.add_product_to_product_set.js +++ b/samples/generated/v1p4beta1/product_search.add_product_to_product_set.js @@ -23,6 +23,9 @@ function main(name, product) { // [START vision_v1p4beta1_generated_ProductSearch_AddProductToProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.create_product.js b/samples/generated/v1p4beta1/product_search.create_product.js index 95a6e8fa..60ec6540 100644 --- a/samples/generated/v1p4beta1/product_search.create_product.js +++ b/samples/generated/v1p4beta1/product_search.create_product.js @@ -23,6 +23,9 @@ function main(parent, product) { // [START vision_v1p4beta1_generated_ProductSearch_CreateProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.create_product_set.js b/samples/generated/v1p4beta1/product_search.create_product_set.js index ae849604..ea4c348b 100644 --- a/samples/generated/v1p4beta1/product_search.create_product_set.js +++ b/samples/generated/v1p4beta1/product_search.create_product_set.js @@ -23,6 +23,9 @@ function main(parent, productSet) { // [START vision_v1p4beta1_generated_ProductSearch_CreateProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.create_reference_image.js b/samples/generated/v1p4beta1/product_search.create_reference_image.js index 2dc52217..bb6709c3 100644 --- a/samples/generated/v1p4beta1/product_search.create_reference_image.js +++ b/samples/generated/v1p4beta1/product_search.create_reference_image.js @@ -23,6 +23,9 @@ function main(parent, referenceImage) { // [START vision_v1p4beta1_generated_ProductSearch_CreateReferenceImage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.delete_product.js b/samples/generated/v1p4beta1/product_search.delete_product.js index 94375710..63f362dc 100644 --- a/samples/generated/v1p4beta1/product_search.delete_product.js +++ b/samples/generated/v1p4beta1/product_search.delete_product.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p4beta1_generated_ProductSearch_DeleteProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.delete_product_set.js b/samples/generated/v1p4beta1/product_search.delete_product_set.js index 06c598bd..72ac7fec 100644 --- a/samples/generated/v1p4beta1/product_search.delete_product_set.js +++ b/samples/generated/v1p4beta1/product_search.delete_product_set.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p4beta1_generated_ProductSearch_DeleteProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.delete_reference_image.js b/samples/generated/v1p4beta1/product_search.delete_reference_image.js index 87f8e595..92f9f39c 100644 --- a/samples/generated/v1p4beta1/product_search.delete_reference_image.js +++ b/samples/generated/v1p4beta1/product_search.delete_reference_image.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p4beta1_generated_ProductSearch_DeleteReferenceImage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.get_product.js b/samples/generated/v1p4beta1/product_search.get_product.js index 465d8eaf..80db0f5a 100644 --- a/samples/generated/v1p4beta1/product_search.get_product.js +++ b/samples/generated/v1p4beta1/product_search.get_product.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p4beta1_generated_ProductSearch_GetProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.get_product_set.js b/samples/generated/v1p4beta1/product_search.get_product_set.js index 3a1d8098..acba73c5 100644 --- a/samples/generated/v1p4beta1/product_search.get_product_set.js +++ b/samples/generated/v1p4beta1/product_search.get_product_set.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p4beta1_generated_ProductSearch_GetProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.get_reference_image.js b/samples/generated/v1p4beta1/product_search.get_reference_image.js index 1a2374fe..5dc13d64 100644 --- a/samples/generated/v1p4beta1/product_search.get_reference_image.js +++ b/samples/generated/v1p4beta1/product_search.get_reference_image.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p4beta1_generated_ProductSearch_GetReferenceImage_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.import_product_sets.js b/samples/generated/v1p4beta1/product_search.import_product_sets.js index 1f175664..3a422698 100644 --- a/samples/generated/v1p4beta1/product_search.import_product_sets.js +++ b/samples/generated/v1p4beta1/product_search.import_product_sets.js @@ -23,6 +23,9 @@ function main(parent, inputConfig) { // [START vision_v1p4beta1_generated_ProductSearch_ImportProductSets_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.list_product_sets.js b/samples/generated/v1p4beta1/product_search.list_product_sets.js index 8976e592..81e409fa 100644 --- a/samples/generated/v1p4beta1/product_search.list_product_sets.js +++ b/samples/generated/v1p4beta1/product_search.list_product_sets.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1p4beta1_generated_ProductSearch_ListProductSets_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.list_products.js b/samples/generated/v1p4beta1/product_search.list_products.js index 726194cd..8b67070e 100644 --- a/samples/generated/v1p4beta1/product_search.list_products.js +++ b/samples/generated/v1p4beta1/product_search.list_products.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1p4beta1_generated_ProductSearch_ListProducts_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.list_products_in_product_set.js b/samples/generated/v1p4beta1/product_search.list_products_in_product_set.js index 8740b9d6..869b118f 100644 --- a/samples/generated/v1p4beta1/product_search.list_products_in_product_set.js +++ b/samples/generated/v1p4beta1/product_search.list_products_in_product_set.js @@ -23,6 +23,9 @@ function main(name) { // [START vision_v1p4beta1_generated_ProductSearch_ListProductsInProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.list_reference_images.js b/samples/generated/v1p4beta1/product_search.list_reference_images.js index a1c5ccc6..637c1f8a 100644 --- a/samples/generated/v1p4beta1/product_search.list_reference_images.js +++ b/samples/generated/v1p4beta1/product_search.list_reference_images.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1p4beta1_generated_ProductSearch_ListReferenceImages_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.purge_products.js b/samples/generated/v1p4beta1/product_search.purge_products.js index 4bb5df02..5dd66449 100644 --- a/samples/generated/v1p4beta1/product_search.purge_products.js +++ b/samples/generated/v1p4beta1/product_search.purge_products.js @@ -23,6 +23,9 @@ function main(parent) { // [START vision_v1p4beta1_generated_ProductSearch_PurgeProducts_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.remove_product_from_product_set.js b/samples/generated/v1p4beta1/product_search.remove_product_from_product_set.js index 4d66f253..af9e9c14 100644 --- a/samples/generated/v1p4beta1/product_search.remove_product_from_product_set.js +++ b/samples/generated/v1p4beta1/product_search.remove_product_from_product_set.js @@ -23,6 +23,9 @@ function main(name, product) { // [START vision_v1p4beta1_generated_ProductSearch_RemoveProductFromProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.update_product.js b/samples/generated/v1p4beta1/product_search.update_product.js index e0fb4e3c..3c8d60bb 100644 --- a/samples/generated/v1p4beta1/product_search.update_product.js +++ b/samples/generated/v1p4beta1/product_search.update_product.js @@ -23,6 +23,9 @@ function main(product) { // [START vision_v1p4beta1_generated_ProductSearch_UpdateProduct_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/product_search.update_product_set.js b/samples/generated/v1p4beta1/product_search.update_product_set.js index d1c80c58..6ceb8322 100644 --- a/samples/generated/v1p4beta1/product_search.update_product_set.js +++ b/samples/generated/v1p4beta1/product_search.update_product_set.js @@ -23,6 +23,9 @@ function main(productSet) { // [START vision_v1p4beta1_generated_ProductSearch_UpdateProductSet_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json b/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json index dcd3f7c0..e7e54208 100644 --- a/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json +++ b/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -62,7 +62,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -102,7 +102,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -146,7 +146,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -186,7 +186,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], @@ -234,7 +234,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -282,7 +282,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -322,7 +322,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -366,7 +366,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -406,7 +406,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -454,7 +454,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -502,7 +502,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -542,7 +542,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -586,7 +586,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -626,7 +626,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -674,7 +674,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -714,7 +714,7 @@ "segments": [ { "start": 25, - "end": 64, + "end": 67, "type": "FULL" } ], @@ -762,7 +762,7 @@ "segments": [ { "start": 25, - "end": 52, + "end": 55, "type": "FULL" } ], @@ -802,7 +802,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 62, "type": "FULL" } ], @@ -846,7 +846,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -890,7 +890,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -938,7 +938,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 60, "type": "FULL" } ], @@ -982,7 +982,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], diff --git a/src/v1/image_annotator_client.ts b/src/v1/image_annotator_client.ts index 81ae76ad..e6ca662d 100644 --- a/src/v1/image_annotator_client.ts +++ b/src/v1/image_annotator_client.ts @@ -308,7 +308,8 @@ export class ImageAnnotatorClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -746,7 +747,7 @@ export class ImageAnnotatorClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.asyncBatchAnnotateImages, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse, @@ -905,7 +906,7 @@ export class ImageAnnotatorClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.asyncBatchAnnotateFiles, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse, diff --git a/src/v1/product_search_client.ts b/src/v1/product_search_client.ts index b7754050..259bd303 100644 --- a/src/v1/product_search_client.ts +++ b/src/v1/product_search_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -362,7 +361,8 @@ export class ProductSearchClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1878,7 +1878,7 @@ export class ProductSearchClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.importProductSets, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.vision.v1.ImportProductSetsResponse, @@ -2048,7 +2048,7 @@ export class ProductSearchClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.purgeProducts, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -2195,7 +2195,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listProductSets.createStream( - this.innerApiCalls.listProductSets as gax.GaxCall, + this.innerApiCalls.listProductSets as GaxCall, request, callSettings ); @@ -2245,7 +2245,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listProductSets.asyncIterate( this.innerApiCalls['listProductSets'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2390,7 +2390,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listProducts.createStream( - this.innerApiCalls.listProducts as gax.GaxCall, + this.innerApiCalls.listProducts as GaxCall, request, callSettings ); @@ -2441,7 +2441,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2600,7 +2600,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listReferenceImages.createStream( - this.innerApiCalls.listReferenceImages as gax.GaxCall, + this.innerApiCalls.listReferenceImages as GaxCall, request, callSettings ); @@ -2654,7 +2654,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listReferenceImages.asyncIterate( this.innerApiCalls['listReferenceImages'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2811,7 +2811,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listProductsInProductSet.createStream( - this.innerApiCalls.listProductsInProductSet as gax.GaxCall, + this.innerApiCalls.listProductsInProductSet as GaxCall, request, callSettings ); @@ -2862,7 +2862,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listProductsInProductSet.asyncIterate( this.innerApiCalls['listProductsInProductSet'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v1p1beta1/image_annotator_client.ts b/src/v1p1beta1/image_annotator_client.ts index 000abd9c..98852109 100644 --- a/src/v1p1beta1/image_annotator_client.ts +++ b/src/v1p1beta1/image_annotator_client.ts @@ -220,7 +220,8 @@ export class ImageAnnotatorClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; diff --git a/src/v1p2beta1/image_annotator_client.ts b/src/v1p2beta1/image_annotator_client.ts index a5d2fdc9..30711c61 100644 --- a/src/v1p2beta1/image_annotator_client.ts +++ b/src/v1p2beta1/image_annotator_client.ts @@ -265,7 +265,8 @@ export class ImageAnnotatorClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -559,7 +560,7 @@ export class ImageAnnotatorClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.asyncBatchAnnotateFiles, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse, diff --git a/src/v1p3beta1/image_annotator_client.ts b/src/v1p3beta1/image_annotator_client.ts index 6c373b87..7ea1aa7e 100644 --- a/src/v1p3beta1/image_annotator_client.ts +++ b/src/v1p3beta1/image_annotator_client.ts @@ -287,7 +287,8 @@ export class ImageAnnotatorClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -581,7 +582,7 @@ export class ImageAnnotatorClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.asyncBatchAnnotateFiles, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse, diff --git a/src/v1p3beta1/product_search_client.ts b/src/v1p3beta1/product_search_client.ts index 66132d9c..40abcac7 100644 --- a/src/v1p3beta1/product_search_client.ts +++ b/src/v1p3beta1/product_search_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -346,7 +345,8 @@ export class ProductSearchClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1953,7 +1953,7 @@ export class ProductSearchClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.importProductSets, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.vision.v1p3beta1.ImportProductSetsResponse, @@ -2106,7 +2106,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listProductSets.createStream( - this.innerApiCalls.listProductSets as gax.GaxCall, + this.innerApiCalls.listProductSets as GaxCall, request, callSettings ); @@ -2156,7 +2156,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listProductSets.asyncIterate( this.innerApiCalls['listProductSets'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2307,7 +2307,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listProducts.createStream( - this.innerApiCalls.listProducts as gax.GaxCall, + this.innerApiCalls.listProducts as GaxCall, request, callSettings ); @@ -2358,7 +2358,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2517,7 +2517,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listReferenceImages.createStream( - this.innerApiCalls.listReferenceImages as gax.GaxCall, + this.innerApiCalls.listReferenceImages as GaxCall, request, callSettings ); @@ -2571,7 +2571,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listReferenceImages.asyncIterate( this.innerApiCalls['listReferenceImages'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2728,7 +2728,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listProductsInProductSet.createStream( - this.innerApiCalls.listProductsInProductSet as gax.GaxCall, + this.innerApiCalls.listProductsInProductSet as GaxCall, request, callSettings ); @@ -2779,7 +2779,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listProductsInProductSet.asyncIterate( this.innerApiCalls['listProductsInProductSet'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/src/v1p4beta1/image_annotator_client.ts b/src/v1p4beta1/image_annotator_client.ts index 958e1b3a..11112f68 100644 --- a/src/v1p4beta1/image_annotator_client.ts +++ b/src/v1p4beta1/image_annotator_client.ts @@ -304,7 +304,8 @@ export class ImageAnnotatorClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -703,7 +704,7 @@ export class ImageAnnotatorClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.asyncBatchAnnotateImages, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse, @@ -845,7 +846,7 @@ export class ImageAnnotatorClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.asyncBatchAnnotateFiles, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse, diff --git a/src/v1p4beta1/product_search_client.ts b/src/v1p4beta1/product_search_client.ts index 0626fb3b..3f83b681 100644 --- a/src/v1p4beta1/product_search_client.ts +++ b/src/v1p4beta1/product_search_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -362,7 +361,8 @@ export class ProductSearchClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1956,7 +1956,7 @@ export class ProductSearchClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.importProductSets, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.vision.v1p4beta1.ImportProductSetsResponse, @@ -2126,7 +2126,7 @@ export class ProductSearchClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.purgeProducts, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -2279,7 +2279,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listProductSets.createStream( - this.innerApiCalls.listProductSets as gax.GaxCall, + this.innerApiCalls.listProductSets as GaxCall, request, callSettings ); @@ -2329,7 +2329,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listProductSets.asyncIterate( this.innerApiCalls['listProductSets'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2480,7 +2480,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listProducts.createStream( - this.innerApiCalls.listProducts as gax.GaxCall, + this.innerApiCalls.listProducts as GaxCall, request, callSettings ); @@ -2531,7 +2531,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listProducts.asyncIterate( this.innerApiCalls['listProducts'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2690,7 +2690,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listReferenceImages.createStream( - this.innerApiCalls.listReferenceImages as gax.GaxCall, + this.innerApiCalls.listReferenceImages as GaxCall, request, callSettings ); @@ -2744,7 +2744,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listReferenceImages.asyncIterate( this.innerApiCalls['listReferenceImages'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2901,7 +2901,7 @@ export class ProductSearchClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listProductsInProductSet.createStream( - this.innerApiCalls.listProductsInProductSet as gax.GaxCall, + this.innerApiCalls.listProductsInProductSet as GaxCall, request, callSettings ); @@ -2952,7 +2952,7 @@ export class ProductSearchClient { this.initialize(); return this.descriptors.page.listProductsInProductSet.asyncIterate( this.innerApiCalls['listProductsInProductSet'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/test/gapic_image_annotator_v1.ts b/test/gapic_image_annotator_v1.ts index 9091881e..21d764f9 100644 --- a/test/gapic_image_annotator_v1.ts +++ b/test/gapic_image_annotator_v1.ts @@ -82,101 +82,103 @@ function stubLongRunningCallWithCallback( } describe('v1.ImageAnnotatorClient', () => { - it('has servicePath', () => { - const servicePath = - imageannotatorModule.v1.ImageAnnotatorClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - imageannotatorModule.v1.ImageAnnotatorClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = imageannotatorModule.v1.ImageAnnotatorClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new imageannotatorModule.v1.ImageAnnotatorClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + imageannotatorModule.v1.ImageAnnotatorClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new imageannotatorModule.v1.ImageAnnotatorClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + imageannotatorModule.v1.ImageAnnotatorClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new imageannotatorModule.v1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = imageannotatorModule.v1.ImageAnnotatorClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - await client.initialize(); - assert(client.imageAnnotatorStub); - }); - it('has close method for the initialized client', done => { - const client = new imageannotatorModule.v1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new imageannotatorModule.v1.ImageAnnotatorClient(); + assert(client); }); - client.initialize(); - assert(client.imageAnnotatorStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new imageannotatorModule.v1.ImageAnnotatorClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new imageannotatorModule.v1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new imageannotatorModule.v1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + await client.initialize(); + assert(client.imageAnnotatorStub); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new imageannotatorModule.v1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('batchAnnotateImages', () => { diff --git a/test/gapic_image_annotator_v1p1beta1.ts b/test/gapic_image_annotator_v1p1beta1.ts index e04323ac..e701a3e8 100644 --- a/test/gapic_image_annotator_v1p1beta1.ts +++ b/test/gapic_image_annotator_v1p1beta1.ts @@ -50,101 +50,103 @@ function stubSimpleCallWithCallback( } describe('v1p1beta1.ImageAnnotatorClient', () => { - it('has servicePath', () => { - const servicePath = - imageannotatorModule.v1p1beta1.ImageAnnotatorClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - imageannotatorModule.v1p1beta1.ImageAnnotatorClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = imageannotatorModule.v1p1beta1.ImageAnnotatorClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + imageannotatorModule.v1p1beta1.ImageAnnotatorClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + imageannotatorModule.v1p1beta1.ImageAnnotatorClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = imageannotatorModule.v1p1beta1.ImageAnnotatorClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - await client.initialize(); - assert(client.imageAnnotatorStub); - }); - it('has close method for the initialized client', done => { - const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient(); + assert(client); }); - client.initialize(); - assert(client.imageAnnotatorStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + await client.initialize(); + assert(client.imageAnnotatorStub); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('batchAnnotateImages', () => { diff --git a/test/gapic_image_annotator_v1p2beta1.ts b/test/gapic_image_annotator_v1p2beta1.ts index 8a6c1b74..d1ea965f 100644 --- a/test/gapic_image_annotator_v1p2beta1.ts +++ b/test/gapic_image_annotator_v1p2beta1.ts @@ -82,101 +82,103 @@ function stubLongRunningCallWithCallback( } describe('v1p2beta1.ImageAnnotatorClient', () => { - it('has servicePath', () => { - const servicePath = - imageannotatorModule.v1p2beta1.ImageAnnotatorClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - imageannotatorModule.v1p2beta1.ImageAnnotatorClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = imageannotatorModule.v1p2beta1.ImageAnnotatorClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + imageannotatorModule.v1p2beta1.ImageAnnotatorClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + imageannotatorModule.v1p2beta1.ImageAnnotatorClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = imageannotatorModule.v1p2beta1.ImageAnnotatorClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - await client.initialize(); - assert(client.imageAnnotatorStub); - }); - it('has close method for the initialized client', done => { - const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient(); + assert(client); }); - client.initialize(); - assert(client.imageAnnotatorStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + await client.initialize(); + assert(client.imageAnnotatorStub); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('batchAnnotateImages', () => { diff --git a/test/gapic_image_annotator_v1p3beta1.ts b/test/gapic_image_annotator_v1p3beta1.ts index 15f411f1..329d8b3d 100644 --- a/test/gapic_image_annotator_v1p3beta1.ts +++ b/test/gapic_image_annotator_v1p3beta1.ts @@ -82,101 +82,103 @@ function stubLongRunningCallWithCallback( } describe('v1p3beta1.ImageAnnotatorClient', () => { - it('has servicePath', () => { - const servicePath = - imageannotatorModule.v1p3beta1.ImageAnnotatorClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - imageannotatorModule.v1p3beta1.ImageAnnotatorClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = imageannotatorModule.v1p3beta1.ImageAnnotatorClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + imageannotatorModule.v1p3beta1.ImageAnnotatorClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = + imageannotatorModule.v1p3beta1.ImageAnnotatorClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = imageannotatorModule.v1p3beta1.ImageAnnotatorClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - await client.initialize(); - assert(client.imageAnnotatorStub); - }); - it('has close method for the initialized client', done => { - const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient(); + assert(client); }); - client.initialize(); - assert(client.imageAnnotatorStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + await client.initialize(); + assert(client.imageAnnotatorStub); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('batchAnnotateImages', () => { diff --git a/test/gapic_image_annotator_v1p4beta1.ts b/test/gapic_image_annotator_v1p4beta1.ts index 408383fb..37e06f60 100644 --- a/test/gapic_image_annotator_v1p4beta1.ts +++ b/test/gapic_image_annotator_v1p4beta1.ts @@ -82,101 +82,103 @@ function stubLongRunningCallWithCallback( } describe('v1p4beta1.ImageAnnotatorClient', () => { - it('has servicePath', () => { - const servicePath = - imageannotatorModule.v1p4beta1.ImageAnnotatorClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - imageannotatorModule.v1p4beta1.ImageAnnotatorClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = imageannotatorModule.v1p4beta1.ImageAnnotatorClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + imageannotatorModule.v1p4beta1.ImageAnnotatorClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + imageannotatorModule.v1p4beta1.ImageAnnotatorClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ - fallback: true, + it('has port', () => { + const port = imageannotatorModule.v1p4beta1.ImageAnnotatorClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient(); + assert(client); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - await client.initialize(); - assert(client.imageAnnotatorStub); - }); - it('has close method for the initialized client', done => { - const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.imageAnnotatorStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + await client.initialize(); + assert(client.imageAnnotatorStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.imageAnnotatorStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); }); describe('batchAnnotateImages', () => { diff --git a/test/gapic_product_search_v1.ts b/test/gapic_product_search_v1.ts index 2607489d..ac4d6486 100644 --- a/test/gapic_product_search_v1.ts +++ b/test/gapic_product_search_v1.ts @@ -145,99 +145,103 @@ function stubAsyncIterationCall( } describe('v1.ProductSearchClient', () => { - it('has servicePath', () => { - const servicePath = productsearchModule.v1.ProductSearchClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = productsearchModule.v1.ProductSearchClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = productsearchModule.v1.ProductSearchClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + productsearchModule.v1.ProductSearchClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new productsearchModule.v1.ProductSearchClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + productsearchModule.v1.ProductSearchClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new productsearchModule.v1.ProductSearchClient({ - fallback: true, + it('has port', () => { + const port = productsearchModule.v1.ProductSearchClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new productsearchModule.v1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new productsearchModule.v1.ProductSearchClient(); + assert(client); }); - assert.strictEqual(client.productSearchStub, undefined); - await client.initialize(); - assert(client.productSearchStub); - }); - it('has close method for the initialized client', done => { - const client = new productsearchModule.v1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new productsearchModule.v1.ProductSearchClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.productSearchStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.productSearchStub, undefined); + await client.initialize(); + assert(client.productSearchStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new productsearchModule.v1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.productSearchStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.productSearchStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.productSearchStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new productsearchModule.v1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new productsearchModule.v1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createProductSet', () => { diff --git a/test/gapic_product_search_v1p3beta1.ts b/test/gapic_product_search_v1p3beta1.ts index 5608cd4c..adad0827 100644 --- a/test/gapic_product_search_v1p3beta1.ts +++ b/test/gapic_product_search_v1p3beta1.ts @@ -145,101 +145,103 @@ function stubAsyncIterationCall( } describe('v1p3beta1.ProductSearchClient', () => { - it('has servicePath', () => { - const servicePath = - productsearchModule.v1p3beta1.ProductSearchClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - productsearchModule.v1p3beta1.ProductSearchClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = productsearchModule.v1p3beta1.ProductSearchClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + productsearchModule.v1p3beta1.ProductSearchClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new productsearchModule.v1p3beta1.ProductSearchClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + productsearchModule.v1p3beta1.ProductSearchClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new productsearchModule.v1p3beta1.ProductSearchClient({ - fallback: true, + it('has port', () => { + const port = productsearchModule.v1p3beta1.ProductSearchClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new productsearchModule.v1p3beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient(); + assert(client); }); - assert.strictEqual(client.productSearchStub, undefined); - await client.initialize(); - assert(client.productSearchStub); - }); - it('has close method for the initialized client', done => { - const client = new productsearchModule.v1p3beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.productSearchStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.productSearchStub, undefined); + await client.initialize(); + assert(client.productSearchStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new productsearchModule.v1p3beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.productSearchStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.productSearchStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.productSearchStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new productsearchModule.v1p3beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new productsearchModule.v1p3beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createProductSet', () => { diff --git a/test/gapic_product_search_v1p4beta1.ts b/test/gapic_product_search_v1p4beta1.ts index 3752aabb..538ec6e0 100644 --- a/test/gapic_product_search_v1p4beta1.ts +++ b/test/gapic_product_search_v1p4beta1.ts @@ -145,101 +145,103 @@ function stubAsyncIterationCall( } describe('v1p4beta1.ProductSearchClient', () => { - it('has servicePath', () => { - const servicePath = - productsearchModule.v1p4beta1.ProductSearchClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = - productsearchModule.v1p4beta1.ProductSearchClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = productsearchModule.v1p4beta1.ProductSearchClient.port; - assert(port); - assert(typeof port === 'number'); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + productsearchModule.v1p4beta1.ProductSearchClient.servicePath; + assert(servicePath); + }); - it('should create a client with no option', () => { - const client = new productsearchModule.v1p4beta1.ProductSearchClient(); - assert(client); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + productsearchModule.v1p4beta1.ProductSearchClient.apiEndpoint; + assert(apiEndpoint); + }); - it('should create a client with gRPC fallback', () => { - const client = new productsearchModule.v1p4beta1.ProductSearchClient({ - fallback: true, + it('has port', () => { + const port = productsearchModule.v1p4beta1.ProductSearchClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new productsearchModule.v1p4beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient(); + assert(client); }); - assert.strictEqual(client.productSearchStub, undefined); - await client.initialize(); - assert(client.productSearchStub); - }); - it('has close method for the initialized client', done => { - const client = new productsearchModule.v1p4beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with gRPC fallback', () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + fallback: true, + }); + assert(client); }); - client.initialize(); - assert(client.productSearchStub); - client.close().then(() => { - done(); + + it('has initialize method and supports deferred initialization', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.productSearchStub, undefined); + await client.initialize(); + assert(client.productSearchStub); }); - }); - it('has close method for the non-initialized client', done => { - const client = new productsearchModule.v1p4beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the initialized client', done => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.productSearchStub); + client.close().then(() => { + done(); + }); }); - assert.strictEqual(client.productSearchStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the non-initialized client', done => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.productSearchStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new productsearchModule.v1p4beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new productsearchModule.v1p4beta1.ProductSearchClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('createProductSet', () => {