google-cloud-asset-v1 0.2.2 → 0.2.3

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.
@@ -38,15 +38,15 @@ module Google
38
38
  ##
39
39
  # Configure the AssetService Client class.
40
40
  #
41
- # See {Google::Cloud::Asset::V1::AssetService::Client::Configuration}
41
+ # See {::Google::Cloud::Asset::V1::AssetService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
44
  # ## Example
45
45
  #
46
46
  # To modify the configuration for all AssetService clients:
47
47
  #
48
- # Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
49
- # config.timeout = 10_000
48
+ # ::Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
49
+ # config.timeout = 10.0
50
50
  # end
51
51
  #
52
52
  # @yield [config] Configure the Client client.
@@ -88,7 +88,7 @@ module Google
88
88
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
89
89
  # should be made on {Client.configure}.
90
90
  #
91
- # See {Google::Cloud::Asset::V1::AssetService::Client::Configuration}
91
+ # See {::Google::Cloud::Asset::V1::AssetService::Client::Configuration}
92
92
  # for a description of the configuration fields.
93
93
  #
94
94
  # @yield [config] Configure the Client client.
@@ -109,13 +109,13 @@ module Google
109
109
  # To create a new AssetService client with the default
110
110
  # configuration:
111
111
  #
112
- # client = Google::Cloud::Asset::V1::AssetService::Client.new
112
+ # client = ::Google::Cloud::Asset::V1::AssetService::Client.new
113
113
  #
114
114
  # To create a new AssetService client with a custom
115
115
  # configuration:
116
116
  #
117
- # client = Google::Cloud::Asset::V1::AssetService::Client.new do |config|
118
- # config.timeout = 10_000
117
+ # client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config|
118
+ # config.timeout = 10.0
119
119
  # end
120
120
  #
121
121
  # @yield [config] Configure the AssetService client.
@@ -147,8 +147,8 @@ module Google
147
147
  config.endpoint = @config.endpoint
148
148
  end
149
149
 
150
- @asset_service_stub = Gapic::ServiceStub.new(
151
- Google::Cloud::Asset::V1::AssetService::Stub,
150
+ @asset_service_stub = ::Gapic::ServiceStub.new(
151
+ ::Google::Cloud::Asset::V1::AssetService::Stub,
152
152
  credentials: credentials,
153
153
  endpoint: @config.endpoint,
154
154
  channel_args: @config.channel_args,
@@ -159,7 +159,7 @@ module Google
159
159
  ##
160
160
  # Get the associated client for long-running operations.
161
161
  #
162
- # @return [Google::Cloud::Asset::V1::AssetService::Operations]
162
+ # @return [::Google::Cloud::Asset::V1::AssetService::Operations]
163
163
  #
164
164
  attr_reader :operations_client
165
165
 
@@ -168,17 +168,17 @@ module Google
168
168
  ##
169
169
  # Exports assets with time and resource types to a given Cloud Storage
170
170
  # location. The output format is newline-delimited JSON.
171
- # This API implements the {Google::Longrunning::Operation google.longrunning.Operation} API allowing you
171
+ # This API implements the {::Google::Longrunning::Operation google.longrunning.Operation} API allowing you
172
172
  # to keep track of the export.
173
173
  #
174
174
  # @overload export_assets(request, options = nil)
175
175
  # Pass arguments to `export_assets` via a request object, either of type
176
- # {Google::Cloud::Asset::V1::ExportAssetsRequest} or an equivalent Hash.
176
+ # {::Google::Cloud::Asset::V1::ExportAssetsRequest} or an equivalent Hash.
177
177
  #
178
- # @param request [Google::Cloud::Asset::V1::ExportAssetsRequest, Hash]
178
+ # @param request [::Google::Cloud::Asset::V1::ExportAssetsRequest, ::Hash]
179
179
  # A request object representing the call parameters. Required. To specify no
180
180
  # parameters, or to keep all the default parameter values, pass an empty Hash.
181
- # @param options [Gapic::CallOptions, Hash]
181
+ # @param options [::Gapic::CallOptions, ::Hash]
182
182
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
183
183
  #
184
184
  # @overload export_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, output_config: nil)
@@ -186,51 +186,51 @@ module Google
186
186
  # least one keyword argument is required. To specify no parameters, or to keep all
187
187
  # the default parameter values, pass an empty Hash as a request object (see above).
188
188
  #
189
- # @param parent [String]
189
+ # @param parent [::String]
190
190
  # Required. The relative name of the root asset. This can only be an
191
191
  # organization number (such as "organizations/123"), a project ID (such as
192
192
  # "projects/my-project-id"), or a project number (such as "projects/12345"),
193
193
  # or a folder number (such as "folders/123").
194
- # @param read_time [Google::Protobuf::Timestamp, Hash]
194
+ # @param read_time [::Google::Protobuf::Timestamp, ::Hash]
195
195
  # Timestamp to take an asset snapshot. This can only be set to a timestamp
196
196
  # between the current time and the current time minus 35 days (inclusive).
197
197
  # If not specified, the current time will be used. Due to delays in resource
198
198
  # data collection and indexing, there is a volatile window during which
199
199
  # running the same query may get different results.
200
- # @param asset_types [Array<String>]
200
+ # @param asset_types [::Array<::String>]
201
201
  # A list of asset types of which to take a snapshot for. For example:
202
202
  # "compute.googleapis.com/Disk". If specified, only matching assets will be
203
203
  # returned. See [Introduction to Cloud Asset
204
204
  # Inventory](https://cloud.google.com/asset-inventory/docs/overview)
205
205
  # for all supported asset types.
206
- # @param content_type [Google::Cloud::Asset::V1::ContentType]
206
+ # @param content_type [::Google::Cloud::Asset::V1::ContentType]
207
207
  # Asset content type. If not specified, no content but the asset name will be
208
208
  # returned.
209
- # @param output_config [Google::Cloud::Asset::V1::OutputConfig, Hash]
209
+ # @param output_config [::Google::Cloud::Asset::V1::OutputConfig, ::Hash]
210
210
  # Required. Output configuration indicating where the results will be output
211
211
  # to. All results will be in newline delimited JSON format.
212
212
  #
213
213
  # @yield [response, operation] Access the result along with the RPC operation
214
- # @yieldparam response [Gapic::Operation]
215
- # @yieldparam operation [GRPC::ActiveCall::Operation]
214
+ # @yieldparam response [::Gapic::Operation]
215
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
216
216
  #
217
- # @return [Gapic::Operation]
217
+ # @return [::Gapic::Operation]
218
218
  #
219
- # @raise [Google::Cloud::Error] if the RPC is aborted.
219
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
220
220
  #
221
221
  def export_assets request, options = nil
222
- raise ArgumentError, "request must be provided" if request.nil?
222
+ raise ::ArgumentError, "request must be provided" if request.nil?
223
223
 
224
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::ExportAssetsRequest
224
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ExportAssetsRequest
225
225
 
226
226
  # Converts hash and nil to an options object
227
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
227
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
228
228
 
229
229
  # Customize the options with defaults
230
230
  metadata = @config.rpcs.export_assets.metadata.to_h
231
231
 
232
232
  # Set x-goog-api-client and x-goog-user-project headers
233
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
233
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
234
234
  lib_name: @config.lib_name, lib_version: @config.lib_version,
235
235
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
236
236
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -248,12 +248,12 @@ module Google
248
248
  retry_policy: @config.retry_policy
249
249
 
250
250
  @asset_service_stub.call_rpc :export_assets, request, options: options do |response, operation|
251
- response = Gapic::Operation.new response, @operations_client, options: options
251
+ response = ::Gapic::Operation.new response, @operations_client, options: options
252
252
  yield response, operation if block_given?
253
253
  return response
254
254
  end
255
- rescue GRPC::BadStatus => e
256
- raise Google::Cloud::Error.from_error(e)
255
+ rescue ::GRPC::BadStatus => e
256
+ raise ::Google::Cloud::Error.from_error(e)
257
257
  end
258
258
 
259
259
  ##
@@ -267,12 +267,12 @@ module Google
267
267
  #
268
268
  # @overload batch_get_assets_history(request, options = nil)
269
269
  # Pass arguments to `batch_get_assets_history` via a request object, either of type
270
- # {Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest} or an equivalent Hash.
270
+ # {::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest} or an equivalent Hash.
271
271
  #
272
- # @param request [Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, Hash]
272
+ # @param request [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, ::Hash]
273
273
  # A request object representing the call parameters. Required. To specify no
274
274
  # parameters, or to keep all the default parameter values, pass an empty Hash.
275
- # @param options [Gapic::CallOptions, Hash]
275
+ # @param options [::Gapic::CallOptions, ::Hash]
276
276
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
277
277
  #
278
278
  # @overload batch_get_assets_history(parent: nil, asset_names: nil, content_type: nil, read_time_window: nil)
@@ -280,11 +280,11 @@ module Google
280
280
  # least one keyword argument is required. To specify no parameters, or to keep all
281
281
  # the default parameter values, pass an empty Hash as a request object (see above).
282
282
  #
283
- # @param parent [String]
283
+ # @param parent [::String]
284
284
  # Required. The relative name of the root asset. It can only be an
285
285
  # organization number (such as "organizations/123"), a project ID (such as
286
286
  # "projects/my-project-id")", or a project number (such as "projects/12345").
287
- # @param asset_names [Array<String>]
287
+ # @param asset_names [::Array<::String>]
288
288
  # A list of the full names of the assets. For example:
289
289
  # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
290
290
  # See [Resource
@@ -295,9 +295,9 @@ module Google
295
295
  #
296
296
  # The request becomes a no-op if the asset name list is empty, and the max
297
297
  # size of the asset name list is 100 in one request.
298
- # @param content_type [Google::Cloud::Asset::V1::ContentType]
298
+ # @param content_type [::Google::Cloud::Asset::V1::ContentType]
299
299
  # Optional. The content type.
300
- # @param read_time_window [Google::Cloud::Asset::V1::TimeWindow, Hash]
300
+ # @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash]
301
301
  # Optional. The time window for the asset history. Both start_time and
302
302
  # end_time are optional and if set, it must be after the current time minus
303
303
  # 35 days. If end_time is not set, it is default to current timestamp.
@@ -306,26 +306,26 @@ module Google
306
306
  # window overlap with read_time_window.
307
307
  #
308
308
  # @yield [response, operation] Access the result along with the RPC operation
309
- # @yieldparam response [Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse]
310
- # @yieldparam operation [GRPC::ActiveCall::Operation]
309
+ # @yieldparam response [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse]
310
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
311
311
  #
312
- # @return [Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse]
312
+ # @return [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse]
313
313
  #
314
- # @raise [Google::Cloud::Error] if the RPC is aborted.
314
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
315
315
  #
316
316
  def batch_get_assets_history request, options = nil
317
- raise ArgumentError, "request must be provided" if request.nil?
317
+ raise ::ArgumentError, "request must be provided" if request.nil?
318
318
 
319
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest
319
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest
320
320
 
321
321
  # Converts hash and nil to an options object
322
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
322
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
323
323
 
324
324
  # Customize the options with defaults
325
325
  metadata = @config.rpcs.batch_get_assets_history.metadata.to_h
326
326
 
327
327
  # Set x-goog-api-client and x-goog-user-project headers
328
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
328
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
329
329
  lib_name: @config.lib_name, lib_version: @config.lib_version,
330
330
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
331
331
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -346,8 +346,8 @@ module Google
346
346
  yield response, operation if block_given?
347
347
  return response
348
348
  end
349
- rescue GRPC::BadStatus => e
350
- raise Google::Cloud::Error.from_error(e)
349
+ rescue ::GRPC::BadStatus => e
350
+ raise ::Google::Cloud::Error.from_error(e)
351
351
  end
352
352
 
353
353
  ##
@@ -356,12 +356,12 @@ module Google
356
356
  #
357
357
  # @overload create_feed(request, options = nil)
358
358
  # Pass arguments to `create_feed` via a request object, either of type
359
- # {Google::Cloud::Asset::V1::CreateFeedRequest} or an equivalent Hash.
359
+ # {::Google::Cloud::Asset::V1::CreateFeedRequest} or an equivalent Hash.
360
360
  #
361
- # @param request [Google::Cloud::Asset::V1::CreateFeedRequest, Hash]
361
+ # @param request [::Google::Cloud::Asset::V1::CreateFeedRequest, ::Hash]
362
362
  # A request object representing the call parameters. Required. To specify no
363
363
  # parameters, or to keep all the default parameter values, pass an empty Hash.
364
- # @param options [Gapic::CallOptions, Hash]
364
+ # @param options [::Gapic::CallOptions, ::Hash]
365
365
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
366
366
  #
367
367
  # @overload create_feed(parent: nil, feed_id: nil, feed: nil)
@@ -369,16 +369,16 @@ module Google
369
369
  # least one keyword argument is required. To specify no parameters, or to keep all
370
370
  # the default parameter values, pass an empty Hash as a request object (see above).
371
371
  #
372
- # @param parent [String]
372
+ # @param parent [::String]
373
373
  # Required. The name of the project/folder/organization where this feed
374
374
  # should be created in. It can only be an organization number (such as
375
375
  # "organizations/123"), a folder number (such as "folders/123"), a project ID
376
376
  # (such as "projects/my-project-id")", or a project number (such as
377
377
  # "projects/12345").
378
- # @param feed_id [String]
378
+ # @param feed_id [::String]
379
379
  # Required. This is the client-assigned asset feed identifier and it needs to
380
380
  # be unique under a specific parent project/folder/organization.
381
- # @param feed [Google::Cloud::Asset::V1::Feed, Hash]
381
+ # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash]
382
382
  # Required. The feed details. The field `name` must be empty and it will be generated
383
383
  # in the format of:
384
384
  # projects/project_number/feeds/feed_id
@@ -386,26 +386,26 @@ module Google
386
386
  # organizations/organization_number/feeds/feed_id
387
387
  #
388
388
  # @yield [response, operation] Access the result along with the RPC operation
389
- # @yieldparam response [Google::Cloud::Asset::V1::Feed]
390
- # @yieldparam operation [GRPC::ActiveCall::Operation]
389
+ # @yieldparam response [::Google::Cloud::Asset::V1::Feed]
390
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
391
391
  #
392
- # @return [Google::Cloud::Asset::V1::Feed]
392
+ # @return [::Google::Cloud::Asset::V1::Feed]
393
393
  #
394
- # @raise [Google::Cloud::Error] if the RPC is aborted.
394
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
395
395
  #
396
396
  def create_feed request, options = nil
397
- raise ArgumentError, "request must be provided" if request.nil?
397
+ raise ::ArgumentError, "request must be provided" if request.nil?
398
398
 
399
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::CreateFeedRequest
399
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateFeedRequest
400
400
 
401
401
  # Converts hash and nil to an options object
402
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
402
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
403
403
 
404
404
  # Customize the options with defaults
405
405
  metadata = @config.rpcs.create_feed.metadata.to_h
406
406
 
407
407
  # Set x-goog-api-client and x-goog-user-project headers
408
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
408
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
409
409
  lib_name: @config.lib_name, lib_version: @config.lib_version,
410
410
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
411
411
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -426,8 +426,8 @@ module Google
426
426
  yield response, operation if block_given?
427
427
  return response
428
428
  end
429
- rescue GRPC::BadStatus => e
430
- raise Google::Cloud::Error.from_error(e)
429
+ rescue ::GRPC::BadStatus => e
430
+ raise ::Google::Cloud::Error.from_error(e)
431
431
  end
432
432
 
433
433
  ##
@@ -435,12 +435,12 @@ module Google
435
435
  #
436
436
  # @overload get_feed(request, options = nil)
437
437
  # Pass arguments to `get_feed` via a request object, either of type
438
- # {Google::Cloud::Asset::V1::GetFeedRequest} or an equivalent Hash.
438
+ # {::Google::Cloud::Asset::V1::GetFeedRequest} or an equivalent Hash.
439
439
  #
440
- # @param request [Google::Cloud::Asset::V1::GetFeedRequest, Hash]
440
+ # @param request [::Google::Cloud::Asset::V1::GetFeedRequest, ::Hash]
441
441
  # A request object representing the call parameters. Required. To specify no
442
442
  # parameters, or to keep all the default parameter values, pass an empty Hash.
443
- # @param options [Gapic::CallOptions, Hash]
443
+ # @param options [::Gapic::CallOptions, ::Hash]
444
444
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
445
445
  #
446
446
  # @overload get_feed(name: nil)
@@ -448,33 +448,33 @@ module Google
448
448
  # least one keyword argument is required. To specify no parameters, or to keep all
449
449
  # the default parameter values, pass an empty Hash as a request object (see above).
450
450
  #
451
- # @param name [String]
451
+ # @param name [::String]
452
452
  # Required. The name of the Feed and it must be in the format of:
453
453
  # projects/project_number/feeds/feed_id
454
454
  # folders/folder_number/feeds/feed_id
455
455
  # organizations/organization_number/feeds/feed_id
456
456
  #
457
457
  # @yield [response, operation] Access the result along with the RPC operation
458
- # @yieldparam response [Google::Cloud::Asset::V1::Feed]
459
- # @yieldparam operation [GRPC::ActiveCall::Operation]
458
+ # @yieldparam response [::Google::Cloud::Asset::V1::Feed]
459
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
460
460
  #
461
- # @return [Google::Cloud::Asset::V1::Feed]
461
+ # @return [::Google::Cloud::Asset::V1::Feed]
462
462
  #
463
- # @raise [Google::Cloud::Error] if the RPC is aborted.
463
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
464
464
  #
465
465
  def get_feed request, options = nil
466
- raise ArgumentError, "request must be provided" if request.nil?
466
+ raise ::ArgumentError, "request must be provided" if request.nil?
467
467
 
468
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::GetFeedRequest
468
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetFeedRequest
469
469
 
470
470
  # Converts hash and nil to an options object
471
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
471
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
472
472
 
473
473
  # Customize the options with defaults
474
474
  metadata = @config.rpcs.get_feed.metadata.to_h
475
475
 
476
476
  # Set x-goog-api-client and x-goog-user-project headers
477
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
477
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
478
478
  lib_name: @config.lib_name, lib_version: @config.lib_version,
479
479
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
480
480
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -495,8 +495,8 @@ module Google
495
495
  yield response, operation if block_given?
496
496
  return response
497
497
  end
498
- rescue GRPC::BadStatus => e
499
- raise Google::Cloud::Error.from_error(e)
498
+ rescue ::GRPC::BadStatus => e
499
+ raise ::Google::Cloud::Error.from_error(e)
500
500
  end
501
501
 
502
502
  ##
@@ -504,12 +504,12 @@ module Google
504
504
  #
505
505
  # @overload list_feeds(request, options = nil)
506
506
  # Pass arguments to `list_feeds` via a request object, either of type
507
- # {Google::Cloud::Asset::V1::ListFeedsRequest} or an equivalent Hash.
507
+ # {::Google::Cloud::Asset::V1::ListFeedsRequest} or an equivalent Hash.
508
508
  #
509
- # @param request [Google::Cloud::Asset::V1::ListFeedsRequest, Hash]
509
+ # @param request [::Google::Cloud::Asset::V1::ListFeedsRequest, ::Hash]
510
510
  # A request object representing the call parameters. Required. To specify no
511
511
  # parameters, or to keep all the default parameter values, pass an empty Hash.
512
- # @param options [Gapic::CallOptions, Hash]
512
+ # @param options [::Gapic::CallOptions, ::Hash]
513
513
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
514
514
  #
515
515
  # @overload list_feeds(parent: nil)
@@ -517,32 +517,32 @@ module Google
517
517
  # least one keyword argument is required. To specify no parameters, or to keep all
518
518
  # the default parameter values, pass an empty Hash as a request object (see above).
519
519
  #
520
- # @param parent [String]
520
+ # @param parent [::String]
521
521
  # Required. The parent project/folder/organization whose feeds are to be
522
522
  # listed. It can only be using project/folder/organization number (such as
523
523
  # "folders/12345")", or a project ID (such as "projects/my-project-id").
524
524
  #
525
525
  # @yield [response, operation] Access the result along with the RPC operation
526
- # @yieldparam response [Google::Cloud::Asset::V1::ListFeedsResponse]
527
- # @yieldparam operation [GRPC::ActiveCall::Operation]
526
+ # @yieldparam response [::Google::Cloud::Asset::V1::ListFeedsResponse]
527
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
528
528
  #
529
- # @return [Google::Cloud::Asset::V1::ListFeedsResponse]
529
+ # @return [::Google::Cloud::Asset::V1::ListFeedsResponse]
530
530
  #
531
- # @raise [Google::Cloud::Error] if the RPC is aborted.
531
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
532
532
  #
533
533
  def list_feeds request, options = nil
534
- raise ArgumentError, "request must be provided" if request.nil?
534
+ raise ::ArgumentError, "request must be provided" if request.nil?
535
535
 
536
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::ListFeedsRequest
536
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListFeedsRequest
537
537
 
538
538
  # Converts hash and nil to an options object
539
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
539
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
540
540
 
541
541
  # Customize the options with defaults
542
542
  metadata = @config.rpcs.list_feeds.metadata.to_h
543
543
 
544
544
  # Set x-goog-api-client and x-goog-user-project headers
545
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
545
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
546
546
  lib_name: @config.lib_name, lib_version: @config.lib_version,
547
547
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
548
548
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -563,8 +563,8 @@ module Google
563
563
  yield response, operation if block_given?
564
564
  return response
565
565
  end
566
- rescue GRPC::BadStatus => e
567
- raise Google::Cloud::Error.from_error(e)
566
+ rescue ::GRPC::BadStatus => e
567
+ raise ::Google::Cloud::Error.from_error(e)
568
568
  end
569
569
 
570
570
  ##
@@ -572,12 +572,12 @@ module Google
572
572
  #
573
573
  # @overload update_feed(request, options = nil)
574
574
  # Pass arguments to `update_feed` via a request object, either of type
575
- # {Google::Cloud::Asset::V1::UpdateFeedRequest} or an equivalent Hash.
575
+ # {::Google::Cloud::Asset::V1::UpdateFeedRequest} or an equivalent Hash.
576
576
  #
577
- # @param request [Google::Cloud::Asset::V1::UpdateFeedRequest, Hash]
577
+ # @param request [::Google::Cloud::Asset::V1::UpdateFeedRequest, ::Hash]
578
578
  # A request object representing the call parameters. Required. To specify no
579
579
  # parameters, or to keep all the default parameter values, pass an empty Hash.
580
- # @param options [Gapic::CallOptions, Hash]
580
+ # @param options [::Gapic::CallOptions, ::Hash]
581
581
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
582
582
  #
583
583
  # @overload update_feed(feed: nil, update_mask: nil)
@@ -585,38 +585,38 @@ module Google
585
585
  # least one keyword argument is required. To specify no parameters, or to keep all
586
586
  # the default parameter values, pass an empty Hash as a request object (see above).
587
587
  #
588
- # @param feed [Google::Cloud::Asset::V1::Feed, Hash]
588
+ # @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash]
589
589
  # Required. The new values of feed details. It must match an existing feed and the
590
590
  # field `name` must be in the format of:
591
591
  # projects/project_number/feeds/feed_id or
592
592
  # folders/folder_number/feeds/feed_id or
593
593
  # organizations/organization_number/feeds/feed_id.
594
- # @param update_mask [Google::Protobuf::FieldMask, Hash]
594
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
595
595
  # Required. Only updates the `feed` fields indicated by this mask.
596
596
  # The field mask must not be empty, and it must not contain fields that
597
597
  # are immutable or only set by the server.
598
598
  #
599
599
  # @yield [response, operation] Access the result along with the RPC operation
600
- # @yieldparam response [Google::Cloud::Asset::V1::Feed]
601
- # @yieldparam operation [GRPC::ActiveCall::Operation]
600
+ # @yieldparam response [::Google::Cloud::Asset::V1::Feed]
601
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
602
602
  #
603
- # @return [Google::Cloud::Asset::V1::Feed]
603
+ # @return [::Google::Cloud::Asset::V1::Feed]
604
604
  #
605
- # @raise [Google::Cloud::Error] if the RPC is aborted.
605
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
606
606
  #
607
607
  def update_feed request, options = nil
608
- raise ArgumentError, "request must be provided" if request.nil?
608
+ raise ::ArgumentError, "request must be provided" if request.nil?
609
609
 
610
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::UpdateFeedRequest
610
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateFeedRequest
611
611
 
612
612
  # Converts hash and nil to an options object
613
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
613
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
614
614
 
615
615
  # Customize the options with defaults
616
616
  metadata = @config.rpcs.update_feed.metadata.to_h
617
617
 
618
618
  # Set x-goog-api-client and x-goog-user-project headers
619
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
619
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
620
620
  lib_name: @config.lib_name, lib_version: @config.lib_version,
621
621
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
622
622
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -637,8 +637,8 @@ module Google
637
637
  yield response, operation if block_given?
638
638
  return response
639
639
  end
640
- rescue GRPC::BadStatus => e
641
- raise Google::Cloud::Error.from_error(e)
640
+ rescue ::GRPC::BadStatus => e
641
+ raise ::Google::Cloud::Error.from_error(e)
642
642
  end
643
643
 
644
644
  ##
@@ -646,12 +646,12 @@ module Google
646
646
  #
647
647
  # @overload delete_feed(request, options = nil)
648
648
  # Pass arguments to `delete_feed` via a request object, either of type
649
- # {Google::Cloud::Asset::V1::DeleteFeedRequest} or an equivalent Hash.
649
+ # {::Google::Cloud::Asset::V1::DeleteFeedRequest} or an equivalent Hash.
650
650
  #
651
- # @param request [Google::Cloud::Asset::V1::DeleteFeedRequest, Hash]
651
+ # @param request [::Google::Cloud::Asset::V1::DeleteFeedRequest, ::Hash]
652
652
  # A request object representing the call parameters. Required. To specify no
653
653
  # parameters, or to keep all the default parameter values, pass an empty Hash.
654
- # @param options [Gapic::CallOptions, Hash]
654
+ # @param options [::Gapic::CallOptions, ::Hash]
655
655
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
656
656
  #
657
657
  # @overload delete_feed(name: nil)
@@ -659,33 +659,33 @@ module Google
659
659
  # least one keyword argument is required. To specify no parameters, or to keep all
660
660
  # the default parameter values, pass an empty Hash as a request object (see above).
661
661
  #
662
- # @param name [String]
662
+ # @param name [::String]
663
663
  # Required. The name of the feed and it must be in the format of:
664
664
  # projects/project_number/feeds/feed_id
665
665
  # folders/folder_number/feeds/feed_id
666
666
  # organizations/organization_number/feeds/feed_id
667
667
  #
668
668
  # @yield [response, operation] Access the result along with the RPC operation
669
- # @yieldparam response [Google::Protobuf::Empty]
670
- # @yieldparam operation [GRPC::ActiveCall::Operation]
669
+ # @yieldparam response [::Google::Protobuf::Empty]
670
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
671
671
  #
672
- # @return [Google::Protobuf::Empty]
672
+ # @return [::Google::Protobuf::Empty]
673
673
  #
674
- # @raise [Google::Cloud::Error] if the RPC is aborted.
674
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
675
675
  #
676
676
  def delete_feed request, options = nil
677
- raise ArgumentError, "request must be provided" if request.nil?
677
+ raise ::ArgumentError, "request must be provided" if request.nil?
678
678
 
679
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::DeleteFeedRequest
679
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteFeedRequest
680
680
 
681
681
  # Converts hash and nil to an options object
682
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
682
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
683
683
 
684
684
  # Customize the options with defaults
685
685
  metadata = @config.rpcs.delete_feed.metadata.to_h
686
686
 
687
687
  # Set x-goog-api-client and x-goog-user-project headers
688
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
688
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
689
689
  lib_name: @config.lib_name, lib_version: @config.lib_version,
690
690
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
691
691
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -706,8 +706,8 @@ module Google
706
706
  yield response, operation if block_given?
707
707
  return response
708
708
  end
709
- rescue GRPC::BadStatus => e
710
- raise Google::Cloud::Error.from_error(e)
709
+ rescue ::GRPC::BadStatus => e
710
+ raise ::Google::Cloud::Error.from_error(e)
711
711
  end
712
712
 
713
713
  ##
@@ -717,7 +717,7 @@ module Google
717
717
  # providing control over timeouts, retry behavior, logging, transport
718
718
  # parameters, and other low-level controls. Certain parameters can also be
719
719
  # applied individually to specific RPCs. See
720
- # {Google::Cloud::Asset::V1::AssetService::Client::Configuration::Rpcs}
720
+ # {::Google::Cloud::Asset::V1::AssetService::Client::Configuration::Rpcs}
721
721
  # for a list of RPCs that can be configured independently.
722
722
  #
723
723
  # Configuration can be applied globally to all clients, or to a single client
@@ -728,22 +728,22 @@ module Google
728
728
  # To modify the global config, setting the timeout for export_assets
729
729
  # to 20 seconds, and all remaining timeouts to 10 seconds:
730
730
  #
731
- # Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
732
- # config.timeout = 10_000
733
- # config.rpcs.export_assets.timeout = 20_000
731
+ # ::Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
732
+ # config.timeout = 10.0
733
+ # config.rpcs.export_assets.timeout = 20.0
734
734
  # end
735
735
  #
736
736
  # To apply the above configuration only to a new client:
737
737
  #
738
- # client = Google::Cloud::Asset::V1::AssetService::Client.new do |config|
739
- # config.timeout = 10_000
740
- # config.rpcs.export_assets.timeout = 20_000
738
+ # client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config|
739
+ # config.timeout = 10.0
740
+ # config.rpcs.export_assets.timeout = 20.0
741
741
  # end
742
742
  #
743
743
  # @!attribute [rw] endpoint
744
744
  # The hostname or hostname:port of the service endpoint.
745
745
  # Defaults to `"cloudasset.googleapis.com"`.
746
- # @return [String]
746
+ # @return [::String]
747
747
  # @!attribute [rw] credentials
748
748
  # Credentials to send with calls. You may provide any of the following types:
749
749
  # * (`String`) The path to a service account key file in JSON format
@@ -755,29 +755,29 @@ module Google
755
755
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
756
756
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
757
757
  # * (`nil`) indicating no credentials
758
- # @return [Object]
758
+ # @return [::Object]
759
759
  # @!attribute [rw] scope
760
760
  # The OAuth scopes
761
- # @return [Array<String>]
761
+ # @return [::Array<::String>]
762
762
  # @!attribute [rw] lib_name
763
763
  # The library name as recorded in instrumentation and logging
764
- # @return [String]
764
+ # @return [::String]
765
765
  # @!attribute [rw] lib_version
766
766
  # The library version as recorded in instrumentation and logging
767
- # @return [String]
767
+ # @return [::String]
768
768
  # @!attribute [rw] channel_args
769
769
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
770
770
  # `GRPC::Core::Channel` object is provided as the credential.
771
- # @return [Hash]
771
+ # @return [::Hash]
772
772
  # @!attribute [rw] interceptors
773
773
  # An array of interceptors that are run before calls are executed.
774
- # @return [Array<GRPC::ClientInterceptor>]
774
+ # @return [::Array<::GRPC::ClientInterceptor>]
775
775
  # @!attribute [rw] timeout
776
- # The call timeout in milliseconds.
777
- # @return [Numeric]
776
+ # The call timeout in seconds.
777
+ # @return [::Numeric]
778
778
  # @!attribute [rw] metadata
779
779
  # Additional gRPC headers to be sent with the call.
780
- # @return [Hash{Symbol=>String}]
780
+ # @return [::Hash{::Symbol=>::String}]
781
781
  # @!attribute [rw] retry_policy
782
782
  # The retry policy. The value is a hash with the following keys:
783
783
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -785,10 +785,10 @@ module Google
785
785
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
786
786
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
787
787
  # trigger a retry.
788
- # @return [Hash]
788
+ # @return [::Hash]
789
789
  #
790
790
  class Configuration
791
- extend Gapic::Config
791
+ extend ::Gapic::Config
792
792
 
793
793
  config_attr :endpoint, "cloudasset.googleapis.com", String
794
794
  config_attr :credentials, nil do |value|
@@ -796,14 +796,14 @@ module Google
796
796
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
797
797
  allowed.any? { |klass| klass === value }
798
798
  end
799
- config_attr :scope, nil, String, Array, nil
800
- config_attr :lib_name, nil, String, nil
801
- config_attr :lib_version, nil, String, nil
802
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
803
- config_attr :interceptors, nil, Array, nil
804
- config_attr :timeout, nil, Numeric, nil
805
- config_attr :metadata, nil, Hash, nil
806
- config_attr :retry_policy, nil, Hash, Proc, nil
799
+ config_attr :scope, nil, ::String, ::Array, nil
800
+ config_attr :lib_name, nil, ::String, nil
801
+ config_attr :lib_version, nil, ::String, nil
802
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
803
+ config_attr :interceptors, nil, ::Array, nil
804
+ config_attr :timeout, nil, ::Numeric, nil
805
+ config_attr :metadata, nil, ::Hash, nil
806
+ config_attr :retry_policy, nil, ::Hash, Proc, nil
807
807
 
808
808
  # @private
809
809
  def initialize parent_config = nil
@@ -844,56 +844,56 @@ module Google
844
844
  class Rpcs
845
845
  ##
846
846
  # RPC-specific configuration for `export_assets`
847
- # @return [Gapic::Config::Method]
847
+ # @return [::Gapic::Config::Method]
848
848
  #
849
849
  attr_reader :export_assets
850
850
  ##
851
851
  # RPC-specific configuration for `batch_get_assets_history`
852
- # @return [Gapic::Config::Method]
852
+ # @return [::Gapic::Config::Method]
853
853
  #
854
854
  attr_reader :batch_get_assets_history
855
855
  ##
856
856
  # RPC-specific configuration for `create_feed`
857
- # @return [Gapic::Config::Method]
857
+ # @return [::Gapic::Config::Method]
858
858
  #
859
859
  attr_reader :create_feed
860
860
  ##
861
861
  # RPC-specific configuration for `get_feed`
862
- # @return [Gapic::Config::Method]
862
+ # @return [::Gapic::Config::Method]
863
863
  #
864
864
  attr_reader :get_feed
865
865
  ##
866
866
  # RPC-specific configuration for `list_feeds`
867
- # @return [Gapic::Config::Method]
867
+ # @return [::Gapic::Config::Method]
868
868
  #
869
869
  attr_reader :list_feeds
870
870
  ##
871
871
  # RPC-specific configuration for `update_feed`
872
- # @return [Gapic::Config::Method]
872
+ # @return [::Gapic::Config::Method]
873
873
  #
874
874
  attr_reader :update_feed
875
875
  ##
876
876
  # RPC-specific configuration for `delete_feed`
877
- # @return [Gapic::Config::Method]
877
+ # @return [::Gapic::Config::Method]
878
878
  #
879
879
  attr_reader :delete_feed
880
880
 
881
881
  # @private
882
882
  def initialize parent_rpcs = nil
883
883
  export_assets_config = parent_rpcs&.export_assets if parent_rpcs&.respond_to? :export_assets
884
- @export_assets = Gapic::Config::Method.new export_assets_config
884
+ @export_assets = ::Gapic::Config::Method.new export_assets_config
885
885
  batch_get_assets_history_config = parent_rpcs&.batch_get_assets_history if parent_rpcs&.respond_to? :batch_get_assets_history
886
- @batch_get_assets_history = Gapic::Config::Method.new batch_get_assets_history_config
886
+ @batch_get_assets_history = ::Gapic::Config::Method.new batch_get_assets_history_config
887
887
  create_feed_config = parent_rpcs&.create_feed if parent_rpcs&.respond_to? :create_feed
888
- @create_feed = Gapic::Config::Method.new create_feed_config
888
+ @create_feed = ::Gapic::Config::Method.new create_feed_config
889
889
  get_feed_config = parent_rpcs&.get_feed if parent_rpcs&.respond_to? :get_feed
890
- @get_feed = Gapic::Config::Method.new get_feed_config
890
+ @get_feed = ::Gapic::Config::Method.new get_feed_config
891
891
  list_feeds_config = parent_rpcs&.list_feeds if parent_rpcs&.respond_to? :list_feeds
892
- @list_feeds = Gapic::Config::Method.new list_feeds_config
892
+ @list_feeds = ::Gapic::Config::Method.new list_feeds_config
893
893
  update_feed_config = parent_rpcs&.update_feed if parent_rpcs&.respond_to? :update_feed
894
- @update_feed = Gapic::Config::Method.new update_feed_config
894
+ @update_feed = ::Gapic::Config::Method.new update_feed_config
895
895
  delete_feed_config = parent_rpcs&.delete_feed if parent_rpcs&.respond_to? :delete_feed
896
- @delete_feed = Gapic::Config::Method.new delete_feed_config
896
+ @delete_feed = ::Gapic::Config::Method.new delete_feed_config
897
897
 
898
898
  yield self if block_given?
899
899
  end