google-cloud-vision-v1p3beta1 0.1.3 → 0.2.2

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +6 -6
  3. data/README.md +1 -1
  4. data/lib/google/cloud/vision/v1p3beta1.rb +1 -1
  5. data/lib/google/cloud/vision/v1p3beta1/image_annotator.rb +1 -1
  6. data/lib/google/cloud/vision/v1p3beta1/image_annotator/client.rb +86 -73
  7. data/lib/google/cloud/vision/v1p3beta1/image_annotator/credentials.rb +1 -1
  8. data/lib/google/cloud/vision/v1p3beta1/image_annotator/operations.rb +109 -103
  9. data/lib/google/cloud/vision/v1p3beta1/image_annotator/paths.rb +3 -3
  10. data/lib/google/cloud/vision/v1p3beta1/product_search.rb +4 -4
  11. data/lib/google/cloud/vision/v1p3beta1/product_search/client.rb +372 -359
  12. data/lib/google/cloud/vision/v1p3beta1/product_search/credentials.rb +1 -1
  13. data/lib/google/cloud/vision/v1p3beta1/product_search/operations.rb +109 -103
  14. data/lib/google/cloud/vision/v1p3beta1/product_search/paths.rb +12 -12
  15. data/lib/google/cloud/vision/v1p3beta1/version.rb +1 -1
  16. data/proto_docs/google/api/resource.rb +12 -12
  17. data/proto_docs/google/cloud/vision/v1p3beta1/geometry.rb +20 -20
  18. data/proto_docs/google/cloud/vision/v1p3beta1/image_annotator.rb +172 -172
  19. data/proto_docs/google/cloud/vision/v1p3beta1/product_search.rb +29 -29
  20. data/proto_docs/google/cloud/vision/v1p3beta1/product_search_service.rb +133 -133
  21. data/proto_docs/google/cloud/vision/v1p3beta1/text_annotation.rb +49 -49
  22. data/proto_docs/google/cloud/vision/v1p3beta1/web_detection.rb +28 -28
  23. data/proto_docs/google/longrunning/operations.rb +30 -30
  24. data/proto_docs/google/protobuf/any.rb +4 -4
  25. data/proto_docs/google/protobuf/empty.rb +2 -2
  26. data/proto_docs/google/protobuf/field_mask.rb +3 -3
  27. data/proto_docs/google/protobuf/timestamp.rb +4 -4
  28. data/proto_docs/google/protobuf/wrappers.rb +27 -27
  29. data/proto_docs/google/rpc/status.rb +6 -6
  30. data/proto_docs/google/type/color.rb +6 -6
  31. data/proto_docs/google/type/latlng.rb +4 -4
  32. metadata +33 -6
  33. data/lib/google/cloud/common_resources_pb.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5d725cef5c7efe7de779a4695f95329f9e6dc072a6286ef24846bc8877b2323
4
- data.tar.gz: c475196633214967d77da38bb5cc499b79ef3f6d8aa9bcd679c0a8d302728021
3
+ metadata.gz: bf2553c39fd167282677813185d60629b91fd23e6b0732513330c9a5952b12cc
4
+ data.tar.gz: b9797b02d3dc5477008edd5892dedb61a93ee07a0953b2a781381837677773cc
5
5
  SHA512:
6
- metadata.gz: 20a621e8a1d61a407fc4e3fd5b8ae1df418b60dc95e1186800a06383d38687b2e66a0fef8d4d2ab5400e1dc2aa5a9c93e46f0a694b8f41088eab1e6d160cc6fe
7
- data.tar.gz: a079bc6565cf4ed3f2fcd035f02d156031a3a6e7c35430eb7b1c3f9d59b4a36f32b0f4aedaf82603e642e6c1c79faf2b392da980c1842fc72d1d63aad676be98
6
+ metadata.gz: 111a0697c169cd710506122920c35d48f17b4ad1aec7ab5d46e2391ee2956619d29fe33205100f39a2cd3a5a3aa9cfbf17a4b16fdc005caff221e14482e6c48d
7
+ data.tar.gz: 604e29c8ad169b8d732a1ce684c02ab46efe08c7438f11d620b5e3aeeb0dbf53003a8719fdca660540b29d703b72ea5d7a03e173c9906cc2118333a42c19acf0
@@ -27,7 +27,7 @@ export VISION_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/vision/v1p3beta1"
29
29
 
30
- client = Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
30
+ client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
31
31
  ```
32
32
 
33
33
  ## Credential Lookup
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-vision-v1p3beta1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::Vision::V1p3beta1::ProductSearch::Credentials}):
67
+ {::Google::Cloud::Vision::V1p3beta1::ProductSearch::Credentials}):
68
68
 
69
69
  1. `VISION_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `VISION_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/vision/v1p3beta1"
77
77
 
78
78
  ENV["VISION_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
80
+ client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
81
81
  ```
82
82
 
83
83
  ### Configuration
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
88
88
  ```ruby
89
89
  require "google/cloud/vision/v1p3beta1"
90
90
 
91
- client = Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new do |config|
91
+ client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new do |config|
92
92
  config.credentials = "path/to/keyfile.json"
93
93
  end
94
94
  ```
@@ -98,11 +98,11 @@ Or configured globally for all clients:
98
98
  ```ruby
99
99
  require "google/cloud/vision/v1p3beta1"
100
100
 
101
- Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.configure do |config|
101
+ ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
105
+ client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
data/README.md CHANGED
@@ -25,7 +25,7 @@ In order to use this library, you first need to go through the following steps:
25
25
  ```ruby
26
26
  require "google/cloud/vision/v1p3beta1"
27
27
 
28
- client = Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
28
+ client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
29
29
  request = my_create_request
30
30
  response = client.create_product_set request
31
31
  ```
@@ -27,7 +27,7 @@ module Google
27
27
  # To load this package, including all its services, and instantiate a client:
28
28
  #
29
29
  # require "google/cloud/vision/v1p3beta1"
30
- # client = Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
30
+ # client = ::Google::Cloud::Vision::V1p3beta1::ProductSearch::Client.new
31
31
  #
32
32
  module V1p3beta1
33
33
  end
@@ -39,7 +39,7 @@ module Google
39
39
  # To load this service and instantiate a client:
40
40
  #
41
41
  # require "google/cloud/vision/v1p3beta1/image_annotator"
42
- # client = Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.new
42
+ # client = ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.new
43
43
  #
44
44
  module ImageAnnotator
45
45
  end
@@ -40,15 +40,15 @@ module Google
40
40
  ##
41
41
  # Configure the ImageAnnotator Client class.
42
42
  #
43
- # See {Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client::Configuration}
43
+ # See {::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client::Configuration}
44
44
  # for a description of the configuration fields.
45
45
  #
46
46
  # ## Example
47
47
  #
48
48
  # To modify the configuration for all ImageAnnotator clients:
49
49
  #
50
- # Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.configure do |config|
51
- # config.timeout = 10_000
50
+ # ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.configure do |config|
51
+ # config.timeout = 10.0
52
52
  # end
53
53
  #
54
54
  # @yield [config] Configure the Client client.
@@ -96,7 +96,7 @@ module Google
96
96
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
97
97
  # should be made on {Client.configure}.
98
98
  #
99
- # See {Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client::Configuration}
99
+ # See {::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client::Configuration}
100
100
  # for a description of the configuration fields.
101
101
  #
102
102
  # @yield [config] Configure the Client client.
@@ -117,13 +117,13 @@ module Google
117
117
  # To create a new ImageAnnotator client with the default
118
118
  # configuration:
119
119
  #
120
- # client = Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.new
120
+ # client = ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.new
121
121
  #
122
122
  # To create a new ImageAnnotator client with a custom
123
123
  # configuration:
124
124
  #
125
- # client = Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.new do |config|
126
- # config.timeout = 10_000
125
+ # client = ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.new do |config|
126
+ # config.timeout = 10.0
127
127
  # end
128
128
  #
129
129
  # @yield [config] Configure the ImageAnnotator client.
@@ -148,14 +148,16 @@ module Google
148
148
  if credentials.is_a?(String) || credentials.is_a?(Hash)
149
149
  credentials = Credentials.new credentials, scope: @config.scope
150
150
  end
151
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
151
+ @quota_project_id = @config.quota_project
152
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
152
153
 
153
154
  @operations_client = Operations.new do |config|
154
155
  config.credentials = credentials
156
+ config.endpoint = @config.endpoint
155
157
  end
156
158
 
157
- @image_annotator_stub = Gapic::ServiceStub.new(
158
- Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Stub,
159
+ @image_annotator_stub = ::Gapic::ServiceStub.new(
160
+ ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Stub,
159
161
  credentials: credentials,
160
162
  endpoint: @config.endpoint,
161
163
  channel_args: @config.channel_args,
@@ -163,6 +165,13 @@ module Google
163
165
  )
164
166
  end
165
167
 
168
+ ##
169
+ # Get the associated client for long-running operations.
170
+ #
171
+ # @return [::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Operations]
172
+ #
173
+ attr_reader :operations_client
174
+
166
175
  # Service calls
167
176
 
168
177
  ##
@@ -170,12 +179,12 @@ module Google
170
179
  #
171
180
  # @overload batch_annotate_images(request, options = nil)
172
181
  # Pass arguments to `batch_annotate_images` via a request object, either of type
173
- # {Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesRequest} or an equivalent Hash.
182
+ # {::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesRequest} or an equivalent Hash.
174
183
  #
175
- # @param request [Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesRequest, Hash]
184
+ # @param request [::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesRequest, ::Hash]
176
185
  # A request object representing the call parameters. Required. To specify no
177
186
  # parameters, or to keep all the default parameter values, pass an empty Hash.
178
- # @param options [Gapic::CallOptions, Hash]
187
+ # @param options [::Gapic::CallOptions, ::Hash]
179
188
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
180
189
  #
181
190
  # @overload batch_annotate_images(requests: nil)
@@ -183,30 +192,30 @@ module Google
183
192
  # least one keyword argument is required. To specify no parameters, or to keep all
184
193
  # the default parameter values, pass an empty Hash as a request object (see above).
185
194
  #
186
- # @param requests [Array<Google::Cloud::Vision::V1p3beta1::AnnotateImageRequest, Hash>]
195
+ # @param requests [::Array<::Google::Cloud::Vision::V1p3beta1::AnnotateImageRequest, ::Hash>]
187
196
  # Individual image annotation requests for this batch.
188
197
  #
189
198
  # @yield [response, operation] Access the result along with the RPC operation
190
- # @yieldparam response [Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse]
191
- # @yieldparam operation [GRPC::ActiveCall::Operation]
199
+ # @yieldparam response [::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse]
200
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
192
201
  #
193
- # @return [Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse]
202
+ # @return [::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse]
194
203
  #
195
- # @raise [Google::Cloud::Error] if the RPC is aborted.
204
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
196
205
  #
197
206
  def batch_annotate_images request, options = nil
198
- raise ArgumentError, "request must be provided" if request.nil?
207
+ raise ::ArgumentError, "request must be provided" if request.nil?
199
208
 
200
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesRequest
209
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesRequest
201
210
 
202
211
  # Converts hash and nil to an options object
203
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
212
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
204
213
 
205
214
  # Customize the options with defaults
206
215
  metadata = @config.rpcs.batch_annotate_images.metadata.to_h
207
216
 
208
217
  # Set x-goog-api-client and x-goog-user-project headers
209
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
218
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
210
219
  lib_name: @config.lib_name, lib_version: @config.lib_version,
211
220
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
212
221
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -221,8 +230,8 @@ module Google
221
230
  yield response, operation if block_given?
222
231
  return response
223
232
  end
224
- rescue GRPC::BadStatus => e
225
- raise Google::Cloud::Error.from_error(e)
233
+ rescue ::GRPC::BadStatus => e
234
+ raise ::Google::Cloud::Error.from_error(e)
226
235
  end
227
236
 
228
237
  ##
@@ -235,12 +244,12 @@ module Google
235
244
  #
236
245
  # @overload async_batch_annotate_files(request, options = nil)
237
246
  # Pass arguments to `async_batch_annotate_files` via a request object, either of type
238
- # {Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesRequest} or an equivalent Hash.
247
+ # {::Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesRequest} or an equivalent Hash.
239
248
  #
240
- # @param request [Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesRequest, Hash]
249
+ # @param request [::Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesRequest, ::Hash]
241
250
  # A request object representing the call parameters. Required. To specify no
242
251
  # parameters, or to keep all the default parameter values, pass an empty Hash.
243
- # @param options [Gapic::CallOptions, Hash]
252
+ # @param options [::Gapic::CallOptions, ::Hash]
244
253
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
245
254
  #
246
255
  # @overload async_batch_annotate_files(requests: nil)
@@ -248,30 +257,30 @@ module Google
248
257
  # least one keyword argument is required. To specify no parameters, or to keep all
249
258
  # the default parameter values, pass an empty Hash as a request object (see above).
250
259
  #
251
- # @param requests [Array<Google::Cloud::Vision::V1p3beta1::AsyncAnnotateFileRequest, Hash>]
260
+ # @param requests [::Array<::Google::Cloud::Vision::V1p3beta1::AsyncAnnotateFileRequest, ::Hash>]
252
261
  # Required. Individual async file annotation requests for this batch.
253
262
  #
254
263
  # @yield [response, operation] Access the result along with the RPC operation
255
- # @yieldparam response [Gapic::Operation]
256
- # @yieldparam operation [GRPC::ActiveCall::Operation]
264
+ # @yieldparam response [::Gapic::Operation]
265
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
257
266
  #
258
- # @return [Gapic::Operation]
267
+ # @return [::Gapic::Operation]
259
268
  #
260
- # @raise [Google::Cloud::Error] if the RPC is aborted.
269
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
261
270
  #
262
271
  def async_batch_annotate_files request, options = nil
263
- raise ArgumentError, "request must be provided" if request.nil?
272
+ raise ::ArgumentError, "request must be provided" if request.nil?
264
273
 
265
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesRequest
274
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesRequest
266
275
 
267
276
  # Converts hash and nil to an options object
268
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
277
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
269
278
 
270
279
  # Customize the options with defaults
271
280
  metadata = @config.rpcs.async_batch_annotate_files.metadata.to_h
272
281
 
273
282
  # Set x-goog-api-client and x-goog-user-project headers
274
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
283
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
275
284
  lib_name: @config.lib_name, lib_version: @config.lib_version,
276
285
  gapic_version: ::Google::Cloud::Vision::V1p3beta1::VERSION
277
286
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -283,12 +292,12 @@ module Google
283
292
  retry_policy: @config.retry_policy
284
293
 
285
294
  @image_annotator_stub.call_rpc :async_batch_annotate_files, request, options: options do |response, operation|
286
- response = Gapic::Operation.new response, @operations_client, options: options
295
+ response = ::Gapic::Operation.new response, @operations_client, options: options
287
296
  yield response, operation if block_given?
288
297
  return response
289
298
  end
290
- rescue GRPC::BadStatus => e
291
- raise Google::Cloud::Error.from_error(e)
299
+ rescue ::GRPC::BadStatus => e
300
+ raise ::Google::Cloud::Error.from_error(e)
292
301
  end
293
302
 
294
303
  ##
@@ -298,7 +307,7 @@ module Google
298
307
  # providing control over timeouts, retry behavior, logging, transport
299
308
  # parameters, and other low-level controls. Certain parameters can also be
300
309
  # applied individually to specific RPCs. See
301
- # {Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client::Configuration::Rpcs}
310
+ # {::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client::Configuration::Rpcs}
302
311
  # for a list of RPCs that can be configured independently.
303
312
  #
304
313
  # Configuration can be applied globally to all clients, or to a single client
@@ -309,22 +318,22 @@ module Google
309
318
  # To modify the global config, setting the timeout for batch_annotate_images
310
319
  # to 20 seconds, and all remaining timeouts to 10 seconds:
311
320
  #
312
- # Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.configure do |config|
313
- # config.timeout = 10_000
314
- # config.rpcs.batch_annotate_images.timeout = 20_000
321
+ # ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.configure do |config|
322
+ # config.timeout = 10.0
323
+ # config.rpcs.batch_annotate_images.timeout = 20.0
315
324
  # end
316
325
  #
317
326
  # To apply the above configuration only to a new client:
318
327
  #
319
- # client = Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.new do |config|
320
- # config.timeout = 10_000
321
- # config.rpcs.batch_annotate_images.timeout = 20_000
328
+ # client = ::Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Client.new do |config|
329
+ # config.timeout = 10.0
330
+ # config.rpcs.batch_annotate_images.timeout = 20.0
322
331
  # end
323
332
  #
324
333
  # @!attribute [rw] endpoint
325
334
  # The hostname or hostname:port of the service endpoint.
326
335
  # Defaults to `"vision.googleapis.com"`.
327
- # @return [String]
336
+ # @return [::String]
328
337
  # @!attribute [rw] credentials
329
338
  # Credentials to send with calls. You may provide any of the following types:
330
339
  # * (`String`) The path to a service account key file in JSON format
@@ -336,29 +345,29 @@ module Google
336
345
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
337
346
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
338
347
  # * (`nil`) indicating no credentials
339
- # @return [Object]
348
+ # @return [::Object]
340
349
  # @!attribute [rw] scope
341
350
  # The OAuth scopes
342
- # @return [Array<String>]
351
+ # @return [::Array<::String>]
343
352
  # @!attribute [rw] lib_name
344
353
  # The library name as recorded in instrumentation and logging
345
- # @return [String]
354
+ # @return [::String]
346
355
  # @!attribute [rw] lib_version
347
356
  # The library version as recorded in instrumentation and logging
348
- # @return [String]
357
+ # @return [::String]
349
358
  # @!attribute [rw] channel_args
350
359
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
351
360
  # `GRPC::Core::Channel` object is provided as the credential.
352
- # @return [Hash]
361
+ # @return [::Hash]
353
362
  # @!attribute [rw] interceptors
354
363
  # An array of interceptors that are run before calls are executed.
355
- # @return [Array<GRPC::ClientInterceptor>]
364
+ # @return [::Array<::GRPC::ClientInterceptor>]
356
365
  # @!attribute [rw] timeout
357
- # The call timeout in milliseconds.
358
- # @return [Numeric]
366
+ # The call timeout in seconds.
367
+ # @return [::Numeric]
359
368
  # @!attribute [rw] metadata
360
369
  # Additional gRPC headers to be sent with the call.
361
- # @return [Hash{Symbol=>String}]
370
+ # @return [::Hash{::Symbol=>::String}]
362
371
  # @!attribute [rw] retry_policy
363
372
  # The retry policy. The value is a hash with the following keys:
364
373
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -366,25 +375,29 @@ module Google
366
375
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
367
376
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
368
377
  # trigger a retry.
369
- # @return [Hash]
378
+ # @return [::Hash]
379
+ # @!attribute [rw] quota_project
380
+ # A separate project against which to charge quota.
381
+ # @return [::String]
370
382
  #
371
383
  class Configuration
372
- extend Gapic::Config
384
+ extend ::Gapic::Config
373
385
 
374
- config_attr :endpoint, "vision.googleapis.com", String
375
- config_attr :credentials, nil do |value|
386
+ config_attr :endpoint, "vision.googleapis.com", ::String
387
+ config_attr :credentials, nil do |value|
376
388
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
377
389
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
378
390
  allowed.any? { |klass| klass === value }
379
391
  end
380
- config_attr :scope, nil, String, Array, nil
381
- config_attr :lib_name, nil, String, nil
382
- config_attr :lib_version, nil, String, nil
383
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
384
- config_attr :interceptors, nil, Array, nil
385
- config_attr :timeout, nil, Numeric, nil
386
- config_attr :metadata, nil, Hash, nil
387
- config_attr :retry_policy, nil, Hash, Proc, nil
392
+ config_attr :scope, nil, ::String, ::Array, nil
393
+ config_attr :lib_name, nil, ::String, nil
394
+ config_attr :lib_version, nil, ::String, nil
395
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
396
+ config_attr :interceptors, nil, ::Array, nil
397
+ config_attr :timeout, nil, ::Numeric, nil
398
+ config_attr :metadata, nil, ::Hash, nil
399
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
400
+ config_attr :quota_project, nil, ::String, nil
388
401
 
389
402
  # @private
390
403
  def initialize parent_config = nil
@@ -400,7 +413,7 @@ module Google
400
413
  def rpcs
401
414
  @rpcs ||= begin
402
415
  parent_rpcs = nil
403
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
416
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
404
417
  Rpcs.new parent_rpcs
405
418
  end
406
419
  end
@@ -425,21 +438,21 @@ module Google
425
438
  class Rpcs
426
439
  ##
427
440
  # RPC-specific configuration for `batch_annotate_images`
428
- # @return [Gapic::Config::Method]
441
+ # @return [::Gapic::Config::Method]
429
442
  #
430
443
  attr_reader :batch_annotate_images
431
444
  ##
432
445
  # RPC-specific configuration for `async_batch_annotate_files`
433
- # @return [Gapic::Config::Method]
446
+ # @return [::Gapic::Config::Method]
434
447
  #
435
448
  attr_reader :async_batch_annotate_files
436
449
 
437
450
  # @private
438
451
  def initialize parent_rpcs = nil
439
452
  batch_annotate_images_config = parent_rpcs&.batch_annotate_images if parent_rpcs&.respond_to? :batch_annotate_images
440
- @batch_annotate_images = Gapic::Config::Method.new batch_annotate_images_config
453
+ @batch_annotate_images = ::Gapic::Config::Method.new batch_annotate_images_config
441
454
  async_batch_annotate_files_config = parent_rpcs&.async_batch_annotate_files if parent_rpcs&.respond_to? :async_batch_annotate_files
442
- @async_batch_annotate_files = Gapic::Config::Method.new async_batch_annotate_files_config
455
+ @async_batch_annotate_files = ::Gapic::Config::Method.new async_batch_annotate_files_config
443
456
 
444
457
  yield self if block_given?
445
458
  end