google-cloud-vision-v1 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/google/cloud/vision/v1/geometry_pb.rb +24 -18
- data/lib/google/cloud/vision/v1/image_annotator/client.rb +6 -4
- data/lib/google/cloud/vision/v1/image_annotator/operations.rb +5 -3
- data/lib/google/cloud/vision/v1/image_annotator/rest/client.rb +6 -4
- data/lib/google/cloud/vision/v1/image_annotator/rest/operations.rb +9 -7
- data/lib/google/cloud/vision/v1/image_annotator/rest/service_stub.rb +4 -4
- data/lib/google/cloud/vision/v1/image_annotator_pb.rb +32 -273
- data/lib/google/cloud/vision/v1/product_search/client.rb +6 -4
- data/lib/google/cloud/vision/v1/product_search/operations.rb +5 -3
- data/lib/google/cloud/vision/v1/product_search/rest/client.rb +6 -4
- data/lib/google/cloud/vision/v1/product_search/rest/operations.rb +9 -7
- data/lib/google/cloud/vision/v1/product_search/rest/service_stub.rb +19 -19
- data/lib/google/cloud/vision/v1/product_search_pb.rb +27 -28
- data/lib/google/cloud/vision/v1/product_search_service_pb.rb +28 -148
- data/lib/google/cloud/vision/v1/text_annotation_pb.rb +25 -65
- data/lib/google/cloud/vision/v1/version.rb +1 -1
- data/lib/google/cloud/vision/v1/web_detection_pb.rb +24 -29
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6341e277c30416ae67a66a2db042a929281cd6b53d6dcad253b82b2e841181ea
|
4
|
+
data.tar.gz: 939fded39744121c62501bcc544aff487cea7886e5532c368252ca793ef6ed8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a1abaedb5b82ab28d8f12666b2e0fba89fca9d3dfa9732754ce49a00270fe1729ebbcf2dfa006e9fcc54bdb279ffe67b6695a4a66bfe2f2734798ee9c836664
|
7
|
+
data.tar.gz: 98abefc37c5abc5c87efc6bb26554a85217c7f0258eea0153440f19093b69fb9029714f0bfa8cb101f1829072b78e96da98fd95db253de4e78edd2faf58a9d30
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the Cloud Vision V1 API
|
2
2
|
|
3
|
-
|
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://
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
@@ -145,7 +145,7 @@ module Google
|
|
145
145
|
credentials = @config.credentials
|
146
146
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
147
147
|
# but only if the default endpoint does not have a region prefix.
|
148
|
-
enable_self_signed_jwt = @config.endpoint ==
|
148
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
149
149
|
!@config.endpoint.split(".").first.include?("-")
|
150
150
|
credentials ||= Credentials.default scope: @config.scope,
|
151
151
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -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://
|
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://
|
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
|
@@ -659,7 +659,9 @@ module Google
|
|
659
659
|
class Configuration
|
660
660
|
extend ::Gapic::Config
|
661
661
|
|
662
|
-
|
662
|
+
DEFAULT_ENDPOINT = "vision.googleapis.com"
|
663
|
+
|
664
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
663
665
|
config_attr :credentials, nil do |value|
|
664
666
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
665
667
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -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://
|
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://
|
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
|
@@ -664,7 +664,9 @@ module Google
|
|
664
664
|
class Configuration
|
665
665
|
extend ::Gapic::Config
|
666
666
|
|
667
|
-
|
667
|
+
DEFAULT_ENDPOINT = "vision.googleapis.com"
|
668
|
+
|
669
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
668
670
|
config_attr :credentials, nil do |value|
|
669
671
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
670
672
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -141,7 +141,7 @@ module Google
|
|
141
141
|
credentials = @config.credentials
|
142
142
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
143
143
|
# but only if the default endpoint does not have a region prefix.
|
144
|
-
enable_self_signed_jwt = @config.endpoint ==
|
144
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
145
145
|
!@config.endpoint.split(".").first.include?("-")
|
146
146
|
credentials ||= Credentials.default scope: @config.scope,
|
147
147
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -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://
|
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://
|
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
|
@@ -567,7 +567,9 @@ module Google
|
|
567
567
|
class Configuration
|
568
568
|
extend ::Gapic::Config
|
569
569
|
|
570
|
-
|
570
|
+
DEFAULT_ENDPOINT = "vision.googleapis.com"
|
571
|
+
|
572
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
571
573
|
config_attr :credentials, nil do |value|
|
572
574
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
573
575
|
allowed.any? { |klass| klass === value }
|
@@ -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://
|
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://
|
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
|
@@ -446,7 +446,9 @@ module Google
|
|
446
446
|
class Configuration
|
447
447
|
extend ::Gapic::Config
|
448
448
|
|
449
|
-
|
449
|
+
DEFAULT_ENDPOINT = "vision.googleapis.com"
|
450
|
+
|
451
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
450
452
|
config_attr :credentials, nil do |value|
|
451
453
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
452
454
|
allowed.any? { |klass| klass === value }
|
@@ -567,7 +569,7 @@ module Google
|
|
567
569
|
|
568
570
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
|
569
571
|
query_string_params = if query_string_params.any?
|
570
|
-
query_string_params.to_h { |p| p.split
|
572
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
571
573
|
else
|
572
574
|
{}
|
573
575
|
end
|
@@ -605,7 +607,7 @@ module Google
|
|
605
607
|
|
606
608
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
|
607
609
|
query_string_params = if query_string_params.any?
|
608
|
-
query_string_params.to_h { |p| p.split
|
610
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
609
611
|
else
|
610
612
|
{}
|
611
613
|
end
|
@@ -643,7 +645,7 @@ module Google
|
|
643
645
|
|
644
646
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
|
645
647
|
query_string_params = if query_string_params.any?
|
646
|
-
query_string_params.to_h { |p| p.split
|
648
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
647
649
|
else
|
648
650
|
{}
|
649
651
|
end
|
@@ -681,7 +683,7 @@ module Google
|
|
681
683
|
|
682
684
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
|
683
685
|
query_string_params = if query_string_params.any?
|
684
|
-
query_string_params.to_h { |p| p.split
|
686
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
685
687
|
else
|
686
688
|
{}
|
687
689
|
end
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_batch_annotate_images_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_batch_annotate_files_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
|
136
136
|
verb, uri, query_string_params, body = ServiceStub.transcode_async_batch_annotate_images_request request_pb
|
137
137
|
query_string_params = if query_string_params.any?
|
138
|
-
query_string_params.to_h { |p| p.split
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
139
|
else
|
140
140
|
{}
|
141
141
|
end
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
|
174
174
|
verb, uri, query_string_params, body = ServiceStub.transcode_async_batch_annotate_files_request request_pb
|
175
175
|
query_string_params = if query_string_params.any?
|
176
|
-
query_string_params.to_h { |p| p.split
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
177
|
else
|
178
178
|
{}
|
179
179
|
end
|
@@ -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
|
-
|
20
|
-
add_file("google/cloud/vision/v1/image_annotator.proto", :syntax => :proto3) do
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|