google-cloud-vision 0.37.1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +343 -0
  6. data/README.md +35 -49
  7. data/lib/{google/cloud/vision/v1/doc/google/protobuf/wrappers.rb → google-cloud-vision.rb} +5 -12
  8. data/lib/google/cloud/vision.rb +132 -215
  9. data/lib/google/cloud/vision/version.rb +6 -2
  10. metadata +74 -102
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/vision/v1.rb +0 -249
  13. data/lib/google/cloud/vision/v1/credentials.rb +0 -42
  14. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb +0 -66
  15. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +0 -923
  16. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb +0 -115
  17. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb +0 -569
  18. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +0 -254
  19. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +0 -102
  20. data/lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb +0 -51
  21. data/lib/google/cloud/vision/v1/doc/google/protobuf/any.rb +0 -131
  22. data/lib/google/cloud/vision/v1/doc/google/protobuf/empty.rb +0 -29
  23. data/lib/google/cloud/vision/v1/doc/google/protobuf/field_mask.rb +0 -222
  24. data/lib/google/cloud/vision/v1/doc/google/protobuf/timestamp.rb +0 -113
  25. data/lib/google/cloud/vision/v1/doc/google/rpc/status.rb +0 -87
  26. data/lib/google/cloud/vision/v1/doc/google/type/color.rb +0 -161
  27. data/lib/google/cloud/vision/v1/doc/google/type/latlng.rb +0 -31
  28. data/lib/google/cloud/vision/v1/geometry_pb.rb +0 -39
  29. data/lib/google/cloud/vision/v1/helpers.rb +0 -1154
  30. data/lib/google/cloud/vision/v1/image_annotator_client.rb +0 -516
  31. data/lib/google/cloud/vision/v1/image_annotator_client_config.json +0 -46
  32. data/lib/google/cloud/vision/v1/image_annotator_pb.rb +0 -344
  33. data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +0 -74
  34. data/lib/google/cloud/vision/v1/product_search_client.rb +0 -1490
  35. data/lib/google/cloud/vision/v1/product_search_client_config.json +0 -121
  36. data/lib/google/cloud/vision/v1/product_search_pb.rb +0 -54
  37. data/lib/google/cloud/vision/v1/product_search_service_pb.rb +0 -207
  38. data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +0 -233
  39. data/lib/google/cloud/vision/v1/text_annotation_pb.rb +0 -94
  40. data/lib/google/cloud/vision/v1/web_detection_pb.rb +0 -51
  41. data/lib/google/cloud/vision/v1p3beta1.rb +0 -253
  42. data/lib/google/cloud/vision/v1p3beta1/credentials.rb +0 -42
  43. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/geometry.rb +0 -72
  44. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/image_annotator.rb +0 -763
  45. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search.rb +0 -156
  46. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search_service.rb +0 -538
  47. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/text_annotation.rb +0 -255
  48. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/web_detection.rb +0 -101
  49. data/lib/google/cloud/vision/v1p3beta1/doc/google/longrunning/operations.rb +0 -51
  50. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/any.rb +0 -131
  51. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/empty.rb +0 -29
  52. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/field_mask.rb +0 -222
  53. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/timestamp.rb +0 -113
  54. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/wrappers.rb +0 -26
  55. data/lib/google/cloud/vision/v1p3beta1/doc/google/rpc/status.rb +0 -87
  56. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/color.rb +0 -161
  57. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/latlng.rb +0 -31
  58. data/lib/google/cloud/vision/v1p3beta1/geometry_pb.rb +0 -43
  59. data/lib/google/cloud/vision/v1p3beta1/helpers.rb +0 -1154
  60. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client.rb +0 -312
  61. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client_config.json +0 -36
  62. data/lib/google/cloud/vision/v1p3beta1/image_annotator_pb.rb +0 -304
  63. data/lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb +0 -55
  64. data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +0 -1419
  65. data/lib/google/cloud/vision/v1p3beta1/product_search_client_config.json +0 -116
  66. data/lib/google/cloud/vision/v1p3beta1/product_search_pb.rb +0 -64
  67. data/lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb +0 -191
  68. data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +0 -226
  69. data/lib/google/cloud/vision/v1p3beta1/text_annotation_pb.rb +0 -94
  70. data/lib/google/cloud/vision/v1p3beta1/web_detection_pb.rb +0 -51
@@ -1,156 +0,0 @@
1
- # Copyright 2019 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
- # https://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
- module Google
17
- module Cloud
18
- module Vision
19
- module V1p3beta1
20
- # Parameters for a product search request.
21
- # @!attribute [rw] catalog_name
22
- # @return [String]
23
- # The resource name of the catalog to search.
24
- #
25
- # Format is: `productSearch/catalogs/CATALOG_NAME`.
26
- # @!attribute [rw] category
27
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSearchCategory]
28
- # The category to search in.
29
- # Optional. It is inferred by the system if it is not specified.
30
- # [Deprecated] Use `product_category`.
31
- # @!attribute [rw] product_category
32
- # @return [String]
33
- # The product category to search in.
34
- # Optional. It is inferred by the system if it is not specified.
35
- # Supported values are `bag`, `shoe`, `sunglasses`, `dress`, `outerwear`,
36
- # `skirt`, `top`, `shorts`, and `pants`.
37
- # @!attribute [rw] normalized_bounding_poly
38
- # @return [Google::Cloud::Vision::V1p3beta1::NormalizedBoundingPoly]
39
- # The bounding polygon around the area of interest in the image.
40
- # Optional. If it is not specified, system discretion will be applied.
41
- # [Deprecated] Use `bounding_poly`.
42
- # @!attribute [rw] bounding_poly
43
- # @return [Google::Cloud::Vision::V1p3beta1::BoundingPoly]
44
- # The bounding polygon around the area of interest in the image.
45
- # Optional. If it is not specified, system discretion will be applied.
46
- # @!attribute [rw] view
47
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSearchResultsView]
48
- # Specifies the verbosity of the product search results.
49
- # Optional. Defaults to `BASIC`.
50
- # @!attribute [rw] product_set
51
- # @return [String]
52
- # The resource name of a
53
- # {Google::Cloud::Vision::V1p3beta1::ProductSet ProductSet} to be searched for
54
- # similar images.
55
- #
56
- # Format is:
57
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
58
- # @!attribute [rw] product_categories
59
- # @return [Array<String>]
60
- # The list of product categories to search in. Currently, we only consider
61
- # the first category, and either "homegoods" or "apparel" should be
62
- # specified.
63
- # @!attribute [rw] filter
64
- # @return [String]
65
- # The filtering expression. This can be used to restrict search results based
66
- # on Product labels. We currently support an AND of OR of key-value
67
- # expressions, where each expression within an OR must have the same key.
68
- #
69
- # For example, "(color = red OR color = blue) AND brand = Google" is
70
- # acceptable, but not "(color = red OR brand = Google)" or "color: red".
71
- class ProductSearchParams; end
72
-
73
- # Results for a product search request.
74
- # @!attribute [rw] category
75
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSearchCategory]
76
- # Product category.
77
- # [Deprecated] Use `product_category`.
78
- # @!attribute [rw] product_category
79
- # @return [String]
80
- # Product category.
81
- # Supported values are `bag` and `shoe`.
82
- # [Deprecated] `product_category` is provided in each Product.
83
- # @!attribute [rw] index_time
84
- # @return [Google::Protobuf::Timestamp]
85
- # Timestamp of the index which provided these results. Changes made after
86
- # this time are not reflected in the current results.
87
- # @!attribute [rw] products
88
- # @return [Array<Google::Cloud::Vision::V1p3beta1::ProductSearchResults::ProductInfo>]
89
- # List of detected products.
90
- # @!attribute [rw] results
91
- # @return [Array<Google::Cloud::Vision::V1p3beta1::ProductSearchResults::Result>]
92
- # List of results, one for each product match.
93
- class ProductSearchResults
94
- # Information about a product.
95
- # @!attribute [rw] product_id
96
- # @return [String]
97
- # Product ID.
98
- # @!attribute [rw] image_uri
99
- # @return [String]
100
- # The URI of the image which matched the query image.
101
- #
102
- # This field is returned only if `view` is set to `FULL` in
103
- # the request.
104
- # @!attribute [rw] score
105
- # @return [Float]
106
- # A confidence level on the match, ranging from 0 (no confidence) to
107
- # 1 (full confidence).
108
- #
109
- # This field is returned only if `view` is set to `FULL` in
110
- # the request.
111
- class ProductInfo; end
112
-
113
- # Information about a product.
114
- # @!attribute [rw] product
115
- # @return [Google::Cloud::Vision::V1p3beta1::Product]
116
- # The Product.
117
- # @!attribute [rw] score
118
- # @return [Float]
119
- # A confidence level on the match, ranging from 0 (no confidence) to
120
- # 1 (full confidence).
121
- #
122
- # This field is returned only if `view` is set to `FULL` in
123
- # the request.
124
- # @!attribute [rw] image
125
- # @return [String]
126
- # The resource name of the image from the product that is the closest match
127
- # to the query.
128
- class Result; end
129
- end
130
-
131
- # Supported product search categories.
132
- module ProductSearchCategory
133
- # Default value used when a category is not specified.
134
- PRODUCT_SEARCH_CATEGORY_UNSPECIFIED = 0
135
-
136
- # Shoes category.
137
- SHOES = 1
138
-
139
- # Bags category.
140
- BAGS = 2
141
- end
142
-
143
- # Specifies the fields to include in product search results.
144
- module ProductSearchResultsView
145
- # Product search results contain only `product_category` and `product_id`.
146
- # Default value.
147
- BASIC = 0
148
-
149
- # Product search results contain `product_category`, `product_id`,
150
- # `image_uri`, and `score`.
151
- FULL = 1
152
- end
153
- end
154
- end
155
- end
156
- end
@@ -1,538 +0,0 @@
1
- # Copyright 2019 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
- # https://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
- module Google
17
- module Cloud
18
- module Vision
19
- module V1p3beta1
20
- # A Product contains ReferenceImages.
21
- # @!attribute [rw] name
22
- # @return [String]
23
- # The resource name of the product.
24
- #
25
- # Format is:
26
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
27
- #
28
- # This field is ignored when creating a product.
29
- # @!attribute [rw] display_name
30
- # @return [String]
31
- # The user-provided name for this Product. Must not be empty. Must be at most
32
- # 4096 characters long.
33
- # @!attribute [rw] description
34
- # @return [String]
35
- # User-provided metadata to be stored with this product. Must be at most 4096
36
- # characters long.
37
- # @!attribute [rw] product_category
38
- # @return [String]
39
- # The category for the product identified by the reference image. This should
40
- # be either "homegoods" or "apparel".
41
- #
42
- # This field is immutable.
43
- # @!attribute [rw] product_labels
44
- # @return [Array<Google::Cloud::Vision::V1p3beta1::Product::KeyValue>]
45
- # Key-value pairs that can be attached to a product. At query time,
46
- # constraints can be specified based on the product_labels.
47
- #
48
- # Note that integer values can be provided as strings, e.g. "1199". Only
49
- # strings with integer values can match a range-based restriction which is
50
- # to be supported soon.
51
- #
52
- # Multiple values can be assigned to the same key. One product may have up to
53
- # 100 product_labels.
54
- class Product
55
- # A product label represented as a key-value pair.
56
- # @!attribute [rw] key
57
- # @return [String]
58
- # The key of the label attached to the product. Cannot be empty and cannot
59
- # exceed 128 bytes.
60
- # @!attribute [rw] value
61
- # @return [String]
62
- # The value of the label attached to the product. Cannot be empty and
63
- # cannot exceed 128 bytes.
64
- class KeyValue; end
65
- end
66
-
67
- # A ProductSet contains Products. A ProductSet can contain a maximum of 1
68
- # million reference images. If the limit is exceeded, periodic indexing will
69
- # fail.
70
- # @!attribute [rw] name
71
- # @return [String]
72
- # The resource name of the ProductSet.
73
- #
74
- # Format is:
75
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
76
- #
77
- # This field is ignored when creating a ProductSet.
78
- # @!attribute [rw] display_name
79
- # @return [String]
80
- # The user-provided name for this ProductSet. Must not be empty. Must be at
81
- # most 4096 characters long.
82
- # @!attribute [rw] index_time
83
- # @return [Google::Protobuf::Timestamp]
84
- # Output only. The time at which this ProductSet was last indexed. Query
85
- # results will reflect all updates before this time. If this ProductSet has
86
- # never been indexed, this field is 0.
87
- #
88
- # This field is ignored when creating a ProductSet.
89
- # @!attribute [rw] index_error
90
- # @return [Google::Rpc::Status]
91
- # Output only. If there was an error with indexing the product set, the field
92
- # is populated.
93
- #
94
- # This field is ignored when creating a ProductSet.
95
- class ProductSet; end
96
-
97
- # A `ReferenceImage` represents a product image and its associated metadata,
98
- # such as bounding boxes.
99
- # @!attribute [rw] name
100
- # @return [String]
101
- # The resource name of the reference image.
102
- #
103
- # Format is:
104
- #
105
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
106
- #
107
- # This field is ignored when creating a reference image.
108
- # @!attribute [rw] uri
109
- # @return [String]
110
- # The Google Cloud Storage URI of the reference image.
111
- #
112
- # The URI must start with `gs://`.
113
- #
114
- # Required.
115
- # @!attribute [rw] bounding_polys
116
- # @return [Array<Google::Cloud::Vision::V1p3beta1::BoundingPoly>]
117
- # Bounding polygons around the areas of interest in the reference image.
118
- # Optional. If this field is empty, the system will try to detect regions of
119
- # interest. At most 10 bounding polygons will be used.
120
- #
121
- # The provided shape is converted into a non-rotated rectangle. Once
122
- # converted, the small edge of the rectangle must be greater than or equal
123
- # to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
124
- # is not).
125
- class ReferenceImage; end
126
-
127
- # Request message for the `CreateProduct` method.
128
- # @!attribute [rw] parent
129
- # @return [String]
130
- # The project in which the Product should be created.
131
- #
132
- # Format is
133
- # `projects/PROJECT_ID/locations/LOC_ID`.
134
- # @!attribute [rw] product
135
- # @return [Google::Cloud::Vision::V1p3beta1::Product]
136
- # The product to create.
137
- # @!attribute [rw] product_id
138
- # @return [String]
139
- # A user-supplied resource id for this Product. If set, the server will
140
- # attempt to use this value as the resource id. If it is already in use, an
141
- # error is returned with code ALREADY_EXISTS. Must be at most 128 characters
142
- # long. It cannot contain the character `/`.
143
- class CreateProductRequest; end
144
-
145
- # Request message for the `ListProducts` method.
146
- # @!attribute [rw] parent
147
- # @return [String]
148
- # The project OR ProductSet from which Products should be listed.
149
- #
150
- # Format:
151
- # `projects/PROJECT_ID/locations/LOC_ID`
152
- # @!attribute [rw] page_size
153
- # @return [Integer]
154
- # The maximum number of items to return. Default 10, maximum 100.
155
- # @!attribute [rw] page_token
156
- # @return [String]
157
- # The next_page_token returned from a previous List request, if any.
158
- class ListProductsRequest; end
159
-
160
- # Response message for the `ListProducts` method.
161
- # @!attribute [rw] products
162
- # @return [Array<Google::Cloud::Vision::V1p3beta1::Product>]
163
- # List of products.
164
- # @!attribute [rw] next_page_token
165
- # @return [String]
166
- # Token to retrieve the next page of results, or empty if there are no more
167
- # results in the list.
168
- class ListProductsResponse; end
169
-
170
- # Request message for the `GetProduct` method.
171
- # @!attribute [rw] name
172
- # @return [String]
173
- # Resource name of the Product to get.
174
- #
175
- # Format is:
176
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
177
- class GetProductRequest; end
178
-
179
- # Request message for the `UpdateProduct` method.
180
- # @!attribute [rw] product
181
- # @return [Google::Cloud::Vision::V1p3beta1::Product]
182
- # The Product resource which replaces the one on the server.
183
- # product.name is immutable.
184
- # @!attribute [rw] update_mask
185
- # @return [Google::Protobuf::FieldMask]
186
- # The {Google::Protobuf::FieldMask FieldMask} that specifies which fields
187
- # to update.
188
- # If update_mask isn't specified, all mutable fields are to be updated.
189
- # Valid mask paths include `product_labels`, `display_name` and
190
- # `description`.
191
- class UpdateProductRequest; end
192
-
193
- # Request message for the `DeleteProduct` method.
194
- # @!attribute [rw] name
195
- # @return [String]
196
- # Resource name of product to delete.
197
- #
198
- # Format is:
199
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
200
- class DeleteProductRequest; end
201
-
202
- # Request message for the `CreateProductSet` method.
203
- # @!attribute [rw] parent
204
- # @return [String]
205
- # The project in which the ProductSet should be created.
206
- #
207
- # Format is `projects/PROJECT_ID/locations/LOC_ID`.
208
- # @!attribute [rw] product_set
209
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSet]
210
- # The ProductSet to create.
211
- # @!attribute [rw] product_set_id
212
- # @return [String]
213
- # A user-supplied resource id for this ProductSet. If set, the server will
214
- # attempt to use this value as the resource id. If it is already in use, an
215
- # error is returned with code ALREADY_EXISTS. Must be at most 128 characters
216
- # long. It cannot contain the character `/`.
217
- class CreateProductSetRequest; end
218
-
219
- # Request message for the `ListProductSets` method.
220
- # @!attribute [rw] parent
221
- # @return [String]
222
- # The project from which ProductSets should be listed.
223
- #
224
- # Format is `projects/PROJECT_ID/locations/LOC_ID`.
225
- # @!attribute [rw] page_size
226
- # @return [Integer]
227
- # The maximum number of items to return. Default 10, maximum 100.
228
- # @!attribute [rw] page_token
229
- # @return [String]
230
- # The next_page_token returned from a previous List request, if any.
231
- class ListProductSetsRequest; end
232
-
233
- # Response message for the `ListProductSets` method.
234
- # @!attribute [rw] product_sets
235
- # @return [Array<Google::Cloud::Vision::V1p3beta1::ProductSet>]
236
- # List of ProductSets.
237
- # @!attribute [rw] next_page_token
238
- # @return [String]
239
- # Token to retrieve the next page of results, or empty if there are no more
240
- # results in the list.
241
- class ListProductSetsResponse; end
242
-
243
- # Request message for the `GetProductSet` method.
244
- # @!attribute [rw] name
245
- # @return [String]
246
- # Resource name of the ProductSet to get.
247
- #
248
- # Format is:
249
- # `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`
250
- class GetProductSetRequest; end
251
-
252
- # Request message for the `UpdateProductSet` method.
253
- # @!attribute [rw] product_set
254
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSet]
255
- # The ProductSet resource which replaces the one on the server.
256
- # @!attribute [rw] update_mask
257
- # @return [Google::Protobuf::FieldMask]
258
- # The {Google::Protobuf::FieldMask FieldMask} that specifies which fields to
259
- # update.
260
- # If update_mask isn't specified, all mutable fields are to be updated.
261
- # Valid mask path is `display_name`.
262
- class UpdateProductSetRequest; end
263
-
264
- # Request message for the `DeleteProductSet` method.
265
- # @!attribute [rw] name
266
- # @return [String]
267
- # Resource name of the ProductSet to delete.
268
- #
269
- # Format is:
270
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
271
- class DeleteProductSetRequest; end
272
-
273
- # Request message for the `CreateReferenceImage` method.
274
- # @!attribute [rw] parent
275
- # @return [String]
276
- # Resource name of the product in which to create the reference image.
277
- #
278
- # Format is
279
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
280
- # @!attribute [rw] reference_image
281
- # @return [Google::Cloud::Vision::V1p3beta1::ReferenceImage]
282
- # The reference image to create.
283
- # If an image ID is specified, it is ignored.
284
- # @!attribute [rw] reference_image_id
285
- # @return [String]
286
- # A user-supplied resource id for the ReferenceImage to be added. If set,
287
- # the server will attempt to use this value as the resource id. If it is
288
- # already in use, an error is returned with code ALREADY_EXISTS. Must be at
289
- # most 128 characters long. It cannot contain the character `/`.
290
- class CreateReferenceImageRequest; end
291
-
292
- # Request message for the `ListReferenceImages` method.
293
- # @!attribute [rw] parent
294
- # @return [String]
295
- # Resource name of the product containing the reference images.
296
- #
297
- # Format is
298
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
299
- # @!attribute [rw] page_size
300
- # @return [Integer]
301
- # The maximum number of items to return. Default 10, maximum 100.
302
- # @!attribute [rw] page_token
303
- # @return [String]
304
- # A token identifying a page of results to be returned. This is the value
305
- # of `nextPageToken` returned in a previous reference image list request.
306
- #
307
- # Defaults to the first page if not specified.
308
- class ListReferenceImagesRequest; end
309
-
310
- # Response message for the `ListReferenceImages` method.
311
- # @!attribute [rw] reference_images
312
- # @return [Array<Google::Cloud::Vision::V1p3beta1::ReferenceImage>]
313
- # The list of reference images.
314
- # @!attribute [rw] page_size
315
- # @return [Integer]
316
- # The maximum number of items to return. Default 10, maximum 100.
317
- # @!attribute [rw] next_page_token
318
- # @return [String]
319
- # The next_page_token returned from a previous List request, if any.
320
- class ListReferenceImagesResponse; end
321
-
322
- # Request message for the `GetReferenceImage` method.
323
- # @!attribute [rw] name
324
- # @return [String]
325
- # The resource name of the ReferenceImage to get.
326
- #
327
- # Format is:
328
- #
329
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
330
- class GetReferenceImageRequest; end
331
-
332
- # Request message for the `DeleteReferenceImage` method.
333
- # @!attribute [rw] name
334
- # @return [String]
335
- # The resource name of the reference image to delete.
336
- #
337
- # Format is:
338
- #
339
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
340
- class DeleteReferenceImageRequest; end
341
-
342
- # Request message for the `AddProductToProductSet` method.
343
- # @!attribute [rw] name
344
- # @return [String]
345
- # The resource name for the ProductSet to modify.
346
- #
347
- # Format is:
348
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
349
- # @!attribute [rw] product
350
- # @return [String]
351
- # The resource name for the Product to be added to this ProductSet.
352
- #
353
- # Format is:
354
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
355
- class AddProductToProductSetRequest; end
356
-
357
- # Request message for the `RemoveProductFromProductSet` method.
358
- # @!attribute [rw] name
359
- # @return [String]
360
- # The resource name for the ProductSet to modify.
361
- #
362
- # Format is:
363
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
364
- # @!attribute [rw] product
365
- # @return [String]
366
- # The resource name for the Product to be removed from this ProductSet.
367
- #
368
- # Format is:
369
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
370
- class RemoveProductFromProductSetRequest; end
371
-
372
- # Request message for the `ListProductsInProductSet` method.
373
- # @!attribute [rw] name
374
- # @return [String]
375
- # The ProductSet resource for which to retrieve Products.
376
- #
377
- # Format is:
378
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
379
- # @!attribute [rw] page_size
380
- # @return [Integer]
381
- # The maximum number of items to return. Default 10, maximum 100.
382
- # @!attribute [rw] page_token
383
- # @return [String]
384
- # The next_page_token returned from a previous List request, if any.
385
- class ListProductsInProductSetRequest; end
386
-
387
- # Response message for the `ListProductsInProductSet` method.
388
- # @!attribute [rw] products
389
- # @return [Array<Google::Cloud::Vision::V1p3beta1::Product>]
390
- # The list of Products.
391
- # @!attribute [rw] next_page_token
392
- # @return [String]
393
- # Token to retrieve the next page of results, or empty if there are no more
394
- # results in the list.
395
- class ListProductsInProductSetResponse; end
396
-
397
- # The Google Cloud Storage location for a csv file which preserves a list of
398
- # ImportProductSetRequests in each line.
399
- # @!attribute [rw] csv_file_uri
400
- # @return [String]
401
- # The Google Cloud Storage URI of the input csv file.
402
- #
403
- # The URI must start with gs://
404
- #
405
- # The format of the input csv file should be one image per line.
406
- # In each line, there are 6 columns.
407
- # 1. image_uri
408
- # 2, image_id
409
- # 3. product_set_id
410
- # 4. product_id
411
- # 5, product_category
412
- # 6, product_display_name
413
- # 7, labels
414
- # 8. bounding_poly
415
- #
416
- # Columns 1, 3, 4, and 5 are required, other columns are optional. A new
417
- # ProductSet/Product with the same id will be created on the fly
418
- # if the ProductSet/Product specified by product_set_id/product_id does not
419
- # exist.
420
- #
421
- # The image_id field is optional but has to be unique if provided. If it is
422
- # empty, we will automatically assign an unique id to the image.
423
- #
424
- # The product_display_name field is optional. If it is empty, a space (" ")
425
- # is used as the place holder for the product display_name, which can
426
- # be updated later through the realtime API.
427
- #
428
- # If the Product with product_id already exists, the fields
429
- # product_display_name, product_category and labels are ignored.
430
- #
431
- # If a Product doesn't exist and needs to be created on the fly, the
432
- # product_display_name field refers to
433
- # {Google::Cloud::Vision::V1p3beta1::Product#display_name Product#display_name},
434
- # the product_category field refers to
435
- # {Google::Cloud::Vision::V1p3beta1::Product#product_category Product#product_category},
436
- # and the labels field refers to {Product#labels}.
437
- #
438
- # Labels (optional) should be a line containing a list of comma-separated
439
- # key-value pairs, with the format
440
- # "key_1=value_1,key_2=value_2,...,key_n=value_n".
441
- #
442
- # The bounding_poly (optional) field is used to identify one region of
443
- # interest from the image in the same manner as CreateReferenceImage. If no
444
- # bounding_poly is specified, the system will try to detect regions of
445
- # interest automatically.
446
- #
447
- # Note that the pipeline will resize the image if the image resolution is too
448
- # large to process (above 20MP).
449
- #
450
- # Also note that at most one bounding_poly is allowed per line. If the image
451
- # contains multiple regions of interest, the csv should contain one line per
452
- # region of interest.
453
- #
454
- # The bounding_poly column should contain an even number of comma-separated
455
- # numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
456
- # integers should be used for absolute bounding polygons, and float values
457
- # in [0, 1] should be used for normalized bounding polygons.
458
- class ImportProductSetsGcsSource; end
459
-
460
- # The input content for the `ImportProductSets` method.
461
- # @!attribute [rw] gcs_source
462
- # @return [Google::Cloud::Vision::V1p3beta1::ImportProductSetsGcsSource]
463
- # The Google Cloud Storage location for a csv file which preserves a list
464
- # of ImportProductSetRequests in each line.
465
- class ImportProductSetsInputConfig; end
466
-
467
- # Request message for the `ImportProductSets` method.
468
- # @!attribute [rw] parent
469
- # @return [String]
470
- # The project in which the ProductSets should be imported.
471
- #
472
- # Format is `projects/PROJECT_ID/locations/LOC_ID`.
473
- # @!attribute [rw] input_config
474
- # @return [Google::Cloud::Vision::V1p3beta1::ImportProductSetsInputConfig]
475
- # The input content for the list of requests.
476
- class ImportProductSetsRequest; end
477
-
478
- # Response message for the `ImportProductSets` method.
479
- #
480
- # This message is returned by the
481
- # {Google::Longrunning::Operations::GetOperation}
482
- # method in the returned
483
- # {Google::Longrunning::Operation#response}
484
- # field.
485
- # @!attribute [rw] reference_images
486
- # @return [Array<Google::Cloud::Vision::V1p3beta1::ReferenceImage>]
487
- # The list of reference_images that are imported successfully.
488
- # @!attribute [rw] statuses
489
- # @return [Array<Google::Rpc::Status>]
490
- # The rpc status for each ImportProductSet request, including both successes
491
- # and errors.
492
- #
493
- # The number of statuses here matches the number of lines in the csv file,
494
- # and statuses[i] stores the success or failure status of processing the i-th
495
- # line of the csv, starting from line 0.
496
- class ImportProductSetsResponse; end
497
-
498
- # Metadata for the batch operations such as the current state.
499
- #
500
- # This is included in the `metadata` field of the `Operation` returned by the
501
- # `GetOperation` call of the `google::longrunning::Operations` service.
502
- # @!attribute [rw] state
503
- # @return [Google::Cloud::Vision::V1p3beta1::BatchOperationMetadata::State]
504
- # The current state of the batch operation.
505
- # @!attribute [rw] submit_time
506
- # @return [Google::Protobuf::Timestamp]
507
- # The time when the batch request was submitted to the server.
508
- # @!attribute [rw] end_time
509
- # @return [Google::Protobuf::Timestamp]
510
- # The time when the batch request is finished and
511
- # {Google::Longrunning::Operation#done} is
512
- # set to true.
513
- class BatchOperationMetadata
514
- # Enumerates the possible states that the batch request can be in.
515
- module State
516
- # Invalid.
517
- STATE_UNSPECIFIED = 0
518
-
519
- # Request is actively being processed.
520
- PROCESSING = 1
521
-
522
- # The request is done and at least one item has been successfully
523
- # processed.
524
- SUCCESSFUL = 2
525
-
526
- # The request is done and no item has been successfully processed.
527
- FAILED = 3
528
-
529
- # The request is done after the longrunning.Operations.CancelOperation has
530
- # been called by the user. Any records that were processed before the
531
- # cancel command are output as specified in the request.
532
- CANCELLED = 4
533
- end
534
- end
535
- end
536
- end
537
- end
538
- end