{ "clientLibrary": { "name": "cloud.google.com/go/vision/v2/apiv1", "version": "2.9.5", "language": "GO", "apis": [ { "id": "google.cloud.vision.v1", "version": "v1" } ] }, "snippets": [ { "regionTag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync", "title": "vision AsyncBatchAnnotateFiles Sample", "description": "AsyncBatchAnnotateFiles run asynchronous image detection and annotation for a list of generic\nfiles, such as PDF files, which may contain multiple pages and multiple\nimages per page. Progress and results can be retrieved through the\n`google.longrunning.Operations` interface.\n`Operation.metadata` contains `OperationMetadata` (metadata).\n`Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", "file": "ImageAnnotatorClient/AsyncBatchAnnotateFiles/main.go", "language": "GO", "clientMethod": { "shortName": "AsyncBatchAnnotateFiles", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient.AsyncBatchAnnotateFiles", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.AsyncBatchAnnotateFilesRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "AsyncBatchAnnotateFilesOperation", "client": { "shortName": "ImageAnnotatorClient", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient" }, "method": { "shortName": "AsyncBatchAnnotateFiles", "fullName": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateFiles", "service": { "shortName": "ImageAnnotator", "fullName": "google.cloud.vision.v1.ImageAnnotator" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 58, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync", "title": "vision AsyncBatchAnnotateImages Sample", "description": "AsyncBatchAnnotateImages run asynchronous image detection and annotation for a list of images.\n\nProgress and results can be retrieved through the\n`google.longrunning.Operations` interface.\n`Operation.metadata` contains `OperationMetadata` (metadata).\n`Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).\n\nThis service will write image annotation outputs to json files in customer\nGCS bucket, each json file containing BatchAnnotateImagesResponse proto.", "file": "ImageAnnotatorClient/AsyncBatchAnnotateImages/main.go", "language": "GO", "clientMethod": { "shortName": "AsyncBatchAnnotateImages", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient.AsyncBatchAnnotateImages", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.AsyncBatchAnnotateImagesRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "AsyncBatchAnnotateImagesOperation", "client": { "shortName": "ImageAnnotatorClient", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient" }, "method": { "shortName": "AsyncBatchAnnotateImages", "fullName": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateImages", "service": { "shortName": "ImageAnnotator", "fullName": "google.cloud.vision.v1.ImageAnnotator" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 58, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync", "title": "vision BatchAnnotateFiles Sample", "description": "BatchAnnotateFiles service that performs image detection and annotation for a batch of files.\nNow only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported.\n\nThis service will extract at most 5 (customers can specify which 5 in\nAnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each\nfile provided and perform detection and annotation for each image\nextracted.", "file": "ImageAnnotatorClient/BatchAnnotateFiles/main.go", "language": "GO", "clientMethod": { "shortName": "BatchAnnotateFiles", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient.BatchAnnotateFiles", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.BatchAnnotateFilesRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.BatchAnnotateFilesResponse", "client": { "shortName": "ImageAnnotatorClient", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient" }, "method": { "shortName": "BatchAnnotateFiles", "fullName": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateFiles", "service": { "shortName": "ImageAnnotator", "fullName": "google.cloud.vision.v1.ImageAnnotator" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync", "title": "vision BatchAnnotateImages Sample", "description": "BatchAnnotateImages run image detection and annotation for a batch of images.", "file": "ImageAnnotatorClient/BatchAnnotateImages/main.go", "language": "GO", "clientMethod": { "shortName": "BatchAnnotateImages", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient.BatchAnnotateImages", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.BatchAnnotateImagesRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.BatchAnnotateImagesResponse", "client": { "shortName": "ImageAnnotatorClient", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient" }, "method": { "shortName": "BatchAnnotateImages", "fullName": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateImages", "service": { "shortName": "ImageAnnotator", "fullName": "google.cloud.vision.v1.ImageAnnotator" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ImageAnnotator_GetOperation_sync", "title": "vision GetOperation Sample", "description": "GetOperation is a utility method from google.longrunning.Operations.", "file": "ImageAnnotatorClient/GetOperation/main.go", "language": "GO", "clientMethod": { "shortName": "GetOperation", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient.GetOperation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.GetOperationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*longrunningpb.Operation", "client": { "shortName": "ImageAnnotatorClient", "fullName": "google.cloud.vision.v1.ImageAnnotatorClient" }, "method": { "shortName": "GetOperation", "fullName": "google.longrunning.Operations.GetOperation", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_AddProductToProductSet_sync", "title": "vision AddProductToProductSet Sample", "description": "AddProductToProductSet adds a Product to the specified ProductSet. If the Product is already\npresent, no change is made.\n\nOne Product can be added to at most 100 ProductSets.\n\nPossible errors: \n\n* Returns NOT_FOUND if the Product or the ProductSet doesn't exist.", "file": "ProductSearchClient/AddProductToProductSet/main.go", "language": "GO", "clientMethod": { "shortName": "AddProductToProductSet", "fullName": "google.cloud.vision.v1.ProductSearchClient.AddProductToProductSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.AddProductToProductSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "AddProductToProductSet", "fullName": "google.cloud.vision.v1.ProductSearch.AddProductToProductSet", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 51, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_CreateProduct_sync", "title": "vision CreateProduct Sample", "description": "CreateProduct creates and returns a new product resource.\n\nPossible errors: \n\n* Returns INVALID_ARGUMENT if display_name is missing or longer than 4096\ncharacters.\n* Returns INVALID_ARGUMENT if description is longer than 4096 characters.\n* Returns INVALID_ARGUMENT if product_category is missing or invalid.", "file": "ProductSearchClient/CreateProduct/main.go", "language": "GO", "clientMethod": { "shortName": "CreateProduct", "fullName": "google.cloud.vision.v1.ProductSearchClient.CreateProduct", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.CreateProductRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.Product", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "CreateProduct", "fullName": "google.cloud.vision.v1.ProductSearch.CreateProduct", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_CreateProductSet_sync", "title": "vision CreateProductSet Sample", "description": "CreateProductSet creates and returns a new ProductSet resource.\n\nPossible errors: \n\n* Returns INVALID_ARGUMENT if display_name is missing, or is longer than\n4096 characters.", "file": "ProductSearchClient/CreateProductSet/main.go", "language": "GO", "clientMethod": { "shortName": "CreateProductSet", "fullName": "google.cloud.vision.v1.ProductSearchClient.CreateProductSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.CreateProductSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.ProductSet", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "CreateProductSet", "fullName": "google.cloud.vision.v1.ProductSearch.CreateProductSet", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_CreateReferenceImage_sync", "title": "vision CreateReferenceImage Sample", "description": "CreateReferenceImage creates and returns a new ReferenceImage resource.\n\nThe `bounding_poly` field is optional. If `bounding_poly` is not specified,\nthe system will try to detect regions of interest in the image that are\ncompatible with the product_category on the parent product. If it is\nspecified, detection is ALWAYS skipped. The system converts polygons into\nnon-rotated rectangles.\n\nNote that the pipeline will resize the image if the image resolution is too\nlarge to process (above 50MP).\n\nPossible errors: \n\n* Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096\ncharacters.\n* Returns INVALID_ARGUMENT if the product does not exist.\n* Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing\ncompatible with the parent product's product_category is detected.\n* Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.", "file": "ProductSearchClient/CreateReferenceImage/main.go", "language": "GO", "clientMethod": { "shortName": "CreateReferenceImage", "fullName": "google.cloud.vision.v1.ProductSearchClient.CreateReferenceImage", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.CreateReferenceImageRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.ReferenceImage", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "CreateReferenceImage", "fullName": "google.cloud.vision.v1.ProductSearch.CreateReferenceImage", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_DeleteProduct_sync", "title": "vision DeleteProduct Sample", "description": "DeleteProduct permanently deletes a product and its reference images.\n\nMetadata of the product and all its images will be deleted right away, but\nsearch queries against ProductSets containing the product may still work\nuntil all related caches are refreshed.", "file": "ProductSearchClient/DeleteProduct/main.go", "language": "GO", "clientMethod": { "shortName": "DeleteProduct", "fullName": "google.cloud.vision.v1.ProductSearchClient.DeleteProduct", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.DeleteProductRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "DeleteProduct", "fullName": "google.cloud.vision.v1.ProductSearch.DeleteProduct", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 51, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_DeleteProductSet_sync", "title": "vision DeleteProductSet Sample", "description": "DeleteProductSet permanently deletes a ProductSet. Products and ReferenceImages in the\nProductSet are not deleted.\n\nThe actual image files are not deleted from Google Cloud Storage.", "file": "ProductSearchClient/DeleteProductSet/main.go", "language": "GO", "clientMethod": { "shortName": "DeleteProductSet", "fullName": "google.cloud.vision.v1.ProductSearchClient.DeleteProductSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.DeleteProductSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "DeleteProductSet", "fullName": "google.cloud.vision.v1.ProductSearch.DeleteProductSet", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 51, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_DeleteReferenceImage_sync", "title": "vision DeleteReferenceImage Sample", "description": "DeleteReferenceImage permanently deletes a reference image.\n\nThe image metadata will be deleted right away, but search queries\nagainst ProductSets containing the image may still work until all related\ncaches are refreshed.\n\nThe actual image files are not deleted from Google Cloud Storage.", "file": "ProductSearchClient/DeleteReferenceImage/main.go", "language": "GO", "clientMethod": { "shortName": "DeleteReferenceImage", "fullName": "google.cloud.vision.v1.ProductSearchClient.DeleteReferenceImage", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.DeleteReferenceImageRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "DeleteReferenceImage", "fullName": "google.cloud.vision.v1.ProductSearch.DeleteReferenceImage", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 51, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_GetOperation_sync", "title": "vision GetOperation Sample", "description": "GetOperation is a utility method from google.longrunning.Operations.", "file": "ProductSearchClient/GetOperation/main.go", "language": "GO", "clientMethod": { "shortName": "GetOperation", "fullName": "google.cloud.vision.v1.ProductSearchClient.GetOperation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.GetOperationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*longrunningpb.Operation", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "GetOperation", "fullName": "google.longrunning.Operations.GetOperation", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_GetProduct_sync", "title": "vision GetProduct Sample", "description": "GetProduct gets information associated with a Product.\n\nPossible errors: \n\n* Returns NOT_FOUND if the Product does not exist.", "file": "ProductSearchClient/GetProduct/main.go", "language": "GO", "clientMethod": { "shortName": "GetProduct", "fullName": "google.cloud.vision.v1.ProductSearchClient.GetProduct", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.GetProductRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.Product", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "GetProduct", "fullName": "google.cloud.vision.v1.ProductSearch.GetProduct", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_GetProductSet_sync", "title": "vision GetProductSet Sample", "description": "GetProductSet gets information associated with a ProductSet.\n\nPossible errors: \n\n* Returns NOT_FOUND if the ProductSet does not exist.", "file": "ProductSearchClient/GetProductSet/main.go", "language": "GO", "clientMethod": { "shortName": "GetProductSet", "fullName": "google.cloud.vision.v1.ProductSearchClient.GetProductSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.GetProductSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.ProductSet", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "GetProductSet", "fullName": "google.cloud.vision.v1.ProductSearch.GetProductSet", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_GetReferenceImage_sync", "title": "vision GetReferenceImage Sample", "description": "GetReferenceImage gets information associated with a ReferenceImage.\n\nPossible errors: \n\n* Returns NOT_FOUND if the specified image does not exist.", "file": "ProductSearchClient/GetReferenceImage/main.go", "language": "GO", "clientMethod": { "shortName": "GetReferenceImage", "fullName": "google.cloud.vision.v1.ProductSearchClient.GetReferenceImage", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.GetReferenceImageRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.ReferenceImage", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "GetReferenceImage", "fullName": "google.cloud.vision.v1.ProductSearch.GetReferenceImage", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_ImportProductSets_sync", "title": "vision ImportProductSets Sample", "description": "ImportProductSets asynchronous API that imports a list of reference images to specified\nproduct sets based on a list of image information.\n\nThe [google.longrunning.Operation][google.longrunning.Operation] API can be\nused to keep track of the progress and results of the request.\n`Operation.metadata` contains `BatchOperationMetadata`. (progress)\n`Operation.response` contains `ImportProductSetsResponse`. (results)\n\nThe input source of this method is a csv file on Google Cloud Storage.\nFor the format of the csv file please see\n[ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].", "file": "ProductSearchClient/ImportProductSets/main.go", "language": "GO", "clientMethod": { "shortName": "ImportProductSets", "fullName": "google.cloud.vision.v1.ProductSearchClient.ImportProductSets", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.ImportProductSetsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "ImportProductSetsOperation", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "ImportProductSets", "fullName": "google.cloud.vision.v1.ProductSearch.ImportProductSets", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 58, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_ListProductSets_sync", "title": "vision ListProductSets Sample", "description": "ListProductSets lists ProductSets in an unspecified order.\n\nPossible errors: \n\n* Returns INVALID_ARGUMENT if page_size is greater than 100, or less\nthan 1.", "file": "ProductSearchClient/ListProductSets/main.go", "language": "GO", "clientMethod": { "shortName": "ListProductSets", "fullName": "google.cloud.vision.v1.ProductSearchClient.ListProductSets", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.ListProductSetsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "ProductSetIterator", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "ListProductSets", "fullName": "google.cloud.vision.v1.ProductSearch.ListProductSets", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_ListProducts_sync", "title": "vision ListProducts Sample", "description": "ListProducts lists products in an unspecified order.\n\nPossible errors: \n\n* Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", "file": "ProductSearchClient/ListProducts/main.go", "language": "GO", "clientMethod": { "shortName": "ListProducts", "fullName": "google.cloud.vision.v1.ProductSearchClient.ListProducts", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.ListProductsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "ProductIterator", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "ListProducts", "fullName": "google.cloud.vision.v1.ProductSearch.ListProducts", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_ListProductsInProductSet_sync", "title": "vision ListProductsInProductSet Sample", "description": "ListProductsInProductSet lists the Products in a ProductSet, in an unspecified order. If the\nProductSet does not exist, the products field of the response will be\nempty.\n\nPossible errors: \n\n* Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", "file": "ProductSearchClient/ListProductsInProductSet/main.go", "language": "GO", "clientMethod": { "shortName": "ListProductsInProductSet", "fullName": "google.cloud.vision.v1.ProductSearchClient.ListProductsInProductSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.ListProductsInProductSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "ProductIterator", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "ListProductsInProductSet", "fullName": "google.cloud.vision.v1.ProductSearch.ListProductsInProductSet", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_ListReferenceImages_sync", "title": "vision ListReferenceImages Sample", "description": "ListReferenceImages lists reference images.\n\nPossible errors: \n\n* Returns NOT_FOUND if the parent product does not exist.\n* Returns INVALID_ARGUMENT if the page_size is greater than 100, or less\nthan 1.", "file": "ProductSearchClient/ListReferenceImages/main.go", "language": "GO", "clientMethod": { "shortName": "ListReferenceImages", "fullName": "google.cloud.vision.v1.ProductSearchClient.ListReferenceImages", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.ListReferenceImagesRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "ReferenceImageIterator", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "ListReferenceImages", "fullName": "google.cloud.vision.v1.ProductSearch.ListReferenceImages", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_PurgeProducts_sync", "title": "vision PurgeProducts Sample", "description": "PurgeProducts asynchronous API to delete all Products in a ProductSet or all Products\nthat are in no ProductSet.\n\nIf a Product is a member of the specified ProductSet in addition to other\nProductSets, the Product will still be deleted.\n\nIt is recommended to not delete the specified ProductSet until after this\noperation has completed. It is also recommended to not add any of the\nProducts involved in the batch delete to a new ProductSet while this\noperation is running because those Products may still end up deleted.\n\nIt's not possible to undo the PurgeProducts operation. Therefore, it is\nrecommended to keep the csv files used in ImportProductSets (if that was\nhow you originally built the Product Set) before starting PurgeProducts, in\ncase you need to re-import the data after deletion.\n\nIf the plan is to purge all of the Products from a ProductSet and then\nre-use the empty ProductSet to re-import new Products into the empty\nProductSet, you must wait until the PurgeProducts operation has finished\nfor that ProductSet.\n\nThe [google.longrunning.Operation][google.longrunning.Operation] API can be\nused to keep track of the progress and results of the request.\n`Operation.metadata` contains `BatchOperationMetadata`. (progress)", "file": "ProductSearchClient/PurgeProducts/main.go", "language": "GO", "clientMethod": { "shortName": "PurgeProducts", "fullName": "google.cloud.vision.v1.ProductSearchClient.PurgeProducts", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.PurgeProductsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "PurgeProductsOperation", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "PurgeProducts", "fullName": "google.cloud.vision.v1.ProductSearch.PurgeProducts", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 56, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync", "title": "vision RemoveProductFromProductSet Sample", "description": "RemoveProductFromProductSet removes a Product from the specified ProductSet.", "file": "ProductSearchClient/RemoveProductFromProductSet/main.go", "language": "GO", "clientMethod": { "shortName": "RemoveProductFromProductSet", "fullName": "google.cloud.vision.v1.ProductSearchClient.RemoveProductFromProductSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.RemoveProductFromProductSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "RemoveProductFromProductSet", "fullName": "google.cloud.vision.v1.ProductSearch.RemoveProductFromProductSet", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 51, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_UpdateProduct_sync", "title": "vision UpdateProduct Sample", "description": "UpdateProduct makes changes to a Product resource.\nOnly the `display_name`, `description`, and `labels` fields can be updated\nright now.\n\nIf labels are updated, the change will not be reflected in queries until\nthe next index time.\n\nPossible errors: \n\n* Returns NOT_FOUND if the Product does not exist.\n* Returns INVALID_ARGUMENT if display_name is present in update_mask but is\nmissing from the request or longer than 4096 characters.\n* Returns INVALID_ARGUMENT if description is present in update_mask but is\nlonger than 4096 characters.\n* Returns INVALID_ARGUMENT if product_category is present in update_mask.", "file": "ProductSearchClient/UpdateProduct/main.go", "language": "GO", "clientMethod": { "shortName": "UpdateProduct", "fullName": "google.cloud.vision.v1.ProductSearchClient.UpdateProduct", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.UpdateProductRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.Product", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "UpdateProduct", "fullName": "google.cloud.vision.v1.ProductSearch.UpdateProduct", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "vision_v1_generated_ProductSearch_UpdateProductSet_sync", "title": "vision UpdateProductSet Sample", "description": "UpdateProductSet makes changes to a ProductSet resource.\nOnly display_name can be updated currently.\n\nPossible errors: \n\n* Returns NOT_FOUND if the ProductSet does not exist.\n* Returns INVALID_ARGUMENT if display_name is present in update_mask but\nmissing from the request or longer than 4096 characters.", "file": "ProductSearchClient/UpdateProductSet/main.go", "language": "GO", "clientMethod": { "shortName": "UpdateProductSet", "fullName": "google.cloud.vision.v1.ProductSearchClient.UpdateProductSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "visionpb.UpdateProductSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*visionpb.ProductSet", "client": { "shortName": "ProductSearchClient", "fullName": "google.cloud.vision.v1.ProductSearchClient" }, "method": { "shortName": "UpdateProductSet", "fullName": "google.cloud.vision.v1.ProductSearch.UpdateProductSet", "service": { "shortName": "ProductSearch", "fullName": "google.cloud.vision.v1.ProductSearch" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] } ] }