google-cloud-vision 0.28.0 → 0.29.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -0
  3. data/lib/google/cloud/vision.rb +33 -0
  4. data/lib/google/cloud/vision/v1.rb +42 -16
  5. data/lib/google/cloud/vision/v1/credentials.rb +33 -0
  6. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb +15 -1
  7. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +224 -46
  8. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +36 -14
  9. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +34 -7
  10. data/lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb +92 -0
  11. data/lib/google/cloud/vision/v1/doc/google/protobuf/any.rb +1 -1
  12. data/lib/google/cloud/vision/v1/doc/google/protobuf/wrappers.rb +1 -1
  13. data/lib/google/cloud/vision/v1/doc/google/rpc/status.rb +1 -1
  14. data/lib/google/cloud/vision/v1/doc/google/type/color.rb +1 -1
  15. data/lib/google/cloud/vision/v1/doc/google/type/latlng.rb +1 -1
  16. data/lib/google/cloud/vision/v1/doc/overview.rb +32 -6
  17. data/lib/google/cloud/vision/v1/geometry_pb.rb +6 -0
  18. data/lib/google/cloud/vision/v1/image_annotator_client.rb +124 -27
  19. data/lib/google/cloud/vision/v1/image_annotator_client_config.json +5 -0
  20. data/lib/google/cloud/vision/v1/image_annotator_pb.rb +72 -0
  21. data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +9 -2
  22. data/lib/google/cloud/vision/v1/text_annotation_pb.rb +5 -0
  23. data/lib/google/cloud/vision/v1/web_detection_pb.rb +10 -0
  24. data/lib/google/cloud/vision/version.rb +1 -1
  25. metadata +5 -3
@@ -24,6 +24,11 @@
24
24
  "timeout_millis": 60000,
25
25
  "retry_codes_name": "idempotent",
26
26
  "retry_params_name": "default"
27
+ },
28
+ "AsyncBatchAnnotateFiles": {
29
+ "timeout_millis": 60000,
30
+ "retry_codes_name": "idempotent",
31
+ "retry_params_name": "default"
27
32
  }
28
33
  }
29
34
  }
@@ -7,6 +7,8 @@ require 'google/api/annotations_pb'
7
7
  require 'google/cloud/vision/v1/geometry_pb'
8
8
  require 'google/cloud/vision/v1/text_annotation_pb'
9
9
  require 'google/cloud/vision/v1/web_detection_pb'
10
+ require 'google/longrunning/operations_pb'
11
+ require 'google/protobuf/timestamp_pb'
10
12
  require 'google/rpc/status_pb'
11
13
  require 'google/type/color_pb'
12
14
  require 'google/type/latlng_pb'
@@ -14,6 +16,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
14
16
  add_message "google.cloud.vision.v1.Feature" do
15
17
  optional :type, :enum, 1, "google.cloud.vision.v1.Feature.Type"
16
18
  optional :max_results, :int32, 2
19
+ optional :model, :string, 3
17
20
  end
18
21
  add_enum "google.cloud.vision.v1.Feature.Type" do
19
22
  value :TYPE_UNSPECIFIED, 0
@@ -100,6 +103,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
100
103
  add_message "google.cloud.vision.v1.Property" do
101
104
  optional :name, :string, 1
102
105
  optional :value, :string, 2
106
+ optional :uint64_value, :uint64, 3
103
107
  end
104
108
  add_message "google.cloud.vision.v1.EntityAnnotation" do
105
109
  optional :mid, :string, 1
@@ -117,6 +121,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
117
121
  optional :spoof, :enum, 2, "google.cloud.vision.v1.Likelihood"
118
122
  optional :medical, :enum, 3, "google.cloud.vision.v1.Likelihood"
119
123
  optional :violence, :enum, 4, "google.cloud.vision.v1.Likelihood"
124
+ optional :racy, :enum, 9, "google.cloud.vision.v1.Likelihood"
120
125
  end
121
126
  add_message "google.cloud.vision.v1.LatLongRect" do
122
127
  optional :min_lat_lng, :message, 1, "google.type.LatLng"
@@ -144,16 +149,24 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
144
149
  add_message "google.cloud.vision.v1.CropHintsParams" do
145
150
  repeated :aspect_ratios, :float, 1
146
151
  end
152
+ add_message "google.cloud.vision.v1.WebDetectionParams" do
153
+ optional :include_geo_results, :bool, 2
154
+ end
147
155
  add_message "google.cloud.vision.v1.ImageContext" do
148
156
  optional :lat_long_rect, :message, 1, "google.cloud.vision.v1.LatLongRect"
149
157
  repeated :language_hints, :string, 2
150
158
  optional :crop_hints_params, :message, 4, "google.cloud.vision.v1.CropHintsParams"
159
+ optional :web_detection_params, :message, 6, "google.cloud.vision.v1.WebDetectionParams"
151
160
  end
152
161
  add_message "google.cloud.vision.v1.AnnotateImageRequest" do
153
162
  optional :image, :message, 1, "google.cloud.vision.v1.Image"
154
163
  repeated :features, :message, 2, "google.cloud.vision.v1.Feature"
155
164
  optional :image_context, :message, 3, "google.cloud.vision.v1.ImageContext"
156
165
  end
166
+ add_message "google.cloud.vision.v1.ImageAnnotationContext" do
167
+ optional :uri, :string, 1
168
+ optional :page_number, :int32, 2
169
+ end
157
170
  add_message "google.cloud.vision.v1.AnnotateImageResponse" do
158
171
  repeated :face_annotations, :message, 1, "google.cloud.vision.v1.FaceAnnotation"
159
172
  repeated :landmark_annotations, :message, 2, "google.cloud.vision.v1.EntityAnnotation"
@@ -166,6 +179,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
166
179
  optional :crop_hints_annotation, :message, 11, "google.cloud.vision.v1.CropHintsAnnotation"
167
180
  optional :web_detection, :message, 13, "google.cloud.vision.v1.WebDetection"
168
181
  optional :error, :message, 9, "google.rpc.Status"
182
+ optional :context, :message, 21, "google.cloud.vision.v1.ImageAnnotationContext"
183
+ end
184
+ add_message "google.cloud.vision.v1.AnnotateFileResponse" do
185
+ optional :input_config, :message, 1, "google.cloud.vision.v1.InputConfig"
186
+ repeated :responses, :message, 2, "google.cloud.vision.v1.AnnotateImageResponse"
169
187
  end
170
188
  add_message "google.cloud.vision.v1.BatchAnnotateImagesRequest" do
171
189
  repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateImageRequest"
@@ -173,6 +191,47 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
173
191
  add_message "google.cloud.vision.v1.BatchAnnotateImagesResponse" do
174
192
  repeated :responses, :message, 1, "google.cloud.vision.v1.AnnotateImageResponse"
175
193
  end
194
+ add_message "google.cloud.vision.v1.AsyncAnnotateFileRequest" do
195
+ optional :input_config, :message, 1, "google.cloud.vision.v1.InputConfig"
196
+ repeated :features, :message, 2, "google.cloud.vision.v1.Feature"
197
+ optional :image_context, :message, 3, "google.cloud.vision.v1.ImageContext"
198
+ optional :output_config, :message, 4, "google.cloud.vision.v1.OutputConfig"
199
+ end
200
+ add_message "google.cloud.vision.v1.AsyncAnnotateFileResponse" do
201
+ optional :output_config, :message, 1, "google.cloud.vision.v1.OutputConfig"
202
+ end
203
+ add_message "google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest" do
204
+ repeated :requests, :message, 1, "google.cloud.vision.v1.AsyncAnnotateFileRequest"
205
+ end
206
+ add_message "google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse" do
207
+ repeated :responses, :message, 1, "google.cloud.vision.v1.AsyncAnnotateFileResponse"
208
+ end
209
+ add_message "google.cloud.vision.v1.InputConfig" do
210
+ optional :gcs_source, :message, 1, "google.cloud.vision.v1.GcsSource"
211
+ optional :mime_type, :string, 2
212
+ end
213
+ add_message "google.cloud.vision.v1.OutputConfig" do
214
+ optional :gcs_destination, :message, 1, "google.cloud.vision.v1.GcsDestination"
215
+ optional :batch_size, :int32, 2
216
+ end
217
+ add_message "google.cloud.vision.v1.GcsSource" do
218
+ optional :uri, :string, 1
219
+ end
220
+ add_message "google.cloud.vision.v1.GcsDestination" do
221
+ optional :uri, :string, 1
222
+ end
223
+ add_message "google.cloud.vision.v1.OperationMetadata" do
224
+ optional :state, :enum, 1, "google.cloud.vision.v1.OperationMetadata.State"
225
+ optional :create_time, :message, 5, "google.protobuf.Timestamp"
226
+ optional :update_time, :message, 6, "google.protobuf.Timestamp"
227
+ end
228
+ add_enum "google.cloud.vision.v1.OperationMetadata.State" do
229
+ value :STATE_UNSPECIFIED, 0
230
+ value :CREATED, 1
231
+ value :RUNNING, 2
232
+ value :DONE, 3
233
+ value :CANCELLED, 4
234
+ end
176
235
  add_enum "google.cloud.vision.v1.Likelihood" do
177
236
  value :UNKNOWN, 0
178
237
  value :VERY_UNLIKELY, 1
@@ -205,11 +264,24 @@ module Google
205
264
  CropHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CropHint").msgclass
206
265
  CropHintsAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CropHintsAnnotation").msgclass
207
266
  CropHintsParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CropHintsParams").msgclass
267
+ WebDetectionParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetectionParams").msgclass
208
268
  ImageContext = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImageContext").msgclass
209
269
  AnnotateImageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AnnotateImageRequest").msgclass
270
+ ImageAnnotationContext = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImageAnnotationContext").msgclass
210
271
  AnnotateImageResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AnnotateImageResponse").msgclass
272
+ AnnotateFileResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AnnotateFileResponse").msgclass
211
273
  BatchAnnotateImagesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchAnnotateImagesRequest").msgclass
212
274
  BatchAnnotateImagesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchAnnotateImagesResponse").msgclass
275
+ AsyncAnnotateFileRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncAnnotateFileRequest").msgclass
276
+ AsyncAnnotateFileResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncAnnotateFileResponse").msgclass
277
+ AsyncBatchAnnotateFilesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest").msgclass
278
+ AsyncBatchAnnotateFilesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse").msgclass
279
+ InputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.InputConfig").msgclass
280
+ OutputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.OutputConfig").msgclass
281
+ GcsSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GcsSource").msgclass
282
+ GcsDestination = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GcsDestination").msgclass
283
+ OperationMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.OperationMetadata").msgclass
284
+ OperationMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.OperationMetadata.State").enummodule
213
285
  Likelihood = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Likelihood").enummodule
214
286
  end
215
287
  end
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/vision/v1/image_annotator.proto for package 'google.cloud.vision.v1'
3
3
  # Original file comments:
4
- # Copyright 2016 Google Inc.
4
+ # Copyright 2018 Google Inc.
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # https://www.apache.org/licenses/LICENSE-2.0
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -37,6 +37,13 @@ module Google
37
37
 
38
38
  # Run image detection and annotation for a batch of images.
39
39
  rpc :BatchAnnotateImages, BatchAnnotateImagesRequest, BatchAnnotateImagesResponse
40
+ # Run asynchronous image detection and annotation for a list of generic
41
+ # files, such as PDF files, which may contain multiple pages and multiple
42
+ # images per page. Progress and results can be retrieved through the
43
+ # `google.longrunning.Operations` interface.
44
+ # `Operation.metadata` contains `OperationMetadata` (metadata).
45
+ # `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
46
+ rpc :AsyncBatchAnnotateFiles, AsyncBatchAnnotateFilesRequest, Google::Longrunning::Operation
40
47
  end
41
48
 
42
49
  Stub = Service.rpc_stub_class
@@ -35,12 +35,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
35
35
  optional :width, :int32, 2
36
36
  optional :height, :int32, 3
37
37
  repeated :blocks, :message, 4, "google.cloud.vision.v1.Block"
38
+ optional :confidence, :float, 5
38
39
  end
39
40
  add_message "google.cloud.vision.v1.Block" do
40
41
  optional :property, :message, 1, "google.cloud.vision.v1.TextAnnotation.TextProperty"
41
42
  optional :bounding_box, :message, 2, "google.cloud.vision.v1.BoundingPoly"
42
43
  repeated :paragraphs, :message, 3, "google.cloud.vision.v1.Paragraph"
43
44
  optional :block_type, :enum, 4, "google.cloud.vision.v1.Block.BlockType"
45
+ optional :confidence, :float, 5
44
46
  end
45
47
  add_enum "google.cloud.vision.v1.Block.BlockType" do
46
48
  value :UNKNOWN, 0
@@ -54,16 +56,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
54
56
  optional :property, :message, 1, "google.cloud.vision.v1.TextAnnotation.TextProperty"
55
57
  optional :bounding_box, :message, 2, "google.cloud.vision.v1.BoundingPoly"
56
58
  repeated :words, :message, 3, "google.cloud.vision.v1.Word"
59
+ optional :confidence, :float, 4
57
60
  end
58
61
  add_message "google.cloud.vision.v1.Word" do
59
62
  optional :property, :message, 1, "google.cloud.vision.v1.TextAnnotation.TextProperty"
60
63
  optional :bounding_box, :message, 2, "google.cloud.vision.v1.BoundingPoly"
61
64
  repeated :symbols, :message, 3, "google.cloud.vision.v1.Symbol"
65
+ optional :confidence, :float, 4
62
66
  end
63
67
  add_message "google.cloud.vision.v1.Symbol" do
64
68
  optional :property, :message, 1, "google.cloud.vision.v1.TextAnnotation.TextProperty"
65
69
  optional :bounding_box, :message, 2, "google.cloud.vision.v1.BoundingPoly"
66
70
  optional :text, :string, 3
71
+ optional :confidence, :float, 4
67
72
  end
68
73
  end
69
74
 
@@ -10,6 +10,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  repeated :full_matching_images, :message, 2, "google.cloud.vision.v1.WebDetection.WebImage"
11
11
  repeated :partial_matching_images, :message, 3, "google.cloud.vision.v1.WebDetection.WebImage"
12
12
  repeated :pages_with_matching_images, :message, 4, "google.cloud.vision.v1.WebDetection.WebPage"
13
+ repeated :visually_similar_images, :message, 6, "google.cloud.vision.v1.WebDetection.WebImage"
14
+ repeated :best_guess_labels, :message, 8, "google.cloud.vision.v1.WebDetection.WebLabel"
13
15
  end
14
16
  add_message "google.cloud.vision.v1.WebDetection.WebEntity" do
15
17
  optional :entity_id, :string, 1
@@ -23,6 +25,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
23
25
  add_message "google.cloud.vision.v1.WebDetection.WebPage" do
24
26
  optional :url, :string, 1
25
27
  optional :score, :float, 2
28
+ optional :page_title, :string, 3
29
+ repeated :full_matching_images, :message, 4, "google.cloud.vision.v1.WebDetection.WebImage"
30
+ repeated :partial_matching_images, :message, 5, "google.cloud.vision.v1.WebDetection.WebImage"
31
+ end
32
+ add_message "google.cloud.vision.v1.WebDetection.WebLabel" do
33
+ optional :label, :string, 1
34
+ optional :language_code, :string, 2
26
35
  end
27
36
  end
28
37
 
@@ -34,6 +43,7 @@ module Google
34
43
  WebDetection::WebEntity = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebEntity").msgclass
35
44
  WebDetection::WebImage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebImage").msgclass
36
45
  WebDetection::WebPage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebPage").msgclass
46
+ WebDetection::WebLabel = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetection.WebLabel").msgclass
37
47
  end
38
48
  end
39
49
  end
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Vision
19
- VERSION = "0.28.0".freeze
19
+ VERSION = "0.29.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-vision
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-02-28 00:00:00.000000000 Z
12
+ date: 2018-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -194,10 +194,12 @@ files:
194
194
  - lib/google/cloud/vision/project.rb
195
195
  - lib/google/cloud/vision/service.rb
196
196
  - lib/google/cloud/vision/v1.rb
197
+ - lib/google/cloud/vision/v1/credentials.rb
197
198
  - lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb
198
199
  - lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb
199
200
  - lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb
200
201
  - lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb
202
+ - lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb
201
203
  - lib/google/cloud/vision/v1/doc/google/protobuf/any.rb
202
204
  - lib/google/cloud/vision/v1/doc/google/protobuf/wrappers.rb
203
205
  - lib/google/cloud/vision/v1/doc/google/rpc/status.rb
@@ -232,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
234
  version: '0'
233
235
  requirements: []
234
236
  rubyforge_project:
235
- rubygems_version: 2.7.6
237
+ rubygems_version: 2.7.7
236
238
  signing_key:
237
239
  specification_version: 4
238
240
  summary: API Client library for Google Cloud Vision API