diff --git a/owlbot.py b/owlbot.py index b835126e..4912eeb4 100644 --- a/owlbot.py +++ b/owlbot.py @@ -100,6 +100,7 @@ # Move docs configuration s.move(library / f"docs/conf.py") + s.move(library / "samples") s.remove_staging_dirs() diff --git a/samples/generated_samples/snippet_metadata_vision_v1.json b/samples/generated_samples/snippet_metadata_vision_v1.json new file mode 100644 index 00000000..9470660d --- /dev/null +++ b/samples/generated_samples/snippet_metadata_vision_v1.json @@ -0,0 +1,2031 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateFiles" + } + }, + "file": "vision_v1_generated_image_annotator_async_batch_annotate_files_async.py", + "regionTag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateFiles" + } + }, + "file": "vision_v1_generated_image_annotator_async_batch_annotate_files_sync.py", + "regionTag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateImages" + } + }, + "file": "vision_v1_generated_image_annotator_async_batch_annotate_images_async.py", + "regionTag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateImages" + } + }, + "file": "vision_v1_generated_image_annotator_async_batch_annotate_images_sync.py", + "regionTag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateFiles" + } + }, + "file": "vision_v1_generated_image_annotator_batch_annotate_files_async.py", + "regionTag": "vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateFiles" + } + }, + "file": "vision_v1_generated_image_annotator_batch_annotate_files_sync.py", + "regionTag": "vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1_generated_image_annotator_batch_annotate_images_async.py", + "regionTag": "vision_v1_generated_ImageAnnotator_BatchAnnotateImages_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1_generated_image_annotator_batch_annotate_images_sync.py", + "regionTag": "vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "AddProductToProductSet" + } + }, + "file": "vision_v1_generated_product_search_add_product_to_product_set_async.py", + "regionTag": "vision_v1_generated_ProductSearch_AddProductToProductSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "AddProductToProductSet" + } + }, + "file": "vision_v1_generated_product_search_add_product_to_product_set_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_AddProductToProductSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProductSet" + } + }, + "file": "vision_v1_generated_product_search_create_product_set_async.py", + "regionTag": "vision_v1_generated_ProductSearch_CreateProductSet_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProductSet" + } + }, + "file": "vision_v1_generated_product_search_create_product_set_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_CreateProductSet_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProduct" + } + }, + "file": "vision_v1_generated_product_search_create_product_async.py", + "regionTag": "vision_v1_generated_ProductSearch_CreateProduct_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProduct" + } + }, + "file": "vision_v1_generated_product_search_create_product_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_CreateProduct_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateReferenceImage" + } + }, + "file": "vision_v1_generated_product_search_create_reference_image_async.py", + "regionTag": "vision_v1_generated_ProductSearch_CreateReferenceImage_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateReferenceImage" + } + }, + "file": "vision_v1_generated_product_search_create_reference_image_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_CreateReferenceImage_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProductSet" + } + }, + "file": "vision_v1_generated_product_search_delete_product_set_async.py", + "regionTag": "vision_v1_generated_ProductSearch_DeleteProductSet_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProductSet" + } + }, + "file": "vision_v1_generated_product_search_delete_product_set_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_DeleteProductSet_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProduct" + } + }, + "file": "vision_v1_generated_product_search_delete_product_async.py", + "regionTag": "vision_v1_generated_ProductSearch_DeleteProduct_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProduct" + } + }, + "file": "vision_v1_generated_product_search_delete_product_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_DeleteProduct_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteReferenceImage" + } + }, + "file": "vision_v1_generated_product_search_delete_reference_image_async.py", + "regionTag": "vision_v1_generated_ProductSearch_DeleteReferenceImage_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteReferenceImage" + } + }, + "file": "vision_v1_generated_product_search_delete_reference_image_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_DeleteReferenceImage_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProductSet" + } + }, + "file": "vision_v1_generated_product_search_get_product_set_async.py", + "regionTag": "vision_v1_generated_ProductSearch_GetProductSet_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProductSet" + } + }, + "file": "vision_v1_generated_product_search_get_product_set_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_GetProductSet_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProduct" + } + }, + "file": "vision_v1_generated_product_search_get_product_async.py", + "regionTag": "vision_v1_generated_ProductSearch_GetProduct_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProduct" + } + }, + "file": "vision_v1_generated_product_search_get_product_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_GetProduct_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetReferenceImage" + } + }, + "file": "vision_v1_generated_product_search_get_reference_image_async.py", + "regionTag": "vision_v1_generated_ProductSearch_GetReferenceImage_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetReferenceImage" + } + }, + "file": "vision_v1_generated_product_search_get_reference_image_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_GetReferenceImage_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ImportProductSets" + } + }, + "file": "vision_v1_generated_product_search_import_product_sets_async.py", + "regionTag": "vision_v1_generated_ProductSearch_ImportProductSets_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ImportProductSets" + } + }, + "file": "vision_v1_generated_product_search_import_product_sets_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_ImportProductSets_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductSets" + } + }, + "file": "vision_v1_generated_product_search_list_product_sets_async.py", + "regionTag": "vision_v1_generated_ProductSearch_ListProductSets_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductSets" + } + }, + "file": "vision_v1_generated_product_search_list_product_sets_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_ListProductSets_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductsInProductSet" + } + }, + "file": "vision_v1_generated_product_search_list_products_in_product_set_async.py", + "regionTag": "vision_v1_generated_ProductSearch_ListProductsInProductSet_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductsInProductSet" + } + }, + "file": "vision_v1_generated_product_search_list_products_in_product_set_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_ListProductsInProductSet_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProducts" + } + }, + "file": "vision_v1_generated_product_search_list_products_async.py", + "regionTag": "vision_v1_generated_ProductSearch_ListProducts_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProducts" + } + }, + "file": "vision_v1_generated_product_search_list_products_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_ListProducts_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListReferenceImages" + } + }, + "file": "vision_v1_generated_product_search_list_reference_images_async.py", + "regionTag": "vision_v1_generated_ProductSearch_ListReferenceImages_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListReferenceImages" + } + }, + "file": "vision_v1_generated_product_search_list_reference_images_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_ListReferenceImages_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "PurgeProducts" + } + }, + "file": "vision_v1_generated_product_search_purge_products_async.py", + "regionTag": "vision_v1_generated_ProductSearch_PurgeProducts_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "PurgeProducts" + } + }, + "file": "vision_v1_generated_product_search_purge_products_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_PurgeProducts_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "RemoveProductFromProductSet" + } + }, + "file": "vision_v1_generated_product_search_remove_product_from_product_set_async.py", + "regionTag": "vision_v1_generated_ProductSearch_RemoveProductFromProductSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "RemoveProductFromProductSet" + } + }, + "file": "vision_v1_generated_product_search_remove_product_from_product_set_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProductSet" + } + }, + "file": "vision_v1_generated_product_search_update_product_set_async.py", + "regionTag": "vision_v1_generated_ProductSearch_UpdateProductSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProductSet" + } + }, + "file": "vision_v1_generated_product_search_update_product_set_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_UpdateProductSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProduct" + } + }, + "file": "vision_v1_generated_product_search_update_product_async.py", + "regionTag": "vision_v1_generated_ProductSearch_UpdateProduct_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProduct" + } + }, + "file": "vision_v1_generated_product_search_update_product_sync.py", + "regionTag": "vision_v1_generated_ProductSearch_UpdateProduct_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/samples/generated_samples/snippet_metadata_vision_v1p1beta1.json b/samples/generated_samples/snippet_metadata_vision_v1p1beta1.json new file mode 100644 index 00000000..d588d510 --- /dev/null +++ b/samples/generated_samples/snippet_metadata_vision_v1p1beta1.json @@ -0,0 +1,93 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1p1beta1_generated_image_annotator_batch_annotate_images_async.py", + "regionTag": "vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1p1beta1_generated_image_annotator_batch_annotate_images_sync.py", + "regionTag": "vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/samples/generated_samples/snippet_metadata_vision_v1p2beta1.json b/samples/generated_samples/snippet_metadata_vision_v1p2beta1.json new file mode 100644 index 00000000..80d069b0 --- /dev/null +++ b/samples/generated_samples/snippet_metadata_vision_v1p2beta1.json @@ -0,0 +1,182 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateFiles" + } + }, + "file": "vision_v1p2beta1_generated_image_annotator_async_batch_annotate_files_async.py", + "regionTag": "vision_v1p2beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateFiles" + } + }, + "file": "vision_v1p2beta1_generated_image_annotator_async_batch_annotate_files_sync.py", + "regionTag": "vision_v1p2beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1p2beta1_generated_image_annotator_batch_annotate_images_async.py", + "regionTag": "vision_v1p2beta1_generated_ImageAnnotator_BatchAnnotateImages_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1p2beta1_generated_image_annotator_batch_annotate_images_sync.py", + "regionTag": "vision_v1p2beta1_generated_ImageAnnotator_BatchAnnotateImages_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/samples/generated_samples/snippet_metadata_vision_v1p3beta1.json b/samples/generated_samples/snippet_metadata_vision_v1p3beta1.json new file mode 100644 index 00000000..9cdb395b --- /dev/null +++ b/samples/generated_samples/snippet_metadata_vision_v1p3beta1.json @@ -0,0 +1,1764 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateFiles" + } + }, + "file": "vision_v1p3beta1_generated_image_annotator_async_batch_annotate_files_async.py", + "regionTag": "vision_v1p3beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateFiles" + } + }, + "file": "vision_v1p3beta1_generated_image_annotator_async_batch_annotate_files_sync.py", + "regionTag": "vision_v1p3beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1p3beta1_generated_image_annotator_batch_annotate_images_async.py", + "regionTag": "vision_v1p3beta1_generated_ImageAnnotator_BatchAnnotateImages_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1p3beta1_generated_image_annotator_batch_annotate_images_sync.py", + "regionTag": "vision_v1p3beta1_generated_ImageAnnotator_BatchAnnotateImages_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "AddProductToProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_add_product_to_product_set_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_AddProductToProductSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "AddProductToProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_add_product_to_product_set_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_AddProductToProductSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_create_product_set_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_CreateProductSet_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_create_product_set_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_CreateProductSet_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProduct" + } + }, + "file": "vision_v1p3beta1_generated_product_search_create_product_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_CreateProduct_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProduct" + } + }, + "file": "vision_v1p3beta1_generated_product_search_create_product_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_CreateProduct_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateReferenceImage" + } + }, + "file": "vision_v1p3beta1_generated_product_search_create_reference_image_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_CreateReferenceImage_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateReferenceImage" + } + }, + "file": "vision_v1p3beta1_generated_product_search_create_reference_image_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_CreateReferenceImage_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_delete_product_set_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_DeleteProductSet_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_delete_product_set_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_DeleteProductSet_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProduct" + } + }, + "file": "vision_v1p3beta1_generated_product_search_delete_product_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_DeleteProduct_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProduct" + } + }, + "file": "vision_v1p3beta1_generated_product_search_delete_product_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_DeleteProduct_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteReferenceImage" + } + }, + "file": "vision_v1p3beta1_generated_product_search_delete_reference_image_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_DeleteReferenceImage_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteReferenceImage" + } + }, + "file": "vision_v1p3beta1_generated_product_search_delete_reference_image_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_DeleteReferenceImage_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_get_product_set_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_GetProductSet_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_get_product_set_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_GetProductSet_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProduct" + } + }, + "file": "vision_v1p3beta1_generated_product_search_get_product_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_GetProduct_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProduct" + } + }, + "file": "vision_v1p3beta1_generated_product_search_get_product_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_GetProduct_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetReferenceImage" + } + }, + "file": "vision_v1p3beta1_generated_product_search_get_reference_image_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_GetReferenceImage_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetReferenceImage" + } + }, + "file": "vision_v1p3beta1_generated_product_search_get_reference_image_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_GetReferenceImage_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ImportProductSets" + } + }, + "file": "vision_v1p3beta1_generated_product_search_import_product_sets_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ImportProductSets_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ImportProductSets" + } + }, + "file": "vision_v1p3beta1_generated_product_search_import_product_sets_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ImportProductSets_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductSets" + } + }, + "file": "vision_v1p3beta1_generated_product_search_list_product_sets_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListProductSets_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductSets" + } + }, + "file": "vision_v1p3beta1_generated_product_search_list_product_sets_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListProductSets_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductsInProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_list_products_in_product_set_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListProductsInProductSet_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductsInProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_list_products_in_product_set_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListProductsInProductSet_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProducts" + } + }, + "file": "vision_v1p3beta1_generated_product_search_list_products_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListProducts_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProducts" + } + }, + "file": "vision_v1p3beta1_generated_product_search_list_products_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListProducts_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListReferenceImages" + } + }, + "file": "vision_v1p3beta1_generated_product_search_list_reference_images_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListReferenceImages_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListReferenceImages" + } + }, + "file": "vision_v1p3beta1_generated_product_search_list_reference_images_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListReferenceImages_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "RemoveProductFromProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_remove_product_from_product_set_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_RemoveProductFromProductSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "RemoveProductFromProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_remove_product_from_product_set_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_RemoveProductFromProductSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_update_product_set_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_UpdateProductSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProductSet" + } + }, + "file": "vision_v1p3beta1_generated_product_search_update_product_set_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_UpdateProductSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProduct" + } + }, + "file": "vision_v1p3beta1_generated_product_search_update_product_async.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_UpdateProduct_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProduct" + } + }, + "file": "vision_v1p3beta1_generated_product_search_update_product_sync.py", + "regionTag": "vision_v1p3beta1_generated_ProductSearch_UpdateProduct_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/samples/generated_samples/snippet_metadata_vision_v1p4beta1.json b/samples/generated_samples/snippet_metadata_vision_v1p4beta1.json new file mode 100644 index 00000000..8a312b70 --- /dev/null +++ b/samples/generated_samples/snippet_metadata_vision_v1p4beta1.json @@ -0,0 +1,2031 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateFiles" + } + }, + "file": "vision_v1p4beta1_generated_image_annotator_async_batch_annotate_files_async.py", + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateFiles" + } + }, + "file": "vision_v1p4beta1_generated_image_annotator_async_batch_annotate_files_sync.py", + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateImages" + } + }, + "file": "vision_v1p4beta1_generated_image_annotator_async_batch_annotate_images_async.py", + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "AsyncBatchAnnotateImages" + } + }, + "file": "vision_v1p4beta1_generated_image_annotator_async_batch_annotate_images_sync.py", + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateFiles" + } + }, + "file": "vision_v1p4beta1_generated_image_annotator_batch_annotate_files_async.py", + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateFiles_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateFiles" + } + }, + "file": "vision_v1p4beta1_generated_image_annotator_batch_annotate_files_sync.py", + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateFiles_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1p4beta1_generated_image_annotator_batch_annotate_images_async.py", + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateImages_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ImageAnnotator" + }, + "shortName": "BatchAnnotateImages" + } + }, + "file": "vision_v1p4beta1_generated_image_annotator_batch_annotate_images_sync.py", + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateImages_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "AddProductToProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_add_product_to_product_set_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_AddProductToProductSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "AddProductToProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_add_product_to_product_set_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_AddProductToProductSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_create_product_set_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_CreateProductSet_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_create_product_set_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_CreateProductSet_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProduct" + } + }, + "file": "vision_v1p4beta1_generated_product_search_create_product_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_CreateProduct_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateProduct" + } + }, + "file": "vision_v1p4beta1_generated_product_search_create_product_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_CreateProduct_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateReferenceImage" + } + }, + "file": "vision_v1p4beta1_generated_product_search_create_reference_image_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_CreateReferenceImage_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "CreateReferenceImage" + } + }, + "file": "vision_v1p4beta1_generated_product_search_create_reference_image_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_CreateReferenceImage_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_delete_product_set_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_DeleteProductSet_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_delete_product_set_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_DeleteProductSet_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProduct" + } + }, + "file": "vision_v1p4beta1_generated_product_search_delete_product_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_DeleteProduct_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteProduct" + } + }, + "file": "vision_v1p4beta1_generated_product_search_delete_product_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_DeleteProduct_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteReferenceImage" + } + }, + "file": "vision_v1p4beta1_generated_product_search_delete_reference_image_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_DeleteReferenceImage_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "DeleteReferenceImage" + } + }, + "file": "vision_v1p4beta1_generated_product_search_delete_reference_image_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_DeleteReferenceImage_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_get_product_set_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_GetProductSet_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_get_product_set_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_GetProductSet_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProduct" + } + }, + "file": "vision_v1p4beta1_generated_product_search_get_product_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_GetProduct_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetProduct" + } + }, + "file": "vision_v1p4beta1_generated_product_search_get_product_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_GetProduct_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetReferenceImage" + } + }, + "file": "vision_v1p4beta1_generated_product_search_get_reference_image_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_GetReferenceImage_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "GetReferenceImage" + } + }, + "file": "vision_v1p4beta1_generated_product_search_get_reference_image_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_GetReferenceImage_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ImportProductSets" + } + }, + "file": "vision_v1p4beta1_generated_product_search_import_product_sets_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ImportProductSets_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ImportProductSets" + } + }, + "file": "vision_v1p4beta1_generated_product_search_import_product_sets_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ImportProductSets_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductSets" + } + }, + "file": "vision_v1p4beta1_generated_product_search_list_product_sets_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListProductSets_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductSets" + } + }, + "file": "vision_v1p4beta1_generated_product_search_list_product_sets_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListProductSets_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductsInProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_list_products_in_product_set_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListProductsInProductSet_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProductsInProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_list_products_in_product_set_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListProductsInProductSet_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProducts" + } + }, + "file": "vision_v1p4beta1_generated_product_search_list_products_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListProducts_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListProducts" + } + }, + "file": "vision_v1p4beta1_generated_product_search_list_products_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListProducts_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListReferenceImages" + } + }, + "file": "vision_v1p4beta1_generated_product_search_list_reference_images_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListReferenceImages_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "ListReferenceImages" + } + }, + "file": "vision_v1p4beta1_generated_product_search_list_reference_images_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListReferenceImages_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "PurgeProducts" + } + }, + "file": "vision_v1p4beta1_generated_product_search_purge_products_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_PurgeProducts_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "PurgeProducts" + } + }, + "file": "vision_v1p4beta1_generated_product_search_purge_products_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_PurgeProducts_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "RemoveProductFromProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_remove_product_from_product_set_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_RemoveProductFromProductSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "RemoveProductFromProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_remove_product_from_product_set_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_RemoveProductFromProductSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_update_product_set_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_UpdateProductSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProductSet" + } + }, + "file": "vision_v1p4beta1_generated_product_search_update_product_set_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_UpdateProductSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProduct" + } + }, + "file": "vision_v1p4beta1_generated_product_search_update_product_async.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_UpdateProduct_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "ProductSearch" + }, + "shortName": "UpdateProduct" + } + }, + "file": "vision_v1p4beta1_generated_product_search_update_product_sync.py", + "regionTag": "vision_v1p4beta1_generated_ProductSearch_UpdateProduct_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_files_async.py b/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_files_async.py new file mode 100644 index 00000000..6226e997 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_files_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] +from google.cloud import vision_v1 + + +async def sample_async_batch_annotate_files(): + # Create a client + client = vision_v1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1.AsyncBatchAnnotateFilesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_files(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] diff --git a/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_files_sync.py b/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_files_sync.py new file mode 100644 index 00000000..028744c3 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_files_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] +from google.cloud import vision_v1 + + +def sample_async_batch_annotate_files(): + # Create a client + client = vision_v1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1.AsyncBatchAnnotateFilesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_files(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_images_async.py b/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_images_async.py new file mode 100644 index 00000000..f06f42aa --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_images_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async] +from google.cloud import vision_v1 + + +async def sample_async_batch_annotate_images(): + # Create a client + client = vision_v1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1.AsyncBatchAnnotateImagesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_images(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async] diff --git a/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_images_sync.py b/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_images_sync.py new file mode 100644 index 00000000..73c94918 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_image_annotator_async_batch_annotate_images_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] +from google.cloud import vision_v1 + + +def sample_async_batch_annotate_images(): + # Create a client + client = vision_v1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1.AsyncBatchAnnotateImagesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_images(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] diff --git a/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_files_async.py b/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_files_async.py new file mode 100644 index 00000000..c09df6a2 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_files_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_async] +from google.cloud import vision_v1 + + +async def sample_batch_annotate_files(): + # Create a client + client = vision_v1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1.BatchAnnotateFilesRequest( + ) + + # Make the request + response = await client.batch_annotate_files(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_async] diff --git a/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_files_sync.py b/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_files_sync.py new file mode 100644 index 00000000..9eac77d5 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_files_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] +from google.cloud import vision_v1 + + +def sample_batch_annotate_files(): + # Create a client + client = vision_v1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1.BatchAnnotateFilesRequest( + ) + + # Make the request + response = client.batch_annotate_files(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] diff --git a/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_images_async.py b/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_images_async.py new file mode 100644 index 00000000..0e7691f5 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_images_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ImageAnnotator_BatchAnnotateImages_async] +from google.cloud import vision_v1 + + +async def sample_batch_annotate_images(): + # Create a client + client = vision_v1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = await client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ImageAnnotator_BatchAnnotateImages_async] diff --git a/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_images_sync.py b/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_images_sync.py new file mode 100644 index 00000000..88a4536e --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_image_annotator_batch_annotate_images_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] +from google.cloud import vision_v1 + + +def sample_batch_annotate_images(): + # Create a client + client = vision_v1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_add_product_to_product_set_async.py b/samples/generated_samples/vision_v1_generated_product_search_add_product_to_product_set_async.py new file mode 100644 index 00000000..ed1e2bd8 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_add_product_to_product_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AddProductToProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_AddProductToProductSet_async] +from google.cloud import vision_v1 + + +async def sample_add_product_to_product_set(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.AddProductToProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + await client.add_product_to_product_set(request=request) + + +# [END vision_v1_generated_ProductSearch_AddProductToProductSet_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_add_product_to_product_set_sync.py b/samples/generated_samples/vision_v1_generated_product_search_add_product_to_product_set_sync.py new file mode 100644 index 00000000..29fe7afb --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_add_product_to_product_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AddProductToProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_AddProductToProductSet_sync] +from google.cloud import vision_v1 + + +def sample_add_product_to_product_set(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.AddProductToProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + client.add_product_to_product_set(request=request) + + +# [END vision_v1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_create_product_async.py b/samples/generated_samples/vision_v1_generated_product_search_create_product_async.py new file mode 100644 index 00000000..bf946336 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_create_product_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_CreateProduct_async] +from google.cloud import vision_v1 + + +async def sample_create_product(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.CreateProductRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_CreateProduct_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_create_product_set_async.py b/samples/generated_samples/vision_v1_generated_product_search_create_product_set_async.py new file mode 100644 index 00000000..fd46b3bd --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_create_product_set_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_CreateProductSet_async] +from google.cloud import vision_v1 + + +async def sample_create_product_set(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.CreateProductSetRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_CreateProductSet_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_create_product_set_sync.py b/samples/generated_samples/vision_v1_generated_product_search_create_product_set_sync.py new file mode 100644 index 00000000..581f3ca0 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_create_product_set_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_CreateProductSet_sync] +from google.cloud import vision_v1 + + +def sample_create_product_set(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.CreateProductSetRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_CreateProductSet_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_create_product_sync.py b/samples/generated_samples/vision_v1_generated_product_search_create_product_sync.py new file mode 100644 index 00000000..fe57e203 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_create_product_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_CreateProduct_sync] +from google.cloud import vision_v1 + + +def sample_create_product(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.CreateProductRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_CreateProduct_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_create_reference_image_async.py b/samples/generated_samples/vision_v1_generated_product_search_create_reference_image_async.py new file mode 100644 index 00000000..18497bc0 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_create_reference_image_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_CreateReferenceImage_async] +from google.cloud import vision_v1 + + +async def sample_create_reference_image(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + reference_image = vision_v1.ReferenceImage() + reference_image.uri = "uri_value" + + request = vision_v1.CreateReferenceImageRequest( + parent="parent_value", + reference_image=reference_image, + ) + + # Make the request + response = await client.create_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_CreateReferenceImage_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_create_reference_image_sync.py b/samples/generated_samples/vision_v1_generated_product_search_create_reference_image_sync.py new file mode 100644 index 00000000..ceae9b0a --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_create_reference_image_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_CreateReferenceImage_sync] +from google.cloud import vision_v1 + + +def sample_create_reference_image(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + reference_image = vision_v1.ReferenceImage() + reference_image.uri = "uri_value" + + request = vision_v1.CreateReferenceImageRequest( + parent="parent_value", + reference_image=reference_image, + ) + + # Make the request + response = client.create_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_delete_product_async.py b/samples/generated_samples/vision_v1_generated_product_search_delete_product_async.py new file mode 100644 index 00000000..1831f433 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_delete_product_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_DeleteProduct_async] +from google.cloud import vision_v1 + + +async def sample_delete_product(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.DeleteProductRequest( + name="name_value", + ) + + # Make the request + await client.delete_product(request=request) + + +# [END vision_v1_generated_ProductSearch_DeleteProduct_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_delete_product_set_async.py b/samples/generated_samples/vision_v1_generated_product_search_delete_product_set_async.py new file mode 100644 index 00000000..17b81593 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_delete_product_set_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_DeleteProductSet_async] +from google.cloud import vision_v1 + + +async def sample_delete_product_set(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.DeleteProductSetRequest( + name="name_value", + ) + + # Make the request + await client.delete_product_set(request=request) + + +# [END vision_v1_generated_ProductSearch_DeleteProductSet_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_delete_product_set_sync.py b/samples/generated_samples/vision_v1_generated_product_search_delete_product_set_sync.py new file mode 100644 index 00000000..a4481e02 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_delete_product_set_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_DeleteProductSet_sync] +from google.cloud import vision_v1 + + +def sample_delete_product_set(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.DeleteProductSetRequest( + name="name_value", + ) + + # Make the request + client.delete_product_set(request=request) + + +# [END vision_v1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_delete_product_sync.py b/samples/generated_samples/vision_v1_generated_product_search_delete_product_sync.py new file mode 100644 index 00000000..f8fa3fad --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_delete_product_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_DeleteProduct_sync] +from google.cloud import vision_v1 + + +def sample_delete_product(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.DeleteProductRequest( + name="name_value", + ) + + # Make the request + client.delete_product(request=request) + + +# [END vision_v1_generated_ProductSearch_DeleteProduct_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_delete_reference_image_async.py b/samples/generated_samples/vision_v1_generated_product_search_delete_reference_image_async.py new file mode 100644 index 00000000..830b88f0 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_delete_reference_image_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_DeleteReferenceImage_async] +from google.cloud import vision_v1 + + +async def sample_delete_reference_image(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.DeleteReferenceImageRequest( + name="name_value", + ) + + # Make the request + await client.delete_reference_image(request=request) + + +# [END vision_v1_generated_ProductSearch_DeleteReferenceImage_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_delete_reference_image_sync.py b/samples/generated_samples/vision_v1_generated_product_search_delete_reference_image_sync.py new file mode 100644 index 00000000..7beb3f83 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_delete_reference_image_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] +from google.cloud import vision_v1 + + +def sample_delete_reference_image(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.DeleteReferenceImageRequest( + name="name_value", + ) + + # Make the request + client.delete_reference_image(request=request) + + +# [END vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_get_product_async.py b/samples/generated_samples/vision_v1_generated_product_search_get_product_async.py new file mode 100644 index 00000000..fa998b95 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_get_product_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_GetProduct_async] +from google.cloud import vision_v1 + + +async def sample_get_product(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.GetProductRequest( + name="name_value", + ) + + # Make the request + response = await client.get_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_GetProduct_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_get_product_set_async.py b/samples/generated_samples/vision_v1_generated_product_search_get_product_set_async.py new file mode 100644 index 00000000..8f9862fc --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_get_product_set_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_GetProductSet_async] +from google.cloud import vision_v1 + + +async def sample_get_product_set(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.GetProductSetRequest( + name="name_value", + ) + + # Make the request + response = await client.get_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_GetProductSet_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_get_product_set_sync.py b/samples/generated_samples/vision_v1_generated_product_search_get_product_set_sync.py new file mode 100644 index 00000000..cd592b37 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_get_product_set_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_GetProductSet_sync] +from google.cloud import vision_v1 + + +def sample_get_product_set(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.GetProductSetRequest( + name="name_value", + ) + + # Make the request + response = client.get_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_GetProductSet_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_get_product_sync.py b/samples/generated_samples/vision_v1_generated_product_search_get_product_sync.py new file mode 100644 index 00000000..88b5b72b --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_get_product_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_GetProduct_sync] +from google.cloud import vision_v1 + + +def sample_get_product(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.GetProductRequest( + name="name_value", + ) + + # Make the request + response = client.get_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_GetProduct_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_get_reference_image_async.py b/samples/generated_samples/vision_v1_generated_product_search_get_reference_image_async.py new file mode 100644 index 00000000..059604f9 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_get_reference_image_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_GetReferenceImage_async] +from google.cloud import vision_v1 + + +async def sample_get_reference_image(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.GetReferenceImageRequest( + name="name_value", + ) + + # Make the request + response = await client.get_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_GetReferenceImage_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_get_reference_image_sync.py b/samples/generated_samples/vision_v1_generated_product_search_get_reference_image_sync.py new file mode 100644 index 00000000..cb19d1ce --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_get_reference_image_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_GetReferenceImage_sync] +from google.cloud import vision_v1 + + +def sample_get_reference_image(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.GetReferenceImageRequest( + name="name_value", + ) + + # Make the request + response = client.get_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_import_product_sets_async.py b/samples/generated_samples/vision_v1_generated_product_search_import_product_sets_async.py new file mode 100644 index 00000000..be8141fa --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_import_product_sets_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ImportProductSets_async] +from google.cloud import vision_v1 + + +async def sample_import_product_sets(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.ImportProductSetsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_product_sets(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_ImportProductSets_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_import_product_sets_sync.py b/samples/generated_samples/vision_v1_generated_product_search_import_product_sets_sync.py new file mode 100644 index 00000000..6243011a --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_import_product_sets_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ImportProductSets_sync] +from google.cloud import vision_v1 + + +def sample_import_product_sets(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.ImportProductSetsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_product_sets(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_ImportProductSets_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_list_product_sets_async.py b/samples/generated_samples/vision_v1_generated_product_search_list_product_sets_async.py new file mode 100644 index 00000000..eef8937f --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_list_product_sets_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ListProductSets_async] +from google.cloud import vision_v1 + + +async def sample_list_product_sets(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.ListProductSetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_product_sets(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1_generated_ProductSearch_ListProductSets_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_list_product_sets_sync.py b/samples/generated_samples/vision_v1_generated_product_search_list_product_sets_sync.py new file mode 100644 index 00000000..fad94a07 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_list_product_sets_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ListProductSets_sync] +from google.cloud import vision_v1 + + +def sample_list_product_sets(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.ListProductSetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_product_sets(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1_generated_ProductSearch_ListProductSets_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_list_products_async.py b/samples/generated_samples/vision_v1_generated_product_search_list_products_async.py new file mode 100644 index 00000000..b48b7669 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_list_products_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ListProducts_async] +from google.cloud import vision_v1 + + +async def sample_list_products(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1_generated_ProductSearch_ListProducts_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_list_products_in_product_set_async.py b/samples/generated_samples/vision_v1_generated_product_search_list_products_in_product_set_async.py new file mode 100644 index 00000000..31c269d4 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_list_products_in_product_set_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductsInProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ListProductsInProductSet_async] +from google.cloud import vision_v1 + + +async def sample_list_products_in_product_set(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.ListProductsInProductSetRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_products_in_product_set(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1_generated_ProductSearch_ListProductsInProductSet_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_list_products_in_product_set_sync.py b/samples/generated_samples/vision_v1_generated_product_search_list_products_in_product_set_sync.py new file mode 100644 index 00000000..5b32317c --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_list_products_in_product_set_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductsInProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] +from google.cloud import vision_v1 + + +def sample_list_products_in_product_set(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.ListProductsInProductSetRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_products_in_product_set(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_list_products_sync.py b/samples/generated_samples/vision_v1_generated_product_search_list_products_sync.py new file mode 100644 index 00000000..d3516515 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_list_products_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ListProducts_sync] +from google.cloud import vision_v1 + + +def sample_list_products(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1_generated_ProductSearch_ListProducts_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_list_reference_images_async.py b/samples/generated_samples/vision_v1_generated_product_search_list_reference_images_async.py new file mode 100644 index 00000000..6394b8e7 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_list_reference_images_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListReferenceImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ListReferenceImages_async] +from google.cloud import vision_v1 + + +async def sample_list_reference_images(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.ListReferenceImagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_reference_images(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1_generated_ProductSearch_ListReferenceImages_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_list_reference_images_sync.py b/samples/generated_samples/vision_v1_generated_product_search_list_reference_images_sync.py new file mode 100644 index 00000000..1ced3d04 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_list_reference_images_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListReferenceImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_ListReferenceImages_sync] +from google.cloud import vision_v1 + + +def sample_list_reference_images(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.ListReferenceImagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_reference_images(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_purge_products_async.py b/samples/generated_samples/vision_v1_generated_product_search_purge_products_async.py new file mode 100644 index 00000000..5d49ee36 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_purge_products_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PurgeProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_PurgeProducts_async] +from google.cloud import vision_v1 + + +async def sample_purge_products(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.PurgeProductsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.purge_products(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_PurgeProducts_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_purge_products_sync.py b/samples/generated_samples/vision_v1_generated_product_search_purge_products_sync.py new file mode 100644 index 00000000..a12d8e61 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_purge_products_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PurgeProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_PurgeProducts_sync] +from google.cloud import vision_v1 + + +def sample_purge_products(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.PurgeProductsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.purge_products(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_PurgeProducts_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_remove_product_from_product_set_async.py b/samples/generated_samples/vision_v1_generated_product_search_remove_product_from_product_set_async.py new file mode 100644 index 00000000..f6dc57c6 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_remove_product_from_product_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RemoveProductFromProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_RemoveProductFromProductSet_async] +from google.cloud import vision_v1 + + +async def sample_remove_product_from_product_set(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.RemoveProductFromProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + await client.remove_product_from_product_set(request=request) + + +# [END vision_v1_generated_ProductSearch_RemoveProductFromProductSet_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_remove_product_from_product_set_sync.py b/samples/generated_samples/vision_v1_generated_product_search_remove_product_from_product_set_sync.py new file mode 100644 index 00000000..10e6b70f --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_remove_product_from_product_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RemoveProductFromProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] +from google.cloud import vision_v1 + + +def sample_remove_product_from_product_set(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.RemoveProductFromProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + client.remove_product_from_product_set(request=request) + + +# [END vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_update_product_async.py b/samples/generated_samples/vision_v1_generated_product_search_update_product_async.py new file mode 100644 index 00000000..2387c5bd --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_update_product_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_UpdateProduct_async] +from google.cloud import vision_v1 + + +async def sample_update_product(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.UpdateProductRequest( + ) + + # Make the request + response = await client.update_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_UpdateProduct_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_update_product_set_async.py b/samples/generated_samples/vision_v1_generated_product_search_update_product_set_async.py new file mode 100644 index 00000000..5706b54e --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_update_product_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_UpdateProductSet_async] +from google.cloud import vision_v1 + + +async def sample_update_product_set(): + # Create a client + client = vision_v1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1.UpdateProductSetRequest( + ) + + # Make the request + response = await client.update_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_UpdateProductSet_async] diff --git a/samples/generated_samples/vision_v1_generated_product_search_update_product_set_sync.py b/samples/generated_samples/vision_v1_generated_product_search_update_product_set_sync.py new file mode 100644 index 00000000..1d24cf6a --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_update_product_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_UpdateProductSet_sync] +from google.cloud import vision_v1 + + +def sample_update_product_set(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.UpdateProductSetRequest( + ) + + # Make the request + response = client.update_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/samples/generated_samples/vision_v1_generated_product_search_update_product_sync.py b/samples/generated_samples/vision_v1_generated_product_search_update_product_sync.py new file mode 100644 index 00000000..5655e9a6 --- /dev/null +++ b/samples/generated_samples/vision_v1_generated_product_search_update_product_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1_generated_ProductSearch_UpdateProduct_sync] +from google.cloud import vision_v1 + + +def sample_update_product(): + # Create a client + client = vision_v1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1.UpdateProductRequest( + ) + + # Make the request + response = client.update_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1_generated_ProductSearch_UpdateProduct_sync] diff --git a/samples/generated_samples/vision_v1p1beta1_generated_image_annotator_batch_annotate_images_async.py b/samples/generated_samples/vision_v1p1beta1_generated_image_annotator_batch_annotate_images_async.py new file mode 100644 index 00000000..3b37ba99 --- /dev/null +++ b/samples/generated_samples/vision_v1p1beta1_generated_image_annotator_batch_annotate_images_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_async] +from google.cloud import vision_v1p1beta1 + + +async def sample_batch_annotate_images(): + # Create a client + client = vision_v1p1beta1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1p1beta1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = await client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_async] diff --git a/samples/generated_samples/vision_v1p1beta1_generated_image_annotator_batch_annotate_images_sync.py b/samples/generated_samples/vision_v1p1beta1_generated_image_annotator_batch_annotate_images_sync.py new file mode 100644 index 00000000..8e5f8967 --- /dev/null +++ b/samples/generated_samples/vision_v1p1beta1_generated_image_annotator_batch_annotate_images_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] +from google.cloud import vision_v1p1beta1 + + +def sample_batch_annotate_images(): + # Create a client + client = vision_v1p1beta1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1p1beta1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_async_batch_annotate_files_async.py b/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_async_batch_annotate_files_async.py new file mode 100644 index 00000000..93fbdba2 --- /dev/null +++ b/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_async_batch_annotate_files_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p2beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] +from google.cloud import vision_v1p2beta1 + + +async def sample_async_batch_annotate_files(): + # Create a client + client = vision_v1p2beta1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1p2beta1.AsyncBatchAnnotateFilesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_files(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1p2beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] diff --git a/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_async_batch_annotate_files_sync.py b/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_async_batch_annotate_files_sync.py new file mode 100644 index 00000000..996ade25 --- /dev/null +++ b/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_async_batch_annotate_files_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p2beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] +from google.cloud import vision_v1p2beta1 + + +def sample_async_batch_annotate_files(): + # Create a client + client = vision_v1p2beta1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1p2beta1.AsyncBatchAnnotateFilesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_files(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1p2beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_batch_annotate_images_async.py b/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_batch_annotate_images_async.py new file mode 100644 index 00000000..e2b2c9d7 --- /dev/null +++ b/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_batch_annotate_images_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p2beta1_generated_ImageAnnotator_BatchAnnotateImages_async] +from google.cloud import vision_v1p2beta1 + + +async def sample_batch_annotate_images(): + # Create a client + client = vision_v1p2beta1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1p2beta1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = await client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1p2beta1_generated_ImageAnnotator_BatchAnnotateImages_async] diff --git a/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_batch_annotate_images_sync.py b/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_batch_annotate_images_sync.py new file mode 100644 index 00000000..04b0a807 --- /dev/null +++ b/samples/generated_samples/vision_v1p2beta1_generated_image_annotator_batch_annotate_images_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p2beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] +from google.cloud import vision_v1p2beta1 + + +def sample_batch_annotate_images(): + # Create a client + client = vision_v1p2beta1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1p2beta1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1p2beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_async_batch_annotate_files_async.py b/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_async_batch_annotate_files_async.py new file mode 100644 index 00000000..10b44a96 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_async_batch_annotate_files_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_async_batch_annotate_files(): + # Create a client + client = vision_v1p3beta1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.AsyncBatchAnnotateFilesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_files(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_async_batch_annotate_files_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_async_batch_annotate_files_sync.py new file mode 100644 index 00000000..26e1fbee --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_async_batch_annotate_files_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_async_batch_annotate_files(): + # Create a client + client = vision_v1p3beta1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.AsyncBatchAnnotateFilesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_files(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_batch_annotate_images_async.py b/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_batch_annotate_images_async.py new file mode 100644 index 00000000..45d1c1f0 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_batch_annotate_images_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ImageAnnotator_BatchAnnotateImages_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_batch_annotate_images(): + # Create a client + client = vision_v1p3beta1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = await client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ImageAnnotator_BatchAnnotateImages_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_batch_annotate_images_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_batch_annotate_images_sync.py new file mode 100644 index 00000000..f754ef17 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_image_annotator_batch_annotate_images_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_batch_annotate_images(): + # Create a client + client = vision_v1p3beta1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_add_product_to_product_set_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_add_product_to_product_set_async.py new file mode 100644 index 00000000..36320750 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_add_product_to_product_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AddProductToProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_AddProductToProductSet_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_add_product_to_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.AddProductToProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + await client.add_product_to_product_set(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_AddProductToProductSet_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_add_product_to_product_set_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_add_product_to_product_set_sync.py new file mode 100644 index 00000000..e62449f3 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_add_product_to_product_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AddProductToProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_AddProductToProductSet_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_add_product_to_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.AddProductToProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + client.add_product_to_product_set(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_async.py new file mode 100644 index 00000000..03644862 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_CreateProduct_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_create_product(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.CreateProductRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_CreateProduct_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_set_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_set_async.py new file mode 100644 index 00000000..c6076ba2 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_set_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_CreateProductSet_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_create_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.CreateProductSetRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_CreateProductSet_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_set_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_set_sync.py new file mode 100644 index 00000000..a0e3228c --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_set_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_CreateProductSet_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_create_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.CreateProductSetRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_CreateProductSet_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_sync.py new file mode 100644 index 00000000..932b9396 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_product_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_CreateProduct_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_create_product(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.CreateProductRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_CreateProduct_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_reference_image_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_reference_image_async.py new file mode 100644 index 00000000..7ac32420 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_reference_image_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_CreateReferenceImage_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_create_reference_image(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + reference_image = vision_v1p3beta1.ReferenceImage() + reference_image.uri = "uri_value" + + request = vision_v1p3beta1.CreateReferenceImageRequest( + parent="parent_value", + reference_image=reference_image, + ) + + # Make the request + response = await client.create_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_CreateReferenceImage_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_reference_image_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_reference_image_sync.py new file mode 100644 index 00000000..280651d3 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_create_reference_image_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_CreateReferenceImage_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_create_reference_image(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + reference_image = vision_v1p3beta1.ReferenceImage() + reference_image.uri = "uri_value" + + request = vision_v1p3beta1.CreateReferenceImageRequest( + parent="parent_value", + reference_image=reference_image, + ) + + # Make the request + response = client.create_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_async.py new file mode 100644 index 00000000..15c1bcca --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_DeleteProduct_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_delete_product(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.DeleteProductRequest( + name="name_value", + ) + + # Make the request + await client.delete_product(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_DeleteProduct_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_set_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_set_async.py new file mode 100644 index 00000000..ca8bcb35 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_set_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_DeleteProductSet_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_delete_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.DeleteProductSetRequest( + name="name_value", + ) + + # Make the request + await client.delete_product_set(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_DeleteProductSet_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_set_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_set_sync.py new file mode 100644 index 00000000..023a02bb --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_set_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_DeleteProductSet_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_delete_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.DeleteProductSetRequest( + name="name_value", + ) + + # Make the request + client.delete_product_set(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_sync.py new file mode 100644 index 00000000..d7262f49 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_product_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_DeleteProduct_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_delete_product(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.DeleteProductRequest( + name="name_value", + ) + + # Make the request + client.delete_product(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_DeleteProduct_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_reference_image_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_reference_image_async.py new file mode 100644 index 00000000..7ad98e65 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_reference_image_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_DeleteReferenceImage_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_delete_reference_image(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.DeleteReferenceImageRequest( + name="name_value", + ) + + # Make the request + await client.delete_reference_image(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_DeleteReferenceImage_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_reference_image_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_reference_image_sync.py new file mode 100644 index 00000000..50a1e9ff --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_delete_reference_image_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_DeleteReferenceImage_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_delete_reference_image(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.DeleteReferenceImageRequest( + name="name_value", + ) + + # Make the request + client.delete_reference_image(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_async.py new file mode 100644 index 00000000..9ef5bd7c --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_GetProduct_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_get_product(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.GetProductRequest( + name="name_value", + ) + + # Make the request + response = await client.get_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_GetProduct_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_set_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_set_async.py new file mode 100644 index 00000000..f0b0fb00 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_set_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_GetProductSet_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_get_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.GetProductSetRequest( + name="name_value", + ) + + # Make the request + response = await client.get_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_GetProductSet_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_set_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_set_sync.py new file mode 100644 index 00000000..09187224 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_set_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_GetProductSet_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_get_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.GetProductSetRequest( + name="name_value", + ) + + # Make the request + response = client.get_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_GetProductSet_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_sync.py new file mode 100644 index 00000000..24c20878 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_product_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_GetProduct_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_get_product(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.GetProductRequest( + name="name_value", + ) + + # Make the request + response = client.get_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_GetProduct_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_reference_image_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_reference_image_async.py new file mode 100644 index 00000000..4c9db65a --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_reference_image_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_GetReferenceImage_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_get_reference_image(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.GetReferenceImageRequest( + name="name_value", + ) + + # Make the request + response = await client.get_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_GetReferenceImage_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_reference_image_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_reference_image_sync.py new file mode 100644 index 00000000..2485d0c4 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_get_reference_image_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_GetReferenceImage_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_get_reference_image(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.GetReferenceImageRequest( + name="name_value", + ) + + # Make the request + response = client.get_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_import_product_sets_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_import_product_sets_async.py new file mode 100644 index 00000000..b805d043 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_import_product_sets_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ImportProductSets_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_import_product_sets(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ImportProductSetsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_product_sets(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ImportProductSets_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_import_product_sets_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_import_product_sets_sync.py new file mode 100644 index 00000000..bbc33d79 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_import_product_sets_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ImportProductSets_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_import_product_sets(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ImportProductSetsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_product_sets(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ImportProductSets_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_product_sets_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_product_sets_async.py new file mode 100644 index 00000000..00c178df --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_product_sets_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ListProductSets_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_list_product_sets(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ListProductSetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_product_sets(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ListProductSets_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_product_sets_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_product_sets_sync.py new file mode 100644 index 00000000..3304c071 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_product_sets_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ListProductSets_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_list_product_sets(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ListProductSetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_product_sets(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ListProductSets_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_async.py new file mode 100644 index 00000000..738e1fb8 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ListProducts_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_list_products(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ListProducts_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_in_product_set_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_in_product_set_async.py new file mode 100644 index 00000000..98c1c128 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_in_product_set_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductsInProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ListProductsInProductSet_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_list_products_in_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ListProductsInProductSetRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_products_in_product_set(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ListProductsInProductSet_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_in_product_set_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_in_product_set_sync.py new file mode 100644 index 00000000..50902a45 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_in_product_set_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductsInProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ListProductsInProductSet_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_list_products_in_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ListProductsInProductSetRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_products_in_product_set(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_sync.py new file mode 100644 index 00000000..9da9d12a --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_products_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ListProducts_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_list_products(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ListProducts_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_reference_images_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_reference_images_async.py new file mode 100644 index 00000000..018fbdf0 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_reference_images_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListReferenceImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ListReferenceImages_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_list_reference_images(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ListReferenceImagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_reference_images(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ListReferenceImages_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_reference_images_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_reference_images_sync.py new file mode 100644 index 00000000..83536bfe --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_list_reference_images_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListReferenceImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_ListReferenceImages_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_list_reference_images(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.ListReferenceImagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_reference_images(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_remove_product_from_product_set_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_remove_product_from_product_set_async.py new file mode 100644 index 00000000..13047fbb --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_remove_product_from_product_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RemoveProductFromProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_RemoveProductFromProductSet_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_remove_product_from_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.RemoveProductFromProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + await client.remove_product_from_product_set(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_RemoveProductFromProductSet_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_remove_product_from_product_set_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_remove_product_from_product_set_sync.py new file mode 100644 index 00000000..efd01864 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_remove_product_from_product_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RemoveProductFromProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_RemoveProductFromProductSet_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_remove_product_from_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.RemoveProductFromProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + client.remove_product_from_product_set(request=request) + + +# [END vision_v1p3beta1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_async.py new file mode 100644 index 00000000..d84f1f8f --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_UpdateProduct_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_update_product(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.UpdateProductRequest( + ) + + # Make the request + response = await client.update_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_UpdateProduct_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_set_async.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_set_async.py new file mode 100644 index 00000000..56687e51 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_UpdateProductSet_async] +from google.cloud import vision_v1p3beta1 + + +async def sample_update_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.UpdateProductSetRequest( + ) + + # Make the request + response = await client.update_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_UpdateProductSet_async] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_set_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_set_sync.py new file mode 100644 index 00000000..905e63f8 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_UpdateProductSet_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_update_product_set(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.UpdateProductSetRequest( + ) + + # Make the request + response = client.update_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_sync.py b/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_sync.py new file mode 100644 index 00000000..60c47ae2 --- /dev/null +++ b/samples/generated_samples/vision_v1p3beta1_generated_product_search_update_product_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p3beta1_generated_ProductSearch_UpdateProduct_sync] +from google.cloud import vision_v1p3beta1 + + +def sample_update_product(): + # Create a client + client = vision_v1p3beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p3beta1.UpdateProductRequest( + ) + + # Make the request + response = client.update_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p3beta1_generated_ProductSearch_UpdateProduct_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_files_async.py b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_files_async.py new file mode 100644 index 00000000..6d8661cd --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_files_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_async_batch_annotate_files(): + # Create a client + client = vision_v1p4beta1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.AsyncBatchAnnotateFilesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_files(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_files_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_files_sync.py new file mode 100644 index 00000000..59431046 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_files_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_async_batch_annotate_files(): + # Create a client + client = vision_v1p4beta1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.AsyncBatchAnnotateFilesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_files(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_images_async.py b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_images_async.py new file mode 100644 index 00000000..ada26db9 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_images_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_async_batch_annotate_images(): + # Create a client + client = vision_v1p4beta1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.AsyncBatchAnnotateImagesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_images(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_images_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_images_sync.py new file mode 100644 index 00000000..39dfb18d --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_async_batch_annotate_images_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AsyncBatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_async_batch_annotate_images(): + # Create a client + client = vision_v1p4beta1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.AsyncBatchAnnotateImagesRequest( + ) + + # Make the request + operation = client.async_batch_annotate_images(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_files_async.py b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_files_async.py new file mode 100644 index 00000000..b84e92ee --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_files_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateFiles_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_batch_annotate_files(): + # Create a client + client = vision_v1p4beta1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.BatchAnnotateFilesRequest( + ) + + # Make the request + response = await client.batch_annotate_files(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateFiles_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_files_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_files_sync.py new file mode 100644 index 00000000..11c7bfdd --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_files_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateFiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateFiles_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_batch_annotate_files(): + # Create a client + client = vision_v1p4beta1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.BatchAnnotateFilesRequest( + ) + + # Make the request + response = client.batch_annotate_files(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateFiles_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_images_async.py b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_images_async.py new file mode 100644 index 00000000..86725658 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_images_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateImages_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_batch_annotate_images(): + # Create a client + client = vision_v1p4beta1.ImageAnnotatorAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = await client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateImages_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_images_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_images_sync.py new file mode 100644 index 00000000..2fef1158 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_image_annotator_batch_annotate_images_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchAnnotateImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_batch_annotate_images(): + # Create a client + client = vision_v1p4beta1.ImageAnnotatorClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.BatchAnnotateImagesRequest( + ) + + # Make the request + response = client.batch_annotate_images(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_add_product_to_product_set_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_add_product_to_product_set_async.py new file mode 100644 index 00000000..f32ceb7c --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_add_product_to_product_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AddProductToProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_AddProductToProductSet_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_add_product_to_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.AddProductToProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + await client.add_product_to_product_set(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_AddProductToProductSet_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_add_product_to_product_set_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_add_product_to_product_set_sync.py new file mode 100644 index 00000000..adf51de6 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_add_product_to_product_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AddProductToProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_AddProductToProductSet_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_add_product_to_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.AddProductToProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + client.add_product_to_product_set(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_async.py new file mode 100644 index 00000000..946c2549 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_CreateProduct_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_create_product(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.CreateProductRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_CreateProduct_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_set_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_set_async.py new file mode 100644 index 00000000..33e5c8e9 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_set_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_CreateProductSet_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_create_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.CreateProductSetRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_CreateProductSet_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_set_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_set_sync.py new file mode 100644 index 00000000..174540e7 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_set_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_CreateProductSet_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_create_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.CreateProductSetRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_CreateProductSet_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_sync.py new file mode 100644 index 00000000..5a536f9d --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_product_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_CreateProduct_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_create_product(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.CreateProductRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_CreateProduct_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_reference_image_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_reference_image_async.py new file mode 100644 index 00000000..ce9cc79f --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_reference_image_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_CreateReferenceImage_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_create_reference_image(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + reference_image = vision_v1p4beta1.ReferenceImage() + reference_image.uri = "uri_value" + + request = vision_v1p4beta1.CreateReferenceImageRequest( + parent="parent_value", + reference_image=reference_image, + ) + + # Make the request + response = await client.create_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_CreateReferenceImage_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_reference_image_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_reference_image_sync.py new file mode 100644 index 00000000..9b8f5b27 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_create_reference_image_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_CreateReferenceImage_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_create_reference_image(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + reference_image = vision_v1p4beta1.ReferenceImage() + reference_image.uri = "uri_value" + + request = vision_v1p4beta1.CreateReferenceImageRequest( + parent="parent_value", + reference_image=reference_image, + ) + + # Make the request + response = client.create_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_async.py new file mode 100644 index 00000000..b6cbae49 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_DeleteProduct_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_delete_product(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.DeleteProductRequest( + name="name_value", + ) + + # Make the request + await client.delete_product(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_DeleteProduct_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_set_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_set_async.py new file mode 100644 index 00000000..9f756fe1 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_set_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_DeleteProductSet_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_delete_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.DeleteProductSetRequest( + name="name_value", + ) + + # Make the request + await client.delete_product_set(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_DeleteProductSet_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_set_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_set_sync.py new file mode 100644 index 00000000..4932e163 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_set_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_DeleteProductSet_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_delete_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.DeleteProductSetRequest( + name="name_value", + ) + + # Make the request + client.delete_product_set(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_sync.py new file mode 100644 index 00000000..f1c4ed75 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_product_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_DeleteProduct_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_delete_product(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.DeleteProductRequest( + name="name_value", + ) + + # Make the request + client.delete_product(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_DeleteProduct_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_reference_image_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_reference_image_async.py new file mode 100644 index 00000000..5be65e8e --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_reference_image_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_DeleteReferenceImage_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_delete_reference_image(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.DeleteReferenceImageRequest( + name="name_value", + ) + + # Make the request + await client.delete_reference_image(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_DeleteReferenceImage_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_reference_image_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_reference_image_sync.py new file mode 100644 index 00000000..5aa274b0 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_delete_reference_image_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_DeleteReferenceImage_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_delete_reference_image(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.DeleteReferenceImageRequest( + name="name_value", + ) + + # Make the request + client.delete_reference_image(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_async.py new file mode 100644 index 00000000..40466cce --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_GetProduct_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_get_product(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.GetProductRequest( + name="name_value", + ) + + # Make the request + response = await client.get_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_GetProduct_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_set_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_set_async.py new file mode 100644 index 00000000..242aae30 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_set_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_GetProductSet_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_get_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.GetProductSetRequest( + name="name_value", + ) + + # Make the request + response = await client.get_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_GetProductSet_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_set_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_set_sync.py new file mode 100644 index 00000000..69d04d3e --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_set_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_GetProductSet_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_get_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.GetProductSetRequest( + name="name_value", + ) + + # Make the request + response = client.get_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_GetProductSet_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_sync.py new file mode 100644 index 00000000..dccd9868 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_product_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_GetProduct_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_get_product(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.GetProductRequest( + name="name_value", + ) + + # Make the request + response = client.get_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_GetProduct_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_reference_image_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_reference_image_async.py new file mode 100644 index 00000000..404cbadd --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_reference_image_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_GetReferenceImage_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_get_reference_image(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.GetReferenceImageRequest( + name="name_value", + ) + + # Make the request + response = await client.get_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_GetReferenceImage_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_reference_image_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_reference_image_sync.py new file mode 100644 index 00000000..f0ccc3a3 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_get_reference_image_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetReferenceImage +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_GetReferenceImage_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_get_reference_image(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.GetReferenceImageRequest( + name="name_value", + ) + + # Make the request + response = client.get_reference_image(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_import_product_sets_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_import_product_sets_async.py new file mode 100644 index 00000000..a9bc814d --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_import_product_sets_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ImportProductSets_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_import_product_sets(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ImportProductSetsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_product_sets(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ImportProductSets_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_import_product_sets_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_import_product_sets_sync.py new file mode 100644 index 00000000..a68c06a9 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_import_product_sets_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ImportProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ImportProductSets_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_import_product_sets(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ImportProductSetsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_product_sets(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ImportProductSets_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_product_sets_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_product_sets_async.py new file mode 100644 index 00000000..03f1058c --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_product_sets_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ListProductSets_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_list_product_sets(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ListProductSetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_product_sets(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ListProductSets_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_product_sets_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_product_sets_sync.py new file mode 100644 index 00000000..16f1bd6e --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_product_sets_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductSets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ListProductSets_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_list_product_sets(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ListProductSetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_product_sets(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ListProductSets_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_async.py new file mode 100644 index 00000000..f6b3187c --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ListProducts_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_list_products(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ListProducts_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_in_product_set_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_in_product_set_async.py new file mode 100644 index 00000000..eca1ba75 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_in_product_set_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductsInProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ListProductsInProductSet_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_list_products_in_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ListProductsInProductSetRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_products_in_product_set(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ListProductsInProductSet_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_in_product_set_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_in_product_set_sync.py new file mode 100644 index 00000000..beec0e44 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_in_product_set_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProductsInProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ListProductsInProductSet_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_list_products_in_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ListProductsInProductSetRequest( + name="name_value", + ) + + # Make the request + page_result = client.list_products_in_product_set(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_sync.py new file mode 100644 index 00000000..27fe43d4 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_products_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ListProducts_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_list_products(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ListProductsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_products(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ListProducts_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_reference_images_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_reference_images_async.py new file mode 100644 index 00000000..3e7d989b --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_reference_images_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListReferenceImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ListReferenceImages_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_list_reference_images(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ListReferenceImagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_reference_images(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ListReferenceImages_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_reference_images_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_reference_images_sync.py new file mode 100644 index 00000000..d97fb7c9 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_list_reference_images_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListReferenceImages +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_ListReferenceImages_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_list_reference_images(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.ListReferenceImagesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_reference_images(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_purge_products_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_purge_products_async.py new file mode 100644 index 00000000..50c37226 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_purge_products_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PurgeProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_PurgeProducts_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_purge_products(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.PurgeProductsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.purge_products(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_PurgeProducts_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_purge_products_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_purge_products_sync.py new file mode 100644 index 00000000..799081e1 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_purge_products_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for PurgeProducts +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_PurgeProducts_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_purge_products(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.PurgeProductsRequest( + parent="parent_value", + ) + + # Make the request + operation = client.purge_products(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_PurgeProducts_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_remove_product_from_product_set_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_remove_product_from_product_set_async.py new file mode 100644 index 00000000..51bf3f54 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_remove_product_from_product_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RemoveProductFromProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_RemoveProductFromProductSet_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_remove_product_from_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.RemoveProductFromProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + await client.remove_product_from_product_set(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_RemoveProductFromProductSet_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_remove_product_from_product_set_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_remove_product_from_product_set_sync.py new file mode 100644 index 00000000..f14e0b1d --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_remove_product_from_product_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RemoveProductFromProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_RemoveProductFromProductSet_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_remove_product_from_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.RemoveProductFromProductSetRequest( + name="name_value", + product="product_value", + ) + + # Make the request + client.remove_product_from_product_set(request=request) + + +# [END vision_v1p4beta1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_async.py new file mode 100644 index 00000000..44870b2e --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_UpdateProduct_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_update_product(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.UpdateProductRequest( + ) + + # Make the request + response = await client.update_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_UpdateProduct_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_set_async.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_set_async.py new file mode 100644 index 00000000..92ae01f5 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_UpdateProductSet_async] +from google.cloud import vision_v1p4beta1 + + +async def sample_update_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchAsyncClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.UpdateProductSetRequest( + ) + + # Make the request + response = await client.update_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_UpdateProductSet_async] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_set_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_set_sync.py new file mode 100644 index 00000000..d403db36 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProductSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_UpdateProductSet_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_update_product_set(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.UpdateProductSetRequest( + ) + + # Make the request + response = client.update_product_set(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_sync.py b/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_sync.py new file mode 100644 index 00000000..92a4a617 --- /dev/null +++ b/samples/generated_samples/vision_v1p4beta1_generated_product_search_update_product_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateProduct +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-vision + + +# [START vision_v1p4beta1_generated_ProductSearch_UpdateProduct_sync] +from google.cloud import vision_v1p4beta1 + + +def sample_update_product(): + # Create a client + client = vision_v1p4beta1.ProductSearchClient() + + # Initialize request argument(s) + request = vision_v1p4beta1.UpdateProductRequest( + ) + + # Make the request + response = client.update_product(request=request) + + # Handle the response + print(response) + +# [END vision_v1p4beta1_generated_ProductSearch_UpdateProduct_sync]