Skip to content

Commit

Permalink
fix: update protobuf options for product sets (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and callmehiphop committed Oct 10, 2019
1 parent ff55c62 commit 08e84a0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import "google/cloud/vision/v1/geometry.proto";
import "google/cloud/vision/v1/product_search_service.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
import "google/api/resource.proto";

option cc_enable_arenas = true;
option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1;vision";
Expand All @@ -39,7 +40,9 @@ message ProductSearchParams {
//
// Format is:
// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
string product_set = 6;
string product_set = 6 [(google.api.resource_reference) = {
type: "vision.googleapis.com/ProductSet"
}];

// The list of product categories to search in. Currently, we only consider
// the first category, and either "homegoods-v2", "apparel-v2", "toys-v2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ service ProductSearch {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}"
};
option (google.api.method_signature) = "name";
}

// Adds a Product to the specified ProductSet. If the Product is already
Expand Down
8 changes: 6 additions & 2 deletions packages/google-cloud-vision/protos/protos.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,10 @@
},
"productSet": {
"type": "string",
"id": 6
"id": 6,
"options": {
"(google.api.resource_reference).type": "vision.googleapis.com/ProductSet"
}
},
"productCategories": {
"rule": "repeated",
Expand Down Expand Up @@ -1126,7 +1129,8 @@
"requestType": "GetReferenceImageRequest",
"responseType": "ReferenceImage",
"options": {
"(google.api.http).get": "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}"
"(google.api.http).get": "/v1/{name=projects/*/locations/*/products/*/referenceImages/*}",
"(google.api.method_signature)": "name"
}
},
"AddProductToProductSet": {
Expand Down
10 changes: 5 additions & 5 deletions packages/google-cloud-vision/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-10-01T11:38:30.509743Z",
"updateTime": "2019-10-10T11:36:24.226193Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.37.1",
"dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80"
"version": "0.38.0",
"dockerImage": "googleapis/artman@sha256:0d2f8d429110aeb8d82df6550ef4ede59d40df9062d260a1580fce688b0512bf"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "ce3c574d1266026cebea3a893247790bd68191c2",
"internalRef": "272147209"
"sha": "10f91fa12f70e8e0209a45fc10807ed1f77c7e4e",
"internalRef": "273826591"
}
},
{
Expand Down

0 comments on commit 08e84a0

Please sign in to comment.