google-cloud-asset-v1beta1 0.1.3 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b6c5e3c33aa93bcfabe02d91a98026a4c50ca5f712d0e2580b1cfa54c5315bf
4
- data.tar.gz: b06cab8c6f2b3fdb756a68958df4f8227a749a109905cea5140f379634a0aa62
3
+ metadata.gz: e2940b966b75b041212087be638493249f0e3596b7c4b29cd3195039b1d32440
4
+ data.tar.gz: 9d28ff2e5970f8eb5e19a1583642ae2bff6f5c8c14bb6b25d488d5e926828234
5
5
  SHA512:
6
- metadata.gz: 527a9dd8289739bc6086e5de7bb57759f377fd8b89b7bddad75c98b333b9206b4810e24422305c9ca6a6623dc117666172b25c0c062ce5765eb66912164f70f6
7
- data.tar.gz: 27b33fe67870692b947e11075e13187757ce2db196e56916a2f06c5ce23cc2eccb32e3f485bed363c9c727101790c2027a13771ad26f37fea84546a09c7fcf7a
6
+ metadata.gz: b1b5d5ee11c5faabd3500e81b41e370bc0b2939ef48c15563b4a55a97b13dc4ad17225993f40afc113be73f083a948590f77ef01c796dc7d6cd8df88b5a1087a
7
+ data.tar.gz: faa499af4d89901bddaf8c5ff98b98fe050edc8f622e8c205895f1eca7f84617aaac296cea03104c1fe956b9ca18662bf45742a040369ac71cec9c6476380d73
@@ -27,7 +27,7 @@ export ASSET_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/asset/v1beta1"
29
29
 
30
- client = Google::Cloud::Asset::V1beta1::AssetService::Client.new
30
+ client = ::Google::Cloud::Asset::V1beta1::AssetService::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-asset-v1beta1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::Asset::V1beta1::AssetService::Credentials}):
67
+ {::Google::Cloud::Asset::V1beta1::AssetService::Credentials}):
68
68
 
69
69
  1. `ASSET_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `ASSET_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/asset/v1beta1"
77
77
 
78
78
  ENV["ASSET_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::Asset::V1beta1::AssetService::Client.new
80
+ client = ::Google::Cloud::Asset::V1beta1::AssetService::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/asset/v1beta1"
90
90
 
91
- client = Google::Cloud::Asset::V1beta1::AssetService::Client.new do |config|
91
+ client = ::Google::Cloud::Asset::V1beta1::AssetService::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/asset/v1beta1"
100
100
 
101
- Google::Cloud::Asset::V1beta1::AssetService::Client.configure do |config|
101
+ ::Google::Cloud::Asset::V1beta1::AssetService::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::Asset::V1beta1::AssetService::Client.new
105
+ client = ::Google::Cloud::Asset::V1beta1::AssetService::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/cloudasset.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/asset/v1beta1"
27
28
 
28
- client = Google::Cloud::Asset::V1beta1::AssetService::Client.new
29
+ client = ::Google::Cloud::Asset::V1beta1::AssetService::Client.new
29
30
  request = my_create_request
30
31
  response = client.export_assets request
31
32
  ```
@@ -33,6 +34,9 @@ response = client.export_assets request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-asset-v1beta1/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/asset-inventory/)
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/asset/v1beta1"
29
- # client = Google::Cloud::Asset::V1beta1::AssetService::Client.new
29
+ # client = ::Google::Cloud::Asset::V1beta1::AssetService::Client.new
30
30
  #
31
31
  module V1beta1
32
32
  end
@@ -36,7 +36,7 @@ module Google
36
36
  # To load this service and instantiate a client:
37
37
  #
38
38
  # require "google/cloud/asset/v1beta1/asset_service"
39
- # client = Google::Cloud::Asset::V1beta1::AssetService::Client.new
39
+ # client = ::Google::Cloud::Asset::V1beta1::AssetService::Client.new
40
40
  #
41
41
  module AssetService
42
42
  end
@@ -36,15 +36,15 @@ module Google
36
36
  ##
37
37
  # Configure the AssetService Client class.
38
38
  #
39
- # See {Google::Cloud::Asset::V1beta1::AssetService::Client::Configuration}
39
+ # See {::Google::Cloud::Asset::V1beta1::AssetService::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 AssetService clients:
45
45
  #
46
- # Google::Cloud::Asset::V1beta1::AssetService::Client.configure do |config|
47
- # config.timeout = 10_000
46
+ # ::Google::Cloud::Asset::V1beta1::AssetService::Client.configure do |config|
47
+ # config.timeout = 10.0
48
48
  # end
49
49
  #
50
50
  # @yield [config] Configure the Client client.
@@ -86,7 +86,7 @@ module Google
86
86
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
87
87
  # should be made on {Client.configure}.
88
88
  #
89
- # See {Google::Cloud::Asset::V1beta1::AssetService::Client::Configuration}
89
+ # See {::Google::Cloud::Asset::V1beta1::AssetService::Client::Configuration}
90
90
  # for a description of the configuration fields.
91
91
  #
92
92
  # @yield [config] Configure the Client client.
@@ -107,13 +107,13 @@ module Google
107
107
  # To create a new AssetService client with the default
108
108
  # configuration:
109
109
  #
110
- # client = Google::Cloud::Asset::V1beta1::AssetService::Client.new
110
+ # client = ::Google::Cloud::Asset::V1beta1::AssetService::Client.new
111
111
  #
112
112
  # To create a new AssetService client with a custom
113
113
  # configuration:
114
114
  #
115
- # client = Google::Cloud::Asset::V1beta1::AssetService::Client.new do |config|
116
- # config.timeout = 10_000
115
+ # client = ::Google::Cloud::Asset::V1beta1::AssetService::Client.new do |config|
116
+ # config.timeout = 10.0
117
117
  # end
118
118
  #
119
119
  # @yield [config] Configure the AssetService client.
@@ -138,15 +138,16 @@ module Google
138
138
  if credentials.is_a?(String) || credentials.is_a?(Hash)
139
139
  credentials = Credentials.new credentials, scope: @config.scope
140
140
  end
141
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
141
+ @quota_project_id = @config.quota_project
142
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
142
143
 
143
144
  @operations_client = Operations.new do |config|
144
145
  config.credentials = credentials
145
146
  config.endpoint = @config.endpoint
146
147
  end
147
148
 
148
- @asset_service_stub = Gapic::ServiceStub.new(
149
- Google::Cloud::Asset::V1beta1::AssetService::Stub,
149
+ @asset_service_stub = ::Gapic::ServiceStub.new(
150
+ ::Google::Cloud::Asset::V1beta1::AssetService::Stub,
150
151
  credentials: credentials,
151
152
  endpoint: @config.endpoint,
152
153
  channel_args: @config.channel_args,
@@ -157,7 +158,7 @@ module Google
157
158
  ##
158
159
  # Get the associated client for long-running operations.
159
160
  #
160
- # @return [Google::Cloud::Asset::V1beta1::AssetService::Operations]
161
+ # @return [::Google::Cloud::Asset::V1beta1::AssetService::Operations]
161
162
  #
162
163
  attr_reader :operations_client
163
164
 
@@ -167,17 +168,17 @@ module Google
167
168
  # Exports assets with time and resource types to a given Cloud Storage
168
169
  # location. The output format is newline-delimited JSON.
169
170
  # This API implements the
170
- # {Google::Longrunning::Operation google.longrunning.Operation} API allowing
171
+ # {::Google::Longrunning::Operation google.longrunning.Operation} API allowing
171
172
  # you to keep track of the export.
172
173
  #
173
174
  # @overload export_assets(request, options = nil)
174
175
  # Pass arguments to `export_assets` via a request object, either of type
175
- # {Google::Cloud::Asset::V1beta1::ExportAssetsRequest} or an equivalent Hash.
176
+ # {::Google::Cloud::Asset::V1beta1::ExportAssetsRequest} or an equivalent Hash.
176
177
  #
177
- # @param request [Google::Cloud::Asset::V1beta1::ExportAssetsRequest, Hash]
178
+ # @param request [::Google::Cloud::Asset::V1beta1::ExportAssetsRequest, ::Hash]
178
179
  # A request object representing the call parameters. Required. To specify no
179
180
  # parameters, or to keep all the default parameter values, pass an empty Hash.
180
- # @param options [Gapic::CallOptions, Hash]
181
+ # @param options [::Gapic::CallOptions, ::Hash]
181
182
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
182
183
  #
183
184
  # @overload export_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, output_config: nil)
@@ -185,51 +186,51 @@ module Google
185
186
  # least one keyword argument is required. To specify no parameters, or to keep all
186
187
  # the default parameter values, pass an empty Hash as a request object (see above).
187
188
  #
188
- # @param parent [String]
189
+ # @param parent [::String]
189
190
  # Required. The relative name of the root asset. This can only be an
190
191
  # organization number (such as "organizations/123"), a project ID (such as
191
192
  # "projects/my-project-id"), a project number (such as "projects/12345"), or
192
193
  # a folder number (such as "folders/123").
193
- # @param read_time [Google::Protobuf::Timestamp, Hash]
194
+ # @param read_time [::Google::Protobuf::Timestamp, ::Hash]
194
195
  # Timestamp to take an asset snapshot. This can only be set to a timestamp
195
196
  # between 2018-10-02 UTC (inclusive) and the current time. If not specified,
196
197
  # the current time will be used. Due to delays in resource data collection
197
198
  # and indexing, there is a volatile window during which running the same
198
199
  # query may get different results.
199
- # @param asset_types [Array<String>]
200
+ # @param asset_types [::Array<::String>]
200
201
  # A list of asset types of which to take a snapshot for. For example:
201
202
  # "google.compute.Disk". If specified, only matching assets will be returned.
202
203
  # See [Introduction to Cloud Asset
203
204
  # Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
204
205
  # for all supported asset types.
205
- # @param content_type [Google::Cloud::Asset::V1beta1::ContentType]
206
+ # @param content_type [::Google::Cloud::Asset::V1beta1::ContentType]
206
207
  # Asset content type. If not specified, no content but the asset name will be
207
208
  # returned.
208
- # @param output_config [Google::Cloud::Asset::V1beta1::OutputConfig, Hash]
209
+ # @param output_config [::Google::Cloud::Asset::V1beta1::OutputConfig, ::Hash]
209
210
  # Required. Output configuration indicating where the results will be output
210
211
  # to. All results will be in newline delimited JSON format.
211
212
  #
212
213
  # @yield [response, operation] Access the result along with the RPC operation
213
- # @yieldparam response [Gapic::Operation]
214
- # @yieldparam operation [GRPC::ActiveCall::Operation]
214
+ # @yieldparam response [::Gapic::Operation]
215
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
215
216
  #
216
- # @return [Gapic::Operation]
217
+ # @return [::Gapic::Operation]
217
218
  #
218
- # @raise [Google::Cloud::Error] if the RPC is aborted.
219
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
219
220
  #
220
221
  def export_assets request, options = nil
221
- raise ArgumentError, "request must be provided" if request.nil?
222
+ raise ::ArgumentError, "request must be provided" if request.nil?
222
223
 
223
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1beta1::ExportAssetsRequest
224
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1beta1::ExportAssetsRequest
224
225
 
225
226
  # Converts hash and nil to an options object
226
- 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
227
228
 
228
229
  # Customize the options with defaults
229
230
  metadata = @config.rpcs.export_assets.metadata.to_h
230
231
 
231
232
  # Set x-goog-api-client and x-goog-user-project headers
232
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
233
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
233
234
  lib_name: @config.lib_name, lib_version: @config.lib_version,
234
235
  gapic_version: ::Google::Cloud::Asset::V1beta1::VERSION
235
236
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -247,12 +248,12 @@ module Google
247
248
  retry_policy: @config.retry_policy
248
249
 
249
250
  @asset_service_stub.call_rpc :export_assets, request, options: options do |response, operation|
250
- response = Gapic::Operation.new response, @operations_client, options: options
251
+ response = ::Gapic::Operation.new response, @operations_client, options: options
251
252
  yield response, operation if block_given?
252
253
  return response
253
254
  end
254
- rescue GRPC::BadStatus => e
255
- raise Google::Cloud::Error.from_error(e)
255
+ rescue ::GRPC::BadStatus => e
256
+ raise ::Google::Cloud::Error.from_error(e)
256
257
  end
257
258
 
258
259
  ##
@@ -266,12 +267,12 @@ module Google
266
267
  #
267
268
  # @overload batch_get_assets_history(request, options = nil)
268
269
  # Pass arguments to `batch_get_assets_history` via a request object, either of type
269
- # {Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryRequest} or an equivalent Hash.
270
+ # {::Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryRequest} or an equivalent Hash.
270
271
  #
271
- # @param request [Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryRequest, Hash]
272
+ # @param request [::Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryRequest, ::Hash]
272
273
  # A request object representing the call parameters. Required. To specify no
273
274
  # parameters, or to keep all the default parameter values, pass an empty Hash.
274
- # @param options [Gapic::CallOptions, Hash]
275
+ # @param options [::Gapic::CallOptions, ::Hash]
275
276
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
276
277
  #
277
278
  # @overload batch_get_assets_history(parent: nil, asset_names: nil, content_type: nil, read_time_window: nil)
@@ -279,11 +280,11 @@ module Google
279
280
  # least one keyword argument is required. To specify no parameters, or to keep all
280
281
  # the default parameter values, pass an empty Hash as a request object (see above).
281
282
  #
282
- # @param parent [String]
283
+ # @param parent [::String]
283
284
  # Required. The relative name of the root asset. It can only be an
284
285
  # organization number (such as "organizations/123"), a project ID (such as
285
286
  # "projects/my-project-id")", or a project number (such as "projects/12345").
286
- # @param asset_names [Array<String>]
287
+ # @param asset_names [::Array<::String>]
287
288
  # A list of the full names of the assets. For example:
288
289
  # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
289
290
  # See [Resource
@@ -292,9 +293,9 @@ module Google
292
293
  #
293
294
  # The request becomes a no-op if the asset name list is empty, and the max
294
295
  # size of the asset name list is 100 in one request.
295
- # @param content_type [Google::Cloud::Asset::V1beta1::ContentType]
296
+ # @param content_type [::Google::Cloud::Asset::V1beta1::ContentType]
296
297
  # Optional. The content type.
297
- # @param read_time_window [Google::Cloud::Asset::V1beta1::TimeWindow, Hash]
298
+ # @param read_time_window [::Google::Cloud::Asset::V1beta1::TimeWindow, ::Hash]
298
299
  # Optional. The time window for the asset history. Both start_time and
299
300
  # end_time are optional and if set, it must be after 2018-10-02 UTC. If
300
301
  # end_time is not set, it is default to current timestamp. If start_time is
@@ -303,26 +304,26 @@ module Google
303
304
  # read_time_window.
304
305
  #
305
306
  # @yield [response, operation] Access the result along with the RPC operation
306
- # @yieldparam response [Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryResponse]
307
- # @yieldparam operation [GRPC::ActiveCall::Operation]
307
+ # @yieldparam response [::Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryResponse]
308
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
308
309
  #
309
- # @return [Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryResponse]
310
+ # @return [::Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryResponse]
310
311
  #
311
- # @raise [Google::Cloud::Error] if the RPC is aborted.
312
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
312
313
  #
313
314
  def batch_get_assets_history request, options = nil
314
- raise ArgumentError, "request must be provided" if request.nil?
315
+ raise ::ArgumentError, "request must be provided" if request.nil?
315
316
 
316
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryRequest
317
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1beta1::BatchGetAssetsHistoryRequest
317
318
 
318
319
  # Converts hash and nil to an options object
319
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
320
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
320
321
 
321
322
  # Customize the options with defaults
322
323
  metadata = @config.rpcs.batch_get_assets_history.metadata.to_h
323
324
 
324
325
  # Set x-goog-api-client and x-goog-user-project headers
325
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
326
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
326
327
  lib_name: @config.lib_name, lib_version: @config.lib_version,
327
328
  gapic_version: ::Google::Cloud::Asset::V1beta1::VERSION
328
329
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -343,8 +344,8 @@ module Google
343
344
  yield response, operation if block_given?
344
345
  return response
345
346
  end
346
- rescue GRPC::BadStatus => e
347
- raise Google::Cloud::Error.from_error(e)
347
+ rescue ::GRPC::BadStatus => e
348
+ raise ::Google::Cloud::Error.from_error(e)
348
349
  end
349
350
 
350
351
  ##
@@ -354,7 +355,7 @@ module Google
354
355
  # providing control over timeouts, retry behavior, logging, transport
355
356
  # parameters, and other low-level controls. Certain parameters can also be
356
357
  # applied individually to specific RPCs. See
357
- # {Google::Cloud::Asset::V1beta1::AssetService::Client::Configuration::Rpcs}
358
+ # {::Google::Cloud::Asset::V1beta1::AssetService::Client::Configuration::Rpcs}
358
359
  # for a list of RPCs that can be configured independently.
359
360
  #
360
361
  # Configuration can be applied globally to all clients, or to a single client
@@ -365,22 +366,22 @@ module Google
365
366
  # To modify the global config, setting the timeout for export_assets
366
367
  # to 20 seconds, and all remaining timeouts to 10 seconds:
367
368
  #
368
- # Google::Cloud::Asset::V1beta1::AssetService::Client.configure do |config|
369
- # config.timeout = 10_000
370
- # config.rpcs.export_assets.timeout = 20_000
369
+ # ::Google::Cloud::Asset::V1beta1::AssetService::Client.configure do |config|
370
+ # config.timeout = 10.0
371
+ # config.rpcs.export_assets.timeout = 20.0
371
372
  # end
372
373
  #
373
374
  # To apply the above configuration only to a new client:
374
375
  #
375
- # client = Google::Cloud::Asset::V1beta1::AssetService::Client.new do |config|
376
- # config.timeout = 10_000
377
- # config.rpcs.export_assets.timeout = 20_000
376
+ # client = ::Google::Cloud::Asset::V1beta1::AssetService::Client.new do |config|
377
+ # config.timeout = 10.0
378
+ # config.rpcs.export_assets.timeout = 20.0
378
379
  # end
379
380
  #
380
381
  # @!attribute [rw] endpoint
381
382
  # The hostname or hostname:port of the service endpoint.
382
383
  # Defaults to `"cloudasset.googleapis.com"`.
383
- # @return [String]
384
+ # @return [::String]
384
385
  # @!attribute [rw] credentials
385
386
  # Credentials to send with calls. You may provide any of the following types:
386
387
  # * (`String`) The path to a service account key file in JSON format
@@ -392,29 +393,29 @@ module Google
392
393
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
393
394
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
394
395
  # * (`nil`) indicating no credentials
395
- # @return [Object]
396
+ # @return [::Object]
396
397
  # @!attribute [rw] scope
397
398
  # The OAuth scopes
398
- # @return [Array<String>]
399
+ # @return [::Array<::String>]
399
400
  # @!attribute [rw] lib_name
400
401
  # The library name as recorded in instrumentation and logging
401
- # @return [String]
402
+ # @return [::String]
402
403
  # @!attribute [rw] lib_version
403
404
  # The library version as recorded in instrumentation and logging
404
- # @return [String]
405
+ # @return [::String]
405
406
  # @!attribute [rw] channel_args
406
407
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
407
408
  # `GRPC::Core::Channel` object is provided as the credential.
408
- # @return [Hash]
409
+ # @return [::Hash]
409
410
  # @!attribute [rw] interceptors
410
411
  # An array of interceptors that are run before calls are executed.
411
- # @return [Array<GRPC::ClientInterceptor>]
412
+ # @return [::Array<::GRPC::ClientInterceptor>]
412
413
  # @!attribute [rw] timeout
413
- # The call timeout in milliseconds.
414
- # @return [Numeric]
414
+ # The call timeout in seconds.
415
+ # @return [::Numeric]
415
416
  # @!attribute [rw] metadata
416
417
  # Additional gRPC headers to be sent with the call.
417
- # @return [Hash{Symbol=>String}]
418
+ # @return [::Hash{::Symbol=>::String}]
418
419
  # @!attribute [rw] retry_policy
419
420
  # The retry policy. The value is a hash with the following keys:
420
421
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -422,25 +423,29 @@ module Google
422
423
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
423
424
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
424
425
  # trigger a retry.
425
- # @return [Hash]
426
+ # @return [::Hash]
427
+ # @!attribute [rw] quota_project
428
+ # A separate project against which to charge quota.
429
+ # @return [::String]
426
430
  #
427
431
  class Configuration
428
- extend Gapic::Config
432
+ extend ::Gapic::Config
429
433
 
430
- config_attr :endpoint, "cloudasset.googleapis.com", String
431
- config_attr :credentials, nil do |value|
434
+ config_attr :endpoint, "cloudasset.googleapis.com", ::String
435
+ config_attr :credentials, nil do |value|
432
436
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
433
437
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
434
438
  allowed.any? { |klass| klass === value }
435
439
  end
436
- config_attr :scope, nil, String, Array, nil
437
- config_attr :lib_name, nil, String, nil
438
- config_attr :lib_version, nil, String, nil
439
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
440
- config_attr :interceptors, nil, Array, nil
441
- config_attr :timeout, nil, Numeric, nil
442
- config_attr :metadata, nil, Hash, nil
443
- config_attr :retry_policy, nil, Hash, Proc, nil
440
+ config_attr :scope, nil, ::String, ::Array, nil
441
+ config_attr :lib_name, nil, ::String, nil
442
+ config_attr :lib_version, nil, ::String, nil
443
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
444
+ config_attr :interceptors, nil, ::Array, nil
445
+ config_attr :timeout, nil, ::Numeric, nil
446
+ config_attr :metadata, nil, ::Hash, nil
447
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
448
+ config_attr :quota_project, nil, ::String, nil
444
449
 
445
450
  # @private
446
451
  def initialize parent_config = nil
@@ -456,7 +461,7 @@ module Google
456
461
  def rpcs
457
462
  @rpcs ||= begin
458
463
  parent_rpcs = nil
459
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
464
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
460
465
  Rpcs.new parent_rpcs
461
466
  end
462
467
  end
@@ -481,21 +486,21 @@ module Google
481
486
  class Rpcs
482
487
  ##
483
488
  # RPC-specific configuration for `export_assets`
484
- # @return [Gapic::Config::Method]
489
+ # @return [::Gapic::Config::Method]
485
490
  #
486
491
  attr_reader :export_assets
487
492
  ##
488
493
  # RPC-specific configuration for `batch_get_assets_history`
489
- # @return [Gapic::Config::Method]
494
+ # @return [::Gapic::Config::Method]
490
495
  #
491
496
  attr_reader :batch_get_assets_history
492
497
 
493
498
  # @private
494
499
  def initialize parent_rpcs = nil
495
500
  export_assets_config = parent_rpcs&.export_assets if parent_rpcs&.respond_to? :export_assets
496
- @export_assets = Gapic::Config::Method.new export_assets_config
501
+ @export_assets = ::Gapic::Config::Method.new export_assets_config
497
502
  batch_get_assets_history_config = parent_rpcs&.batch_get_assets_history if parent_rpcs&.respond_to? :batch_get_assets_history
498
- @batch_get_assets_history = Gapic::Config::Method.new batch_get_assets_history_config
503
+ @batch_get_assets_history = ::Gapic::Config::Method.new batch_get_assets_history_config
499
504
 
500
505
  yield self if block_given?
501
506
  end