google-cloud-vision 0.32.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +4 -2
  3. data/AUTHENTICATION.md +151 -0
  4. data/LICENSE.md +201 -0
  5. data/MIGRATING.md +343 -0
  6. data/README.md +97 -52
  7. data/lib/google/cloud/vision/{v1/doc/google/protobuf/empty.rb → version.rb} +10 -13
  8. data/lib/google/cloud/vision.rb +132 -207
  9. data/lib/{google/cloud/vision/v1p3beta1/doc/google/protobuf/empty.rb → google-cloud-vision.rb} +5 -15
  10. metadata +108 -83
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/vision/v1/credentials.rb +0 -42
  13. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb +0 -66
  14. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +0 -763
  15. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb +0 -88
  16. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb +0 -539
  17. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +0 -254
  18. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +0 -102
  19. data/lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb +0 -93
  20. data/lib/google/cloud/vision/v1/doc/google/protobuf/any.rb +0 -130
  21. data/lib/google/cloud/vision/v1/doc/google/protobuf/field_mask.rb +0 -230
  22. data/lib/google/cloud/vision/v1/doc/google/protobuf/timestamp.rb +0 -109
  23. data/lib/google/cloud/vision/v1/doc/google/protobuf/wrappers.rb +0 -90
  24. data/lib/google/cloud/vision/v1/doc/google/rpc/status.rb +0 -84
  25. data/lib/google/cloud/vision/v1/doc/google/type/color.rb +0 -156
  26. data/lib/google/cloud/vision/v1/doc/google/type/latlng.rb +0 -65
  27. data/lib/google/cloud/vision/v1/geometry_pb.rb +0 -39
  28. data/lib/google/cloud/vision/v1/helpers.rb +0 -1154
  29. data/lib/google/cloud/vision/v1/image_annotator_client.rb +0 -302
  30. data/lib/google/cloud/vision/v1/image_annotator_client_config.json +0 -36
  31. data/lib/google/cloud/vision/v1/image_annotator_pb.rb +0 -305
  32. data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +0 -56
  33. data/lib/google/cloud/vision/v1/product_search_client.rb +0 -1337
  34. data/lib/google/cloud/vision/v1/product_search_client_config.json +0 -116
  35. data/lib/google/cloud/vision/v1/product_search_pb.rb +0 -45
  36. data/lib/google/cloud/vision/v1/product_search_service_pb.rb +0 -191
  37. data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +0 -224
  38. data/lib/google/cloud/vision/v1/text_annotation_pb.rb +0 -94
  39. data/lib/google/cloud/vision/v1/web_detection_pb.rb +0 -51
  40. data/lib/google/cloud/vision/v1.rb +0 -233
  41. data/lib/google/cloud/vision/v1p3beta1/credentials.rb +0 -42
  42. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/geometry.rb +0 -72
  43. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/image_annotator.rb +0 -763
  44. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search.rb +0 -154
  45. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search_service.rb +0 -533
  46. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/text_annotation.rb +0 -254
  47. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/web_detection.rb +0 -101
  48. data/lib/google/cloud/vision/v1p3beta1/doc/google/longrunning/operations.rb +0 -93
  49. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/any.rb +0 -130
  50. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/field_mask.rb +0 -230
  51. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/timestamp.rb +0 -109
  52. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/wrappers.rb +0 -90
  53. data/lib/google/cloud/vision/v1p3beta1/doc/google/rpc/status.rb +0 -84
  54. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/color.rb +0 -156
  55. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/latlng.rb +0 -65
  56. data/lib/google/cloud/vision/v1p3beta1/geometry_pb.rb +0 -43
  57. data/lib/google/cloud/vision/v1p3beta1/helpers.rb +0 -1154
  58. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client.rb +0 -302
  59. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client_config.json +0 -36
  60. data/lib/google/cloud/vision/v1p3beta1/image_annotator_pb.rb +0 -304
  61. data/lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb +0 -55
  62. data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +0 -1351
  63. data/lib/google/cloud/vision/v1p3beta1/product_search_client_config.json +0 -116
  64. data/lib/google/cloud/vision/v1p3beta1/product_search_pb.rb +0 -64
  65. data/lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb +0 -191
  66. data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +0 -222
  67. data/lib/google/cloud/vision/v1p3beta1/text_annotation_pb.rb +0 -94
  68. data/lib/google/cloud/vision/v1p3beta1/web_detection_pb.rb +0 -51
  69. data/lib/google/cloud/vision/v1p3beta1.rb +0 -233
@@ -1,88 +0,0 @@
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
- # 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 V1
20
- # Parameters for a product search request.
21
- # @!attribute [rw] bounding_poly
22
- # @return [Google::Cloud::Vision::V1::BoundingPoly]
23
- # The bounding polygon around the area of interest in the image.
24
- # Optional. If it is not specified, system discretion will be applied.
25
- # @!attribute [rw] product_set
26
- # @return [String]
27
- # The resource name of a {Google::Cloud::Vision::V1::ProductSet ProductSet} to be searched for similar images.
28
- #
29
- # Format is:
30
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
31
- # @!attribute [rw] product_categories
32
- # @return [Array<String>]
33
- # The list of product categories to search in. Currently, we only consider
34
- # the first category, and either "homegoods", "apparel", or "toys" should be
35
- # specified.
36
- # @!attribute [rw] filter
37
- # @return [String]
38
- # The filtering expression. This can be used to restrict search results based
39
- # on Product labels. We currently support an AND of OR of key-value
40
- # expressions, where each expression within an OR must have the same key.
41
- #
42
- # For example, "(color = red OR color = blue) AND brand = Google" is
43
- # acceptable, but not "(color = red OR brand = Google)" or "color: red".
44
- class ProductSearchParams; end
45
-
46
- # Results for a product search request.
47
- # @!attribute [rw] index_time
48
- # @return [Google::Protobuf::Timestamp]
49
- # Timestamp of the index which provided these results. Changes made after
50
- # this time are not reflected in the current results.
51
- # @!attribute [rw] results
52
- # @return [Array<Google::Cloud::Vision::V1::ProductSearchResults::Result>]
53
- # List of results, one for each product match.
54
- # @!attribute [rw] product_grouped_results
55
- # @return [Array<Google::Cloud::Vision::V1::ProductSearchResults::GroupedResult>]
56
- # List of results grouped by products detected in the query image. Each entry
57
- # corresponds to one bounding polygon in the query image, and contains the
58
- # matching products specific to that region. There may be duplicate product
59
- # matches in the union of all the per-product results.
60
- class ProductSearchResults
61
- # Information about a product.
62
- # @!attribute [rw] product
63
- # @return [Google::Cloud::Vision::V1::Product]
64
- # The Product.
65
- # @!attribute [rw] score
66
- # @return [Float]
67
- # A confidence level on the match, ranging from 0 (no confidence) to
68
- # 1 (full confidence).
69
- # @!attribute [rw] image
70
- # @return [String]
71
- # The resource name of the image from the product that is the closest match
72
- # to the query.
73
- class Result; end
74
-
75
- # Information about the products similar to a single product in a query
76
- # image.
77
- # @!attribute [rw] bounding_poly
78
- # @return [Google::Cloud::Vision::V1::BoundingPoly]
79
- # The bounding polygon around the product detected in the query image.
80
- # @!attribute [rw] results
81
- # @return [Array<Google::Cloud::Vision::V1::ProductSearchResults::Result>]
82
- # List of results, one for each product match.
83
- class GroupedResult; end
84
- end
85
- end
86
- end
87
- end
88
- end
@@ -1,539 +0,0 @@
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
- # 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 V1
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", "apparel", or "toys".
41
- #
42
- # This field is immutable.
43
- # @!attribute [rw] product_labels
44
- # @return [Array<Google::Cloud::Vision::V1::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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::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::V1::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 8 columns.
407
- #
408
- # 1. image-uri
409
- # 2. image-id
410
- # 3. product-set-id
411
- # 4. product-id
412
- # 5. product-category
413
- # 6. product-display-name
414
- # 7. labels
415
- # 8. bounding-poly
416
- #
417
- # The `image-uri`, `product-set-id`, `product-id`, and `product-category`
418
- # columns are required. All other columns are optional.
419
- #
420
- # If the `ProductSet` or `Product` specified by the `product-set-id` and
421
- # `product-id` values does not exist, then the system will create a new
422
- # `ProductSet` or `Product` for the image. In this case, the
423
- # `product-display-name` column refers to
424
- # {Google::Cloud::Vision::V1::Product#display_name display_name}, the
425
- # `product-category` column refers to
426
- # {Google::Cloud::Vision::V1::Product#product_category product_category}, and the
427
- # `labels` column refers to {Google::Cloud::Vision::V1::Product#product_labels product_labels}.
428
- #
429
- # The `image-id` column is optional but must be unique if provided. If it is
430
- # empty, the system will automatically assign a unique id to the image.
431
- #
432
- # The `product-display-name` column is optional. If it is empty, the system
433
- # sets the {Google::Cloud::Vision::V1::Product#display_name display_name} field for the product to a
434
- # space (" "). You can update the `display_name` later by using the API.
435
- #
436
- # If a `Product` with the specified `product-id` already exists, then the
437
- # system ignores the `product-display-name`, `product-category`, and `labels`
438
- # columns.
439
- #
440
- # The `labels` column (optional) is a line containing a list of
441
- # comma-separated key-value pairs, in the following format:
442
- #
443
- # "key_1=value_1,key_2=value_2,...,key_n=value_n"
444
- #
445
- # The `bounding-poly` column (optional) identifies one region of
446
- # interest from the image in the same manner as `CreateReferenceImage`. If
447
- # you do not specify the `bounding-poly` column, then the system will try to
448
- # detect regions of interest automatically.
449
- #
450
- # At most one `bounding-poly` column is allowed per line. If the image
451
- # contains multiple regions of interest, add a line to the CSV file that
452
- # includes the same product information, and the `bounding-poly` values for
453
- # each region of interest.
454
- #
455
- # The `bounding-poly` column must contain an even number of comma-separated
456
- # numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
457
- # non-negative integers for absolute bounding polygons, and float values
458
- # in [0, 1] for normalized bounding polygons.
459
- #
460
- # The system will resize the image if the image resolution is too
461
- # large to process (larger than 20MP).
462
- class ImportProductSetsGcsSource; end
463
-
464
- # The input content for the `ImportProductSets` method.
465
- # @!attribute [rw] gcs_source
466
- # @return [Google::Cloud::Vision::V1::ImportProductSetsGcsSource]
467
- # The Google Cloud Storage location for a csv file which preserves a list
468
- # of ImportProductSetRequests in each line.
469
- class ImportProductSetsInputConfig; end
470
-
471
- # Request message for the `ImportProductSets` method.
472
- # @!attribute [rw] parent
473
- # @return [String]
474
- # The project in which the ProductSets should be imported.
475
- #
476
- # Format is `projects/PROJECT_ID/locations/LOC_ID`.
477
- # @!attribute [rw] input_config
478
- # @return [Google::Cloud::Vision::V1::ImportProductSetsInputConfig]
479
- # The input content for the list of requests.
480
- class ImportProductSetsRequest; end
481
-
482
- # Response message for the `ImportProductSets` method.
483
- #
484
- # This message is returned by the
485
- # {Google::Longrunning::Operations::GetOperation} method in the returned
486
- # {Google::Longrunning::Operation#response} field.
487
- # @!attribute [rw] reference_images
488
- # @return [Array<Google::Cloud::Vision::V1::ReferenceImage>]
489
- # The list of reference_images that are imported successfully.
490
- # @!attribute [rw] statuses
491
- # @return [Array<Google::Rpc::Status>]
492
- # The rpc status for each ImportProductSet request, including both successes
493
- # and errors.
494
- #
495
- # The number of statuses here matches the number of lines in the csv file,
496
- # and statuses[i] stores the success or failure status of processing the i-th
497
- # line of the csv, starting from line 0.
498
- class ImportProductSetsResponse; end
499
-
500
- # Metadata for the batch operations such as the current state.
501
- #
502
- # This is included in the `metadata` field of the `Operation` returned by the
503
- # `GetOperation` call of the `google::longrunning::Operations` service.
504
- # @!attribute [rw] state
505
- # @return [Google::Cloud::Vision::V1::BatchOperationMetadata::State]
506
- # The current state of the batch operation.
507
- # @!attribute [rw] submit_time
508
- # @return [Google::Protobuf::Timestamp]
509
- # The time when the batch request was submitted to the server.
510
- # @!attribute [rw] end_time
511
- # @return [Google::Protobuf::Timestamp]
512
- # The time when the batch request is finished and
513
- # {Google::Longrunning::Operation#done} is set to true.
514
- class BatchOperationMetadata
515
- # Enumerates the possible states that the batch request can be in.
516
- module State
517
- # Invalid.
518
- STATE_UNSPECIFIED = 0
519
-
520
- # Request is actively being processed.
521
- PROCESSING = 1
522
-
523
- # The request is done and at least one item has been successfully
524
- # processed.
525
- SUCCESSFUL = 2
526
-
527
- # The request is done and no item has been successfully processed.
528
- FAILED = 3
529
-
530
- # The request is done after the longrunning.Operations.CancelOperation has
531
- # been called by the user. Any records that were processed before the
532
- # cancel command are output as specified in the request.
533
- CANCELLED = 4
534
- end
535
- end
536
- end
537
- end
538
- end
539
- end