Skip to content

Commit 2fcf55c

Browse files
feat(vision): Added option for user to set labels (#9359)
- [ ] Regenerate this pull request now. docs: Updated various comments chore: configure longrunning operations PiperOrigin-RevId: 604671304 Source-Link: https://togithub.com/googleapis/googleapis/commit/f4c047f491294628d60be57ede025aaee831e98c Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/939ab9ea6efe368126440b42e6beac7897d3a1c2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTM5YWI5ZWE2ZWZlMzY4MTI2NDQwYjQyZTZiZWFjNzg5N2QzYTFjMiJ9 BEGIN_NESTED_COMMIT feat(documentai): expose model_type in v1 processor, so that user can see the model_type after get or list processor version PiperOrigin-RevId: 603727585 Source-Link: https://togithub.com/googleapis/googleapis/commit/7a9a855287b5042410c93e5a510f40efd4ce6cb1 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/9643051150762c3e15d1cd420ddfb978a1b7c24c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTY0MzA1MTE1MDc2MmMzZTE1ZDFjZDQyMGRkZmI5NzhhMWI3YzI0YyJ9 END_NESTED_COMMIT
1 parent 14ce978 commit 2fcf55c

File tree

15 files changed

+1288
-633
lines changed

15 files changed

+1288
-633
lines changed

documentai/apiv1/documentaipb/processor.pb.go

Lines changed: 205 additions & 130 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/GetOperation/main.go

Lines changed: 53 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/generated/snippets/vision/apiv1/ProductSearchClient/GetOperation/main.go

Lines changed: 53 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/generated/snippets/vision/apiv1/snippet_metadata.google.cloud.vision.v1.json

Lines changed: 94 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,52 @@
195195
}
196196
]
197197
},
198+
{
199+
"regionTag": "vision_v1_generated_ImageAnnotator_GetOperation_sync",
200+
"title": "vision GetOperation Sample",
201+
"description": "GetOperation is a utility method from google.longrunning.Operations.",
202+
"file": "ImageAnnotatorClient/GetOperation/main.go",
203+
"language": "GO",
204+
"clientMethod": {
205+
"shortName": "GetOperation",
206+
"fullName": "google.cloud.vision.v1.ImageAnnotatorClient.GetOperation",
207+
"parameters": [
208+
{
209+
"type": "context.Context",
210+
"name": "ctx"
211+
},
212+
{
213+
"type": "longrunningpb.GetOperationRequest",
214+
"name": "req"
215+
},
216+
{
217+
"type": "...gax.CallOption",
218+
"name": "opts"
219+
}
220+
],
221+
"resultType": "*longrunningpb.Operation",
222+
"client": {
223+
"shortName": "ImageAnnotatorClient",
224+
"fullName": "google.cloud.vision.v1.ImageAnnotatorClient"
225+
},
226+
"method": {
227+
"shortName": "GetOperation",
228+
"fullName": "google.longrunning.Operations.GetOperation",
229+
"service": {
230+
"shortName": "Operations",
231+
"fullName": "google.longrunning.Operations"
232+
}
233+
}
234+
},
235+
"origin": "API_DEFINITION",
236+
"segments": [
237+
{
238+
"start": 18,
239+
"end": 53,
240+
"type": "FULL"
241+
}
242+
]
243+
},
198244
{
199245
"regionTag": "vision_v1_generated_ProductSearch_AddProductToProductSet_sync",
200246
"title": "vision AddProductToProductSet Sample",
@@ -513,6 +559,52 @@
513559
}
514560
]
515561
},
562+
{
563+
"regionTag": "vision_v1_generated_ProductSearch_GetOperation_sync",
564+
"title": "vision GetOperation Sample",
565+
"description": "GetOperation is a utility method from google.longrunning.Operations.",
566+
"file": "ProductSearchClient/GetOperation/main.go",
567+
"language": "GO",
568+
"clientMethod": {
569+
"shortName": "GetOperation",
570+
"fullName": "google.cloud.vision.v1.ProductSearchClient.GetOperation",
571+
"parameters": [
572+
{
573+
"type": "context.Context",
574+
"name": "ctx"
575+
},
576+
{
577+
"type": "longrunningpb.GetOperationRequest",
578+
"name": "req"
579+
},
580+
{
581+
"type": "...gax.CallOption",
582+
"name": "opts"
583+
}
584+
],
585+
"resultType": "*longrunningpb.Operation",
586+
"client": {
587+
"shortName": "ProductSearchClient",
588+
"fullName": "google.cloud.vision.v1.ProductSearchClient"
589+
},
590+
"method": {
591+
"shortName": "GetOperation",
592+
"fullName": "google.longrunning.Operations.GetOperation",
593+
"service": {
594+
"shortName": "Operations",
595+
"fullName": "google.longrunning.Operations"
596+
}
597+
}
598+
},
599+
"origin": "API_DEFINITION",
600+
"segments": [
601+
{
602+
"start": 18,
603+
"end": 53,
604+
"type": "FULL"
605+
}
606+
]
607+
},
516608
{
517609
"regionTag": "vision_v1_generated_ProductSearch_GetProduct_sync",
518610
"title": "vision GetProduct Sample",
@@ -654,7 +746,7 @@
654746
{
655747
"regionTag": "vision_v1_generated_ProductSearch_ImportProductSets_sync",
656748
"title": "vision ImportProductSets Sample",
657-
"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 used to keep track of the\nprogress 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].",
749+
"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].",
658750
"file": "ProductSearchClient/ImportProductSets/main.go",
659751
"language": "GO",
660752
"clientMethod": {
@@ -884,7 +976,7 @@
884976
{
885977
"regionTag": "vision_v1_generated_ProductSearch_PurgeProducts_sync",
886978
"title": "vision PurgeProducts Sample",
887-
"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 used to keep track of the\nprogress and results of the request.\n`Operation.metadata` contains `BatchOperationMetadata`. (progress)",
979+
"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)",
888980
"file": "ProductSearchClient/PurgeProducts/main.go",
889981
"language": "GO",
890982
"clientMethod": {

vision/apiv1/gapic_metadata.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
"methods": [
3030
"BatchAnnotateImages"
3131
]
32+
},
33+
"GetOperation": {
34+
"methods": [
35+
"GetOperation"
36+
]
3237
}
3338
}
3439
},
@@ -54,6 +59,11 @@
5459
"methods": [
5560
"BatchAnnotateImages"
5661
]
62+
},
63+
"GetOperation": {
64+
"methods": [
65+
"GetOperation"
66+
]
5767
}
5868
}
5969
}
@@ -99,6 +109,11 @@
99109
"DeleteReferenceImage"
100110
]
101111
},
112+
"GetOperation": {
113+
"methods": [
114+
"GetOperation"
115+
]
116+
},
102117
"GetProduct": {
103118
"methods": [
104119
"GetProduct"
@@ -199,6 +214,11 @@
199214
"DeleteReferenceImage"
200215
]
201216
},
217+
"GetOperation": {
218+
"methods": [
219+
"GetOperation"
220+
]
221+
},
202222
"GetProduct": {
203223
"methods": [
204224
"GetProduct"

0 commit comments

Comments
 (0)