google-cloud-video_intelligence-v1beta2 0.1.0 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09b4cf3e5923a130b981df41baeb0bb618f49ef81d446c44826d5383b0232926'
4
- data.tar.gz: 86831945c9443e275393196a5ecbc94c35b8a1b00c854c56d303256f6aa74181
3
+ metadata.gz: 7fd9cc15762bd78d4bf7a42c5cb035864a24e2332e414e2c6c643a1d712fe15a
4
+ data.tar.gz: ff45db2a4375a2744594928a1d02a9d414e67aa1755d99f8bd0cc90952501b42
5
5
  SHA512:
6
- metadata.gz: 4eea94c49763160c8877903664f8233796a2478050b61895ffc6078a67653e53c1894308293e4fb8e5f3d77349c108d2be9dd04524e4fda90fd9948fc7634f8d
7
- data.tar.gz: d54d914757ac86c85f31baed2404c8e1f59a11d4e4e309ca8da305b8bcc729f19f3eace4759649c8bfb8c7b44279d840a974be9ec539705a2adaf252ce6e0ad9
6
+ metadata.gz: cccd8450ce06056ca4b40deefa9dbff4fe3325b6cd9eda96cd76ed0e162b22f3dbb069495d71c33f24c9e725f600e37cbfceafb34ef699248727f4b9b68e1e0b
7
+ data.tar.gz: 55cae10720df77aba107ee70ae8d6b5d92338d1af0abe52e0c4d6b788c495a0e5127877e13d010b9edb911c621dcb47bca1910248168cf326d77637735aaf221
@@ -27,7 +27,7 @@ export VIDEO_INTELLIGENCE_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/video_intelligence/v1beta2"
29
29
 
30
- client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
30
+ client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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-video_intelligence-v1beta2
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Credentials}):
67
+ {::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Credentials}):
68
68
 
69
69
  1. `VIDEO_INTELLIGENCE_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `VIDEO_INTELLIGENCE_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/video_intelligence/v1beta2"
77
77
 
78
78
  ENV["VIDEO_INTELLIGENCE_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
80
+ client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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/video_intelligence/v1beta2"
90
90
 
91
- client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config|
91
+ client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::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/video_intelligence/v1beta2"
100
100
 
101
- Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config|
101
+ ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
105
+ client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/videointelligence.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -25,7 +26,7 @@ In order to use this library, you first need to go through the following steps:
25
26
  ```ruby
26
27
  require "google/cloud/video_intelligence/v1beta2"
27
28
 
28
- client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
29
+ client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
29
30
  request = my_create_request
30
31
  response = client.annotate_video request
31
32
  ```
@@ -33,6 +34,9 @@ response = client.annotate_video request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-video_intelligence-v1beta2/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/video-intelligence)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -26,7 +26,7 @@ module Google
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
28
  # require "google/cloud/video_intelligence/v1beta2"
29
- # client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
29
+ # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
30
30
  #
31
31
  module V1beta2
32
32
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module VideoIntelligence
23
23
  module V1beta2
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.3"
25
25
  end
26
26
  end
27
27
  end
@@ -36,7 +36,7 @@ module Google
36
36
  # To load this service and instantiate a client:
37
37
  #
38
38
  # require "google/cloud/video_intelligence/v1beta2/video_intelligence_service"
39
- # client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
39
+ # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
40
40
  #
41
41
  module VideoIntelligenceService
42
42
  end
@@ -36,15 +36,15 @@ module Google
36
36
  ##
37
37
  # Configure the VideoIntelligenceService Client class.
38
38
  #
39
- # See {Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client::Configuration}
39
+ # See {::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client::Configuration}
40
40
  # for a description of the configuration fields.
41
41
  #
42
42
  # ## Example
43
43
  #
44
44
  # To modify the configuration for all VideoIntelligenceService clients:
45
45
  #
46
- # Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config|
47
- # config.timeout = 10_000
46
+ # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config|
47
+ # config.timeout = 10.0
48
48
  # end
49
49
  #
50
50
  # @yield [config] Configure the Client client.
@@ -84,7 +84,7 @@ module Google
84
84
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
85
85
  # should be made on {Client.configure}.
86
86
  #
87
- # See {Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client::Configuration}
87
+ # See {::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client::Configuration}
88
88
  # for a description of the configuration fields.
89
89
  #
90
90
  # @yield [config] Configure the Client client.
@@ -105,13 +105,13 @@ module Google
105
105
  # To create a new VideoIntelligenceService client with the default
106
106
  # configuration:
107
107
  #
108
- # client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
108
+ # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new
109
109
  #
110
110
  # To create a new VideoIntelligenceService client with a custom
111
111
  # configuration:
112
112
  #
113
- # client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config|
114
- # config.timeout = 10_000
113
+ # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config|
114
+ # config.timeout = 10.0
115
115
  # end
116
116
  #
117
117
  # @yield [config] Configure the VideoIntelligenceService client.
@@ -136,15 +136,16 @@ module Google
136
136
  if credentials.is_a?(String) || credentials.is_a?(Hash)
137
137
  credentials = Credentials.new credentials, scope: @config.scope
138
138
  end
139
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
139
+ @quota_project_id = @config.quota_project
140
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
140
141
 
141
142
  @operations_client = Operations.new do |config|
142
143
  config.credentials = credentials
143
144
  config.endpoint = @config.endpoint
144
145
  end
145
146
 
146
- @video_intelligence_service_stub = Gapic::ServiceStub.new(
147
- Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Stub,
147
+ @video_intelligence_service_stub = ::Gapic::ServiceStub.new(
148
+ ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Stub,
148
149
  credentials: credentials,
149
150
  endpoint: @config.endpoint,
150
151
  channel_args: @config.channel_args,
@@ -155,7 +156,7 @@ module Google
155
156
  ##
156
157
  # Get the associated client for long-running operations.
157
158
  #
158
- # @return [Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Operations]
159
+ # @return [::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Operations]
159
160
  #
160
161
  attr_reader :operations_client
161
162
 
@@ -169,12 +170,12 @@ module Google
169
170
  #
170
171
  # @overload annotate_video(request, options = nil)
171
172
  # Pass arguments to `annotate_video` via a request object, either of type
172
- # {Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest} or an equivalent Hash.
173
+ # {::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest} or an equivalent Hash.
173
174
  #
174
- # @param request [Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, Hash]
175
+ # @param request [::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest, ::Hash]
175
176
  # A request object representing the call parameters. Required. To specify no
176
177
  # parameters, or to keep all the default parameter values, pass an empty Hash.
177
- # @param options [Gapic::CallOptions, Hash]
178
+ # @param options [::Gapic::CallOptions, ::Hash]
178
179
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
179
180
  #
180
181
  # @overload annotate_video(input_uri: nil, input_content: nil, features: nil, video_context: nil, output_uri: nil, location_id: nil)
@@ -182,7 +183,7 @@ module Google
182
183
  # least one keyword argument is required. To specify no parameters, or to keep all
183
184
  # the default parameter values, pass an empty Hash as a request object (see above).
184
185
  #
185
- # @param input_uri [String]
186
+ # @param input_uri [::String]
186
187
  # Input video location. Currently, only
187
188
  # [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
188
189
  # supported, which must be specified in the following format:
@@ -193,47 +194,47 @@ module Google
193
194
  # videos. Supported wildcards: '*' to match 0 or more characters;
194
195
  # '?' to match 1 character. If unset, the input video should be embedded
195
196
  # in the request as `input_content`. If set, `input_content` should be unset.
196
- # @param input_content [String]
197
+ # @param input_content [::String]
197
198
  # The video data bytes.
198
199
  # If unset, the input video(s) should be specified via `input_uri`.
199
200
  # If set, `input_uri` should be unset.
200
- # @param features [Array<Google::Cloud::VideoIntelligence::V1beta2::Feature>]
201
+ # @param features [::Array<::Google::Cloud::VideoIntelligence::V1beta2::Feature>]
201
202
  # Required. Requested video annotation features.
202
- # @param video_context [Google::Cloud::VideoIntelligence::V1beta2::VideoContext, Hash]
203
+ # @param video_context [::Google::Cloud::VideoIntelligence::V1beta2::VideoContext, ::Hash]
203
204
  # Additional video context and/or feature-specific parameters.
204
- # @param output_uri [String]
205
+ # @param output_uri [::String]
205
206
  # Optional. Location where the output (in JSON format) should be stored.
206
207
  # Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
207
208
  # URIs are supported, which must be specified in the following format:
208
209
  # `gs://bucket-id/object-id` (other URI formats return
209
210
  # [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For
210
211
  # more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).
211
- # @param location_id [String]
212
+ # @param location_id [::String]
212
213
  # Optional. Cloud region where annotation should take place. Supported cloud
213
214
  # regions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region
214
215
  # is specified, a region will be determined based on video file location.
215
216
  #
216
217
  # @yield [response, operation] Access the result along with the RPC operation
217
- # @yieldparam response [Gapic::Operation]
218
- # @yieldparam operation [GRPC::ActiveCall::Operation]
218
+ # @yieldparam response [::Gapic::Operation]
219
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
219
220
  #
220
- # @return [Gapic::Operation]
221
+ # @return [::Gapic::Operation]
221
222
  #
222
- # @raise [Google::Cloud::Error] if the RPC is aborted.
223
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
223
224
  #
224
225
  def annotate_video request, options = nil
225
- raise ArgumentError, "request must be provided" if request.nil?
226
+ raise ::ArgumentError, "request must be provided" if request.nil?
226
227
 
227
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest
228
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VideoIntelligence::V1beta2::AnnotateVideoRequest
228
229
 
229
230
  # Converts hash and nil to an options object
230
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
231
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
231
232
 
232
233
  # Customize the options with defaults
233
234
  metadata = @config.rpcs.annotate_video.metadata.to_h
234
235
 
235
236
  # Set x-goog-api-client and x-goog-user-project headers
236
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
237
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
237
238
  lib_name: @config.lib_name, lib_version: @config.lib_version,
238
239
  gapic_version: ::Google::Cloud::VideoIntelligence::V1beta2::VERSION
239
240
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -245,12 +246,12 @@ module Google
245
246
  retry_policy: @config.retry_policy
246
247
 
247
248
  @video_intelligence_service_stub.call_rpc :annotate_video, request, options: options do |response, operation|
248
- response = Gapic::Operation.new response, @operations_client, options: options
249
+ response = ::Gapic::Operation.new response, @operations_client, options: options
249
250
  yield response, operation if block_given?
250
251
  return response
251
252
  end
252
- rescue GRPC::BadStatus => e
253
- raise Google::Cloud::Error.from_error(e)
253
+ rescue ::GRPC::BadStatus => e
254
+ raise ::Google::Cloud::Error.from_error(e)
254
255
  end
255
256
 
256
257
  ##
@@ -260,7 +261,7 @@ module Google
260
261
  # providing control over timeouts, retry behavior, logging, transport
261
262
  # parameters, and other low-level controls. Certain parameters can also be
262
263
  # applied individually to specific RPCs. See
263
- # {Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client::Configuration::Rpcs}
264
+ # {::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client::Configuration::Rpcs}
264
265
  # for a list of RPCs that can be configured independently.
265
266
  #
266
267
  # Configuration can be applied globally to all clients, or to a single client
@@ -271,22 +272,22 @@ module Google
271
272
  # To modify the global config, setting the timeout for annotate_video
272
273
  # to 20 seconds, and all remaining timeouts to 10 seconds:
273
274
  #
274
- # Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config|
275
- # config.timeout = 10_000
276
- # config.rpcs.annotate_video.timeout = 20_000
275
+ # ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.configure do |config|
276
+ # config.timeout = 10.0
277
+ # config.rpcs.annotate_video.timeout = 20.0
277
278
  # end
278
279
  #
279
280
  # To apply the above configuration only to a new client:
280
281
  #
281
- # client = Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config|
282
- # config.timeout = 10_000
283
- # config.rpcs.annotate_video.timeout = 20_000
282
+ # client = ::Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceService::Client.new do |config|
283
+ # config.timeout = 10.0
284
+ # config.rpcs.annotate_video.timeout = 20.0
284
285
  # end
285
286
  #
286
287
  # @!attribute [rw] endpoint
287
288
  # The hostname or hostname:port of the service endpoint.
288
289
  # Defaults to `"videointelligence.googleapis.com"`.
289
- # @return [String]
290
+ # @return [::String]
290
291
  # @!attribute [rw] credentials
291
292
  # Credentials to send with calls. You may provide any of the following types:
292
293
  # * (`String`) The path to a service account key file in JSON format
@@ -298,29 +299,29 @@ module Google
298
299
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
299
300
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
300
301
  # * (`nil`) indicating no credentials
301
- # @return [Object]
302
+ # @return [::Object]
302
303
  # @!attribute [rw] scope
303
304
  # The OAuth scopes
304
- # @return [Array<String>]
305
+ # @return [::Array<::String>]
305
306
  # @!attribute [rw] lib_name
306
307
  # The library name as recorded in instrumentation and logging
307
- # @return [String]
308
+ # @return [::String]
308
309
  # @!attribute [rw] lib_version
309
310
  # The library version as recorded in instrumentation and logging
310
- # @return [String]
311
+ # @return [::String]
311
312
  # @!attribute [rw] channel_args
312
313
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
313
314
  # `GRPC::Core::Channel` object is provided as the credential.
314
- # @return [Hash]
315
+ # @return [::Hash]
315
316
  # @!attribute [rw] interceptors
316
317
  # An array of interceptors that are run before calls are executed.
317
- # @return [Array<GRPC::ClientInterceptor>]
318
+ # @return [::Array<::GRPC::ClientInterceptor>]
318
319
  # @!attribute [rw] timeout
319
- # The call timeout in milliseconds.
320
- # @return [Numeric]
320
+ # The call timeout in seconds.
321
+ # @return [::Numeric]
321
322
  # @!attribute [rw] metadata
322
323
  # Additional gRPC headers to be sent with the call.
323
- # @return [Hash{Symbol=>String}]
324
+ # @return [::Hash{::Symbol=>::String}]
324
325
  # @!attribute [rw] retry_policy
325
326
  # The retry policy. The value is a hash with the following keys:
326
327
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -328,25 +329,29 @@ module Google
328
329
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
329
330
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
330
331
  # trigger a retry.
331
- # @return [Hash]
332
+ # @return [::Hash]
333
+ # @!attribute [rw] quota_project
334
+ # A separate project against which to charge quota.
335
+ # @return [::String]
332
336
  #
333
337
  class Configuration
334
- extend Gapic::Config
338
+ extend ::Gapic::Config
335
339
 
336
- config_attr :endpoint, "videointelligence.googleapis.com", String
337
- config_attr :credentials, nil do |value|
340
+ config_attr :endpoint, "videointelligence.googleapis.com", ::String
341
+ config_attr :credentials, nil do |value|
338
342
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
339
343
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
340
344
  allowed.any? { |klass| klass === value }
341
345
  end
342
- config_attr :scope, nil, String, Array, nil
343
- config_attr :lib_name, nil, String, nil
344
- config_attr :lib_version, nil, String, nil
345
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
346
- config_attr :interceptors, nil, Array, nil
347
- config_attr :timeout, nil, Numeric, nil
348
- config_attr :metadata, nil, Hash, nil
349
- config_attr :retry_policy, nil, Hash, Proc, nil
346
+ config_attr :scope, nil, ::String, ::Array, nil
347
+ config_attr :lib_name, nil, ::String, nil
348
+ config_attr :lib_version, nil, ::String, nil
349
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
350
+ config_attr :interceptors, nil, ::Array, nil
351
+ config_attr :timeout, nil, ::Numeric, nil
352
+ config_attr :metadata, nil, ::Hash, nil
353
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
354
+ config_attr :quota_project, nil, ::String, nil
350
355
 
351
356
  # @private
352
357
  def initialize parent_config = nil
@@ -362,7 +367,7 @@ module Google
362
367
  def rpcs
363
368
  @rpcs ||= begin
364
369
  parent_rpcs = nil
365
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
370
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
366
371
  Rpcs.new parent_rpcs
367
372
  end
368
373
  end
@@ -387,14 +392,14 @@ module Google
387
392
  class Rpcs
388
393
  ##
389
394
  # RPC-specific configuration for `annotate_video`
390
- # @return [Gapic::Config::Method]
395
+ # @return [::Gapic::Config::Method]
391
396
  #
392
397
  attr_reader :annotate_video
393
398
 
394
399
  # @private
395
400
  def initialize parent_rpcs = nil
396
401
  annotate_video_config = parent_rpcs&.annotate_video if parent_rpcs&.respond_to? :annotate_video
397
- @annotate_video = Gapic::Config::Method.new annotate_video_config
402
+ @annotate_video = ::Gapic::Config::Method.new annotate_video_config
398
403
 
399
404
  yield self if block_given?
400
405
  end
@@ -24,7 +24,7 @@ module Google
24
24
  module V1beta2
25
25
  module VideoIntelligenceService
26
26
  # Credentials for the VideoIntelligenceService API.
27
- class Credentials < Google::Auth::Credentials
27
+ class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
29
  "https://www.googleapis.com/auth/cloud-platform"
30
30
  ]
@@ -85,9 +85,11 @@ module Google
85
85
  if credentials.is_a?(String) || credentials.is_a?(Hash)
86
86
  credentials = Credentials.new credentials, scope: @config.scope
87
87
  end
88
+ @quota_project_id = @config.quota_project
89
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
88
90
 
89
- @operations_stub = Gapic::ServiceStub.new(
90
- Google::Longrunning::Operations::Stub,
91
+ @operations_stub = ::Gapic::ServiceStub.new(
92
+ ::Google::Longrunning::Operations::Stub,
91
93
  credentials: credentials,
92
94
  endpoint: @config.endpoint,
93
95
  channel_args: @config.channel_args,
@@ -106,12 +108,12 @@ module Google
106
108
  #
107
109
  # @overload list_operations(request, options = nil)
108
110
  # Pass arguments to `list_operations` via a request object, either of type
109
- # {Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
111
+ # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
110
112
  #
111
- # @param request [Google::Longrunning::ListOperationsRequest, Hash]
113
+ # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash]
112
114
  # A request object representing the call parameters. Required. To specify no
113
115
  # parameters, or to keep all the default parameter values, pass an empty Hash.
114
- # @param options [Gapic::CallOptions, Hash]
116
+ # @param options [::Gapic::CallOptions, ::Hash]
115
117
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
116
118
  #
117
119
  # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil)
@@ -119,36 +121,36 @@ module Google
119
121
  # least one keyword argument is required. To specify no parameters, or to keep all
120
122
  # the default parameter values, pass an empty Hash as a request object (see above).
121
123
  #
122
- # @param name [String]
124
+ # @param name [::String]
123
125
  # The name of the operation collection.
124
- # @param filter [String]
126
+ # @param filter [::String]
125
127
  # The standard list filter.
126
- # @param page_size [Integer]
128
+ # @param page_size [::Integer]
127
129
  # The standard list page size.
128
- # @param page_token [String]
130
+ # @param page_token [::String]
129
131
  # The standard list page token.
130
132
  #
131
133
  # @yield [response, operation] Access the result along with the RPC operation
132
- # @yieldparam response [Gapic::PagedEnumerable<Gapic::Operation>]
133
- # @yieldparam operation [GRPC::ActiveCall::Operation]
134
+ # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>]
135
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
134
136
  #
135
- # @return [Gapic::PagedEnumerable<Gapic::Operation>]
137
+ # @return [::Gapic::PagedEnumerable<::Gapic::Operation>]
136
138
  #
137
- # @raise [Google::Cloud::Error] if the RPC is aborted.
139
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
138
140
  #
139
141
  def list_operations request, options = nil
140
- raise ArgumentError, "request must be provided" if request.nil?
142
+ raise ::ArgumentError, "request must be provided" if request.nil?
141
143
 
142
- request = Gapic::Protobuf.coerce request, to: Google::Longrunning::ListOperationsRequest
144
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest
143
145
 
144
146
  # Converts hash and nil to an options object
145
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
147
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
146
148
 
147
149
  # Customize the options with defaults
148
150
  metadata = @config.rpcs.list_operations.metadata.to_h
149
151
 
150
152
  # Set x-goog-api-client and x-goog-user-project headers
151
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
153
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
152
154
  lib_name: @config.lib_name, lib_version: @config.lib_version,
153
155
  gapic_version: ::Google::Cloud::VideoIntelligence::V1beta2::VERSION
154
156
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -166,13 +168,13 @@ module Google
166
168
  retry_policy: @config.retry_policy
167
169
 
168
170
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
169
- wrap_lro_operation = ->(op_response) { Gapic::Operation.new op_response, @operations_client }
170
- response = Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
171
+ wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
172
+ response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
171
173
  yield response, operation if block_given?
172
174
  return response
173
175
  end
174
- rescue GRPC::BadStatus => e
175
- raise Google::Cloud::Error.from_error(e)
176
+ rescue ::GRPC::BadStatus => e
177
+ raise ::Google::Cloud::Error.from_error(e)
176
178
  end
177
179
 
178
180
  ##
@@ -182,12 +184,12 @@ module Google
182
184
  #
183
185
  # @overload get_operation(request, options = nil)
184
186
  # Pass arguments to `get_operation` via a request object, either of type
185
- # {Google::Longrunning::GetOperationRequest} or an equivalent Hash.
187
+ # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash.
186
188
  #
187
- # @param request [Google::Longrunning::GetOperationRequest, Hash]
189
+ # @param request [::Google::Longrunning::GetOperationRequest, ::Hash]
188
190
  # A request object representing the call parameters. Required. To specify no
189
191
  # parameters, or to keep all the default parameter values, pass an empty Hash.
190
- # @param options [Gapic::CallOptions, Hash]
192
+ # @param options [::Gapic::CallOptions, ::Hash]
191
193
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
192
194
  #
193
195
  # @overload get_operation(name: nil)
@@ -195,30 +197,30 @@ module Google
195
197
  # least one keyword argument is required. To specify no parameters, or to keep all
196
198
  # the default parameter values, pass an empty Hash as a request object (see above).
197
199
  #
198
- # @param name [String]
200
+ # @param name [::String]
199
201
  # The name of the operation resource.
200
202
  #
201
203
  # @yield [response, operation] Access the result along with the RPC operation
202
- # @yieldparam response [Gapic::Operation]
203
- # @yieldparam operation [GRPC::ActiveCall::Operation]
204
+ # @yieldparam response [::Gapic::Operation]
205
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
204
206
  #
205
- # @return [Gapic::Operation]
207
+ # @return [::Gapic::Operation]
206
208
  #
207
- # @raise [Google::Cloud::Error] if the RPC is aborted.
209
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
208
210
  #
209
211
  def get_operation request, options = nil
210
- raise ArgumentError, "request must be provided" if request.nil?
212
+ raise ::ArgumentError, "request must be provided" if request.nil?
211
213
 
212
- request = Gapic::Protobuf.coerce request, to: Google::Longrunning::GetOperationRequest
214
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest
213
215
 
214
216
  # Converts hash and nil to an options object
215
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
217
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
216
218
 
217
219
  # Customize the options with defaults
218
220
  metadata = @config.rpcs.get_operation.metadata.to_h
219
221
 
220
222
  # Set x-goog-api-client and x-goog-user-project headers
221
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
223
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
222
224
  lib_name: @config.lib_name, lib_version: @config.lib_version,
223
225
  gapic_version: ::Google::Cloud::VideoIntelligence::V1beta2::VERSION
224
226
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -236,12 +238,12 @@ module Google
236
238
  retry_policy: @config.retry_policy
237
239
 
238
240
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
239
- response = Gapic::Operation.new response, @operations_client, options: options
241
+ response = ::Gapic::Operation.new response, @operations_client, options: options
240
242
  yield response, operation if block_given?
241
243
  return response
242
244
  end
243
- rescue GRPC::BadStatus => e
244
- raise Google::Cloud::Error.from_error(e)
245
+ rescue ::GRPC::BadStatus => e
246
+ raise ::Google::Cloud::Error.from_error(e)
245
247
  end
246
248
 
247
249
  ##
@@ -252,12 +254,12 @@ module Google
252
254
  #
253
255
  # @overload delete_operation(request, options = nil)
254
256
  # Pass arguments to `delete_operation` via a request object, either of type
255
- # {Google::Longrunning::DeleteOperationRequest} or an equivalent Hash.
257
+ # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash.
256
258
  #
257
- # @param request [Google::Longrunning::DeleteOperationRequest, Hash]
259
+ # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash]
258
260
  # A request object representing the call parameters. Required. To specify no
259
261
  # parameters, or to keep all the default parameter values, pass an empty Hash.
260
- # @param options [Gapic::CallOptions, Hash]
262
+ # @param options [::Gapic::CallOptions, ::Hash]
261
263
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
262
264
  #
263
265
  # @overload delete_operation(name: nil)
@@ -265,30 +267,30 @@ module Google
265
267
  # least one keyword argument is required. To specify no parameters, or to keep all
266
268
  # the default parameter values, pass an empty Hash as a request object (see above).
267
269
  #
268
- # @param name [String]
270
+ # @param name [::String]
269
271
  # The name of the operation resource to be deleted.
270
272
  #
271
273
  # @yield [response, operation] Access the result along with the RPC operation
272
- # @yieldparam response [Google::Protobuf::Empty]
273
- # @yieldparam operation [GRPC::ActiveCall::Operation]
274
+ # @yieldparam response [::Google::Protobuf::Empty]
275
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
274
276
  #
275
- # @return [Google::Protobuf::Empty]
277
+ # @return [::Google::Protobuf::Empty]
276
278
  #
277
- # @raise [Google::Cloud::Error] if the RPC is aborted.
279
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
278
280
  #
279
281
  def delete_operation request, options = nil
280
- raise ArgumentError, "request must be provided" if request.nil?
282
+ raise ::ArgumentError, "request must be provided" if request.nil?
281
283
 
282
- request = Gapic::Protobuf.coerce request, to: Google::Longrunning::DeleteOperationRequest
284
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest
283
285
 
284
286
  # Converts hash and nil to an options object
285
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
287
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
286
288
 
287
289
  # Customize the options with defaults
288
290
  metadata = @config.rpcs.delete_operation.metadata.to_h
289
291
 
290
292
  # Set x-goog-api-client and x-goog-user-project headers
291
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
293
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
294
  lib_name: @config.lib_name, lib_version: @config.lib_version,
293
295
  gapic_version: ::Google::Cloud::VideoIntelligence::V1beta2::VERSION
294
296
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -309,8 +311,8 @@ module Google
309
311
  yield response, operation if block_given?
310
312
  return response
311
313
  end
312
- rescue GRPC::BadStatus => e
313
- raise Google::Cloud::Error.from_error(e)
314
+ rescue ::GRPC::BadStatus => e
315
+ raise ::Google::Cloud::Error.from_error(e)
314
316
  end
315
317
 
316
318
  ##
@@ -322,17 +324,17 @@ module Google
322
324
  # other methods to check whether the cancellation succeeded or whether the
323
325
  # operation completed despite cancellation. On successful cancellation,
324
326
  # the operation is not deleted; instead, it becomes an operation with
325
- # an {Google::Longrunning::Operation#error Operation.error} value with a {Google::Rpc::Status#code google.rpc.Status.code} of 1,
327
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
326
328
  # corresponding to `Code.CANCELLED`.
327
329
  #
328
330
  # @overload cancel_operation(request, options = nil)
329
331
  # Pass arguments to `cancel_operation` via a request object, either of type
330
- # {Google::Longrunning::CancelOperationRequest} or an equivalent Hash.
332
+ # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash.
331
333
  #
332
- # @param request [Google::Longrunning::CancelOperationRequest, Hash]
334
+ # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash]
333
335
  # A request object representing the call parameters. Required. To specify no
334
336
  # parameters, or to keep all the default parameter values, pass an empty Hash.
335
- # @param options [Gapic::CallOptions, Hash]
337
+ # @param options [::Gapic::CallOptions, ::Hash]
336
338
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
337
339
  #
338
340
  # @overload cancel_operation(name: nil)
@@ -340,30 +342,30 @@ module Google
340
342
  # least one keyword argument is required. To specify no parameters, or to keep all
341
343
  # the default parameter values, pass an empty Hash as a request object (see above).
342
344
  #
343
- # @param name [String]
345
+ # @param name [::String]
344
346
  # The name of the operation resource to be cancelled.
345
347
  #
346
348
  # @yield [response, operation] Access the result along with the RPC operation
347
- # @yieldparam response [Google::Protobuf::Empty]
348
- # @yieldparam operation [GRPC::ActiveCall::Operation]
349
+ # @yieldparam response [::Google::Protobuf::Empty]
350
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
349
351
  #
350
- # @return [Google::Protobuf::Empty]
352
+ # @return [::Google::Protobuf::Empty]
351
353
  #
352
- # @raise [Google::Cloud::Error] if the RPC is aborted.
354
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
353
355
  #
354
356
  def cancel_operation request, options = nil
355
- raise ArgumentError, "request must be provided" if request.nil?
357
+ raise ::ArgumentError, "request must be provided" if request.nil?
356
358
 
357
- request = Gapic::Protobuf.coerce request, to: Google::Longrunning::CancelOperationRequest
359
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest
358
360
 
359
361
  # Converts hash and nil to an options object
360
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
362
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
361
363
 
362
364
  # Customize the options with defaults
363
365
  metadata = @config.rpcs.cancel_operation.metadata.to_h
364
366
 
365
367
  # Set x-goog-api-client and x-goog-user-project headers
366
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
368
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
367
369
  lib_name: @config.lib_name, lib_version: @config.lib_version,
368
370
  gapic_version: ::Google::Cloud::VideoIntelligence::V1beta2::VERSION
369
371
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -384,8 +386,8 @@ module Google
384
386
  yield response, operation if block_given?
385
387
  return response
386
388
  end
387
- rescue GRPC::BadStatus => e
388
- raise Google::Cloud::Error.from_error(e)
389
+ rescue ::GRPC::BadStatus => e
390
+ raise ::Google::Cloud::Error.from_error(e)
389
391
  end
390
392
 
391
393
  ##
@@ -395,7 +397,7 @@ module Google
395
397
  # providing control over timeouts, retry behavior, logging, transport
396
398
  # parameters, and other low-level controls. Certain parameters can also be
397
399
  # applied individually to specific RPCs. See
398
- # {Google::Longrunning::Operations::Client::Configuration::Rpcs}
400
+ # {::Google::Longrunning::Operations::Client::Configuration::Rpcs}
399
401
  # for a list of RPCs that can be configured independently.
400
402
  #
401
403
  # Configuration can be applied globally to all clients, or to a single client
@@ -406,22 +408,22 @@ module Google
406
408
  # To modify the global config, setting the timeout for list_operations
407
409
  # to 20 seconds, and all remaining timeouts to 10 seconds:
408
410
  #
409
- # Google::Longrunning::Operations::Client.configure do |config|
410
- # config.timeout = 10_000
411
- # config.rpcs.list_operations.timeout = 20_000
411
+ # ::Google::Longrunning::Operations::Client.configure do |config|
412
+ # config.timeout = 10.0
413
+ # config.rpcs.list_operations.timeout = 20.0
412
414
  # end
413
415
  #
414
416
  # To apply the above configuration only to a new client:
415
417
  #
416
- # client = Google::Longrunning::Operations::Client.new do |config|
417
- # config.timeout = 10_000
418
- # config.rpcs.list_operations.timeout = 20_000
418
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
419
+ # config.timeout = 10.0
420
+ # config.rpcs.list_operations.timeout = 20.0
419
421
  # end
420
422
  #
421
423
  # @!attribute [rw] endpoint
422
424
  # The hostname or hostname:port of the service endpoint.
423
425
  # Defaults to `"videointelligence.googleapis.com"`.
424
- # @return [String]
426
+ # @return [::String]
425
427
  # @!attribute [rw] credentials
426
428
  # Credentials to send with calls. You may provide any of the following types:
427
429
  # * (`String`) The path to a service account key file in JSON format
@@ -433,29 +435,29 @@ module Google
433
435
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
434
436
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
435
437
  # * (`nil`) indicating no credentials
436
- # @return [Object]
438
+ # @return [::Object]
437
439
  # @!attribute [rw] scope
438
440
  # The OAuth scopes
439
- # @return [Array<String>]
441
+ # @return [::Array<::String>]
440
442
  # @!attribute [rw] lib_name
441
443
  # The library name as recorded in instrumentation and logging
442
- # @return [String]
444
+ # @return [::String]
443
445
  # @!attribute [rw] lib_version
444
446
  # The library version as recorded in instrumentation and logging
445
- # @return [String]
447
+ # @return [::String]
446
448
  # @!attribute [rw] channel_args
447
449
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
448
450
  # `GRPC::Core::Channel` object is provided as the credential.
449
- # @return [Hash]
451
+ # @return [::Hash]
450
452
  # @!attribute [rw] interceptors
451
453
  # An array of interceptors that are run before calls are executed.
452
- # @return [Array<GRPC::ClientInterceptor>]
454
+ # @return [::Array<::GRPC::ClientInterceptor>]
453
455
  # @!attribute [rw] timeout
454
- # The call timeout in milliseconds.
455
- # @return [Numeric]
456
+ # The call timeout in seconds.
457
+ # @return [::Numeric]
456
458
  # @!attribute [rw] metadata
457
459
  # Additional gRPC headers to be sent with the call.
458
- # @return [Hash{Symbol=>String}]
460
+ # @return [::Hash{::Symbol=>::String}]
459
461
  # @!attribute [rw] retry_policy
460
462
  # The retry policy. The value is a hash with the following keys:
461
463
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -463,25 +465,29 @@ module Google
463
465
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
464
466
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
465
467
  # trigger a retry.
466
- # @return [Hash]
468
+ # @return [::Hash]
469
+ # @!attribute [rw] quota_project
470
+ # A separate project against which to charge quota.
471
+ # @return [::String]
467
472
  #
468
473
  class Configuration
469
- extend Gapic::Config
474
+ extend ::Gapic::Config
470
475
 
471
- config_attr :endpoint, "videointelligence.googleapis.com", String
472
- config_attr :credentials, nil do |value|
476
+ config_attr :endpoint, "videointelligence.googleapis.com", ::String
477
+ config_attr :credentials, nil do |value|
473
478
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
474
479
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
475
480
  allowed.any? { |klass| klass === value }
476
481
  end
477
- config_attr :scope, nil, String, Array, nil
478
- config_attr :lib_name, nil, String, nil
479
- config_attr :lib_version, nil, String, nil
480
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
481
- config_attr :interceptors, nil, Array, nil
482
- config_attr :timeout, nil, Numeric, nil
483
- config_attr :metadata, nil, Hash, nil
484
- config_attr :retry_policy, nil, Hash, Proc, nil
482
+ config_attr :scope, nil, ::String, ::Array, nil
483
+ config_attr :lib_name, nil, ::String, nil
484
+ config_attr :lib_version, nil, ::String, nil
485
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
486
+ config_attr :interceptors, nil, ::Array, nil
487
+ config_attr :timeout, nil, ::Numeric, nil
488
+ config_attr :metadata, nil, ::Hash, nil
489
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
490
+ config_attr :quota_project, nil, ::String, nil
485
491
 
486
492
  # @private
487
493
  def initialize parent_config = nil
@@ -497,7 +503,7 @@ module Google
497
503
  def rpcs
498
504
  @rpcs ||= begin
499
505
  parent_rpcs = nil
500
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
506
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
501
507
  Rpcs.new parent_rpcs
502
508
  end
503
509
  end
@@ -522,35 +528,35 @@ module Google
522
528
  class Rpcs
523
529
  ##
524
530
  # RPC-specific configuration for `list_operations`
525
- # @return [Gapic::Config::Method]
531
+ # @return [::Gapic::Config::Method]
526
532
  #
527
533
  attr_reader :list_operations
528
534
  ##
529
535
  # RPC-specific configuration for `get_operation`
530
- # @return [Gapic::Config::Method]
536
+ # @return [::Gapic::Config::Method]
531
537
  #
532
538
  attr_reader :get_operation
533
539
  ##
534
540
  # RPC-specific configuration for `delete_operation`
535
- # @return [Gapic::Config::Method]
541
+ # @return [::Gapic::Config::Method]
536
542
  #
537
543
  attr_reader :delete_operation
538
544
  ##
539
545
  # RPC-specific configuration for `cancel_operation`
540
- # @return [Gapic::Config::Method]
546
+ # @return [::Gapic::Config::Method]
541
547
  #
542
548
  attr_reader :cancel_operation
543
549
 
544
550
  # @private
545
551
  def initialize parent_rpcs = nil
546
552
  list_operations_config = parent_rpcs&.list_operations if parent_rpcs&.respond_to? :list_operations
547
- @list_operations = Gapic::Config::Method.new list_operations_config
553
+ @list_operations = ::Gapic::Config::Method.new list_operations_config
548
554
  get_operation_config = parent_rpcs&.get_operation if parent_rpcs&.respond_to? :get_operation
549
- @get_operation = Gapic::Config::Method.new get_operation_config
555
+ @get_operation = ::Gapic::Config::Method.new get_operation_config
550
556
  delete_operation_config = parent_rpcs&.delete_operation if parent_rpcs&.respond_to? :delete_operation
551
- @delete_operation = Gapic::Config::Method.new delete_operation_config
557
+ @delete_operation = ::Gapic::Config::Method.new delete_operation_config
552
558
  cancel_operation_config = parent_rpcs&.cancel_operation if parent_rpcs&.respond_to? :cancel_operation
553
- @cancel_operation = Gapic::Config::Method.new cancel_operation_config
559
+ @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
554
560
 
555
561
  yield self if block_given?
556
562
  end