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