google-cloud-vision-v1p4beta1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google/cloud/vision/v1p4beta1/face_pb.rb +35 -0
- data/lib/google/cloud/vision/v1p4beta1/geometry_pb.rb +40 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/client.rb +629 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/credentials.rb +52 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/helpers.rb +1228 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/operations.rb +664 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator/paths.rb +52 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator.rb +52 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator_pb.rb +343 -0
- data/lib/google/cloud/vision/v1p4beta1/image_annotator_services_pb.rb +73 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search/client.rb +2106 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search/credentials.rb +52 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search/operations.rb +664 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search/paths.rb +109 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search.rb +67 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search_pb.rb +55 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search_service_pb.rb +208 -0
- data/lib/google/cloud/vision/v1p4beta1/product_search_service_services_pb.rb +236 -0
- data/lib/google/cloud/vision/v1p4beta1/text_annotation_pb.rb +95 -0
- data/lib/google/cloud/vision/v1p4beta1/version.rb +28 -0
- data/lib/google/cloud/vision/v1p4beta1/web_detection_pb.rb +52 -0
- data/lib/google/cloud/vision/v1p4beta1.rb +39 -0
- data/lib/google-cloud-vision-v1p4beta1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/vision/v1p4beta1/face.rb +68 -0
- data/proto_docs/google/cloud/vision/v1p4beta1/geometry.rb +82 -0
- data/proto_docs/google/cloud/vision/v1p4beta1/image_annotator.rb +989 -0
- data/proto_docs/google/cloud/vision/v1p4beta1/product_search.rb +136 -0
- data/proto_docs/google/cloud/vision/v1p4beta1/product_search_service.rb +676 -0
- data/proto_docs/google/cloud/vision/v1p4beta1/text_annotation.rb +286 -0
- data/proto_docs/google/cloud/vision/v1p4beta1/web_detection.rb +121 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/color.rb +173 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- metadata +240 -0
@@ -0,0 +1,236 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/vision/v1p4beta1/product_search_service.proto for package 'google.cloud.vision.v1p4beta1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2019 Google LLC.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'grpc'
|
21
|
+
require 'google/cloud/vision/v1p4beta1/product_search_service_pb'
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Vision
|
26
|
+
module V1p4beta1
|
27
|
+
module ProductSearch
|
28
|
+
# Manages Products and ProductSets of reference images for use in product
|
29
|
+
# search. It uses the following resource model:
|
30
|
+
#
|
31
|
+
# - The API has a collection of
|
32
|
+
# [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named
|
33
|
+
# `projects/*/locations/*/productSets/*`, which acts as a way to put different
|
34
|
+
# products into groups to limit identification.
|
35
|
+
#
|
36
|
+
# In parallel,
|
37
|
+
#
|
38
|
+
# - The API has a collection of
|
39
|
+
# [Product][google.cloud.vision.v1p4beta1.Product] resources, named
|
40
|
+
# `projects/*/locations/*/products/*`
|
41
|
+
#
|
42
|
+
# - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of
|
43
|
+
# [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources,
|
44
|
+
# named
|
45
|
+
# `projects/*/locations/*/products/*/referenceImages/*`
|
46
|
+
class Service
|
47
|
+
|
48
|
+
include ::GRPC::GenericService
|
49
|
+
|
50
|
+
self.marshal_class_method = :encode
|
51
|
+
self.unmarshal_class_method = :decode
|
52
|
+
self.service_name = 'google.cloud.vision.v1p4beta1.ProductSearch'
|
53
|
+
|
54
|
+
# Creates and returns a new ProductSet resource.
|
55
|
+
#
|
56
|
+
# Possible errors:
|
57
|
+
#
|
58
|
+
# * Returns INVALID_ARGUMENT if display_name is missing, or is longer than
|
59
|
+
# 4096 characters.
|
60
|
+
rpc :CreateProductSet, ::Google::Cloud::Vision::V1p4beta1::CreateProductSetRequest, ::Google::Cloud::Vision::V1p4beta1::ProductSet
|
61
|
+
# Lists ProductSets in an unspecified order.
|
62
|
+
#
|
63
|
+
# Possible errors:
|
64
|
+
#
|
65
|
+
# * Returns INVALID_ARGUMENT if page_size is greater than 100, or less
|
66
|
+
# than 1.
|
67
|
+
rpc :ListProductSets, ::Google::Cloud::Vision::V1p4beta1::ListProductSetsRequest, ::Google::Cloud::Vision::V1p4beta1::ListProductSetsResponse
|
68
|
+
# Gets information associated with a ProductSet.
|
69
|
+
#
|
70
|
+
# Possible errors:
|
71
|
+
#
|
72
|
+
# * Returns NOT_FOUND if the ProductSet does not exist.
|
73
|
+
rpc :GetProductSet, ::Google::Cloud::Vision::V1p4beta1::GetProductSetRequest, ::Google::Cloud::Vision::V1p4beta1::ProductSet
|
74
|
+
# Makes changes to a ProductSet resource.
|
75
|
+
# Only display_name can be updated currently.
|
76
|
+
#
|
77
|
+
# Possible errors:
|
78
|
+
#
|
79
|
+
# * Returns NOT_FOUND if the ProductSet does not exist.
|
80
|
+
# * Returns INVALID_ARGUMENT if display_name is present in update_mask but
|
81
|
+
# missing from the request or longer than 4096 characters.
|
82
|
+
rpc :UpdateProductSet, ::Google::Cloud::Vision::V1p4beta1::UpdateProductSetRequest, ::Google::Cloud::Vision::V1p4beta1::ProductSet
|
83
|
+
# Permanently deletes a ProductSet. Products and ReferenceImages in the
|
84
|
+
# ProductSet are not deleted.
|
85
|
+
#
|
86
|
+
# The actual image files are not deleted from Google Cloud Storage.
|
87
|
+
rpc :DeleteProductSet, ::Google::Cloud::Vision::V1p4beta1::DeleteProductSetRequest, ::Google::Protobuf::Empty
|
88
|
+
# Creates and returns a new product resource.
|
89
|
+
#
|
90
|
+
# Possible errors:
|
91
|
+
#
|
92
|
+
# * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
|
93
|
+
# characters.
|
94
|
+
# * Returns INVALID_ARGUMENT if description is longer than 4096 characters.
|
95
|
+
# * Returns INVALID_ARGUMENT if product_category is missing or invalid.
|
96
|
+
rpc :CreateProduct, ::Google::Cloud::Vision::V1p4beta1::CreateProductRequest, ::Google::Cloud::Vision::V1p4beta1::Product
|
97
|
+
# Lists products in an unspecified order.
|
98
|
+
#
|
99
|
+
# Possible errors:
|
100
|
+
#
|
101
|
+
# * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
|
102
|
+
rpc :ListProducts, ::Google::Cloud::Vision::V1p4beta1::ListProductsRequest, ::Google::Cloud::Vision::V1p4beta1::ListProductsResponse
|
103
|
+
# Gets information associated with a Product.
|
104
|
+
#
|
105
|
+
# Possible errors:
|
106
|
+
#
|
107
|
+
# * Returns NOT_FOUND if the Product does not exist.
|
108
|
+
rpc :GetProduct, ::Google::Cloud::Vision::V1p4beta1::GetProductRequest, ::Google::Cloud::Vision::V1p4beta1::Product
|
109
|
+
# Makes changes to a Product resource.
|
110
|
+
# Only the `display_name`, `description`, and `labels` fields can be updated
|
111
|
+
# right now.
|
112
|
+
#
|
113
|
+
# If labels are updated, the change will not be reflected in queries until
|
114
|
+
# the next index time.
|
115
|
+
#
|
116
|
+
# Possible errors:
|
117
|
+
#
|
118
|
+
# * Returns NOT_FOUND if the Product does not exist.
|
119
|
+
# * Returns INVALID_ARGUMENT if display_name is present in update_mask but is
|
120
|
+
# missing from the request or longer than 4096 characters.
|
121
|
+
# * Returns INVALID_ARGUMENT if description is present in update_mask but is
|
122
|
+
# longer than 4096 characters.
|
123
|
+
# * Returns INVALID_ARGUMENT if product_category is present in update_mask.
|
124
|
+
rpc :UpdateProduct, ::Google::Cloud::Vision::V1p4beta1::UpdateProductRequest, ::Google::Cloud::Vision::V1p4beta1::Product
|
125
|
+
# Permanently deletes a product and its reference images.
|
126
|
+
#
|
127
|
+
# Metadata of the product and all its images will be deleted right away, but
|
128
|
+
# search queries against ProductSets containing the product may still work
|
129
|
+
# until all related caches are refreshed.
|
130
|
+
rpc :DeleteProduct, ::Google::Cloud::Vision::V1p4beta1::DeleteProductRequest, ::Google::Protobuf::Empty
|
131
|
+
# Creates and returns a new ReferenceImage resource.
|
132
|
+
#
|
133
|
+
# The `bounding_poly` field is optional. If `bounding_poly` is not specified,
|
134
|
+
# the system will try to detect regions of interest in the image that are
|
135
|
+
# compatible with the product_category on the parent product. If it is
|
136
|
+
# specified, detection is ALWAYS skipped. The system converts polygons into
|
137
|
+
# non-rotated rectangles.
|
138
|
+
#
|
139
|
+
# Note that the pipeline will resize the image if the image resolution is too
|
140
|
+
# large to process (above 50MP).
|
141
|
+
#
|
142
|
+
# Possible errors:
|
143
|
+
#
|
144
|
+
# * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
|
145
|
+
# characters.
|
146
|
+
# * Returns INVALID_ARGUMENT if the product does not exist.
|
147
|
+
# * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
|
148
|
+
# compatible with the parent product's product_category is detected.
|
149
|
+
# * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
|
150
|
+
rpc :CreateReferenceImage, ::Google::Cloud::Vision::V1p4beta1::CreateReferenceImageRequest, ::Google::Cloud::Vision::V1p4beta1::ReferenceImage
|
151
|
+
# Permanently deletes a reference image.
|
152
|
+
#
|
153
|
+
# The image metadata will be deleted right away, but search queries
|
154
|
+
# against ProductSets containing the image may still work until all related
|
155
|
+
# caches are refreshed.
|
156
|
+
#
|
157
|
+
# The actual image files are not deleted from Google Cloud Storage.
|
158
|
+
rpc :DeleteReferenceImage, ::Google::Cloud::Vision::V1p4beta1::DeleteReferenceImageRequest, ::Google::Protobuf::Empty
|
159
|
+
# Lists reference images.
|
160
|
+
#
|
161
|
+
# Possible errors:
|
162
|
+
#
|
163
|
+
# * Returns NOT_FOUND if the parent product does not exist.
|
164
|
+
# * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less
|
165
|
+
# than 1.
|
166
|
+
rpc :ListReferenceImages, ::Google::Cloud::Vision::V1p4beta1::ListReferenceImagesRequest, ::Google::Cloud::Vision::V1p4beta1::ListReferenceImagesResponse
|
167
|
+
# Gets information associated with a ReferenceImage.
|
168
|
+
#
|
169
|
+
# Possible errors:
|
170
|
+
#
|
171
|
+
# * Returns NOT_FOUND if the specified image does not exist.
|
172
|
+
rpc :GetReferenceImage, ::Google::Cloud::Vision::V1p4beta1::GetReferenceImageRequest, ::Google::Cloud::Vision::V1p4beta1::ReferenceImage
|
173
|
+
# Adds a Product to the specified ProductSet. If the Product is already
|
174
|
+
# present, no change is made.
|
175
|
+
#
|
176
|
+
# One Product can be added to at most 100 ProductSets.
|
177
|
+
#
|
178
|
+
# Possible errors:
|
179
|
+
#
|
180
|
+
# * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
|
181
|
+
rpc :AddProductToProductSet, ::Google::Cloud::Vision::V1p4beta1::AddProductToProductSetRequest, ::Google::Protobuf::Empty
|
182
|
+
# Removes a Product from the specified ProductSet.
|
183
|
+
rpc :RemoveProductFromProductSet, ::Google::Cloud::Vision::V1p4beta1::RemoveProductFromProductSetRequest, ::Google::Protobuf::Empty
|
184
|
+
# Lists the Products in a ProductSet, in an unspecified order. If the
|
185
|
+
# ProductSet does not exist, the products field of the response will be
|
186
|
+
# empty.
|
187
|
+
#
|
188
|
+
# Possible errors:
|
189
|
+
#
|
190
|
+
# * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
|
191
|
+
rpc :ListProductsInProductSet, ::Google::Cloud::Vision::V1p4beta1::ListProductsInProductSetRequest, ::Google::Cloud::Vision::V1p4beta1::ListProductsInProductSetResponse
|
192
|
+
# Asynchronous API that imports a list of reference images to specified
|
193
|
+
# product sets based on a list of image information.
|
194
|
+
#
|
195
|
+
# The [google.longrunning.Operation][google.longrunning.Operation] API can be
|
196
|
+
# used to keep track of the progress and results of the request.
|
197
|
+
# `Operation.metadata` contains `BatchOperationMetadata`. (progress)
|
198
|
+
# `Operation.response` contains `ImportProductSetsResponse`. (results)
|
199
|
+
#
|
200
|
+
# The input source of this method is a csv file on Google Cloud Storage.
|
201
|
+
# For the format of the csv file please see
|
202
|
+
# [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].
|
203
|
+
rpc :ImportProductSets, ::Google::Cloud::Vision::V1p4beta1::ImportProductSetsRequest, ::Google::Longrunning::Operation
|
204
|
+
# Asynchronous API to delete all Products in a ProductSet or all Products
|
205
|
+
# that are in no ProductSet.
|
206
|
+
#
|
207
|
+
# If a Product is a member of the specified ProductSet in addition to other
|
208
|
+
# ProductSets, the Product will still be deleted.
|
209
|
+
#
|
210
|
+
# It is recommended to not delete the specified ProductSet until after this
|
211
|
+
# operation has completed. It is also recommended to not add any of the
|
212
|
+
# Products involved in the batch delete to a new ProductSet while this
|
213
|
+
# operation is running because those Products may still end up deleted.
|
214
|
+
#
|
215
|
+
# It's not possible to undo the PurgeProducts operation. Therefore, it is
|
216
|
+
# recommended to keep the csv files used in ImportProductSets (if that was
|
217
|
+
# how you originally built the Product Set) before starting PurgeProducts, in
|
218
|
+
# case you need to re-import the data after deletion.
|
219
|
+
#
|
220
|
+
# If the plan is to purge all of the Products from a ProductSet and then
|
221
|
+
# re-use the empty ProductSet to re-import new Products into the empty
|
222
|
+
# ProductSet, you must wait until the PurgeProducts operation has finished
|
223
|
+
# for that ProductSet.
|
224
|
+
#
|
225
|
+
# The [google.longrunning.Operation][google.longrunning.Operation] API can be
|
226
|
+
# used to keep track of the progress and results of the request.
|
227
|
+
# `Operation.metadata` contains `BatchOperationMetadata`. (progress)
|
228
|
+
rpc :PurgeProducts, ::Google::Cloud::Vision::V1p4beta1::PurgeProductsRequest, ::Google::Longrunning::Operation
|
229
|
+
end
|
230
|
+
|
231
|
+
Stub = Service.rpc_stub_class
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/vision/v1p4beta1/text_annotation.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/cloud/vision/v1p4beta1/geometry_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("google/cloud/vision/v1p4beta1/text_annotation.proto", :syntax => :proto3) do
|
10
|
+
add_message "google.cloud.vision.v1p4beta1.TextAnnotation" do
|
11
|
+
repeated :pages, :message, 1, "google.cloud.vision.v1p4beta1.Page"
|
12
|
+
optional :text, :string, 2
|
13
|
+
end
|
14
|
+
add_message "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage" do
|
15
|
+
optional :language_code, :string, 1
|
16
|
+
optional :confidence, :float, 2
|
17
|
+
end
|
18
|
+
add_message "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak" do
|
19
|
+
optional :type, :enum, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType"
|
20
|
+
optional :is_prefix, :bool, 2
|
21
|
+
end
|
22
|
+
add_enum "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType" do
|
23
|
+
value :UNKNOWN, 0
|
24
|
+
value :SPACE, 1
|
25
|
+
value :SURE_SPACE, 2
|
26
|
+
value :EOL_SURE_SPACE, 3
|
27
|
+
value :HYPHEN, 4
|
28
|
+
value :LINE_BREAK, 5
|
29
|
+
end
|
30
|
+
add_message "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty" do
|
31
|
+
repeated :detected_languages, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage"
|
32
|
+
optional :detected_break, :message, 2, "google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak"
|
33
|
+
end
|
34
|
+
add_message "google.cloud.vision.v1p4beta1.Page" do
|
35
|
+
optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
|
36
|
+
optional :width, :int32, 2
|
37
|
+
optional :height, :int32, 3
|
38
|
+
repeated :blocks, :message, 4, "google.cloud.vision.v1p4beta1.Block"
|
39
|
+
optional :confidence, :float, 5
|
40
|
+
end
|
41
|
+
add_message "google.cloud.vision.v1p4beta1.Block" do
|
42
|
+
optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
|
43
|
+
optional :bounding_box, :message, 2, "google.cloud.vision.v1p4beta1.BoundingPoly"
|
44
|
+
repeated :paragraphs, :message, 3, "google.cloud.vision.v1p4beta1.Paragraph"
|
45
|
+
optional :block_type, :enum, 4, "google.cloud.vision.v1p4beta1.Block.BlockType"
|
46
|
+
optional :confidence, :float, 5
|
47
|
+
end
|
48
|
+
add_enum "google.cloud.vision.v1p4beta1.Block.BlockType" do
|
49
|
+
value :UNKNOWN, 0
|
50
|
+
value :TEXT, 1
|
51
|
+
value :TABLE, 2
|
52
|
+
value :PICTURE, 3
|
53
|
+
value :RULER, 4
|
54
|
+
value :BARCODE, 5
|
55
|
+
end
|
56
|
+
add_message "google.cloud.vision.v1p4beta1.Paragraph" do
|
57
|
+
optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
|
58
|
+
optional :bounding_box, :message, 2, "google.cloud.vision.v1p4beta1.BoundingPoly"
|
59
|
+
repeated :words, :message, 3, "google.cloud.vision.v1p4beta1.Word"
|
60
|
+
optional :confidence, :float, 4
|
61
|
+
end
|
62
|
+
add_message "google.cloud.vision.v1p4beta1.Word" do
|
63
|
+
optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
|
64
|
+
optional :bounding_box, :message, 2, "google.cloud.vision.v1p4beta1.BoundingPoly"
|
65
|
+
repeated :symbols, :message, 3, "google.cloud.vision.v1p4beta1.Symbol"
|
66
|
+
optional :confidence, :float, 4
|
67
|
+
end
|
68
|
+
add_message "google.cloud.vision.v1p4beta1.Symbol" do
|
69
|
+
optional :property, :message, 1, "google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty"
|
70
|
+
optional :bounding_box, :message, 2, "google.cloud.vision.v1p4beta1.BoundingPoly"
|
71
|
+
optional :text, :string, 3
|
72
|
+
optional :confidence, :float, 4
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
module Google
|
78
|
+
module Cloud
|
79
|
+
module Vision
|
80
|
+
module V1p4beta1
|
81
|
+
TextAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.TextAnnotation").msgclass
|
82
|
+
TextAnnotation::DetectedLanguage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage").msgclass
|
83
|
+
TextAnnotation::DetectedBreak = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak").msgclass
|
84
|
+
TextAnnotation::DetectedBreak::BreakType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType").enummodule
|
85
|
+
TextAnnotation::TextProperty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty").msgclass
|
86
|
+
Page = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Page").msgclass
|
87
|
+
Block = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Block").msgclass
|
88
|
+
Block::BlockType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Block.BlockType").enummodule
|
89
|
+
Paragraph = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Paragraph").msgclass
|
90
|
+
Word = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Word").msgclass
|
91
|
+
Symbol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Symbol").msgclass
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Vision
|
23
|
+
module V1p4beta1
|
24
|
+
VERSION = "0.1.0"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/vision/v1p4beta1/web_detection.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("google/cloud/vision/v1p4beta1/web_detection.proto", :syntax => :proto3) do
|
9
|
+
add_message "google.cloud.vision.v1p4beta1.WebDetection" do
|
10
|
+
repeated :web_entities, :message, 1, "google.cloud.vision.v1p4beta1.WebDetection.WebEntity"
|
11
|
+
repeated :full_matching_images, :message, 2, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
|
12
|
+
repeated :partial_matching_images, :message, 3, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
|
13
|
+
repeated :pages_with_matching_images, :message, 4, "google.cloud.vision.v1p4beta1.WebDetection.WebPage"
|
14
|
+
repeated :visually_similar_images, :message, 6, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
|
15
|
+
repeated :best_guess_labels, :message, 8, "google.cloud.vision.v1p4beta1.WebDetection.WebLabel"
|
16
|
+
end
|
17
|
+
add_message "google.cloud.vision.v1p4beta1.WebDetection.WebEntity" do
|
18
|
+
optional :entity_id, :string, 1
|
19
|
+
optional :score, :float, 2
|
20
|
+
optional :description, :string, 3
|
21
|
+
end
|
22
|
+
add_message "google.cloud.vision.v1p4beta1.WebDetection.WebImage" do
|
23
|
+
optional :url, :string, 1
|
24
|
+
optional :score, :float, 2
|
25
|
+
end
|
26
|
+
add_message "google.cloud.vision.v1p4beta1.WebDetection.WebPage" do
|
27
|
+
optional :url, :string, 1
|
28
|
+
optional :score, :float, 2
|
29
|
+
optional :page_title, :string, 3
|
30
|
+
repeated :full_matching_images, :message, 4, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
|
31
|
+
repeated :partial_matching_images, :message, 5, "google.cloud.vision.v1p4beta1.WebDetection.WebImage"
|
32
|
+
end
|
33
|
+
add_message "google.cloud.vision.v1p4beta1.WebDetection.WebLabel" do
|
34
|
+
optional :label, :string, 1
|
35
|
+
optional :language_code, :string, 2
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
module Google
|
41
|
+
module Cloud
|
42
|
+
module Vision
|
43
|
+
module V1p4beta1
|
44
|
+
WebDetection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.WebDetection").msgclass
|
45
|
+
WebDetection::WebEntity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.WebDetection.WebEntity").msgclass
|
46
|
+
WebDetection::WebImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.WebDetection.WebImage").msgclass
|
47
|
+
WebDetection::WebPage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.WebDetection.WebPage").msgclass
|
48
|
+
WebDetection::WebLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.WebDetection.WebLabel").msgclass
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/vision/v1p4beta1/product_search"
|
20
|
+
require "google/cloud/vision/v1p4beta1/image_annotator"
|
21
|
+
require "google/cloud/vision/v1p4beta1/version"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Vision
|
26
|
+
##
|
27
|
+
# To load this package, including all its services, and instantiate a client:
|
28
|
+
#
|
29
|
+
# require "google/cloud/vision/v1p4beta1"
|
30
|
+
# client = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
|
31
|
+
#
|
32
|
+
module V1p4beta1
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
helper_path = ::File.join __dir__, "v1p4beta1", "_helpers.rb"
|
39
|
+
require "google/cloud/vision/v1p4beta1/_helpers" if ::File.file? helper_path
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/vision/v1p4beta1"
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# An indicator of the behavior of a given field (for example, that a field
|
23
|
+
# is required in requests, or given as output but ignored as input).
|
24
|
+
# This **does not** change the behavior in protocol buffers itself; it only
|
25
|
+
# denotes the behavior and may affect how API tooling handles the field.
|
26
|
+
#
|
27
|
+
# Note: This enum **may** receive new values in the future.
|
28
|
+
module FieldBehavior
|
29
|
+
# Conventional default for enums. Do not use this.
|
30
|
+
FIELD_BEHAVIOR_UNSPECIFIED = 0
|
31
|
+
|
32
|
+
# Specifically denotes a field as optional.
|
33
|
+
# While all fields in protocol buffers are optional, this may be specified
|
34
|
+
# for emphasis if appropriate.
|
35
|
+
OPTIONAL = 1
|
36
|
+
|
37
|
+
# Denotes a field as required.
|
38
|
+
# This indicates that the field **must** be provided as part of the request,
|
39
|
+
# and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
|
40
|
+
REQUIRED = 2
|
41
|
+
|
42
|
+
# Denotes a field as output only.
|
43
|
+
# This indicates that the field is provided in responses, but including the
|
44
|
+
# field in a request does nothing (the server *must* ignore it and
|
45
|
+
# *must not* throw an error as a result of the field's presence).
|
46
|
+
OUTPUT_ONLY = 3
|
47
|
+
|
48
|
+
# Denotes a field as input only.
|
49
|
+
# This indicates that the field is provided in requests, and the
|
50
|
+
# corresponding field is not included in output.
|
51
|
+
INPUT_ONLY = 4
|
52
|
+
|
53
|
+
# Denotes a field as immutable.
|
54
|
+
# This indicates that the field may be set once in a request to create a
|
55
|
+
# resource, but may not be changed thereafter.
|
56
|
+
IMMUTABLE = 5
|
57
|
+
|
58
|
+
# Denotes that a (repeated) field is an unordered list.
|
59
|
+
# This indicates that the service may provide the elements of the list
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
|
+
# provided. Additionally, the list's order may or may not be stable.
|
62
|
+
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|