google-cloud-vision 0.32.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +4 -2
  3. data/AUTHENTICATION.md +151 -0
  4. data/LICENSE.md +201 -0
  5. data/MIGRATING.md +343 -0
  6. data/README.md +97 -52
  7. data/lib/google/cloud/vision/{v1/doc/google/protobuf/empty.rb → version.rb} +10 -13
  8. data/lib/google/cloud/vision.rb +132 -207
  9. data/lib/{google/cloud/vision/v1p3beta1/doc/google/protobuf/empty.rb → google-cloud-vision.rb} +5 -15
  10. metadata +108 -83
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/vision/v1/credentials.rb +0 -42
  13. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb +0 -66
  14. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +0 -763
  15. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb +0 -88
  16. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb +0 -539
  17. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +0 -254
  18. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +0 -102
  19. data/lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb +0 -93
  20. data/lib/google/cloud/vision/v1/doc/google/protobuf/any.rb +0 -130
  21. data/lib/google/cloud/vision/v1/doc/google/protobuf/field_mask.rb +0 -230
  22. data/lib/google/cloud/vision/v1/doc/google/protobuf/timestamp.rb +0 -109
  23. data/lib/google/cloud/vision/v1/doc/google/protobuf/wrappers.rb +0 -90
  24. data/lib/google/cloud/vision/v1/doc/google/rpc/status.rb +0 -84
  25. data/lib/google/cloud/vision/v1/doc/google/type/color.rb +0 -156
  26. data/lib/google/cloud/vision/v1/doc/google/type/latlng.rb +0 -65
  27. data/lib/google/cloud/vision/v1/geometry_pb.rb +0 -39
  28. data/lib/google/cloud/vision/v1/helpers.rb +0 -1154
  29. data/lib/google/cloud/vision/v1/image_annotator_client.rb +0 -302
  30. data/lib/google/cloud/vision/v1/image_annotator_client_config.json +0 -36
  31. data/lib/google/cloud/vision/v1/image_annotator_pb.rb +0 -305
  32. data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +0 -56
  33. data/lib/google/cloud/vision/v1/product_search_client.rb +0 -1337
  34. data/lib/google/cloud/vision/v1/product_search_client_config.json +0 -116
  35. data/lib/google/cloud/vision/v1/product_search_pb.rb +0 -45
  36. data/lib/google/cloud/vision/v1/product_search_service_pb.rb +0 -191
  37. data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +0 -224
  38. data/lib/google/cloud/vision/v1/text_annotation_pb.rb +0 -94
  39. data/lib/google/cloud/vision/v1/web_detection_pb.rb +0 -51
  40. data/lib/google/cloud/vision/v1.rb +0 -233
  41. data/lib/google/cloud/vision/v1p3beta1/credentials.rb +0 -42
  42. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/geometry.rb +0 -72
  43. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/image_annotator.rb +0 -763
  44. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search.rb +0 -154
  45. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search_service.rb +0 -533
  46. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/text_annotation.rb +0 -254
  47. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/web_detection.rb +0 -101
  48. data/lib/google/cloud/vision/v1p3beta1/doc/google/longrunning/operations.rb +0 -93
  49. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/any.rb +0 -130
  50. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/field_mask.rb +0 -230
  51. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/timestamp.rb +0 -109
  52. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/wrappers.rb +0 -90
  53. data/lib/google/cloud/vision/v1p3beta1/doc/google/rpc/status.rb +0 -84
  54. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/color.rb +0 -156
  55. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/latlng.rb +0 -65
  56. data/lib/google/cloud/vision/v1p3beta1/geometry_pb.rb +0 -43
  57. data/lib/google/cloud/vision/v1p3beta1/helpers.rb +0 -1154
  58. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client.rb +0 -302
  59. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client_config.json +0 -36
  60. data/lib/google/cloud/vision/v1p3beta1/image_annotator_pb.rb +0 -304
  61. data/lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb +0 -55
  62. data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +0 -1351
  63. data/lib/google/cloud/vision/v1p3beta1/product_search_client_config.json +0 -116
  64. data/lib/google/cloud/vision/v1p3beta1/product_search_pb.rb +0 -64
  65. data/lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb +0 -191
  66. data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +0 -222
  67. data/lib/google/cloud/vision/v1p3beta1/text_annotation_pb.rb +0 -94
  68. data/lib/google/cloud/vision/v1p3beta1/web_detection_pb.rb +0 -51
  69. data/lib/google/cloud/vision/v1p3beta1.rb +0 -233
@@ -1,4 +1,6 @@
1
- # Copyright 2018 Google LLC
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
2
4
  #
3
5
  # Licensed under the Apache License, Version 2.0 (the "License");
4
6
  # you may not use this file except in compliance with the License.
@@ -12,224 +14,147 @@
12
14
  # See the License for the specific language governing permissions and
13
15
  # limitations under the License.
14
16
 
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ # Require this file early so that the version constant gets defined before
20
+ # requiring "google/cloud". This is because google-cloud-core will load the
21
+ # entrypoint (gem name) file, which in turn re-requires this file (hence
22
+ # causing a require cycle) unless the version constant is already defined.
23
+ require "google/cloud/vision/version"
15
24
 
16
- require "google/gax"
17
- require "pathname"
25
+ require "googleauth"
26
+ gem "google-cloud-core"
27
+ require "google/cloud" unless defined? ::Google::Cloud.new
28
+ require "google/cloud/config"
29
+
30
+ # Set the default configuration
31
+ ::Google::Cloud.configure.add_config! :vision do |config|
32
+ config.add_field! :endpoint, "vision.googleapis.com", match: ::String
33
+ config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
34
+ config.add_field! :scope, nil, match: [::Array, ::String]
35
+ config.add_field! :lib_name, nil, match: ::String
36
+ config.add_field! :lib_version, nil, match: ::String
37
+ config.add_field! :interceptors, nil, match: ::Array
38
+ config.add_field! :timeout, nil, match: ::Numeric
39
+ config.add_field! :metadata, nil, match: ::Hash
40
+ config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
41
+ config.add_field! :quota_project, nil, match: ::String
42
+ end
18
43
 
19
44
  module Google
20
45
  module Cloud
21
- # rubocop:disable LineLength
22
-
23
- ##
24
- # # Ruby Client for Cloud Vision API ([Alpha](https://github.com/googleapis/google-cloud-ruby#versioning))
25
- #
26
- # [Cloud Vision API][Product Documentation]:
27
- # Integrates Google Vision features, including image labeling, face, logo, and
28
- # landmark detection, optical character recognition (OCR), and detection of
29
- # explicit content, into applications.
30
- # - [Product Documentation][]
31
- #
32
- # ## Quick Start
33
- # In order to use this library, you first need to go through the following
34
- # steps:
35
- #
36
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
37
- # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
38
- # 3. [Enable the Cloud Vision API.](https://console.cloud.google.com/apis/library/vision.googleapis.com)
39
- # 4. [Setup Authentication.](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
40
- #
41
- # ### Installation
42
- # ```
43
- # $ gem install google-cloud-vision
44
- # ```
45
- #
46
- # ### Migration Guide
47
- #
48
- # The 0.32.0 release introduced breaking changes relative to the previous
49
- # release, 0.31.0. For more details and instructions to migrate your code,
50
- # please visit the [migration
51
- # guide](https://cloud.google.com/vision/docs/ruby-client-migration).
52
- #
53
- # ### Preview
54
- # #### ImageAnnotatorClient
55
- # ```rb
56
- # require "google/cloud/vision"
57
- #
58
- # image_annotator_client = Google::Cloud::Vision::ImageAnnotator.new
59
- # gcs_image_uri = "gs://gapic-toolkit/President_Barack_Obama.jpg"
60
- # source = { gcs_image_uri: gcs_image_uri }
61
- # image = { source: source }
62
- # type = :FACE_DETECTION
63
- # features_element = { type: type }
64
- # features = [features_element]
65
- # requests_element = { image: image, features: features }
66
- # requests = [requests_element]
67
- # response = image_annotator_client.batch_annotate_images(requests)
68
- # ```
69
- #
70
- # ### Next Steps
71
- # - Read the [Cloud Vision API Product documentation][Product Documentation]
72
- # to learn more about the product and see How-to Guides.
73
- # - View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
74
- # to see the full list of Cloud APIs that we cover.
75
- #
76
- # [Product Documentation]: https://cloud.google.com/vision
77
- #
78
- # ## Enabling Logging
79
- #
80
- # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
81
- # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
82
- # or a [`Google::Cloud::Logging::Logger`](https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
83
- # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
84
- # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
85
- #
86
- # Configuring a Ruby stdlib logger:
87
- #
88
- # ```ruby
89
- # require "logger"
90
- #
91
- # module MyLogger
92
- # LOGGER = Logger.new $stderr, level: Logger::WARN
93
- # def logger
94
- # LOGGER
95
- # end
96
- # end
97
- #
98
- # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
99
- # module GRPC
100
- # extend MyLogger
101
- # end
102
- # ```
103
- #
104
46
  module Vision
105
- # rubocop:enable LineLength
106
-
107
- FILE_DIR = File.realdirpath(Pathname.new(__FILE__).join("..").join("vision"))
47
+ ##
48
+ # Create a new client object for ProductSearch.
49
+ #
50
+ # By default, this returns an instance of
51
+ # [Google::Cloud::Vision::V1::ProductSearch::Client](https://googleapis.dev/ruby/google-cloud-vision-v1/latest/Google/Cloud/Vision/V1/ProductSearch/Client.html)
52
+ # for version V1 of the API.
53
+ # However, you can specify specify a different API version by passing it in the
54
+ # `version` parameter. If the ProductSearch service is
55
+ # supported by that API version, and the corresponding gem is available, the
56
+ # appropriate versioned client will be returned.
57
+ #
58
+ # ## About ProductSearch
59
+ #
60
+ # Manages Products and ProductSets of reference images for use in product
61
+ # search. It uses the following resource model:
62
+ #
63
+ # - The API has a collection of ProductSet resources, named
64
+ # `projects/*/locations/*/productSets/*`, which acts as a way to put different
65
+ # products into groups to limit identification.
66
+ #
67
+ # In parallel,
68
+ #
69
+ # - The API has a collection of Product resources, named
70
+ # `projects/*/locations/*/products/*`
71
+ #
72
+ # - Each Product has a collection of ReferenceImage resources, named
73
+ # `projects/*/locations/*/products/*/referenceImages/*`
74
+ #
75
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
76
+ # Defaults to `:v1`.
77
+ # @return [ProductSearch::Client] A client object for the specified version.
78
+ #
79
+ def self.product_search version: :v1, &block
80
+ require "google/cloud/vision/#{version.to_s.downcase}"
108
81
 
109
- AVAILABLE_VERSIONS = Dir["#{FILE_DIR}/*"]
110
- .select { |file| File.directory?(file) }
111
- .select { |dir| Google::Gax::VERSION_MATCHER.match(File.basename(dir)) }
112
- .select { |dir| File.exist?(dir + ".rb") }
113
- .map { |dir| File.basename(dir) }
82
+ package_name = Google::Cloud::Vision
83
+ .constants
84
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
85
+ .first
86
+ package_module = Google::Cloud::Vision.const_get package_name
87
+ package_module.const_get(:ProductSearch).const_get(:Client).new(&block)
88
+ end
114
89
 
115
- module ProductSearch
116
- ##
117
- # Manages Products and ProductSets of reference images for use in product
118
- # search. It uses the following resource model:
119
- #
120
- # * The API has a collection of {Google::Cloud::Vision::V1::ProductSet ProductSet} resources, named
121
- # `projects/*/locations/*/productSets/*`, which acts as a way to put different
122
- # products into groups to limit identification.
123
- #
124
- # In parallel,
125
- #
126
- # * The API has a collection of {Google::Cloud::Vision::V1::Product Product} resources, named
127
- # `projects/*/locations/*/products/*`
128
- #
129
- # * Each {Google::Cloud::Vision::V1::Product Product} has a collection of {Google::Cloud::Vision::V1::ReferenceImage ReferenceImage} resources, named
130
- # `projects/*/locations/*/products/*/referenceImages/*`
131
- #
132
- # @param version [Symbol, String]
133
- # The major version of the service to be used. By default :v1
134
- # is used.
135
- # @overload new(version:, credentials:, scopes:, client_config:, timeout:)
136
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
137
- # Provides the means for authenticating requests made by the client. This parameter can
138
- # be many types.
139
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
140
- # authenticating requests made by this client.
141
- # A `String` will be treated as the path to the keyfile to be used for the construction of
142
- # credentials for this client.
143
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
144
- # credentials for this client.
145
- # A `GRPC::Core::Channel` will be used to make calls through.
146
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
147
- # should already be composed with a `GRPC::Core::CallCredentials` object.
148
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
149
- # metadata for requests, generally, to give OAuth credentials.
150
- # @param scopes [Array<String>]
151
- # The OAuth scopes for this service. This parameter is ignored if
152
- # an updater_proc is supplied.
153
- # @param client_config [Hash]
154
- # A Hash for call options for each method. See
155
- # Google::Gax#construct_settings for the structure of
156
- # this data. Falls back to the default config if not specified
157
- # or the specified config is missing data points.
158
- # @param timeout [Numeric]
159
- # The default timeout, in seconds, for calls made through this client.
160
- # @param metadata [Hash]
161
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
162
- # @param exception_transformer [Proc]
163
- # An optional proc that intercepts any exceptions raised during an API call to inject
164
- # custom error handling.
165
- def self.new(*args, version: :v1, **kwargs)
166
- unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
167
- raise "The version: #{version} is not available. The available versions " \
168
- "are: [#{AVAILABLE_VERSIONS.join(", ")}]"
169
- end
90
+ ##
91
+ # Create a new client object for ImageAnnotator.
92
+ #
93
+ # By default, this returns an instance of
94
+ # [Google::Cloud::Vision::V1::ImageAnnotator::Client](https://googleapis.dev/ruby/google-cloud-vision-v1/latest/Google/Cloud/Vision/V1/ImageAnnotator/Client.html)
95
+ # for version V1 of the API.
96
+ # However, you can specify specify a different API version by passing it in the
97
+ # `version` parameter. If the ImageAnnotator service is
98
+ # supported by that API version, and the corresponding gem is available, the
99
+ # appropriate versioned client will be returned.
100
+ #
101
+ # ## About ImageAnnotator
102
+ #
103
+ # Service that performs Google Cloud Vision API detection tasks over client
104
+ # images, such as face, landmark, logo, label, and text detection. The
105
+ # ImageAnnotator service returns detected entities from the images.
106
+ #
107
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
108
+ # Defaults to `:v1`.
109
+ # @return [ImageAnnotator::Client] A client object for the specified version.
110
+ #
111
+ def self.image_annotator version: :v1, &block
112
+ require "google/cloud/vision/#{version.to_s.downcase}"
170
113
 
171
- require "#{FILE_DIR}/#{version.to_s.downcase}"
172
- version_module = Google::Cloud::Vision
173
- .constants
174
- .select {|sym| sym.to_s.downcase == version.to_s.downcase}
175
- .first
176
- Google::Cloud::Vision.const_get(version_module)::ProductSearch.new(*args, **kwargs)
177
- end
114
+ package_name = Google::Cloud::Vision
115
+ .constants
116
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
117
+ .first
118
+ package_module = Google::Cloud::Vision.const_get package_name
119
+ package_module.const_get(:ImageAnnotator).const_get(:Client).new(&block)
178
120
  end
179
121
 
180
- module ImageAnnotator
181
- ##
182
- # Service that performs Google Cloud Vision API detection tasks over client
183
- # images, such as face, landmark, logo, label, and text detection. The
184
- # ImageAnnotator service returns detected entities from the images.
185
- #
186
- # @param version [Symbol, String]
187
- # The major version of the service to be used. By default :v1
188
- # is used.
189
- # @overload new(version:, credentials:, scopes:, client_config:, timeout:)
190
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
191
- # Provides the means for authenticating requests made by the client. This parameter can
192
- # be many types.
193
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
194
- # authenticating requests made by this client.
195
- # A `String` will be treated as the path to the keyfile to be used for the construction of
196
- # credentials for this client.
197
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
198
- # credentials for this client.
199
- # A `GRPC::Core::Channel` will be used to make calls through.
200
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
201
- # should already be composed with a `GRPC::Core::CallCredentials` object.
202
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
203
- # metadata for requests, generally, to give OAuth credentials.
204
- # @param scopes [Array<String>]
205
- # The OAuth scopes for this service. This parameter is ignored if
206
- # an updater_proc is supplied.
207
- # @param client_config [Hash]
208
- # A Hash for call options for each method. See
209
- # Google::Gax#construct_settings for the structure of
210
- # this data. Falls back to the default config if not specified
211
- # or the specified config is missing data points.
212
- # @param timeout [Numeric]
213
- # The default timeout, in seconds, for calls made through this client.
214
- # @param metadata [Hash]
215
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
216
- # @param exception_transformer [Proc]
217
- # An optional proc that intercepts any exceptions raised during an API call to inject
218
- # custom error handling.
219
- def self.new(*args, version: :v1, **kwargs)
220
- unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
221
- raise "The version: #{version} is not available. The available versions " \
222
- "are: [#{AVAILABLE_VERSIONS.join(", ")}]"
223
- end
122
+ ##
123
+ # Configure the google-cloud-vision library.
124
+ #
125
+ # The following configuration parameters are supported:
126
+ #
127
+ # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) -
128
+ # The path to the keyfile as a String, the contents of the keyfile as a
129
+ # Hash, or a Google::Auth::Credentials object.
130
+ # * `lib_name` (*type:* `String`) -
131
+ # The library name as recorded in instrumentation and logging.
132
+ # * `lib_version` (*type:* `String`) -
133
+ # The library version as recorded in instrumentation and logging.
134
+ # * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
135
+ # An array of interceptors that are run before calls are executed.
136
+ # * `timeout` (*type:* `Numeric`) -
137
+ # Default timeout in seconds.
138
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) -
139
+ # Additional gRPC headers to be sent with the call.
140
+ # * `retry_policy` (*type:* `Hash`) -
141
+ # The retry policy. The value is a hash with the following keys:
142
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
143
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
144
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
145
+ # * `:retry_codes` (*type:* `Array<String>`) -
146
+ # The error codes that should trigger a retry.
147
+ #
148
+ # @return [::Google::Cloud::Config] The default configuration used by this library
149
+ #
150
+ def self.configure
151
+ yield ::Google::Cloud.configure.vision if block_given?
224
152
 
225
- require "#{FILE_DIR}/#{version.to_s.downcase}"
226
- version_module = Google::Cloud::Vision
227
- .constants
228
- .select {|sym| sym.to_s.downcase == version.to_s.downcase}
229
- .first
230
- Google::Cloud::Vision.const_get(version_module)::ImageAnnotator.new(*args, **kwargs)
231
- end
153
+ ::Google::Cloud.configure.vision
232
154
  end
233
155
  end
234
156
  end
235
157
  end
158
+
159
+ helper_path = ::File.join __dir__, "vision", "helpers.rb"
160
+ require "google/cloud/vision/helpers" if ::File.file? helper_path
@@ -1,4 +1,6 @@
1
- # Copyright 2018 Google LLC
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
2
4
  #
3
5
  # Licensed under the Apache License, Version 2.0 (the "License");
4
6
  # you may not use this file except in compliance with the License.
@@ -12,18 +14,6 @@
12
14
  # See the License for the specific language governing permissions and
13
15
  # limitations under the License.
14
16
 
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
15
18
 
16
- module Google
17
- module Protobuf
18
- # A generic empty message that you can re-use to avoid defining duplicated
19
- # empty messages in your APIs. A typical example is to use it as the request
20
- # or the response type of an API method. For instance:
21
- #
22
- # service Foo {
23
- # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
24
- # }
25
- #
26
- # The JSON representation for `Empty` is empty JSON object `{}`.
27
- class Empty; end
28
- end
29
- end
19
+ require "google/cloud/vision" unless defined? Google::Cloud::Vision::VERSION