google-cloud-vision 0.37.3 → 1.1.0

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 +201 -0
  5. data/MIGRATING.md +343 -0
  6. data/README.md +96 -51
  7. data/lib/{google/cloud/vision/v1/doc/google/protobuf/wrappers.rb → google-cloud-vision.rb} +4 -11
  8. data/lib/google/cloud/vision.rb +131 -214
  9. data/lib/google/cloud/vision/version.rb +6 -2
  10. metadata +75 -103
  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 -39
  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 -249
  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 -536
  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 -39
  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 -306
  63. data/lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb +0 -56
  64. data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +0 -1415
  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 -65
  67. data/lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb +0 -194
  68. data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +0 -223
  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 2020 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,536 +0,0 @@
1
- # Copyright 2020 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
- # Immutable. The category for the product identified by the reference image. This should
40
- # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories
41
- # "homegoods", "apparel", and "toys" are still supported, but these should
42
- # not be used for new products.
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
- # Required. The Google Cloud Storage URI of the reference image.
111
- #
112
- # The URI must start with `gs://`.
113
- # @!attribute [rw] bounding_polys
114
- # @return [Array<Google::Cloud::Vision::V1p3beta1::BoundingPoly>]
115
- # Optional. Bounding polygons around the areas of interest in the reference image.
116
- # If this field is empty, the system will try to detect regions of
117
- # interest. At most 10 bounding polygons will be used.
118
- #
119
- # The provided shape is converted into a non-rotated rectangle. Once
120
- # converted, the small edge of the rectangle must be greater than or equal
121
- # to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
122
- # is not).
123
- class ReferenceImage; end
124
-
125
- # Request message for the `CreateProduct` method.
126
- # @!attribute [rw] parent
127
- # @return [String]
128
- # Required. The project in which the Product should be created.
129
- #
130
- # Format is
131
- # `projects/PROJECT_ID/locations/LOC_ID`.
132
- # @!attribute [rw] product
133
- # @return [Google::Cloud::Vision::V1p3beta1::Product]
134
- # Required. The product to create.
135
- # @!attribute [rw] product_id
136
- # @return [String]
137
- # A user-supplied resource id for this Product. If set, the server will
138
- # attempt to use this value as the resource id. If it is already in use, an
139
- # error is returned with code ALREADY_EXISTS. Must be at most 128 characters
140
- # long. It cannot contain the character `/`.
141
- class CreateProductRequest; end
142
-
143
- # Request message for the `ListProducts` method.
144
- # @!attribute [rw] parent
145
- # @return [String]
146
- # Required. The project OR ProductSet from which Products should be listed.
147
- #
148
- # Format:
149
- # `projects/PROJECT_ID/locations/LOC_ID`
150
- # @!attribute [rw] page_size
151
- # @return [Integer]
152
- # The maximum number of items to return. Default 10, maximum 100.
153
- # @!attribute [rw] page_token
154
- # @return [String]
155
- # The next_page_token returned from a previous List request, if any.
156
- class ListProductsRequest; end
157
-
158
- # Response message for the `ListProducts` method.
159
- # @!attribute [rw] products
160
- # @return [Array<Google::Cloud::Vision::V1p3beta1::Product>]
161
- # List of products.
162
- # @!attribute [rw] next_page_token
163
- # @return [String]
164
- # Token to retrieve the next page of results, or empty if there are no more
165
- # results in the list.
166
- class ListProductsResponse; end
167
-
168
- # Request message for the `GetProduct` method.
169
- # @!attribute [rw] name
170
- # @return [String]
171
- # Required. Resource name of the Product to get.
172
- #
173
- # Format is:
174
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
175
- class GetProductRequest; end
176
-
177
- # Request message for the `UpdateProduct` method.
178
- # @!attribute [rw] product
179
- # @return [Google::Cloud::Vision::V1p3beta1::Product]
180
- # Required. The Product resource which replaces the one on the server.
181
- # product.name is immutable.
182
- # @!attribute [rw] update_mask
183
- # @return [Google::Protobuf::FieldMask]
184
- # The {Google::Protobuf::FieldMask FieldMask} that specifies which fields
185
- # to update.
186
- # If update_mask isn't specified, all mutable fields are to be updated.
187
- # Valid mask paths include `product_labels`, `display_name`, and
188
- # `description`.
189
- class UpdateProductRequest; end
190
-
191
- # Request message for the `DeleteProduct` method.
192
- # @!attribute [rw] name
193
- # @return [String]
194
- # Required. Resource name of product to delete.
195
- #
196
- # Format is:
197
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
198
- class DeleteProductRequest; end
199
-
200
- # Request message for the `CreateProductSet` method.
201
- # @!attribute [rw] parent
202
- # @return [String]
203
- # Required. The project in which the ProductSet should be created.
204
- #
205
- # Format is `projects/PROJECT_ID/locations/LOC_ID`.
206
- # @!attribute [rw] product_set
207
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSet]
208
- # Required. The ProductSet to create.
209
- # @!attribute [rw] product_set_id
210
- # @return [String]
211
- # A user-supplied resource id for this ProductSet. If set, the server will
212
- # attempt to use this value as the resource id. If it is already in use, an
213
- # error is returned with code ALREADY_EXISTS. Must be at most 128 characters
214
- # long. It cannot contain the character `/`.
215
- class CreateProductSetRequest; end
216
-
217
- # Request message for the `ListProductSets` method.
218
- # @!attribute [rw] parent
219
- # @return [String]
220
- # Required. The project from which ProductSets should be listed.
221
- #
222
- # Format is `projects/PROJECT_ID/locations/LOC_ID`.
223
- # @!attribute [rw] page_size
224
- # @return [Integer]
225
- # The maximum number of items to return. Default 10, maximum 100.
226
- # @!attribute [rw] page_token
227
- # @return [String]
228
- # The next_page_token returned from a previous List request, if any.
229
- class ListProductSetsRequest; end
230
-
231
- # Response message for the `ListProductSets` method.
232
- # @!attribute [rw] product_sets
233
- # @return [Array<Google::Cloud::Vision::V1p3beta1::ProductSet>]
234
- # List of ProductSets.
235
- # @!attribute [rw] next_page_token
236
- # @return [String]
237
- # Token to retrieve the next page of results, or empty if there are no more
238
- # results in the list.
239
- class ListProductSetsResponse; end
240
-
241
- # Request message for the `GetProductSet` method.
242
- # @!attribute [rw] name
243
- # @return [String]
244
- # Required. Resource name of the ProductSet to get.
245
- #
246
- # Format is:
247
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
248
- class GetProductSetRequest; end
249
-
250
- # Request message for the `UpdateProductSet` method.
251
- # @!attribute [rw] product_set
252
- # @return [Google::Cloud::Vision::V1p3beta1::ProductSet]
253
- # Required. The ProductSet resource which replaces the one on the server.
254
- # @!attribute [rw] update_mask
255
- # @return [Google::Protobuf::FieldMask]
256
- # The {Google::Protobuf::FieldMask FieldMask} that specifies which fields to
257
- # update.
258
- # If update_mask isn't specified, all mutable fields are to be updated.
259
- # Valid mask path is `display_name`.
260
- class UpdateProductSetRequest; end
261
-
262
- # Request message for the `DeleteProductSet` method.
263
- # @!attribute [rw] name
264
- # @return [String]
265
- # Required. Resource name of the ProductSet to delete.
266
- #
267
- # Format is:
268
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
269
- class DeleteProductSetRequest; end
270
-
271
- # Request message for the `CreateReferenceImage` method.
272
- # @!attribute [rw] parent
273
- # @return [String]
274
- # Required. Resource name of the product in which to create the reference image.
275
- #
276
- # Format is
277
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
278
- # @!attribute [rw] reference_image
279
- # @return [Google::Cloud::Vision::V1p3beta1::ReferenceImage]
280
- # Required. The reference image to create.
281
- # If an image ID is specified, it is ignored.
282
- # @!attribute [rw] reference_image_id
283
- # @return [String]
284
- # A user-supplied resource id for the ReferenceImage to be added. If set,
285
- # the server will attempt to use this value as the resource id. If it is
286
- # already in use, an error is returned with code ALREADY_EXISTS. Must be at
287
- # most 128 characters long. It cannot contain the character `/`.
288
- class CreateReferenceImageRequest; end
289
-
290
- # Request message for the `ListReferenceImages` method.
291
- # @!attribute [rw] parent
292
- # @return [String]
293
- # Required. Resource name of the product containing the reference images.
294
- #
295
- # Format is
296
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
297
- # @!attribute [rw] page_size
298
- # @return [Integer]
299
- # The maximum number of items to return. Default 10, maximum 100.
300
- # @!attribute [rw] page_token
301
- # @return [String]
302
- # A token identifying a page of results to be returned. This is the value
303
- # of `nextPageToken` returned in a previous reference image list request.
304
- #
305
- # Defaults to the first page if not specified.
306
- class ListReferenceImagesRequest; end
307
-
308
- # Response message for the `ListReferenceImages` method.
309
- # @!attribute [rw] reference_images
310
- # @return [Array<Google::Cloud::Vision::V1p3beta1::ReferenceImage>]
311
- # The list of reference images.
312
- # @!attribute [rw] page_size
313
- # @return [Integer]
314
- # The maximum number of items to return. Default 10, maximum 100.
315
- # @!attribute [rw] next_page_token
316
- # @return [String]
317
- # The next_page_token returned from a previous List request, if any.
318
- class ListReferenceImagesResponse; end
319
-
320
- # Request message for the `GetReferenceImage` method.
321
- # @!attribute [rw] name
322
- # @return [String]
323
- # Required. The resource name of the ReferenceImage to get.
324
- #
325
- # Format is:
326
- #
327
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.
328
- class GetReferenceImageRequest; end
329
-
330
- # Request message for the `DeleteReferenceImage` method.
331
- # @!attribute [rw] name
332
- # @return [String]
333
- # Required. The resource name of the reference image to delete.
334
- #
335
- # Format is:
336
- #
337
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`
338
- class DeleteReferenceImageRequest; end
339
-
340
- # Request message for the `AddProductToProductSet` method.
341
- # @!attribute [rw] name
342
- # @return [String]
343
- # Required. The resource name for the ProductSet to modify.
344
- #
345
- # Format is:
346
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
347
- # @!attribute [rw] product
348
- # @return [String]
349
- # Required. The resource name for the Product to be added to this ProductSet.
350
- #
351
- # Format is:
352
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
353
- class AddProductToProductSetRequest; end
354
-
355
- # Request message for the `RemoveProductFromProductSet` method.
356
- # @!attribute [rw] name
357
- # @return [String]
358
- # Required. The resource name for the ProductSet to modify.
359
- #
360
- # Format is:
361
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
362
- # @!attribute [rw] product
363
- # @return [String]
364
- # Required. The resource name for the Product to be removed from this ProductSet.
365
- #
366
- # Format is:
367
- # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
368
- class RemoveProductFromProductSetRequest; end
369
-
370
- # Request message for the `ListProductsInProductSet` method.
371
- # @!attribute [rw] name
372
- # @return [String]
373
- # Required. The ProductSet resource for which to retrieve Products.
374
- #
375
- # Format is:
376
- # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`
377
- # @!attribute [rw] page_size
378
- # @return [Integer]
379
- # The maximum number of items to return. Default 10, maximum 100.
380
- # @!attribute [rw] page_token
381
- # @return [String]
382
- # The next_page_token returned from a previous List request, if any.
383
- class ListProductsInProductSetRequest; end
384
-
385
- # Response message for the `ListProductsInProductSet` method.
386
- # @!attribute [rw] products
387
- # @return [Array<Google::Cloud::Vision::V1p3beta1::Product>]
388
- # The list of Products.
389
- # @!attribute [rw] next_page_token
390
- # @return [String]
391
- # Token to retrieve the next page of results, or empty if there are no more
392
- # results in the list.
393
- class ListProductsInProductSetResponse; end
394
-
395
- # The Google Cloud Storage location for a csv file which preserves a list of
396
- # ImportProductSetRequests in each line.
397
- # @!attribute [rw] csv_file_uri
398
- # @return [String]
399
- # The Google Cloud Storage URI of the input csv file.
400
- #
401
- # The URI must start with `gs://`.
402
- #
403
- # The format of the input csv file should be one image per line.
404
- # In each line, there are 6 columns.
405
- # 1. image_uri
406
- # 2, image_id
407
- # 3. product_set_id
408
- # 4. product_id
409
- # 5, product_category
410
- # 6, product_display_name
411
- # 7, labels
412
- # 8. bounding_poly
413
- #
414
- # Columns 1, 3, 4, and 5 are required, other columns are optional. A new
415
- # ProductSet/Product with the same id will be created on the fly
416
- # if the ProductSet/Product specified by product_set_id/product_id does not
417
- # exist.
418
- #
419
- # The image_id field is optional but has to be unique if provided. If it is
420
- # empty, we will automatically assign an unique id to the image.
421
- #
422
- # The product_display_name field is optional. If it is empty, a space (" ")
423
- # is used as the place holder for the product display_name, which can
424
- # be updated later through the realtime API.
425
- #
426
- # If the Product with product_id already exists, the fields
427
- # product_display_name, product_category and labels are ignored.
428
- #
429
- # If a Product doesn't exist and needs to be created on the fly, the
430
- # product_display_name field refers to
431
- # {Google::Cloud::Vision::V1p3beta1::Product#display_name Product#display_name},
432
- # the product_category field refers to
433
- # {Google::Cloud::Vision::V1p3beta1::Product#product_category Product#product_category},
434
- # and the labels field refers to {Product#labels}.
435
- #
436
- # Labels (optional) should be a line containing a list of comma-separated
437
- # key-value pairs, with the format
438
- # "key_1=value_1,key_2=value_2,...,key_n=value_n".
439
- #
440
- # The bounding_poly (optional) field is used to identify one region of
441
- # interest from the image in the same manner as CreateReferenceImage. If no
442
- # bounding_poly is specified, the system will try to detect regions of
443
- # interest automatically.
444
- #
445
- # Note that the pipeline will resize the image if the image resolution is too
446
- # large to process (above 20MP).
447
- #
448
- # Also note that at most one bounding_poly is allowed per line. If the image
449
- # contains multiple regions of interest, the csv should contain one line per
450
- # region of interest.
451
- #
452
- # The bounding_poly column should contain an even number of comma-separated
453
- # numbers, with the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Nonnegative
454
- # integers should be used for absolute bounding polygons, and float values
455
- # in [0, 1] should be used for normalized bounding polygons.
456
- class ImportProductSetsGcsSource; end
457
-
458
- # The input content for the `ImportProductSets` method.
459
- # @!attribute [rw] gcs_source
460
- # @return [Google::Cloud::Vision::V1p3beta1::ImportProductSetsGcsSource]
461
- # The Google Cloud Storage location for a csv file which preserves a list
462
- # of ImportProductSetRequests in each line.
463
- class ImportProductSetsInputConfig; end
464
-
465
- # Request message for the `ImportProductSets` method.
466
- # @!attribute [rw] parent
467
- # @return [String]
468
- # Required. The project in which the ProductSets should be imported.
469
- #
470
- # Format is `projects/PROJECT_ID/locations/LOC_ID`.
471
- # @!attribute [rw] input_config
472
- # @return [Google::Cloud::Vision::V1p3beta1::ImportProductSetsInputConfig]
473
- # Required. The input content for the list of requests.
474
- class ImportProductSetsRequest; end
475
-
476
- # Response message for the `ImportProductSets` method.
477
- #
478
- # This message is returned by the
479
- # {Google::Longrunning::Operations::GetOperation}
480
- # method in the returned
481
- # {Google::Longrunning::Operation#response}
482
- # field.
483
- # @!attribute [rw] reference_images
484
- # @return [Array<Google::Cloud::Vision::V1p3beta1::ReferenceImage>]
485
- # The list of reference_images that are imported successfully.
486
- # @!attribute [rw] statuses
487
- # @return [Array<Google::Rpc::Status>]
488
- # The rpc status for each ImportProductSet request, including both successes
489
- # and errors.
490
- #
491
- # The number of statuses here matches the number of lines in the csv file,
492
- # and statuses[i] stores the success or failure status of processing the i-th
493
- # line of the csv, starting from line 0.
494
- class ImportProductSetsResponse; end
495
-
496
- # Metadata for the batch operations such as the current state.
497
- #
498
- # This is included in the `metadata` field of the `Operation` returned by the
499
- # `GetOperation` call of the `google::longrunning::Operations` service.
500
- # @!attribute [rw] state
501
- # @return [Google::Cloud::Vision::V1p3beta1::BatchOperationMetadata::State]
502
- # The current state of the batch operation.
503
- # @!attribute [rw] submit_time
504
- # @return [Google::Protobuf::Timestamp]
505
- # The time when the batch request was submitted to the server.
506
- # @!attribute [rw] end_time
507
- # @return [Google::Protobuf::Timestamp]
508
- # The time when the batch request is finished and
509
- # {Google::Longrunning::Operation#done} is
510
- # set to true.
511
- class BatchOperationMetadata
512
- # Enumerates the possible states that the batch request can be in.
513
- module State
514
- # Invalid.
515
- STATE_UNSPECIFIED = 0
516
-
517
- # Request is actively being processed.
518
- PROCESSING = 1
519
-
520
- # The request is done and at least one item has been successfully
521
- # processed.
522
- SUCCESSFUL = 2
523
-
524
- # The request is done and no item has been successfully processed.
525
- FAILED = 3
526
-
527
- # The request is done after the longrunning.Operations.CancelOperation has
528
- # been called by the user. Any records that were processed before the
529
- # cancel command are output as specified in the request.
530
- CANCELLED = 4
531
- end
532
- end
533
- end
534
- end
535
- end
536
- end