Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / cloud / vision / v1p4beta1 / product_search.proto
1 // Copyright 2018 Google LLC.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15
16 syntax = "proto3";
17
18 package google.cloud.vision.v1p4beta1;
19
20 import "google/api/annotations.proto";
21 import "google/cloud/vision/v1p4beta1/geometry.proto";
22 import "google/cloud/vision/v1p4beta1/product_search_service.proto";
23 import "google/protobuf/timestamp.proto";
24
25 option cc_enable_arenas = true;
26 option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision";
27 option java_multiple_files = true;
28 option java_outer_classname = "ProductSearchProto";
29 option java_package = "com.google.cloud.vision.v1p4beta1";
30 option objc_class_prefix = "GCVN";
31
32 // Parameters for a product search request.
33 message ProductSearchParams {
34   // The bounding polygon around the area of interest in the image.
35   // Optional. If it is not specified, system discretion will be applied.
36   BoundingPoly bounding_poly = 9;
37
38   // The resource name of a
39   // [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
40   // similar images.
41   //
42   // Format is:
43   // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
44   string product_set = 6;
45
46   // The list of product categories to search in. Currently, we only consider
47   // the first category, and either "homegoods", "apparel", or "toys" should be
48   // specified.
49   repeated string product_categories = 7;
50
51   // The filtering expression. This can be used to restrict search results based
52   // on Product labels. We currently support an AND of OR of key-value
53   // expressions, where each expression within an OR must have the same key.
54   //
55   // For example, "(color = red OR color = blue) AND brand = Google" is
56   // acceptable, but not "(color = red OR brand = Google)" or "color: red".
57   string filter = 8;
58 }
59
60 // Results for a product search request.
61 message ProductSearchResults {
62   // Information about a product.
63   message Result {
64     // The Product.
65     Product product = 1;
66
67     // A confidence level on the match, ranging from 0 (no confidence) to
68     // 1 (full confidence).
69     float score = 2;
70
71     // The resource name of the image from the product that is the closest match
72     // to the query.
73     string image = 3;
74   }
75
76   // Information about the products similar to a single product in a query
77   // image.
78   message GroupedResult {
79     // The bounding polygon around the product detected in the query image.
80     BoundingPoly bounding_poly = 1;
81
82     // List of results, one for each product match.
83     repeated Result results = 2;
84   }
85
86   // Timestamp of the index which provided these results. Changes made after
87   // this time are not reflected in the current results.
88   google.protobuf.Timestamp index_time = 2;
89
90   // List of results, one for each product match.
91   repeated Result results = 5;
92
93   // List of results grouped by products detected in the query image. Each entry
94   // corresponds to one bounding polygon in the query image, and contains the
95   // matching products specific to that region. There may be duplicate product
96   // matches in the union of all the per-product results.
97   repeated GroupedResult product_grouped_results = 6;
98 }