google-cloud-vision-v1 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d1b235d5d654b3ffb89909ecdca4725863476265556719f0859a9d5967acedd
4
- data.tar.gz: 3cf67715c9d3dc690840dbec0b4221d7d3f763362e17e5bb84abdb97d2925f75
3
+ metadata.gz: 40df20aa44564c2dfe57aecdada11ba4de2e85f3a6f3acc1c418ac8900a92684
4
+ data.tar.gz: 1fd2c2cda39b61034b7f4763905bff6fe8d63557b879f335ca3589e0aa582e68
5
5
  SHA512:
6
- metadata.gz: 304e4fda645f7641da3d109a414bbdc0c6a2cc3ecad5be1e016720f017c33fa38ac6f5127b9e00c9d2b0f02fb7b98c6cdc093983e0ebcc29ba35fd62f55f64d6
7
- data.tar.gz: 0af6e1ca762eab95e4de8675e255886f2f9258d8a19b65edfd6766084a28c93f845e7463410d59c89070ab1865eba1cd6b3d8a7823b4dcb852f7c61cb2c9dab5
6
+ metadata.gz: c7194614df273eaa6c5b5ac5a4c0704b3f53426f697b6c7baa7d1d955b71c8edbc949a838c63d22a0e8ddbd0af5455ee0a094dd943b41216b05f7fba6c7e5bc5
7
+ data.tar.gz: f8430ac20d35108d533686ff2fb0eda2427ab8a8688039efe9a364ce64cb1843e3de09dc7e1fa898dbd9a55112527808cf4da26c1a35d0d91e72104d76592356
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud Vision V1 API
2
2
 
3
- API Client library for the Cloud Vision V1 API
3
+ Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.
4
4
 
5
5
  Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.
6
6
 
@@ -47,7 +47,7 @@ for general usage information.
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
49
  The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -1,28 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/vision/v1/geometry.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/vision/v1/geometry.proto", :syntax => :proto3) do
8
- add_message "google.cloud.vision.v1.Vertex" do
9
- optional :x, :int32, 1
10
- optional :y, :int32, 2
11
- end
12
- add_message "google.cloud.vision.v1.NormalizedVertex" do
13
- optional :x, :float, 1
14
- optional :y, :float, 2
15
- end
16
- add_message "google.cloud.vision.v1.BoundingPoly" do
17
- repeated :vertices, :message, 1, "google.cloud.vision.v1.Vertex"
18
- repeated :normalized_vertices, :message, 2, "google.cloud.vision.v1.NormalizedVertex"
19
- end
20
- add_message "google.cloud.vision.v1.Position" do
21
- optional :x, :float, 1
22
- optional :y, :float, 2
23
- optional :z, :float, 3
7
+
8
+ descriptor_data = "\n%google/cloud/vision/v1/geometry.proto\x12\x16google.cloud.vision.v1\"\x1e\n\x06Vertex\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"\x87\x01\n\x0c\x42oundingPoly\x12\x30\n\x08vertices\x18\x01 \x03(\x0b\x32\x1e.google.cloud.vision.v1.Vertex\x12\x45\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32(.google.cloud.vision.v1.NormalizedVertex\"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\x42n\n\x1a\x63om.google.cloud.vision.v1B\rGeometryProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
24
28
  end
25
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
26
32
  end
27
33
 
28
34
  module Google
@@ -615,9 +615,9 @@ module Google
615
615
  # * (`String`) The path to a service account key file in JSON format
616
616
  # * (`Hash`) A service account key as a Hash
617
617
  # * (`Google::Auth::Credentials`) A googleauth credentials object
618
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
618
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
619
619
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
620
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
620
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
621
621
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
622
622
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
623
623
  # * (`nil`) indicating no credentials
@@ -620,9 +620,9 @@ module Google
620
620
  # * (`String`) The path to a service account key file in JSON format
621
621
  # * (`Hash`) A service account key as a Hash
622
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
623
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
624
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
625
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
626
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
627
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
628
628
  # * (`nil`) indicating no credentials
@@ -532,9 +532,9 @@ module Google
532
532
  # * (`String`) The path to a service account key file in JSON format
533
533
  # * (`Hash`) A service account key as a Hash
534
534
  # * (`Google::Auth::Credentials`) A googleauth credentials object
535
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
535
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
536
536
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
537
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
537
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
538
538
  # * (`nil`) indicating no credentials
539
539
  # @return [::Object]
540
540
  # @!attribute [rw] scope
@@ -411,9 +411,9 @@ module Google
411
411
  # * (`String`) The path to a service account key file in JSON format
412
412
  # * (`Hash`) A service account key as a Hash
413
413
  # * (`Google::Auth::Credentials`) A googleauth credentials object
414
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
414
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
415
415
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
416
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
416
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
417
417
  # * (`nil`) indicating no credentials
418
418
  # @return [::Object]
419
419
  # @!attribute [rw] scope
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/vision/v1/image_annotator.proto
3
4
 
@@ -16,281 +17,39 @@ require 'google/rpc/status_pb'
16
17
  require 'google/type/color_pb'
17
18
  require 'google/type/latlng_pb'
18
19
 
19
- Google::Protobuf::DescriptorPool.generated_pool.build do
20
- add_file("google/cloud/vision/v1/image_annotator.proto", :syntax => :proto3) do
21
- add_message "google.cloud.vision.v1.Feature" do
22
- optional :type, :enum, 1, "google.cloud.vision.v1.Feature.Type"
23
- optional :max_results, :int32, 2
24
- optional :model, :string, 3
25
- end
26
- add_enum "google.cloud.vision.v1.Feature.Type" do
27
- value :TYPE_UNSPECIFIED, 0
28
- value :FACE_DETECTION, 1
29
- value :LANDMARK_DETECTION, 2
30
- value :LOGO_DETECTION, 3
31
- value :LABEL_DETECTION, 4
32
- value :TEXT_DETECTION, 5
33
- value :DOCUMENT_TEXT_DETECTION, 11
34
- value :SAFE_SEARCH_DETECTION, 6
35
- value :IMAGE_PROPERTIES, 7
36
- value :CROP_HINTS, 9
37
- value :WEB_DETECTION, 10
38
- value :PRODUCT_SEARCH, 12
39
- value :OBJECT_LOCALIZATION, 19
40
- end
41
- add_message "google.cloud.vision.v1.ImageSource" do
42
- optional :gcs_image_uri, :string, 1
43
- optional :image_uri, :string, 2
44
- end
45
- add_message "google.cloud.vision.v1.Image" do
46
- optional :content, :bytes, 1
47
- optional :source, :message, 2, "google.cloud.vision.v1.ImageSource"
48
- end
49
- add_message "google.cloud.vision.v1.FaceAnnotation" do
50
- optional :bounding_poly, :message, 1, "google.cloud.vision.v1.BoundingPoly"
51
- optional :fd_bounding_poly, :message, 2, "google.cloud.vision.v1.BoundingPoly"
52
- repeated :landmarks, :message, 3, "google.cloud.vision.v1.FaceAnnotation.Landmark"
53
- optional :roll_angle, :float, 4
54
- optional :pan_angle, :float, 5
55
- optional :tilt_angle, :float, 6
56
- optional :detection_confidence, :float, 7
57
- optional :landmarking_confidence, :float, 8
58
- optional :joy_likelihood, :enum, 9, "google.cloud.vision.v1.Likelihood"
59
- optional :sorrow_likelihood, :enum, 10, "google.cloud.vision.v1.Likelihood"
60
- optional :anger_likelihood, :enum, 11, "google.cloud.vision.v1.Likelihood"
61
- optional :surprise_likelihood, :enum, 12, "google.cloud.vision.v1.Likelihood"
62
- optional :under_exposed_likelihood, :enum, 13, "google.cloud.vision.v1.Likelihood"
63
- optional :blurred_likelihood, :enum, 14, "google.cloud.vision.v1.Likelihood"
64
- optional :headwear_likelihood, :enum, 15, "google.cloud.vision.v1.Likelihood"
65
- end
66
- add_message "google.cloud.vision.v1.FaceAnnotation.Landmark" do
67
- optional :type, :enum, 3, "google.cloud.vision.v1.FaceAnnotation.Landmark.Type"
68
- optional :position, :message, 4, "google.cloud.vision.v1.Position"
69
- end
70
- add_enum "google.cloud.vision.v1.FaceAnnotation.Landmark.Type" do
71
- value :UNKNOWN_LANDMARK, 0
72
- value :LEFT_EYE, 1
73
- value :RIGHT_EYE, 2
74
- value :LEFT_OF_LEFT_EYEBROW, 3
75
- value :RIGHT_OF_LEFT_EYEBROW, 4
76
- value :LEFT_OF_RIGHT_EYEBROW, 5
77
- value :RIGHT_OF_RIGHT_EYEBROW, 6
78
- value :MIDPOINT_BETWEEN_EYES, 7
79
- value :NOSE_TIP, 8
80
- value :UPPER_LIP, 9
81
- value :LOWER_LIP, 10
82
- value :MOUTH_LEFT, 11
83
- value :MOUTH_RIGHT, 12
84
- value :MOUTH_CENTER, 13
85
- value :NOSE_BOTTOM_RIGHT, 14
86
- value :NOSE_BOTTOM_LEFT, 15
87
- value :NOSE_BOTTOM_CENTER, 16
88
- value :LEFT_EYE_TOP_BOUNDARY, 17
89
- value :LEFT_EYE_RIGHT_CORNER, 18
90
- value :LEFT_EYE_BOTTOM_BOUNDARY, 19
91
- value :LEFT_EYE_LEFT_CORNER, 20
92
- value :RIGHT_EYE_TOP_BOUNDARY, 21
93
- value :RIGHT_EYE_RIGHT_CORNER, 22
94
- value :RIGHT_EYE_BOTTOM_BOUNDARY, 23
95
- value :RIGHT_EYE_LEFT_CORNER, 24
96
- value :LEFT_EYEBROW_UPPER_MIDPOINT, 25
97
- value :RIGHT_EYEBROW_UPPER_MIDPOINT, 26
98
- value :LEFT_EAR_TRAGION, 27
99
- value :RIGHT_EAR_TRAGION, 28
100
- value :LEFT_EYE_PUPIL, 29
101
- value :RIGHT_EYE_PUPIL, 30
102
- value :FOREHEAD_GLABELLA, 31
103
- value :CHIN_GNATHION, 32
104
- value :CHIN_LEFT_GONION, 33
105
- value :CHIN_RIGHT_GONION, 34
106
- value :LEFT_CHEEK_CENTER, 35
107
- value :RIGHT_CHEEK_CENTER, 36
108
- end
109
- add_message "google.cloud.vision.v1.LocationInfo" do
110
- optional :lat_lng, :message, 1, "google.type.LatLng"
111
- end
112
- add_message "google.cloud.vision.v1.Property" do
113
- optional :name, :string, 1
114
- optional :value, :string, 2
115
- optional :uint64_value, :uint64, 3
116
- end
117
- add_message "google.cloud.vision.v1.EntityAnnotation" do
118
- optional :mid, :string, 1
119
- optional :locale, :string, 2
120
- optional :description, :string, 3
121
- optional :score, :float, 4
122
- optional :confidence, :float, 5
123
- optional :topicality, :float, 6
124
- optional :bounding_poly, :message, 7, "google.cloud.vision.v1.BoundingPoly"
125
- repeated :locations, :message, 8, "google.cloud.vision.v1.LocationInfo"
126
- repeated :properties, :message, 9, "google.cloud.vision.v1.Property"
127
- end
128
- add_message "google.cloud.vision.v1.LocalizedObjectAnnotation" do
129
- optional :mid, :string, 1
130
- optional :language_code, :string, 2
131
- optional :name, :string, 3
132
- optional :score, :float, 4
133
- optional :bounding_poly, :message, 5, "google.cloud.vision.v1.BoundingPoly"
134
- end
135
- add_message "google.cloud.vision.v1.SafeSearchAnnotation" do
136
- optional :adult, :enum, 1, "google.cloud.vision.v1.Likelihood"
137
- optional :spoof, :enum, 2, "google.cloud.vision.v1.Likelihood"
138
- optional :medical, :enum, 3, "google.cloud.vision.v1.Likelihood"
139
- optional :violence, :enum, 4, "google.cloud.vision.v1.Likelihood"
140
- optional :racy, :enum, 9, "google.cloud.vision.v1.Likelihood"
141
- end
142
- add_message "google.cloud.vision.v1.LatLongRect" do
143
- optional :min_lat_lng, :message, 1, "google.type.LatLng"
144
- optional :max_lat_lng, :message, 2, "google.type.LatLng"
145
- end
146
- add_message "google.cloud.vision.v1.ColorInfo" do
147
- optional :color, :message, 1, "google.type.Color"
148
- optional :score, :float, 2
149
- optional :pixel_fraction, :float, 3
150
- end
151
- add_message "google.cloud.vision.v1.DominantColorsAnnotation" do
152
- repeated :colors, :message, 1, "google.cloud.vision.v1.ColorInfo"
153
- end
154
- add_message "google.cloud.vision.v1.ImageProperties" do
155
- optional :dominant_colors, :message, 1, "google.cloud.vision.v1.DominantColorsAnnotation"
156
- end
157
- add_message "google.cloud.vision.v1.CropHint" do
158
- optional :bounding_poly, :message, 1, "google.cloud.vision.v1.BoundingPoly"
159
- optional :confidence, :float, 2
160
- optional :importance_fraction, :float, 3
161
- end
162
- add_message "google.cloud.vision.v1.CropHintsAnnotation" do
163
- repeated :crop_hints, :message, 1, "google.cloud.vision.v1.CropHint"
164
- end
165
- add_message "google.cloud.vision.v1.CropHintsParams" do
166
- repeated :aspect_ratios, :float, 1
167
- end
168
- add_message "google.cloud.vision.v1.WebDetectionParams" do
169
- optional :include_geo_results, :bool, 2
170
- end
171
- add_message "google.cloud.vision.v1.TextDetectionParams" do
172
- optional :enable_text_detection_confidence_score, :bool, 9
173
- repeated :advanced_ocr_options, :string, 11
174
- end
175
- add_message "google.cloud.vision.v1.ImageContext" do
176
- optional :lat_long_rect, :message, 1, "google.cloud.vision.v1.LatLongRect"
177
- repeated :language_hints, :string, 2
178
- optional :crop_hints_params, :message, 4, "google.cloud.vision.v1.CropHintsParams"
179
- optional :product_search_params, :message, 5, "google.cloud.vision.v1.ProductSearchParams"
180
- optional :web_detection_params, :message, 6, "google.cloud.vision.v1.WebDetectionParams"
181
- optional :text_detection_params, :message, 12, "google.cloud.vision.v1.TextDetectionParams"
182
- end
183
- add_message "google.cloud.vision.v1.AnnotateImageRequest" do
184
- optional :image, :message, 1, "google.cloud.vision.v1.Image"
185
- repeated :features, :message, 2, "google.cloud.vision.v1.Feature"
186
- optional :image_context, :message, 3, "google.cloud.vision.v1.ImageContext"
187
- end
188
- add_message "google.cloud.vision.v1.ImageAnnotationContext" do
189
- optional :uri, :string, 1
190
- optional :page_number, :int32, 2
191
- end
192
- add_message "google.cloud.vision.v1.AnnotateImageResponse" do
193
- repeated :face_annotations, :message, 1, "google.cloud.vision.v1.FaceAnnotation"
194
- repeated :landmark_annotations, :message, 2, "google.cloud.vision.v1.EntityAnnotation"
195
- repeated :logo_annotations, :message, 3, "google.cloud.vision.v1.EntityAnnotation"
196
- repeated :label_annotations, :message, 4, "google.cloud.vision.v1.EntityAnnotation"
197
- repeated :localized_object_annotations, :message, 22, "google.cloud.vision.v1.LocalizedObjectAnnotation"
198
- repeated :text_annotations, :message, 5, "google.cloud.vision.v1.EntityAnnotation"
199
- optional :full_text_annotation, :message, 12, "google.cloud.vision.v1.TextAnnotation"
200
- optional :safe_search_annotation, :message, 6, "google.cloud.vision.v1.SafeSearchAnnotation"
201
- optional :image_properties_annotation, :message, 8, "google.cloud.vision.v1.ImageProperties"
202
- optional :crop_hints_annotation, :message, 11, "google.cloud.vision.v1.CropHintsAnnotation"
203
- optional :web_detection, :message, 13, "google.cloud.vision.v1.WebDetection"
204
- optional :product_search_results, :message, 14, "google.cloud.vision.v1.ProductSearchResults"
205
- optional :error, :message, 9, "google.rpc.Status"
206
- optional :context, :message, 21, "google.cloud.vision.v1.ImageAnnotationContext"
207
- end
208
- add_message "google.cloud.vision.v1.BatchAnnotateImagesRequest" do
209
- repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateImageRequest"
210
- optional :parent, :string, 4
211
- end
212
- add_message "google.cloud.vision.v1.BatchAnnotateImagesResponse" do
213
- repeated :responses, :message, 1, "google.cloud.vision.v1.AnnotateImageResponse"
214
- end
215
- add_message "google.cloud.vision.v1.AnnotateFileRequest" do
216
- optional :input_config, :message, 1, "google.cloud.vision.v1.InputConfig"
217
- repeated :features, :message, 2, "google.cloud.vision.v1.Feature"
218
- optional :image_context, :message, 3, "google.cloud.vision.v1.ImageContext"
219
- repeated :pages, :int32, 4
220
- end
221
- add_message "google.cloud.vision.v1.AnnotateFileResponse" do
222
- optional :input_config, :message, 1, "google.cloud.vision.v1.InputConfig"
223
- repeated :responses, :message, 2, "google.cloud.vision.v1.AnnotateImageResponse"
224
- optional :total_pages, :int32, 3
225
- optional :error, :message, 4, "google.rpc.Status"
226
- end
227
- add_message "google.cloud.vision.v1.BatchAnnotateFilesRequest" do
228
- repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateFileRequest"
229
- optional :parent, :string, 3
230
- end
231
- add_message "google.cloud.vision.v1.BatchAnnotateFilesResponse" do
232
- repeated :responses, :message, 1, "google.cloud.vision.v1.AnnotateFileResponse"
233
- end
234
- add_message "google.cloud.vision.v1.AsyncAnnotateFileRequest" do
235
- optional :input_config, :message, 1, "google.cloud.vision.v1.InputConfig"
236
- repeated :features, :message, 2, "google.cloud.vision.v1.Feature"
237
- optional :image_context, :message, 3, "google.cloud.vision.v1.ImageContext"
238
- optional :output_config, :message, 4, "google.cloud.vision.v1.OutputConfig"
239
- end
240
- add_message "google.cloud.vision.v1.AsyncAnnotateFileResponse" do
241
- optional :output_config, :message, 1, "google.cloud.vision.v1.OutputConfig"
242
- end
243
- add_message "google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest" do
244
- repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateImageRequest"
245
- optional :output_config, :message, 2, "google.cloud.vision.v1.OutputConfig"
246
- optional :parent, :string, 4
247
- end
248
- add_message "google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse" do
249
- optional :output_config, :message, 1, "google.cloud.vision.v1.OutputConfig"
250
- end
251
- add_message "google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest" do
252
- repeated :requests, :message, 1, "google.cloud.vision.v1.AsyncAnnotateFileRequest"
253
- optional :parent, :string, 4
254
- end
255
- add_message "google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse" do
256
- repeated :responses, :message, 1, "google.cloud.vision.v1.AsyncAnnotateFileResponse"
257
- end
258
- add_message "google.cloud.vision.v1.InputConfig" do
259
- optional :gcs_source, :message, 1, "google.cloud.vision.v1.GcsSource"
260
- optional :content, :bytes, 3
261
- optional :mime_type, :string, 2
262
- end
263
- add_message "google.cloud.vision.v1.OutputConfig" do
264
- optional :gcs_destination, :message, 1, "google.cloud.vision.v1.GcsDestination"
265
- optional :batch_size, :int32, 2
266
- end
267
- add_message "google.cloud.vision.v1.GcsSource" do
268
- optional :uri, :string, 1
269
- end
270
- add_message "google.cloud.vision.v1.GcsDestination" do
271
- optional :uri, :string, 1
272
- end
273
- add_message "google.cloud.vision.v1.OperationMetadata" do
274
- optional :state, :enum, 1, "google.cloud.vision.v1.OperationMetadata.State"
275
- optional :create_time, :message, 5, "google.protobuf.Timestamp"
276
- optional :update_time, :message, 6, "google.protobuf.Timestamp"
277
- end
278
- add_enum "google.cloud.vision.v1.OperationMetadata.State" do
279
- value :STATE_UNSPECIFIED, 0
280
- value :CREATED, 1
281
- value :RUNNING, 2
282
- value :DONE, 3
283
- value :CANCELLED, 4
284
- end
285
- add_enum "google.cloud.vision.v1.Likelihood" do
286
- value :UNKNOWN, 0
287
- value :VERY_UNLIKELY, 1
288
- value :UNLIKELY, 2
289
- value :POSSIBLE, 3
290
- value :LIKELY, 4
291
- value :VERY_LIKELY, 5
20
+
21
+ descriptor_data = "\n,google/cloud/vision/v1/image_annotator.proto\x12\x16google.cloud.vision.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a%google/cloud/vision/v1/geometry.proto\x1a+google/cloud/vision/v1/product_search.proto\x1a,google/cloud/vision/v1/text_annotation.proto\x1a*google/cloud/vision/v1/web_detection.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x18google/type/latlng.proto\"\x87\x03\n\x07\x46\x65\x61ture\x12\x32\n\x04type\x18\x01 \x01(\x0e\x32$.google.cloud.vision.v1.Feature.Type\x12\x13\n\x0bmax_results\x18\x02 \x01(\x05\x12\r\n\x05model\x18\x03 \x01(\t\"\xa3\x02\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x01\x12\x16\n\x12LANDMARK_DETECTION\x10\x02\x12\x12\n\x0eLOGO_DETECTION\x10\x03\x12\x13\n\x0fLABEL_DETECTION\x10\x04\x12\x12\n\x0eTEXT_DETECTION\x10\x05\x12\x1b\n\x17\x44OCUMENT_TEXT_DETECTION\x10\x0b\x12\x19\n\x15SAFE_SEARCH_DETECTION\x10\x06\x12\x14\n\x10IMAGE_PROPERTIES\x10\x07\x12\x0e\n\nCROP_HINTS\x10\t\x12\x11\n\rWEB_DETECTION\x10\n\x12\x12\n\x0ePRODUCT_SEARCH\x10\x0c\x12\x17\n\x13OBJECT_LOCALIZATION\x10\x13\"7\n\x0bImageSource\x12\x15\n\rgcs_image_uri\x18\x01 \x01(\t\x12\x11\n\timage_uri\x18\x02 \x01(\t\"M\n\x05Image\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x12\x33\n\x06source\x18\x02 \x01(\x0b\x32#.google.cloud.vision.v1.ImageSource\"\xf6\r\n\x0e\x46\x61\x63\x65\x41nnotation\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12>\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x42\n\tlandmarks\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1.FaceAnnotation.Landmark\x12\x12\n\nroll_angle\x18\x04 \x01(\x02\x12\x11\n\tpan_angle\x18\x05 \x01(\x02\x12\x12\n\ntilt_angle\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tection_confidence\x18\x07 \x01(\x02\x12\x1e\n\x16landmarking_confidence\x18\x08 \x01(\x02\x12:\n\x0ejoy_likelihood\x18\t \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12=\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12<\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12?\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x44\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12>\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12?\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x1a\xe8\x07\n\x08Landmark\x12\x42\n\x04type\x18\x03 \x01(\x0e\x32\x34.google.cloud.vision.v1.FaceAnnotation.Landmark.Type\x12\x32\n\x08position\x18\x04 \x01(\x0b\x32 .google.cloud.vision.v1.Position\"\xe3\x06\n\x04Type\x12\x14\n\x10UNKNOWN_LANDMARK\x10\x00\x12\x0c\n\x08LEFT_EYE\x10\x01\x12\r\n\tRIGHT_EYE\x10\x02\x12\x18\n\x14LEFT_OF_LEFT_EYEBROW\x10\x03\x12\x19\n\x15RIGHT_OF_LEFT_EYEBROW\x10\x04\x12\x19\n\x15LEFT_OF_RIGHT_EYEBROW\x10\x05\x12\x1a\n\x16RIGHT_OF_RIGHT_EYEBROW\x10\x06\x12\x19\n\x15MIDPOINT_BETWEEN_EYES\x10\x07\x12\x0c\n\x08NOSE_TIP\x10\x08\x12\r\n\tUPPER_LIP\x10\t\x12\r\n\tLOWER_LIP\x10\n\x12\x0e\n\nMOUTH_LEFT\x10\x0b\x12\x0f\n\x0bMOUTH_RIGHT\x10\x0c\x12\x10\n\x0cMOUTH_CENTER\x10\r\x12\x15\n\x11NOSE_BOTTOM_RIGHT\x10\x0e\x12\x14\n\x10NOSE_BOTTOM_LEFT\x10\x0f\x12\x16\n\x12NOSE_BOTTOM_CENTER\x10\x10\x12\x19\n\x15LEFT_EYE_TOP_BOUNDARY\x10\x11\x12\x19\n\x15LEFT_EYE_RIGHT_CORNER\x10\x12\x12\x1c\n\x18LEFT_EYE_BOTTOM_BOUNDARY\x10\x13\x12\x18\n\x14LEFT_EYE_LEFT_CORNER\x10\x14\x12\x1a\n\x16RIGHT_EYE_TOP_BOUNDARY\x10\x15\x12\x1a\n\x16RIGHT_EYE_RIGHT_CORNER\x10\x16\x12\x1d\n\x19RIGHT_EYE_BOTTOM_BOUNDARY\x10\x17\x12\x19\n\x15RIGHT_EYE_LEFT_CORNER\x10\x18\x12\x1f\n\x1bLEFT_EYEBROW_UPPER_MIDPOINT\x10\x19\x12 \n\x1cRIGHT_EYEBROW_UPPER_MIDPOINT\x10\x1a\x12\x14\n\x10LEFT_EAR_TRAGION\x10\x1b\x12\x15\n\x11RIGHT_EAR_TRAGION\x10\x1c\x12\x12\n\x0eLEFT_EYE_PUPIL\x10\x1d\x12\x13\n\x0fRIGHT_EYE_PUPIL\x10\x1e\x12\x15\n\x11\x46OREHEAD_GLABELLA\x10\x1f\x12\x11\n\rCHIN_GNATHION\x10 \x12\x14\n\x10\x43HIN_LEFT_GONION\x10!\x12\x15\n\x11\x43HIN_RIGHT_GONION\x10\"\x12\x15\n\x11LEFT_CHEEK_CENTER\x10#\x12\x16\n\x12RIGHT_CHEEK_CENTER\x10$\"4\n\x0cLocationInfo\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\"=\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x14\n\x0cuint64_value\x18\x03 \x01(\x04\"\xab\x02\n\x10\x45ntityAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x0e\n\x06locale\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x16\n\nconfidence\x18\x05 \x01(\x02\x42\x02\x18\x01\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12;\n\rbounding_poly\x18\x07 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x37\n\tlocations\x18\x08 \x03(\x0b\x32$.google.cloud.vision.v1.LocationInfo\x12\x34\n\nproperties\x18\t \x03(\x0b\x32 .google.cloud.vision.v1.Property\"\x99\x01\n\x19LocalizedObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12;\n\rbounding_poly\x18\x05 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\"\x99\x02\n\x14SafeSearchAnnotation\x12\x31\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x31\n\x05spoof\x18\x02 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x33\n\x07medical\x18\x03 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x34\n\x08violence\x18\x04 \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\x12\x30\n\x04racy\x18\t \x01(\x0e\x32\".google.cloud.vision.v1.Likelihood\"a\n\x0bLatLongRect\x12(\n\x0bmin_lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12(\n\x0bmax_lat_lng\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng\"U\n\tColorInfo\x12!\n\x05\x63olor\x18\x01 \x01(\x0b\x32\x12.google.type.Color\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x16\n\x0epixel_fraction\x18\x03 \x01(\x02\"M\n\x18\x44ominantColorsAnnotation\x12\x31\n\x06\x63olors\x18\x01 \x03(\x0b\x32!.google.cloud.vision.v1.ColorInfo\"\\\n\x0fImageProperties\x12I\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x30.google.cloud.vision.v1.DominantColorsAnnotation\"x\n\x08\x43ropHint\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x1b\n\x13importance_fraction\x18\x03 \x01(\x02\"K\n\x13\x43ropHintsAnnotation\x12\x34\n\ncrop_hints\x18\x01 \x03(\x0b\x32 .google.cloud.vision.v1.CropHint\"(\n\x0f\x43ropHintsParams\x12\x15\n\raspect_ratios\x18\x01 \x03(\x02\"1\n\x12WebDetectionParams\x12\x1b\n\x13include_geo_results\x18\x02 \x01(\x08\"c\n\x13TextDetectionParams\x12.\n&enable_text_detection_confidence_score\x18\t \x01(\x08\x12\x1c\n\x14\x61\x64vanced_ocr_options\x18\x0b \x03(\t\"\x88\x03\n\x0cImageContext\x12:\n\rlat_long_rect\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12\x42\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1.CropHintsParams\x12J\n\x15product_search_params\x18\x05 \x01(\x0b\x32+.google.cloud.vision.v1.ProductSearchParams\x12H\n\x14web_detection_params\x18\x06 \x01(\x0b\x32*.google.cloud.vision.v1.WebDetectionParams\x12J\n\x15text_detection_params\x18\x0c \x01(\x0b\x32+.google.cloud.vision.v1.TextDetectionParams\"\xb4\x01\n\x14\x41nnotateImageRequest\x12,\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.vision.v1.Image\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\":\n\x16ImageAnnotationContext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\"\xe4\x07\n\x15\x41nnotateImageResponse\x12@\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.FaceAnnotation\x12\x46\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x42\n\x10logo_annotations\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x43\n\x11label_annotations\x18\x04 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12W\n\x1clocalized_object_annotations\x18\x16 \x03(\x0b\x32\x31.google.cloud.vision.v1.LocalizedObjectAnnotation\x12\x42\n\x10text_annotations\x18\x05 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x44\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32&.google.cloud.vision.v1.TextAnnotation\x12L\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32,.google.cloud.vision.v1.SafeSearchAnnotation\x12L\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32\'.google.cloud.vision.v1.ImageProperties\x12J\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32+.google.cloud.vision.v1.CropHintsAnnotation\x12;\n\rweb_detection\x18\r \x01(\x0b\x32$.google.cloud.vision.v1.WebDetection\x12L\n\x16product_search_results\x18\x0e \x01(\x0b\x32,.google.cloud.vision.v1.ProductSearchResults\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\x12?\n\x07\x63ontext\x18\x15 \x01(\x0b\x32..google.cloud.vision.v1.ImageAnnotationContext\"q\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\"_\n\x1b\x42\x61tchAnnotateImagesResponse\x12@\n\tresponses\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse\"\xcf\x01\n\x13\x41nnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12\r\n\x05pages\x18\x04 \x03(\x05\"\xcb\x01\n\x14\x41nnotateFileResponse\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12@\n\tresponses\x18\x02 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse\x12\x13\n\x0btotal_pages\x18\x03 \x01(\x05\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"o\n\x19\x42\x61tchAnnotateFilesRequest\x12\x42\n\x08requests\x18\x01 \x03(\x0b\x32+.google.cloud.vision.v1.AnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x03 \x01(\t\"]\n\x1a\x42\x61tchAnnotateFilesResponse\x12?\n\tresponses\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateFileResponse\"\x82\x02\n\x18\x41syncAnnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12;\n\routput_config\x18\x04 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig\"X\n\x19\x41syncAnnotateFileResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig\"\xb8\x01\n\x1f\x41syncBatchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12@\n\routput_config\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfigB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\"_\n AsyncBatchAnnotateImagesResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig\"y\n\x1e\x41syncBatchAnnotateFilesRequest\x12G\n\x08requests\x18\x01 \x03(\x0b\x32\x30.google.cloud.vision.v1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t\"g\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x44\n\tresponses\x18\x01 \x03(\x0b\x32\x31.google.cloud.vision.v1.AsyncAnnotateFileResponse\"h\n\x0bInputConfig\x12\x35\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.vision.v1.GcsSource\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t\"c\n\x0cOutputConfig\x12?\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1.GcsDestination\x12\x12\n\nbatch_size\x18\x02 \x01(\x05\"\x18\n\tGcsSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x1d\n\x0eGcsDestination\x12\x0b\n\x03uri\x18\x01 \x01(\t\"\x88\x02\n\x11OperationMetadata\x12>\n\x05state\x18\x01 \x01(\x0e\x32/.google.cloud.vision.v1.OperationMetadata.State\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\r\n\tCANCELLED\x10\x04*e\n\nLikelihood\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xf5\n\n\x0eImageAnnotator\x12\x93\x02\n\x13\x42\x61tchAnnotateImages\x12\x32.google.cloud.vision.v1.BatchAnnotateImagesRequest\x1a\x33.google.cloud.vision.v1.BatchAnnotateImagesResponse\"\x92\x01\x82\xd3\xe4\x93\x02\x80\x01\"\x13/v1/images:annotate:\x01*Z8\"3/v1/{parent=projects/*/locations/*}/images:annotate:\x01*Z,\"\'/v1/{parent=projects/*}/images:annotate:\x01*\xda\x41\x08requests\x12\x8c\x02\n\x12\x42\x61tchAnnotateFiles\x12\x31.google.cloud.vision.v1.BatchAnnotateFilesRequest\x1a\x32.google.cloud.vision.v1.BatchAnnotateFilesResponse\"\x8e\x01\x82\xd3\xe4\x93\x02}\"\x12/v1/files:annotate:\x01*Z7\"2/v1/{parent=projects/*/locations/*}/files:annotate:\x01*Z+\"&/v1/{parent=projects/*}/files:annotate:\x01*\xda\x41\x08requests\x12\xeb\x02\n\x18\x41syncBatchAnnotateImages\x12\x37.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest\x1a\x1d.google.longrunning.Operation\"\xf6\x01\x82\xd3\xe4\x93\x02\x9e\x01\"\x1d/v1/images:asyncBatchAnnotate:\x01*ZB\"=/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate:\x01*Z6\"1/v1/{parent=projects/*}/images:asyncBatchAnnotate:\x01*\xda\x41\x16requests,output_config\xca\x41\x35\n AsyncBatchAnnotateImagesResponse\x12\x11OperationMetadata\x12\xd7\x02\n\x17\x41syncBatchAnnotateFiles\x12\x36.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\x82\xd3\xe4\x93\x02\x9b\x01\"\x1c/v1/files:asyncBatchAnnotate:\x01*ZA\"</v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate:\x01*Z5\"0/v1/{parent=projects/*}/files:asyncBatchAnnotate:\x01*\xda\x41\x08requests\xca\x41\x34\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x11OperationMetadata\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionBt\n\x1a\x63om.google.cloud.vision.v1B\x13ImageAnnotatorProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
22
+
23
+ pool = Google::Protobuf::DescriptorPool.generated_pool
24
+
25
+ begin
26
+ pool.add_serialized_file(descriptor_data)
27
+ rescue TypeError => e
28
+ # Compatibility code: will be removed in the next major version.
29
+ require 'google/protobuf/descriptor_pb'
30
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
31
+ parsed.clear_dependency
32
+ serialized = parsed.class.encode(parsed)
33
+ file = pool.add_serialized_file(serialized)
34
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
35
+ imports = [
36
+ ["google.cloud.vision.v1.BoundingPoly", "google/cloud/vision/v1/geometry.proto"],
37
+ ["google.type.LatLng", "google/type/latlng.proto"],
38
+ ["google.type.Color", "google/type/color.proto"],
39
+ ["google.cloud.vision.v1.ProductSearchParams", "google/cloud/vision/v1/product_search.proto"],
40
+ ["google.cloud.vision.v1.TextAnnotation", "google/cloud/vision/v1/text_annotation.proto"],
41
+ ["google.cloud.vision.v1.WebDetection", "google/cloud/vision/v1/web_detection.proto"],
42
+ ["google.rpc.Status", "google/rpc/status.proto"],
43
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
44
+ ]
45
+ imports.each do |type_name, expected_filename|
46
+ import_file = pool.lookup(type_name).file_descriptor
47
+ if import_file.name != expected_filename
48
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
292
49
  end
293
50
  end
51
+ warn "Each proto file must use a consistent fully-qualified name."
52
+ warn "This will become an error in the next major version."
294
53
  end
295
54
 
296
55
  module Google
@@ -2211,9 +2211,9 @@ module Google
2211
2211
  # * (`String`) The path to a service account key file in JSON format
2212
2212
  # * (`Hash`) A service account key as a Hash
2213
2213
  # * (`Google::Auth::Credentials`) A googleauth credentials object
2214
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
2214
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2215
2215
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2216
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
2216
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2217
2217
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2218
2218
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2219
2219
  # * (`nil`) indicating no credentials
@@ -620,9 +620,9 @@ module Google
620
620
  # * (`String`) The path to a service account key file in JSON format
621
621
  # * (`Hash`) A service account key as a Hash
622
622
  # * (`Google::Auth::Credentials`) A googleauth credentials object
623
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
623
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
624
624
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
625
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
625
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
626
626
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
627
627
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
628
628
  # * (`nil`) indicating no credentials
@@ -1735,9 +1735,9 @@ module Google
1735
1735
  # * (`String`) The path to a service account key file in JSON format
1736
1736
  # * (`Hash`) A service account key as a Hash
1737
1737
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1738
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1738
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1739
1739
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1740
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1740
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1741
1741
  # * (`nil`) indicating no credentials
1742
1742
  # @return [::Object]
1743
1743
  # @!attribute [rw] scope
@@ -411,9 +411,9 @@ module Google
411
411
  # * (`String`) The path to a service account key file in JSON format
412
412
  # * (`Hash`) A service account key as a Hash
413
413
  # * (`Google::Auth::Credentials`) A googleauth credentials object
414
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
414
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
415
415
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
416
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
416
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
417
417
  # * (`nil`) indicating no credentials
418
418
  # @return [::Object]
419
419
  # @!attribute [rw] scope
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/vision/v1/product_search.proto
3
4
 
@@ -8,36 +9,34 @@ require 'google/cloud/vision/v1/geometry_pb'
8
9
  require 'google/cloud/vision/v1/product_search_service_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/cloud/vision/v1/product_search.proto", :syntax => :proto3) do
13
- add_message "google.cloud.vision.v1.ProductSearchParams" do
14
- optional :bounding_poly, :message, 9, "google.cloud.vision.v1.BoundingPoly"
15
- optional :product_set, :string, 6
16
- repeated :product_categories, :string, 7
17
- optional :filter, :string, 8
18
- end
19
- add_message "google.cloud.vision.v1.ProductSearchResults" do
20
- optional :index_time, :message, 2, "google.protobuf.Timestamp"
21
- repeated :results, :message, 5, "google.cloud.vision.v1.ProductSearchResults.Result"
22
- repeated :product_grouped_results, :message, 6, "google.cloud.vision.v1.ProductSearchResults.GroupedResult"
23
- end
24
- add_message "google.cloud.vision.v1.ProductSearchResults.Result" do
25
- optional :product, :message, 1, "google.cloud.vision.v1.Product"
26
- optional :score, :float, 2
27
- optional :image, :string, 3
28
- end
29
- add_message "google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation" do
30
- optional :mid, :string, 1
31
- optional :language_code, :string, 2
32
- optional :name, :string, 3
33
- optional :score, :float, 4
34
- end
35
- add_message "google.cloud.vision.v1.ProductSearchResults.GroupedResult" do
36
- optional :bounding_poly, :message, 1, "google.cloud.vision.v1.BoundingPoly"
37
- repeated :results, :message, 2, "google.cloud.vision.v1.ProductSearchResults.Result"
38
- repeated :object_annotations, :message, 3, "google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation"
12
+
13
+ descriptor_data = "\n+google/cloud/vision/v1/product_search.proto\x12\x16google.cloud.vision.v1\x1a\x19google/api/resource.proto\x1a%google/cloud/vision/v1/geometry.proto\x1a\x33google/cloud/vision/v1/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x01\n\x13ProductSearchParams\x12;\n\rbounding_poly\x18\t \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12:\n\x0bproduct_set\x18\x06 \x01(\tB%\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x1a\n\x12product_categories\x18\x07 \x03(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t\"\x88\x05\n\x14ProductSearchResults\x12.\n\nindex_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x44\n\x07results\x18\x05 \x03(\x0b\x32\x33.google.cloud.vision.v1.ProductSearchResults.Result\x12[\n\x17product_grouped_results\x18\x06 \x03(\x0b\x32:.google.cloud.vision.v1.ProductSearchResults.GroupedResult\x1aX\n\x06Result\x12\x30\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\r\n\x05score\x18\x02 \x01(\x02\x12\r\n\x05image\x18\x03 \x01(\t\x1aS\n\x10ObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x1a\xed\x01\n\rGroupedResult\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x44\n\x07results\x18\x02 \x03(\x0b\x32\x33.google.cloud.vision.v1.ProductSearchResults.Result\x12Y\n\x12object_annotations\x18\x03 \x03(\x0b\x32=.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationBs\n\x1a\x63om.google.cloud.vision.v1B\x12ProductSearchProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
14
+
15
+ pool = Google::Protobuf::DescriptorPool.generated_pool
16
+
17
+ begin
18
+ pool.add_serialized_file(descriptor_data)
19
+ rescue TypeError => e
20
+ # Compatibility code: will be removed in the next major version.
21
+ require 'google/protobuf/descriptor_pb'
22
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
23
+ parsed.clear_dependency
24
+ serialized = parsed.class.encode(parsed)
25
+ file = pool.add_serialized_file(serialized)
26
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
+ imports = [
28
+ ["google.cloud.vision.v1.BoundingPoly", "google/cloud/vision/v1/geometry.proto"],
29
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
30
+ ["google.cloud.vision.v1.Product", "google/cloud/vision/v1/product_search_service.proto"],
31
+ ]
32
+ imports.each do |type_name, expected_filename|
33
+ import_file = pool.lookup(type_name).file_descriptor
34
+ if import_file.name != expected_filename
35
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
39
36
  end
40
37
  end
38
+ warn "Each proto file must use a consistent fully-qualified name."
39
+ warn "This will become an error in the next major version."
41
40
  end
42
41
 
43
42
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/vision/v1/product_search_service.proto
3
4
 
@@ -14,156 +15,35 @@ require 'google/protobuf/field_mask_pb'
14
15
  require 'google/protobuf/timestamp_pb'
15
16
  require 'google/rpc/status_pb'
16
17
 
17
- Google::Protobuf::DescriptorPool.generated_pool.build do
18
- add_file("google/cloud/vision/v1/product_search_service.proto", :syntax => :proto3) do
19
- add_message "google.cloud.vision.v1.Product" do
20
- optional :name, :string, 1
21
- optional :display_name, :string, 2
22
- optional :description, :string, 3
23
- optional :product_category, :string, 4
24
- repeated :product_labels, :message, 5, "google.cloud.vision.v1.Product.KeyValue"
25
- end
26
- add_message "google.cloud.vision.v1.Product.KeyValue" do
27
- optional :key, :string, 1
28
- optional :value, :string, 2
29
- end
30
- add_message "google.cloud.vision.v1.ProductSet" do
31
- optional :name, :string, 1
32
- optional :display_name, :string, 2
33
- optional :index_time, :message, 3, "google.protobuf.Timestamp"
34
- optional :index_error, :message, 4, "google.rpc.Status"
35
- end
36
- add_message "google.cloud.vision.v1.ReferenceImage" do
37
- optional :name, :string, 1
38
- optional :uri, :string, 2
39
- repeated :bounding_polys, :message, 3, "google.cloud.vision.v1.BoundingPoly"
40
- end
41
- add_message "google.cloud.vision.v1.CreateProductRequest" do
42
- optional :parent, :string, 1
43
- optional :product, :message, 2, "google.cloud.vision.v1.Product"
44
- optional :product_id, :string, 3
45
- end
46
- add_message "google.cloud.vision.v1.ListProductsRequest" do
47
- optional :parent, :string, 1
48
- optional :page_size, :int32, 2
49
- optional :page_token, :string, 3
50
- end
51
- add_message "google.cloud.vision.v1.ListProductsResponse" do
52
- repeated :products, :message, 1, "google.cloud.vision.v1.Product"
53
- optional :next_page_token, :string, 2
54
- end
55
- add_message "google.cloud.vision.v1.GetProductRequest" do
56
- optional :name, :string, 1
57
- end
58
- add_message "google.cloud.vision.v1.UpdateProductRequest" do
59
- optional :product, :message, 1, "google.cloud.vision.v1.Product"
60
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
61
- end
62
- add_message "google.cloud.vision.v1.DeleteProductRequest" do
63
- optional :name, :string, 1
64
- end
65
- add_message "google.cloud.vision.v1.CreateProductSetRequest" do
66
- optional :parent, :string, 1
67
- optional :product_set, :message, 2, "google.cloud.vision.v1.ProductSet"
68
- optional :product_set_id, :string, 3
69
- end
70
- add_message "google.cloud.vision.v1.ListProductSetsRequest" do
71
- optional :parent, :string, 1
72
- optional :page_size, :int32, 2
73
- optional :page_token, :string, 3
74
- end
75
- add_message "google.cloud.vision.v1.ListProductSetsResponse" do
76
- repeated :product_sets, :message, 1, "google.cloud.vision.v1.ProductSet"
77
- optional :next_page_token, :string, 2
78
- end
79
- add_message "google.cloud.vision.v1.GetProductSetRequest" do
80
- optional :name, :string, 1
81
- end
82
- add_message "google.cloud.vision.v1.UpdateProductSetRequest" do
83
- optional :product_set, :message, 1, "google.cloud.vision.v1.ProductSet"
84
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
85
- end
86
- add_message "google.cloud.vision.v1.DeleteProductSetRequest" do
87
- optional :name, :string, 1
88
- end
89
- add_message "google.cloud.vision.v1.CreateReferenceImageRequest" do
90
- optional :parent, :string, 1
91
- optional :reference_image, :message, 2, "google.cloud.vision.v1.ReferenceImage"
92
- optional :reference_image_id, :string, 3
93
- end
94
- add_message "google.cloud.vision.v1.ListReferenceImagesRequest" do
95
- optional :parent, :string, 1
96
- optional :page_size, :int32, 2
97
- optional :page_token, :string, 3
98
- end
99
- add_message "google.cloud.vision.v1.ListReferenceImagesResponse" do
100
- repeated :reference_images, :message, 1, "google.cloud.vision.v1.ReferenceImage"
101
- optional :page_size, :int32, 2
102
- optional :next_page_token, :string, 3
103
- end
104
- add_message "google.cloud.vision.v1.GetReferenceImageRequest" do
105
- optional :name, :string, 1
106
- end
107
- add_message "google.cloud.vision.v1.DeleteReferenceImageRequest" do
108
- optional :name, :string, 1
109
- end
110
- add_message "google.cloud.vision.v1.AddProductToProductSetRequest" do
111
- optional :name, :string, 1
112
- optional :product, :string, 2
113
- end
114
- add_message "google.cloud.vision.v1.RemoveProductFromProductSetRequest" do
115
- optional :name, :string, 1
116
- optional :product, :string, 2
117
- end
118
- add_message "google.cloud.vision.v1.ListProductsInProductSetRequest" do
119
- optional :name, :string, 1
120
- optional :page_size, :int32, 2
121
- optional :page_token, :string, 3
122
- end
123
- add_message "google.cloud.vision.v1.ListProductsInProductSetResponse" do
124
- repeated :products, :message, 1, "google.cloud.vision.v1.Product"
125
- optional :next_page_token, :string, 2
126
- end
127
- add_message "google.cloud.vision.v1.ImportProductSetsGcsSource" do
128
- optional :csv_file_uri, :string, 1
129
- end
130
- add_message "google.cloud.vision.v1.ImportProductSetsInputConfig" do
131
- oneof :source do
132
- optional :gcs_source, :message, 1, "google.cloud.vision.v1.ImportProductSetsGcsSource"
133
- end
134
- end
135
- add_message "google.cloud.vision.v1.ImportProductSetsRequest" do
136
- optional :parent, :string, 1
137
- optional :input_config, :message, 2, "google.cloud.vision.v1.ImportProductSetsInputConfig"
138
- end
139
- add_message "google.cloud.vision.v1.ImportProductSetsResponse" do
140
- repeated :reference_images, :message, 1, "google.cloud.vision.v1.ReferenceImage"
141
- repeated :statuses, :message, 2, "google.rpc.Status"
142
- end
143
- add_message "google.cloud.vision.v1.BatchOperationMetadata" do
144
- optional :state, :enum, 1, "google.cloud.vision.v1.BatchOperationMetadata.State"
145
- optional :submit_time, :message, 2, "google.protobuf.Timestamp"
146
- optional :end_time, :message, 3, "google.protobuf.Timestamp"
147
- end
148
- add_enum "google.cloud.vision.v1.BatchOperationMetadata.State" do
149
- value :STATE_UNSPECIFIED, 0
150
- value :PROCESSING, 1
151
- value :SUCCESSFUL, 2
152
- value :FAILED, 3
153
- value :CANCELLED, 4
154
- end
155
- add_message "google.cloud.vision.v1.ProductSetPurgeConfig" do
156
- optional :product_set_id, :string, 1
157
- end
158
- add_message "google.cloud.vision.v1.PurgeProductsRequest" do
159
- optional :parent, :string, 1
160
- optional :force, :bool, 4
161
- oneof :target do
162
- optional :product_set_purge_config, :message, 2, "google.cloud.vision.v1.ProductSetPurgeConfig"
163
- optional :delete_orphan_products, :bool, 3
164
- end
18
+
19
+ descriptor_data = "\n3google/cloud/vision/v1/product_search_service.proto\x12\x16google.cloud.vision.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/cloud/vision/v1/geometry.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xab\x02\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1d\n\x10product_category\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12@\n\x0eproduct_labels\x18\x05 \x03(\x0b\x32(.google.cloud.vision.v1.Product.KeyValue\x1a&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:^\xea\x41[\n\x1dvision.googleapis.com/Product\x12:projects/{project}/locations/{location}/products/{product}\"\xfd\x01\n\nProductSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x33\n\nindex_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12,\n\x0bindex_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03:h\xea\x41\x65\n vision.googleapis.com/ProductSet\x12\x41projects/{project}/locations/{location}/productSets/{product_set}\"\xfe\x01\n\x0eReferenceImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x0e\x62ounding_polys\x18\x03 \x03(\x0b\x32$.google.cloud.vision.v1.BoundingPolyB\x03\xe0\x41\x01:\x88\x01\xea\x41\x84\x01\n$vision.googleapis.com/ReferenceImage\x12\\projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}\"\x9c\x01\n\x14\x43reateProductRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.vision.v1.ProductB\x03\xe0\x41\x02\x12\x12\n\nproduct_id\x18\x03 \x01(\t\"w\n\x13ListProductsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"b\n\x14ListProductsResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"H\n\x11GetProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"~\n\x14UpdateProductRequest\x12\x35\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.vision.v1.ProductB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14\x44\x65leteProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\xaa\x01\n\x17\x43reateProductSetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x0bproduct_set\x18\x02 \x01(\x0b\x32\".google.cloud.vision.v1.ProductSetB\x03\xe0\x41\x02\x12\x16\n\x0eproduct_set_id\x18\x03 \x01(\t\"z\n\x16ListProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"l\n\x17ListProductSetsResponse\x12\x38\n\x0cproduct_sets\x18\x01 \x03(\x0b\x32\".google.cloud.vision.v1.ProductSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x14GetProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\"\x88\x01\n\x17UpdateProductSetRequest\x12<\n\x0bproduct_set\x18\x01 \x01(\x0b\x32\".google.cloud.vision.v1.ProductSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Q\n\x17\x44\x65leteProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\"\xb6\x01\n\x1b\x43reateReferenceImageRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12\x44\n\x0freference_image\x18\x02 \x01(\x0b\x32&.google.cloud.vision.v1.ReferenceImageB\x03\xe0\x41\x02\x12\x1a\n\x12reference_image_id\x18\x03 \x01(\t\"z\n\x1aListReferenceImagesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8b\x01\n\x1bListReferenceImagesResponse\x12@\n\x10reference_images\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.ReferenceImage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"V\n\x18GetReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage\"Y\n\x1b\x44\x65leteReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage\"\x8f\x01\n\x1d\x41\x64\x64ProductToProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\x94\x01\n\"RemoveProductFromProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\"\x80\x01\n\x1fListProductsInProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n vision.googleapis.com/ProductSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n ListProductsInProductSetResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"2\n\x1aImportProductSetsGcsSource\x12\x14\n\x0c\x63sv_file_uri\x18\x01 \x01(\t\"r\n\x1cImportProductSetsInputConfig\x12H\n\ngcs_source\x18\x01 \x01(\x0b\x32\x32.google.cloud.vision.v1.ImportProductSetsGcsSourceH\x00\x42\x08\n\x06source\"\xa6\x01\n\x18ImportProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12O\n\x0cinput_config\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1.ImportProductSetsInputConfigB\x03\xe0\x41\x02\"\x83\x01\n\x19ImportProductSetsResponse\x12@\n\x10reference_images\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.ReferenceImage\x12$\n\x08statuses\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\"\x97\x02\n\x16\x42\x61tchOperationMetadata\x12\x43\n\x05state\x18\x01 \x01(\x0e\x32\x34.google.cloud.vision.v1.BatchOperationMetadata.State\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\x0e\n\nSUCCESSFUL\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\"/\n\x15ProductSetPurgeConfig\x12\x16\n\x0eproduct_set_id\x18\x01 \x01(\t\"\xdf\x01\n\x14PurgeProductsRequest\x12Q\n\x18product_set_purge_config\x18\x02 \x01(\x0b\x32-.google.cloud.vision.v1.ProductSetPurgeConfigH\x00\x12 \n\x16\x64\x65lete_orphan_products\x18\x03 \x01(\x08H\x00\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05\x66orce\x18\x04 \x01(\x08\x42\x08\n\x06target2\xf4\x1d\n\rProductSearch\x12\xd1\x01\n\x10\x43reateProductSet\x12/.google.cloud.vision.v1.CreateProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\"h\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\xda\x41!parent,product_set,product_set_id\x12\xb4\x01\n\x0fListProductSets\x12..google.cloud.vision.v1.ListProductSetsRequest\x1a/.google.cloud.vision.v1.ListProductSetsResponse\"@\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/productSets\xda\x41\x06parent\x12\xa1\x01\n\rGetProductSet\x12,.google.cloud.vision.v1.GetProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\">\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xd3\x01\n\x10UpdateProductSet\x12/.google.cloud.vision.v1.UpdateProductSetRequest\x1a\".google.cloud.vision.v1.ProductSet\"j\x82\xd3\xe4\x93\x02J2;/v1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\xda\x41\x17product_set,update_mask\x12\x9b\x01\n\x10\x44\x65leteProductSet\x12/.google.cloud.vision.v1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty\">\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xb9\x01\n\rCreateProduct\x12,.google.cloud.vision.v1.CreateProductRequest\x1a\x1f.google.cloud.vision.v1.Product\"Y\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/products:\x07product\xda\x41\x19parent,product,product_id\x12\xa8\x01\n\x0cListProducts\x12+.google.cloud.vision.v1.ListProductsRequest\x1a,.google.cloud.vision.v1.ListProductsResponse\"=\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/products\xda\x41\x06parent\x12\x95\x01\n\nGetProduct\x12).google.cloud.vision.v1.GetProductRequest\x1a\x1f.google.cloud.vision.v1.Product\";\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xbb\x01\n\rUpdateProduct\x12,.google.cloud.vision.v1.UpdateProductRequest\x1a\x1f.google.cloud.vision.v1.Product\"[\x82\xd3\xe4\x93\x02?24/v1/{product.name=projects/*/locations/*/products/*}:\x07product\xda\x41\x13product,update_mask\x12\x92\x01\n\rDeleteProduct\x12,.google.cloud.vision.v1.DeleteProductRequest\x1a\x16.google.protobuf.Empty\";\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xf9\x01\n\x14\x43reateReferenceImage\x12\x33.google.cloud.vision.v1.CreateReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage\"\x83\x01\x82\xd3\xe4\x93\x02Q\">/v1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\xda\x41)parent,reference_image,reference_image_id\x12\xb2\x01\n\x14\x44\x65leteReferenceImage\x12\x33.google.cloud.vision.v1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty\"M\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xcf\x01\n\x13ListReferenceImages\x12\x32.google.cloud.vision.v1.ListReferenceImagesRequest\x1a\x33.google.cloud.vision.v1.ListReferenceImagesResponse\"O\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/products/*}/referenceImages\xda\x41\x06parent\x12\xbc\x01\n\x11GetReferenceImage\x12\x30.google.cloud.vision.v1.GetReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage\"M\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xbd\x01\n\x16\x41\x64\x64ProductToProductSet\x12\x35.google.cloud.vision.v1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty\"T\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\xda\x41\x0cname,product\x12\xca\x01\n\x1bRemoveProductFromProductSet\x12:.google.cloud.vision.v1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty\"W\x82\xd3\xe4\x93\x02\x42\"=/v1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\xda\x41\x0cname,product\x12\xd6\x01\n\x18ListProductsInProductSet\x12\x37.google.cloud.vision.v1.ListProductsInProductSetRequest\x1a\x38.google.cloud.vision.v1.ListProductsInProductSetResponse\"G\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/productSets/*}/products\xda\x41\x04name\x12\xf4\x01\n\x11ImportProductSets\x12\x30.google.cloud.vision.v1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\x82\xd3\xe4\x93\x02;\"6/v1/{parent=projects/*/locations/*}/productSets:import:\x01*\xda\x41\x13parent,input_config\xca\x41\x33\n\x19ImportProductSetsResponse\x12\x16\x42\x61tchOperationMetadata\x12\xd6\x01\n\rPurgeProducts\x12,.google.cloud.vision.v1.PurgeProductsRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02\x37\"2/v1/{parent=projects/*/locations/*}/products:purge:\x01*\xda\x41\x06parent\xca\x41/\n\x15google.protobuf.Empty\x12\x16\x42\x61tchOperationMetadata\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionBz\n\x1a\x63om.google.cloud.vision.v1B\x19ProductSearchServiceProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
20
+
21
+ pool = Google::Protobuf::DescriptorPool.generated_pool
22
+
23
+ begin
24
+ pool.add_serialized_file(descriptor_data)
25
+ rescue TypeError => e
26
+ # Compatibility code: will be removed in the next major version.
27
+ require 'google/protobuf/descriptor_pb'
28
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
29
+ parsed.clear_dependency
30
+ serialized = parsed.class.encode(parsed)
31
+ file = pool.add_serialized_file(serialized)
32
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
33
+ imports = [
34
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
35
+ ["google.rpc.Status", "google/rpc/status.proto"],
36
+ ["google.cloud.vision.v1.BoundingPoly", "google/cloud/vision/v1/geometry.proto"],
37
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
38
+ ]
39
+ imports.each do |type_name, expected_filename|
40
+ import_file = pool.lookup(type_name).file_descriptor
41
+ if import_file.name != expected_filename
42
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
165
43
  end
166
44
  end
45
+ warn "Each proto file must use a consistent fully-qualified name."
46
+ warn "This will become an error in the next major version."
167
47
  end
168
48
 
169
49
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/vision/v1/text_annotation.proto
3
4
 
@@ -5,73 +6,32 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/cloud/vision/v1/geometry_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/cloud/vision/v1/text_annotation.proto", :syntax => :proto3) do
10
- add_message "google.cloud.vision.v1.TextAnnotation" do
11
- repeated :pages, :message, 1, "google.cloud.vision.v1.Page"
12
- optional :text, :string, 2
13
- end
14
- add_message "google.cloud.vision.v1.TextAnnotation.DetectedLanguage" do
15
- optional :language_code, :string, 1
16
- optional :confidence, :float, 2
17
- end
18
- add_message "google.cloud.vision.v1.TextAnnotation.DetectedBreak" do
19
- optional :type, :enum, 1, "google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType"
20
- optional :is_prefix, :bool, 2
21
- end
22
- add_enum "google.cloud.vision.v1.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.v1.TextAnnotation.TextProperty" do
31
- repeated :detected_languages, :message, 1, "google.cloud.vision.v1.TextAnnotation.DetectedLanguage"
32
- optional :detected_break, :message, 2, "google.cloud.vision.v1.TextAnnotation.DetectedBreak"
33
- end
34
- add_message "google.cloud.vision.v1.Page" do
35
- optional :property, :message, 1, "google.cloud.vision.v1.TextAnnotation.TextProperty"
36
- optional :width, :int32, 2
37
- optional :height, :int32, 3
38
- repeated :blocks, :message, 4, "google.cloud.vision.v1.Block"
39
- optional :confidence, :float, 5
40
- end
41
- add_message "google.cloud.vision.v1.Block" do
42
- optional :property, :message, 1, "google.cloud.vision.v1.TextAnnotation.TextProperty"
43
- optional :bounding_box, :message, 2, "google.cloud.vision.v1.BoundingPoly"
44
- repeated :paragraphs, :message, 3, "google.cloud.vision.v1.Paragraph"
45
- optional :block_type, :enum, 4, "google.cloud.vision.v1.Block.BlockType"
46
- optional :confidence, :float, 5
47
- end
48
- add_enum "google.cloud.vision.v1.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.v1.Paragraph" do
57
- optional :property, :message, 1, "google.cloud.vision.v1.TextAnnotation.TextProperty"
58
- optional :bounding_box, :message, 2, "google.cloud.vision.v1.BoundingPoly"
59
- repeated :words, :message, 3, "google.cloud.vision.v1.Word"
60
- optional :confidence, :float, 4
61
- end
62
- add_message "google.cloud.vision.v1.Word" do
63
- optional :property, :message, 1, "google.cloud.vision.v1.TextAnnotation.TextProperty"
64
- optional :bounding_box, :message, 2, "google.cloud.vision.v1.BoundingPoly"
65
- repeated :symbols, :message, 3, "google.cloud.vision.v1.Symbol"
66
- optional :confidence, :float, 4
67
- end
68
- add_message "google.cloud.vision.v1.Symbol" do
69
- optional :property, :message, 1, "google.cloud.vision.v1.TextAnnotation.TextProperty"
70
- optional :bounding_box, :message, 2, "google.cloud.vision.v1.BoundingPoly"
71
- optional :text, :string, 3
72
- optional :confidence, :float, 4
9
+
10
+ descriptor_data = "\n,google/cloud/vision/v1/text_annotation.proto\x12\x16google.cloud.vision.v1\x1a%google/cloud/vision/v1/geometry.proto\"\x96\x04\n\x0eTextAnnotation\x12+\n\x05pages\x18\x01 \x03(\x0b\x32\x1c.google.cloud.vision.v1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xd5\x01\n\rDetectedBreak\x12L\n\x04type\x18\x01 \x01(\x0e\x32>.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08\"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xb1\x01\n\x0cTextProperty\x12S\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1.TextAnnotation.DetectedLanguage\x12L\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1.TextAnnotation.DetectedBreak\"\xaf\x01\n\x04Page\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12-\n\x06\x62locks\x18\x04 \x03(\x0b\x32\x1d.google.cloud.vision.v1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02\"\xe6\x02\n\x05\x42lock\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x35\n\nparagraphs\x18\x03 \x03(\x0b\x32!.google.cloud.vision.v1.Paragraph\x12;\n\nblock_type\x18\x04 \x01(\x0e\x32\'.google.cloud.vision.v1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02\"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05\"\xcf\x01\n\tParagraph\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12+\n\x05words\x18\x03 \x03(\x0b\x32\x1c.google.cloud.vision.v1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02\"\xce\x01\n\x04Word\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12/\n\x07symbols\x18\x03 \x03(\x0b\x32\x1e.google.cloud.vision.v1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02\"\xad\x01\n\x06Symbol\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42t\n\x1a\x63om.google.cloud.vision.v1B\x13TextAnnotationProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.cloud.vision.v1.BoundingPoly", "google/cloud/vision/v1/geometry.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
73
31
  end
74
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
75
35
  end
76
36
 
77
37
  module Google
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Vision
23
23
  module V1
24
- VERSION = "0.10.0"
24
+ VERSION = "0.11.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,39 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/vision/v1/web_detection.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/vision/v1/web_detection.proto", :syntax => :proto3) do
8
- add_message "google.cloud.vision.v1.WebDetection" do
9
- repeated :web_entities, :message, 1, "google.cloud.vision.v1.WebDetection.WebEntity"
10
- repeated :full_matching_images, :message, 2, "google.cloud.vision.v1.WebDetection.WebImage"
11
- repeated :partial_matching_images, :message, 3, "google.cloud.vision.v1.WebDetection.WebImage"
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"
15
- end
16
- add_message "google.cloud.vision.v1.WebDetection.WebEntity" do
17
- optional :entity_id, :string, 1
18
- optional :score, :float, 2
19
- optional :description, :string, 3
20
- end
21
- add_message "google.cloud.vision.v1.WebDetection.WebImage" do
22
- optional :url, :string, 1
23
- optional :score, :float, 2
24
- end
25
- add_message "google.cloud.vision.v1.WebDetection.WebPage" do
26
- optional :url, :string, 1
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
7
+
8
+ descriptor_data = "\n*google/cloud/vision/v1/web_detection.proto\x12\x16google.cloud.vision.v1\"\xd4\x06\n\x0cWebDetection\x12\x44\n\x0cweb_entities\x18\x01 \x03(\x0b\x32..google.cloud.vision.v1.WebDetection.WebEntity\x12K\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12N\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12P\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32,.google.cloud.vision.v1.WebDetection.WebPage\x12N\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12H\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebLabel\x1a\x42\n\tWebEntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x1a&\n\x08WebImage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x1a\xd6\x01\n\x07WebPage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x12\n\npage_title\x18\x03 \x01(\t\x12K\n\x14\x66ull_matching_images\x18\x04 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x12N\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32-.google.cloud.vision.v1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tBr\n\x1a\x63om.google.cloud.vision.v1B\x11WebDetectionProtoP\x01Z5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpb\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
35
28
  end
36
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
37
32
  end
38
33
 
39
34
  module Google
@@ -35,7 +35,9 @@ module Google
35
35
  # Details about how and where to publish client libraries.
36
36
  # @!attribute [rw] version
37
37
  # @return [::String]
38
- # Version of the API to apply these settings to.
38
+ # Version of the API to apply these settings to. This is the full protobuf
39
+ # package for the API, ending in the version element.
40
+ # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
39
41
  # @!attribute [rw] launch_stage
40
42
  # @return [::Google::Api::LaunchStage]
41
43
  # Launch stage of this version of the API.
@@ -81,7 +83,7 @@ module Google
81
83
  # long-running operation pattern.
82
84
  # @!attribute [rw] new_issue_uri
83
85
  # @return [::String]
84
- # Link to a place that API users can report issues. Example:
86
+ # Link to a *public* URI where users can report issues. Example:
85
87
  # https://issuetracker.google.com/issues/new?component=190865&template=1161103
86
88
  # @!attribute [rw] documentation_uri
87
89
  # @return [::String]
@@ -111,6 +113,10 @@ module Google
111
113
  # Client library settings. If the same version string appears multiple
112
114
  # times in this list, then the last one wins. Settings from earlier
113
115
  # settings with the same version string are discarded.
116
+ # @!attribute [rw] proto_reference_documentation_uri
117
+ # @return [::String]
118
+ # Optional link to proto reference documentation. Example:
119
+ # https://cloud.google.com/pubsub/lite/docs/reference/rpc
114
120
  class Publishing
115
121
  include ::Google::Protobuf::MessageExts
116
122
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -203,9 +209,57 @@ module Google
203
209
  # @!attribute [rw] common
204
210
  # @return [::Google::Api::CommonLanguageSettings]
205
211
  # Some settings.
212
+ # @!attribute [rw] renamed_services
213
+ # @return [::Google::Protobuf::Map{::String => ::String}]
214
+ # Map from original service names to renamed versions.
215
+ # This is used when the default generated types
216
+ # would cause a naming conflict. (Neither name is
217
+ # fully-qualified.)
218
+ # Example: Subscriber to SubscriberServiceApi.
219
+ # @!attribute [rw] renamed_resources
220
+ # @return [::Google::Protobuf::Map{::String => ::String}]
221
+ # Map from full resource types to the effective short name
222
+ # for the resource. This is used when otherwise resource
223
+ # named from different services would cause naming collisions.
224
+ # Example entry:
225
+ # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
226
+ # @!attribute [rw] ignored_resources
227
+ # @return [::Array<::String>]
228
+ # List of full resource types to ignore during generation.
229
+ # This is typically used for API-specific Location resources,
230
+ # which should be handled by the generator as if they were actually
231
+ # the common Location resources.
232
+ # Example entry: "documentai.googleapis.com/Location"
233
+ # @!attribute [rw] forced_namespace_aliases
234
+ # @return [::Array<::String>]
235
+ # Namespaces which must be aliased in snippets due to
236
+ # a known (but non-generator-predictable) naming collision
237
+ # @!attribute [rw] handwritten_signatures
238
+ # @return [::Array<::String>]
239
+ # Method signatures (in the form "service.method(signature)")
240
+ # which are provided separately, so shouldn't be generated.
241
+ # Snippets *calling* these methods are still generated, however.
206
242
  class DotnetSettings
207
243
  include ::Google::Protobuf::MessageExts
208
244
  extend ::Google::Protobuf::MessageExts::ClassMethods
245
+
246
+ # @!attribute [rw] key
247
+ # @return [::String]
248
+ # @!attribute [rw] value
249
+ # @return [::String]
250
+ class RenamedServicesEntry
251
+ include ::Google::Protobuf::MessageExts
252
+ extend ::Google::Protobuf::MessageExts::ClassMethods
253
+ end
254
+
255
+ # @!attribute [rw] key
256
+ # @return [::String]
257
+ # @!attribute [rw] value
258
+ # @return [::String]
259
+ class RenamedResourcesEntry
260
+ include ::Google::Protobuf::MessageExts
261
+ extend ::Google::Protobuf::MessageExts::ClassMethods
262
+ end
209
263
  end
210
264
 
211
265
  # Settings for Ruby client libraries.
@@ -240,8 +294,8 @@ module Google
240
294
  # Example of a YAML configuration::
241
295
  #
242
296
  # publishing:
243
- # method_behavior:
244
- # - selector: CreateAdDomain
297
+ # method_settings:
298
+ # - selector: google.cloud.speech.v2.Speech.BatchRecognize
245
299
  # long_running:
246
300
  # initial_poll_delay:
247
301
  # seconds: 60 # 1 minute
@@ -299,6 +353,15 @@ module Google
299
353
 
300
354
  # Street View Org.
301
355
  STREET_VIEW = 4
356
+
357
+ # Shopping Org.
358
+ SHOPPING = 5
359
+
360
+ # Geo Org.
361
+ GEO = 6
362
+
363
+ # Generative AI - https://developers.generativeai.google
364
+ GENERATIVE_AI = 7
302
365
  end
303
366
 
304
367
  # To where should client libraries be published?
@@ -43,8 +43,12 @@ module Google
43
43
  # if (any.is(Foo.class)) {
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
46
50
  #
47
- # Example 3: Pack and unpack a message in Python.
51
+ # Example 3: Pack and unpack a message in Python.
48
52
  #
49
53
  # foo = Foo(...)
50
54
  # any = Any()
@@ -54,7 +58,7 @@ module Google
54
58
  # any.Unpack(foo)
55
59
  # ...
56
60
  #
57
- # Example 4: Pack and unpack a message in Go
61
+ # Example 4: Pack and unpack a message in Go
58
62
  #
59
63
  # foo := &pb.Foo{...}
60
64
  # any, err := anypb.New(foo)
@@ -73,9 +77,8 @@ module Google
73
77
  # in the type URL, for example "foo.bar.com/x/y.z" will yield type
74
78
  # name "y.z".
75
79
  #
76
- #
77
80
  # JSON
78
- #
81
+ # ====
79
82
  # The JSON representation of an `Any` value uses the regular
80
83
  # representation of the deserialized, embedded message, with an
81
84
  # additional field `@type` which contains the type URL. Example:
@@ -69,7 +69,6 @@ module Google
69
69
  # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
- #
73
72
  # Example 5: Compute Timestamp from Java `Instant.now()`.
74
73
  #
75
74
  # Instant now = Instant.now();
@@ -78,7 +77,6 @@ module Google
78
77
  # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
78
  # .setNanos(now.getNano()).build();
80
79
  #
81
- #
82
80
  # Example 6: Compute Timestamp from current time in Python.
83
81
  #
84
82
  # timestamp = Timestamp()
@@ -108,7 +106,7 @@ module Google
108
106
  # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
109
107
  # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
110
108
  # the Joda Time's [`ISODateTimeFormat.dateTime()`](
111
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
109
+ # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
112
110
  # ) to obtain a formatter capable of generating timestamps in this format.
113
111
  # @!attribute [rw] seconds
114
112
  # @return [::Integer]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-vision-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.17.1
19
+ version: 0.19.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.17.1
29
+ version: 0.19.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -245,5 +245,7 @@ requirements: []
245
245
  rubygems_version: 3.4.2
246
246
  signing_key:
247
247
  specification_version: 4
248
- summary: API Client library for the Cloud Vision V1 API
248
+ summary: Integrates Google Vision features, including image labeling, face, logo,
249
+ and landmark detection, optical character recognition (OCR), and detection of explicit
250
+ content, into applications.
249
251
  test_files: []