google-cloud-billing-v1 0.3.1 → 0.5.2

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: f18dc523e18393c7da46035dc046b8980af102a52212ab3bdcb04b3942f43480
4
- data.tar.gz: 5d6d892ef177d401e05c1e64986cc4cfabbae39452ded78196e6f1f536afb455
3
+ metadata.gz: 7bc5b70ab235a67ea94c5019a6f4eb4ab653c6dbe3c2b9b6406fbbe0d6cb8cb1
4
+ data.tar.gz: 6a44e8560ec472f3ebdbabf3c1fc57f1e2e1852661306aa96f4189c8ff5f1990
5
5
  SHA512:
6
- metadata.gz: 4803e33adbabb9e13bfc0f88515637e0b280907a9ba08224a11f5f8ff5b80906ecfd87f107e1376270c25dd1ed146a22df91df14ea639df9acd1b212bd4e83a7
7
- data.tar.gz: d60539546cb4be05d2a337d155f25fc08e6d99200cdd5b0303e4e6d7cbadd21d4e0a73a460c6911dfa84b509435a4866c0464ee60fd0fdf4f54dde226ad4f352
6
+ metadata.gz: 72e9caf54cbd0d302180cfa3993d09af2e92253c5358356eb99d672792f95806b259b59009641eb1ab81997642c3683a66d3be5fa86c13b8f1df50495fe324e7
7
+ data.tar.gz: 651d0eae634c3bab902551ebacffa1e135002bc31a7832481af986566196140e628974baebd3c2d3bbba36e79a313c52706c1ccac209a2c982342f394025cc8d
@@ -27,7 +27,7 @@ export BILLING_CREDENTIALS=path/to/keyfile.json
27
27
  ```ruby
28
28
  require "google/cloud/billing/v1"
29
29
 
30
- client = Google::Cloud::Billing::V1::CloudBilling::Client.new
30
+ client = ::Google::Cloud::Billing::V1::CloudBilling::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-billing-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- {Google::Cloud::Billing::V1::CloudBilling::Credentials}):
67
+ {::Google::Cloud::Billing::V1::CloudBilling::Credentials}):
68
68
 
69
69
  1. `BILLING_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `BILLING_KEYFILE` - Path to JSON file, or JSON contents
@@ -77,7 +77,7 @@ require "google/cloud/billing/v1"
77
77
 
78
78
  ENV["BILLING_CREDENTIALS"] = "path/to/keyfile.json"
79
79
 
80
- client = Google::Cloud::Billing::V1::CloudBilling::Client.new
80
+ client = ::Google::Cloud::Billing::V1::CloudBilling::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/billing/v1"
90
90
 
91
- client = Google::Cloud::Billing::V1::CloudBilling::Client.new do |config|
91
+ client = ::Google::Cloud::Billing::V1::CloudBilling::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/billing/v1"
100
100
 
101
- Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
101
+ ::Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
102
102
  config.credentials = "path/to/keyfile.json"
103
103
  end
104
104
 
105
- client = Google::Cloud::Billing::V1::CloudBilling::Client.new
105
+ client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new
106
106
  ```
107
107
 
108
108
  ### Cloud SDK
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Billing V1
1
+ # Ruby Client for the Billing V1 API
2
2
 
3
3
  API Client library for the Billing V1 API
4
4
 
@@ -12,6 +12,53 @@ https://github.com/googleapis/google-cloud-ruby
12
12
  $ gem install google-cloud-billing-v1
13
13
  ```
14
14
 
15
+ ## Before You Begin
16
+
17
+ In order to use this library, you first need to go through the following steps:
18
+
19
+ 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
+ 1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. {file:AUTHENTICATION.md Set up authentication.}
22
+
23
+ ## Quick Start
24
+
25
+ ```ruby
26
+ require "google/cloud/billing/v1"
27
+
28
+ client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new
29
+ request = my_create_request
30
+ response = client.get_billing_account request
31
+ ```
32
+
33
+ View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-billing-v1/latest)
34
+ for class and method documentation.
35
+
36
+ ## Enabling Logging
37
+
38
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
39
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
40
+ or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
41
+ that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
42
+ and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
43
+
44
+ Configuring a Ruby stdlib logger:
45
+
46
+ ```ruby
47
+ require "logger"
48
+
49
+ module MyLogger
50
+ LOGGER = Logger.new $stderr, level: Logger::WARN
51
+ def logger
52
+ LOGGER
53
+ end
54
+ end
55
+
56
+ # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
57
+ module GRPC
58
+ extend MyLogger
59
+ end
60
+ ```
61
+
15
62
  ## Supported Ruby Versions
16
63
 
17
64
  This library is supported on Ruby 2.4+.
@@ -1 +1,21 @@
1
- require "google/cloud/billing/v1/version"
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/cloud/billing/v1"
@@ -18,3 +18,19 @@
18
18
 
19
19
  require "google/cloud/billing/v1/cloud_billing"
20
20
  require "google/cloud/billing/v1/cloud_catalog"
21
+ require "google/cloud/billing/v1/version"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Billing
26
+ ##
27
+ # To load this package, including all its services, and instantiate a client:
28
+ #
29
+ # require "google/cloud/billing/v1"
30
+ # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new
31
+ #
32
+ module V1
33
+ end
34
+ end
35
+ end
36
+ end
@@ -16,5 +16,34 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "google/cloud/billing/v1/cloud_billing/client"
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/billing/v1/version"
24
+
20
25
  require "google/cloud/billing/v1/cloud_billing/credentials"
26
+ require "google/cloud/billing/v1/cloud_billing/paths"
27
+ require "google/cloud/billing/v1/cloud_billing/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Billing
32
+ module V1
33
+ ##
34
+ # Retrieves GCP Console billing accounts and associates them with projects.
35
+ #
36
+ # To load this service and instantiate a client:
37
+ #
38
+ # require "google/cloud/billing/v1/cloud_billing"
39
+ # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new
40
+ #
41
+ module CloudBilling
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+ helper_path = ::File.join __dir__, "cloud_billing", "helpers.rb"
49
+ require "google/cloud/billing/v1/cloud_billing/helpers" if ::File.file? helper_path
@@ -16,15 +16,8 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "gapic/common"
20
- require "gapic/config"
21
- require "gapic/config/method"
22
-
23
19
  require "google/cloud/errors"
24
- require "google/cloud/billing/v1/version"
25
20
  require "google/cloud/billing/v1/cloud_billing_pb"
26
- require "google/cloud/billing/v1/cloud_billing/credentials"
27
- require "google/cloud/billing/v1/cloud_billing/paths"
28
21
 
29
22
  module Google
30
23
  module Cloud
@@ -45,15 +38,15 @@ module Google
45
38
  ##
46
39
  # Configure the CloudBilling Client class.
47
40
  #
48
- # See {Google::Cloud::Billing::V1::CloudBilling::Client::Configuration}
41
+ # See {::Google::Cloud::Billing::V1::CloudBilling::Client::Configuration}
49
42
  # for a description of the configuration fields.
50
43
  #
51
44
  # ## Example
52
45
  #
53
46
  # To modify the configuration for all CloudBilling clients:
54
47
  #
55
- # Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
56
- # config.timeout = 10_000
48
+ # ::Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
49
+ # config.timeout = 10.0
57
50
  # end
58
51
  #
59
52
  # @yield [config] Configure the Client client.
@@ -159,7 +152,7 @@ module Google
159
152
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
160
153
  # should be made on {Client.configure}.
161
154
  #
162
- # See {Google::Cloud::Billing::V1::CloudBilling::Client::Configuration}
155
+ # See {::Google::Cloud::Billing::V1::CloudBilling::Client::Configuration}
163
156
  # for a description of the configuration fields.
164
157
  #
165
158
  # @yield [config] Configure the Client client.
@@ -180,13 +173,13 @@ module Google
180
173
  # To create a new CloudBilling client with the default
181
174
  # configuration:
182
175
  #
183
- # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
176
+ # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new
184
177
  #
185
178
  # To create a new CloudBilling client with a custom
186
179
  # configuration:
187
180
  #
188
- # client = Google::Cloud::Billing::V1::CloudBilling::Client.new do |config|
189
- # config.timeout = 10_000
181
+ # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config|
182
+ # config.timeout = 10.0
190
183
  # end
191
184
  #
192
185
  # @yield [config] Configure the CloudBilling client.
@@ -211,10 +204,11 @@ module Google
211
204
  if credentials.is_a?(String) || credentials.is_a?(Hash)
212
205
  credentials = Credentials.new credentials, scope: @config.scope
213
206
  end
214
- @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
207
+ @quota_project_id = @config.quota_project
208
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
215
209
 
216
- @cloud_billing_stub = Gapic::ServiceStub.new(
217
- Google::Cloud::Billing::V1::CloudBilling::Stub,
210
+ @cloud_billing_stub = ::Gapic::ServiceStub.new(
211
+ ::Google::Cloud::Billing::V1::CloudBilling::Stub,
218
212
  credentials: credentials,
219
213
  endpoint: @config.endpoint,
220
214
  channel_args: @config.channel_args,
@@ -230,40 +224,45 @@ module Google
230
224
  # account](https://cloud.google.com/billing/docs/how-to/billing-access).
231
225
  #
232
226
  # @overload get_billing_account(request, options = nil)
233
- # @param request [Google::Cloud::Billing::V1::GetBillingAccountRequest | Hash]
234
- # Gets information about a billing account. The current authenticated user
235
- # must be a [viewer of the billing
236
- # account](https://cloud.google.com/billing/docs/how-to/billing-access).
237
- # @param options [Gapic::CallOptions, Hash]
227
+ # Pass arguments to `get_billing_account` via a request object, either of type
228
+ # {::Google::Cloud::Billing::V1::GetBillingAccountRequest} or an equivalent Hash.
229
+ #
230
+ # @param request [::Google::Cloud::Billing::V1::GetBillingAccountRequest, ::Hash]
231
+ # A request object representing the call parameters. Required. To specify no
232
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
233
+ # @param options [::Gapic::CallOptions, ::Hash]
238
234
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
239
235
  #
240
236
  # @overload get_billing_account(name: nil)
241
- # @param name [String]
237
+ # Pass arguments to `get_billing_account` via keyword arguments. Note that at
238
+ # least one keyword argument is required. To specify no parameters, or to keep all
239
+ # the default parameter values, pass an empty Hash as a request object (see above).
240
+ #
241
+ # @param name [::String]
242
242
  # Required. The resource name of the billing account to retrieve. For example,
243
243
  # `billingAccounts/012345-567890-ABCDEF`.
244
244
  #
245
- #
246
245
  # @yield [response, operation] Access the result along with the RPC operation
247
- # @yieldparam response [Google::Cloud::Billing::V1::BillingAccount]
248
- # @yieldparam operation [GRPC::ActiveCall::Operation]
246
+ # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
247
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
249
248
  #
250
- # @return [Google::Cloud::Billing::V1::BillingAccount]
249
+ # @return [::Google::Cloud::Billing::V1::BillingAccount]
251
250
  #
252
- # @raise [Google::Cloud::Error] if the RPC is aborted.
251
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
253
252
  #
254
253
  def get_billing_account request, options = nil
255
- raise ArgumentError, "request must be provided" if request.nil?
254
+ raise ::ArgumentError, "request must be provided" if request.nil?
256
255
 
257
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::GetBillingAccountRequest
256
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetBillingAccountRequest
258
257
 
259
258
  # Converts hash and nil to an options object
260
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
259
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
261
260
 
262
261
  # Customize the options with defaults
263
262
  metadata = @config.rpcs.get_billing_account.metadata.to_h
264
263
 
265
264
  # Set x-goog-api-client and x-goog-user-project headers
266
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
265
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
267
266
  lib_name: @config.lib_name, lib_version: @config.lib_version,
268
267
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
269
268
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -284,8 +283,8 @@ module Google
284
283
  yield response, operation if block_given?
285
284
  return response
286
285
  end
287
- rescue GRPC::BadStatus => e
288
- raise Google::Cloud::Error.from_error(e)
286
+ rescue ::GRPC::BadStatus => e
287
+ raise ::Google::Cloud::Error.from_error(e)
289
288
  end
290
289
 
291
290
  ##
@@ -294,22 +293,28 @@ module Google
294
293
  # [view](https://cloud.google.com/billing/docs/how-to/billing-access).
295
294
  #
296
295
  # @overload list_billing_accounts(request, options = nil)
297
- # @param request [Google::Cloud::Billing::V1::ListBillingAccountsRequest | Hash]
298
- # Lists the billing accounts that the current authenticated user has
299
- # permission to
300
- # [view](https://cloud.google.com/billing/docs/how-to/billing-access).
301
- # @param options [Gapic::CallOptions, Hash]
296
+ # Pass arguments to `list_billing_accounts` via a request object, either of type
297
+ # {::Google::Cloud::Billing::V1::ListBillingAccountsRequest} or an equivalent Hash.
298
+ #
299
+ # @param request [::Google::Cloud::Billing::V1::ListBillingAccountsRequest, ::Hash]
300
+ # A request object representing the call parameters. Required. To specify no
301
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
302
+ # @param options [::Gapic::CallOptions, ::Hash]
302
303
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
303
304
  #
304
305
  # @overload list_billing_accounts(page_size: nil, page_token: nil, filter: nil)
305
- # @param page_size [Integer]
306
+ # Pass arguments to `list_billing_accounts` via keyword arguments. Note that at
307
+ # least one keyword argument is required. To specify no parameters, or to keep all
308
+ # the default parameter values, pass an empty Hash as a request object (see above).
309
+ #
310
+ # @param page_size [::Integer]
306
311
  # Requested page size. The maximum page size is 100; this is also the
307
312
  # default.
308
- # @param page_token [String]
313
+ # @param page_token [::String]
309
314
  # A token identifying a page of results to return. This should be a
310
315
  # `next_page_token` value returned from a previous `ListBillingAccounts`
311
316
  # call. If unspecified, the first page of results is returned.
312
- # @param filter [String]
317
+ # @param filter [::String]
313
318
  # Options for how to filter the returned billing accounts.
314
319
  # Currently this only supports filtering for
315
320
  # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a
@@ -317,28 +322,27 @@ module Google
317
322
  # (e.g. "master_billing_account=billingAccounts/012345-678901-ABCDEF").
318
323
  # Boolean algebra and other fields are not currently supported.
319
324
  #
320
- #
321
325
  # @yield [response, operation] Access the result along with the RPC operation
322
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Billing::V1::BillingAccount>]
323
- # @yieldparam operation [GRPC::ActiveCall::Operation]
326
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>]
327
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
324
328
  #
325
- # @return [Gapic::PagedEnumerable<Google::Cloud::Billing::V1::BillingAccount>]
329
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>]
326
330
  #
327
- # @raise [Google::Cloud::Error] if the RPC is aborted.
331
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
328
332
  #
329
333
  def list_billing_accounts request, options = nil
330
- raise ArgumentError, "request must be provided" if request.nil?
334
+ raise ::ArgumentError, "request must be provided" if request.nil?
331
335
 
332
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::ListBillingAccountsRequest
336
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListBillingAccountsRequest
333
337
 
334
338
  # Converts hash and nil to an options object
335
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
339
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
336
340
 
337
341
  # Customize the options with defaults
338
342
  metadata = @config.rpcs.list_billing_accounts.metadata.to_h
339
343
 
340
344
  # Set x-goog-api-client and x-goog-user-project headers
341
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
345
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
342
346
  lib_name: @config.lib_name, lib_version: @config.lib_version,
343
347
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
344
348
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -350,12 +354,12 @@ module Google
350
354
  retry_policy: @config.retry_policy
351
355
 
352
356
  @cloud_billing_stub.call_rpc :list_billing_accounts, request, options: options do |response, operation|
353
- response = Gapic::PagedEnumerable.new @cloud_billing_stub, :list_billing_accounts, request, response, operation, options
357
+ response = ::Gapic::PagedEnumerable.new @cloud_billing_stub, :list_billing_accounts, request, response, operation, options
354
358
  yield response, operation if block_given?
355
359
  return response
356
360
  end
357
- rescue GRPC::BadStatus => e
358
- raise Google::Cloud::Error.from_error(e)
361
+ rescue ::GRPC::BadStatus => e
362
+ raise ::Google::Cloud::Error.from_error(e)
359
363
  end
360
364
 
361
365
  ##
@@ -367,47 +371,49 @@ module Google
367
371
  # of the billing account.
368
372
  #
369
373
  # @overload update_billing_account(request, options = nil)
370
- # @param request [Google::Cloud::Billing::V1::UpdateBillingAccountRequest | Hash]
371
- # Updates a billing account's fields.
372
- # Currently the only field that can be edited is `display_name`.
373
- # The current authenticated user must have the `billing.accounts.update`
374
- # IAM permission, which is typically given to the
375
- # [administrator](https://cloud.google.com/billing/docs/how-to/billing-access)
376
- # of the billing account.
377
- # @param options [Gapic::CallOptions, Hash]
374
+ # Pass arguments to `update_billing_account` via a request object, either of type
375
+ # {::Google::Cloud::Billing::V1::UpdateBillingAccountRequest} or an equivalent Hash.
376
+ #
377
+ # @param request [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, ::Hash]
378
+ # A request object representing the call parameters. Required. To specify no
379
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
380
+ # @param options [::Gapic::CallOptions, ::Hash]
378
381
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
379
382
  #
380
383
  # @overload update_billing_account(name: nil, account: nil, update_mask: nil)
381
- # @param name [String]
384
+ # Pass arguments to `update_billing_account` via keyword arguments. Note that at
385
+ # least one keyword argument is required. To specify no parameters, or to keep all
386
+ # the default parameter values, pass an empty Hash as a request object (see above).
387
+ #
388
+ # @param name [::String]
382
389
  # Required. The name of the billing account resource to be updated.
383
- # @param account [Google::Cloud::Billing::V1::BillingAccount | Hash]
390
+ # @param account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash]
384
391
  # Required. The billing account resource to replace the resource on the server.
385
- # @param update_mask [Google::Protobuf::FieldMask | Hash]
392
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
386
393
  # The update mask applied to the resource.
387
394
  # Only "display_name" is currently supported.
388
395
  #
389
- #
390
396
  # @yield [response, operation] Access the result along with the RPC operation
391
- # @yieldparam response [Google::Cloud::Billing::V1::BillingAccount]
392
- # @yieldparam operation [GRPC::ActiveCall::Operation]
397
+ # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
398
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
393
399
  #
394
- # @return [Google::Cloud::Billing::V1::BillingAccount]
400
+ # @return [::Google::Cloud::Billing::V1::BillingAccount]
395
401
  #
396
- # @raise [Google::Cloud::Error] if the RPC is aborted.
402
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
397
403
  #
398
404
  def update_billing_account request, options = nil
399
- raise ArgumentError, "request must be provided" if request.nil?
405
+ raise ::ArgumentError, "request must be provided" if request.nil?
400
406
 
401
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::UpdateBillingAccountRequest
407
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest
402
408
 
403
409
  # Converts hash and nil to an options object
404
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
410
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
405
411
 
406
412
  # Customize the options with defaults
407
413
  metadata = @config.rpcs.update_billing_account.metadata.to_h
408
414
 
409
415
  # Set x-goog-api-client and x-goog-user-project headers
410
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
416
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
411
417
  lib_name: @config.lib_name, lib_version: @config.lib_version,
412
418
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
413
419
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -428,8 +434,8 @@ module Google
428
434
  yield response, operation if block_given?
429
435
  return response
430
436
  end
431
- rescue GRPC::BadStatus => e
432
- raise Google::Cloud::Error.from_error(e)
437
+ rescue ::GRPC::BadStatus => e
438
+ raise ::Google::Cloud::Error.from_error(e)
433
439
  end
434
440
 
435
441
  ##
@@ -445,49 +451,47 @@ module Google
445
451
  # provisioned as a reseller account.
446
452
  #
447
453
  # @overload create_billing_account(request, options = nil)
448
- # @param request [Google::Cloud::Billing::V1::CreateBillingAccountRequest | Hash]
449
- # Creates a billing account.
450
- # This method can only be used to create
451
- # [billing subaccounts](https://cloud.google.com/billing/docs/concepts)
452
- # by GCP resellers.
453
- # When creating a subaccount, the current authenticated user must have the
454
- # `billing.accounts.update` IAM permission on the master account, which is
455
- # typically given to billing account
456
- # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
457
- # This method will return an error if the master account has not been
458
- # provisioned as a reseller account.
459
- # @param options [Gapic::CallOptions, Hash]
454
+ # Pass arguments to `create_billing_account` via a request object, either of type
455
+ # {::Google::Cloud::Billing::V1::CreateBillingAccountRequest} or an equivalent Hash.
456
+ #
457
+ # @param request [::Google::Cloud::Billing::V1::CreateBillingAccountRequest, ::Hash]
458
+ # A request object representing the call parameters. Required. To specify no
459
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
460
+ # @param options [::Gapic::CallOptions, ::Hash]
460
461
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
461
462
  #
462
463
  # @overload create_billing_account(billing_account: nil)
463
- # @param billing_account [Google::Cloud::Billing::V1::BillingAccount | Hash]
464
+ # Pass arguments to `create_billing_account` via keyword arguments. Note that at
465
+ # least one keyword argument is required. To specify no parameters, or to keep all
466
+ # the default parameter values, pass an empty Hash as a request object (see above).
467
+ #
468
+ # @param billing_account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash]
464
469
  # Required. The billing account resource to create.
465
470
  # Currently CreateBillingAccount only supports subaccount creation, so
466
471
  # any created billing accounts must be under a provided master billing
467
472
  # account.
468
473
  #
469
- #
470
474
  # @yield [response, operation] Access the result along with the RPC operation
471
- # @yieldparam response [Google::Cloud::Billing::V1::BillingAccount]
472
- # @yieldparam operation [GRPC::ActiveCall::Operation]
475
+ # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
476
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
473
477
  #
474
- # @return [Google::Cloud::Billing::V1::BillingAccount]
478
+ # @return [::Google::Cloud::Billing::V1::BillingAccount]
475
479
  #
476
- # @raise [Google::Cloud::Error] if the RPC is aborted.
480
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
477
481
  #
478
482
  def create_billing_account request, options = nil
479
- raise ArgumentError, "request must be provided" if request.nil?
483
+ raise ::ArgumentError, "request must be provided" if request.nil?
480
484
 
481
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::CreateBillingAccountRequest
485
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::CreateBillingAccountRequest
482
486
 
483
487
  # Converts hash and nil to an options object
484
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
488
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
485
489
 
486
490
  # Customize the options with defaults
487
491
  metadata = @config.rpcs.create_billing_account.metadata.to_h
488
492
 
489
493
  # Set x-goog-api-client and x-goog-user-project headers
490
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
494
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
491
495
  lib_name: @config.lib_name, lib_version: @config.lib_version,
492
496
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
493
497
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -502,8 +506,8 @@ module Google
502
506
  yield response, operation if block_given?
503
507
  return response
504
508
  end
505
- rescue GRPC::BadStatus => e
506
- raise Google::Cloud::Error.from_error(e)
509
+ rescue ::GRPC::BadStatus => e
510
+ raise ::Google::Cloud::Error.from_error(e)
507
511
  end
508
512
 
509
513
  ##
@@ -513,48 +517,52 @@ module Google
513
517
  # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
514
518
  #
515
519
  # @overload list_project_billing_info(request, options = nil)
516
- # @param request [Google::Cloud::Billing::V1::ListProjectBillingInfoRequest | Hash]
517
- # Lists the projects associated with a billing account. The current
518
- # authenticated user must have the `billing.resourceAssociations.list` IAM
519
- # permission, which is often given to billing account
520
- # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
521
- # @param options [Gapic::CallOptions, Hash]
520
+ # Pass arguments to `list_project_billing_info` via a request object, either of type
521
+ # {::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest} or an equivalent Hash.
522
+ #
523
+ # @param request [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, ::Hash]
524
+ # A request object representing the call parameters. Required. To specify no
525
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
526
+ # @param options [::Gapic::CallOptions, ::Hash]
522
527
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
523
528
  #
524
529
  # @overload list_project_billing_info(name: nil, page_size: nil, page_token: nil)
525
- # @param name [String]
530
+ # Pass arguments to `list_project_billing_info` via keyword arguments. Note that at
531
+ # least one keyword argument is required. To specify no parameters, or to keep all
532
+ # the default parameter values, pass an empty Hash as a request object (see above).
533
+ #
534
+ # @param name [::String]
526
535
  # Required. The resource name of the billing account associated with the projects that
527
536
  # you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
528
- # @param page_size [Integer]
537
+ # @param page_size [::Integer]
529
538
  # Requested page size. The maximum page size is 100; this is also the
530
539
  # default.
531
- # @param page_token [String]
540
+ # @param page_token [::String]
532
541
  # A token identifying a page of results to be returned. This should be a
533
542
  # `next_page_token` value returned from a previous `ListProjectBillingInfo`
534
543
  # call. If unspecified, the first page of results is returned.
535
544
  #
536
- #
537
545
  # @yield [response, operation] Access the result along with the RPC operation
538
- # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Billing::V1::ProjectBillingInfo>]
539
- # @yieldparam operation [GRPC::ActiveCall::Operation]
546
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>]
547
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
540
548
  #
541
- # @return [Gapic::PagedEnumerable<Google::Cloud::Billing::V1::ProjectBillingInfo>]
549
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>]
542
550
  #
543
- # @raise [Google::Cloud::Error] if the RPC is aborted.
551
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
544
552
  #
545
553
  def list_project_billing_info request, options = nil
546
- raise ArgumentError, "request must be provided" if request.nil?
554
+ raise ::ArgumentError, "request must be provided" if request.nil?
547
555
 
548
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::ListProjectBillingInfoRequest
556
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest
549
557
 
550
558
  # Converts hash and nil to an options object
551
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
559
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
552
560
 
553
561
  # Customize the options with defaults
554
562
  metadata = @config.rpcs.list_project_billing_info.metadata.to_h
555
563
 
556
564
  # Set x-goog-api-client and x-goog-user-project headers
557
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
565
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
558
566
  lib_name: @config.lib_name, lib_version: @config.lib_version,
559
567
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
560
568
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -572,12 +580,12 @@ module Google
572
580
  retry_policy: @config.retry_policy
573
581
 
574
582
  @cloud_billing_stub.call_rpc :list_project_billing_info, request, options: options do |response, operation|
575
- response = Gapic::PagedEnumerable.new @cloud_billing_stub, :list_project_billing_info, request, response, operation, options
583
+ response = ::Gapic::PagedEnumerable.new @cloud_billing_stub, :list_project_billing_info, request, response, operation, options
576
584
  yield response, operation if block_given?
577
585
  return response
578
586
  end
579
- rescue GRPC::BadStatus => e
580
- raise Google::Cloud::Error.from_error(e)
587
+ rescue ::GRPC::BadStatus => e
588
+ raise ::Google::Cloud::Error.from_error(e)
581
589
  end
582
590
 
583
591
  ##
@@ -587,41 +595,45 @@ module Google
587
595
  # ).
588
596
  #
589
597
  # @overload get_project_billing_info(request, options = nil)
590
- # @param request [Google::Cloud::Billing::V1::GetProjectBillingInfoRequest | Hash]
591
- # Gets the billing information for a project. The current authenticated user
592
- # must have [permission to view the
593
- # project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
594
- # ).
595
- # @param options [Gapic::CallOptions, Hash]
598
+ # Pass arguments to `get_project_billing_info` via a request object, either of type
599
+ # {::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest} or an equivalent Hash.
600
+ #
601
+ # @param request [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, ::Hash]
602
+ # A request object representing the call parameters. Required. To specify no
603
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
604
+ # @param options [::Gapic::CallOptions, ::Hash]
596
605
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
597
606
  #
598
607
  # @overload get_project_billing_info(name: nil)
599
- # @param name [String]
608
+ # Pass arguments to `get_project_billing_info` via keyword arguments. Note that at
609
+ # least one keyword argument is required. To specify no parameters, or to keep all
610
+ # the default parameter values, pass an empty Hash as a request object (see above).
611
+ #
612
+ # @param name [::String]
600
613
  # Required. The resource name of the project for which billing information is
601
614
  # retrieved. For example, `projects/tokyo-rain-123`.
602
615
  #
603
- #
604
616
  # @yield [response, operation] Access the result along with the RPC operation
605
- # @yieldparam response [Google::Cloud::Billing::V1::ProjectBillingInfo]
606
- # @yieldparam operation [GRPC::ActiveCall::Operation]
617
+ # @yieldparam response [::Google::Cloud::Billing::V1::ProjectBillingInfo]
618
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
607
619
  #
608
- # @return [Google::Cloud::Billing::V1::ProjectBillingInfo]
620
+ # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo]
609
621
  #
610
- # @raise [Google::Cloud::Error] if the RPC is aborted.
622
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
611
623
  #
612
624
  def get_project_billing_info request, options = nil
613
- raise ArgumentError, "request must be provided" if request.nil?
625
+ raise ::ArgumentError, "request must be provided" if request.nil?
614
626
 
615
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::GetProjectBillingInfoRequest
627
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest
616
628
 
617
629
  # Converts hash and nil to an options object
618
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
630
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
619
631
 
620
632
  # Customize the options with defaults
621
633
  metadata = @config.rpcs.get_project_billing_info.metadata.to_h
622
634
 
623
635
  # Set x-goog-api-client and x-goog-user-project headers
624
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
636
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
625
637
  lib_name: @config.lib_name, lib_version: @config.lib_version,
626
638
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
627
639
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -642,8 +654,8 @@ module Google
642
654
  yield response, operation if block_given?
643
655
  return response
644
656
  end
645
- rescue GRPC::BadStatus => e
646
- raise Google::Cloud::Error.from_error(e)
657
+ rescue ::GRPC::BadStatus => e
658
+ raise ::Google::Cloud::Error.from_error(e)
647
659
  end
648
660
 
649
661
  ##
@@ -680,71 +692,48 @@ module Google
680
692
  # *open* billing account.
681
693
  #
682
694
  # @overload update_project_billing_info(request, options = nil)
683
- # @param request [Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest | Hash]
684
- # Sets or updates the billing account associated with a project. You specify
685
- # the new billing account by setting the `billing_account_name` in the
686
- # `ProjectBillingInfo` resource to the resource name of a billing account.
687
- # Associating a project with an open billing account enables billing on the
688
- # project and allows charges for resource usage. If the project already had a
689
- # billing account, this method changes the billing account used for resource
690
- # usage charges.
691
- #
692
- # *Note:* Incurred charges that have not yet been reported in the transaction
693
- # history of the GCP Console might be billed to the new billing
694
- # account, even if the charge occurred before the new billing account was
695
- # assigned to the project.
696
- #
697
- # The current authenticated user must have ownership privileges for both the
698
- # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
699
- # ) and the [billing
700
- # account](https://cloud.google.com/billing/docs/how-to/billing-access).
701
- #
702
- # You can disable billing on the project by setting the
703
- # `billing_account_name` field to empty. This action disassociates the
704
- # current billing account from the project. Any billable activity of your
705
- # in-use services will stop, and your application could stop functioning as
706
- # expected. Any unbilled charges to date will be billed to the previously
707
- # associated account. The current authenticated user must be either an owner
708
- # of the project or an owner of the billing account for the project.
709
- #
710
- # Note that associating a project with a *closed* billing account will have
711
- # much the same effect as disabling billing on the project: any paid
712
- # resources used by the project will be shut down. Thus, unless you wish to
713
- # disable billing, you should always call this method with the name of an
714
- # *open* billing account.
715
- # @param options [Gapic::CallOptions, Hash]
695
+ # Pass arguments to `update_project_billing_info` via a request object, either of type
696
+ # {::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest} or an equivalent Hash.
697
+ #
698
+ # @param request [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, ::Hash]
699
+ # A request object representing the call parameters. Required. To specify no
700
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
701
+ # @param options [::Gapic::CallOptions, ::Hash]
716
702
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
717
703
  #
718
704
  # @overload update_project_billing_info(name: nil, project_billing_info: nil)
719
- # @param name [String]
705
+ # Pass arguments to `update_project_billing_info` via keyword arguments. Note that at
706
+ # least one keyword argument is required. To specify no parameters, or to keep all
707
+ # the default parameter values, pass an empty Hash as a request object (see above).
708
+ #
709
+ # @param name [::String]
720
710
  # Required. The resource name of the project associated with the billing information
721
711
  # that you want to update. For example, `projects/tokyo-rain-123`.
722
- # @param project_billing_info [Google::Cloud::Billing::V1::ProjectBillingInfo | Hash]
712
+ # @param project_billing_info [::Google::Cloud::Billing::V1::ProjectBillingInfo, ::Hash]
723
713
  # The new billing information for the project. Read-only fields are ignored;
724
714
  # thus, you can leave empty all fields except `billing_account_name`.
725
715
  #
726
- #
727
716
  # @yield [response, operation] Access the result along with the RPC operation
728
- # @yieldparam response [Google::Cloud::Billing::V1::ProjectBillingInfo]
729
- # @yieldparam operation [GRPC::ActiveCall::Operation]
717
+ # @yieldparam response [::Google::Cloud::Billing::V1::ProjectBillingInfo]
718
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
730
719
  #
731
- # @return [Google::Cloud::Billing::V1::ProjectBillingInfo]
720
+ # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo]
732
721
  #
733
- # @raise [Google::Cloud::Error] if the RPC is aborted.
722
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
734
723
  #
735
724
  def update_project_billing_info request, options = nil
736
- raise ArgumentError, "request must be provided" if request.nil?
725
+ raise ::ArgumentError, "request must be provided" if request.nil?
737
726
 
738
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest
727
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest
739
728
 
740
729
  # Converts hash and nil to an options object
741
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
730
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
742
731
 
743
732
  # Customize the options with defaults
744
733
  metadata = @config.rpcs.update_project_billing_info.metadata.to_h
745
734
 
746
735
  # Set x-goog-api-client and x-goog-user-project headers
747
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
736
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
748
737
  lib_name: @config.lib_name, lib_version: @config.lib_version,
749
738
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
750
739
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -765,8 +754,8 @@ module Google
765
754
  yield response, operation if block_given?
766
755
  return response
767
756
  end
768
- rescue GRPC::BadStatus => e
769
- raise Google::Cloud::Error.from_error(e)
757
+ rescue ::GRPC::BadStatus => e
758
+ raise ::Google::Cloud::Error.from_error(e)
770
759
  end
771
760
 
772
761
  ##
@@ -776,42 +765,48 @@ module Google
776
765
  # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
777
766
  #
778
767
  # @overload get_iam_policy(request, options = nil)
779
- # @param request [Google::Iam::V1::GetIamPolicyRequest | Hash]
780
- # Gets the access control policy for a billing account.
781
- # The caller must have the `billing.accounts.getIamPolicy` permission on the
782
- # account, which is often given to billing account
783
- # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access).
784
- # @param options [Gapic::CallOptions, Hash]
768
+ # Pass arguments to `get_iam_policy` via a request object, either of type
769
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
770
+ #
771
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
772
+ # A request object representing the call parameters. Required. To specify no
773
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
774
+ # @param options [::Gapic::CallOptions, ::Hash]
785
775
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
786
776
  #
787
- # @overload get_iam_policy(resource: nil)
788
- # @param resource [String]
789
- # REQUIRED: The resource for which the policy is being requested.
790
- # `resource` is usually specified as a path. For example, a Project
791
- # resource is specified as `projects/{project}`.
777
+ # @overload get_iam_policy(resource: nil, options: nil)
778
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
779
+ # least one keyword argument is required. To specify no parameters, or to keep all
780
+ # the default parameter values, pass an empty Hash as a request object (see above).
792
781
  #
782
+ # @param resource [::String]
783
+ # REQUIRED: The resource for which the policy is being requested.
784
+ # See the operation documentation for the appropriate value for this field.
785
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
786
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
787
+ # `GetIamPolicy`. This field is only used by Cloud IAM.
793
788
  #
794
789
  # @yield [response, operation] Access the result along with the RPC operation
795
- # @yieldparam response [Google::Iam::V1::Policy]
796
- # @yieldparam operation [GRPC::ActiveCall::Operation]
790
+ # @yieldparam response [::Google::Iam::V1::Policy]
791
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
797
792
  #
798
- # @return [Google::Iam::V1::Policy]
793
+ # @return [::Google::Iam::V1::Policy]
799
794
  #
800
- # @raise [Google::Cloud::Error] if the RPC is aborted.
795
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
801
796
  #
802
797
  def get_iam_policy request, options = nil
803
- raise ArgumentError, "request must be provided" if request.nil?
798
+ raise ::ArgumentError, "request must be provided" if request.nil?
804
799
 
805
- request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::GetIamPolicyRequest
800
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
806
801
 
807
802
  # Converts hash and nil to an options object
808
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
803
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
809
804
 
810
805
  # Customize the options with defaults
811
806
  metadata = @config.rpcs.get_iam_policy.metadata.to_h
812
807
 
813
808
  # Set x-goog-api-client and x-goog-user-project headers
814
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
809
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
815
810
  lib_name: @config.lib_name, lib_version: @config.lib_version,
816
811
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
817
812
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -832,8 +827,8 @@ module Google
832
827
  yield response, operation if block_given?
833
828
  return response
834
829
  end
835
- rescue GRPC::BadStatus => e
836
- raise Google::Cloud::Error.from_error(e)
830
+ rescue ::GRPC::BadStatus => e
831
+ raise ::Google::Cloud::Error.from_error(e)
837
832
  end
838
833
 
839
834
  ##
@@ -844,48 +839,50 @@ module Google
844
839
  # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
845
840
  #
846
841
  # @overload set_iam_policy(request, options = nil)
847
- # @param request [Google::Iam::V1::SetIamPolicyRequest | Hash]
848
- # Sets the access control policy for a billing account. Replaces any existing
849
- # policy.
850
- # The caller must have the `billing.accounts.setIamPolicy` permission on the
851
- # account, which is often given to billing account
852
- # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access).
853
- # @param options [Gapic::CallOptions, Hash]
842
+ # Pass arguments to `set_iam_policy` via a request object, either of type
843
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
844
+ #
845
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
846
+ # A request object representing the call parameters. Required. To specify no
847
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
848
+ # @param options [::Gapic::CallOptions, ::Hash]
854
849
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
855
850
  #
856
851
  # @overload set_iam_policy(resource: nil, policy: nil)
857
- # @param resource [String]
852
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
853
+ # least one keyword argument is required. To specify no parameters, or to keep all
854
+ # the default parameter values, pass an empty Hash as a request object (see above).
855
+ #
856
+ # @param resource [::String]
858
857
  # REQUIRED: The resource for which the policy is being specified.
859
- # `resource` is usually specified as a path. For example, a Project
860
- # resource is specified as `projects/{project}`.
861
- # @param policy [Google::Iam::V1::Policy | Hash]
858
+ # See the operation documentation for the appropriate value for this field.
859
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
862
860
  # REQUIRED: The complete policy to be applied to the `resource`. The size of
863
861
  # the policy is limited to a few 10s of KB. An empty policy is a
864
862
  # valid policy but certain Cloud Platform services (such as Projects)
865
863
  # might reject them.
866
864
  #
867
- #
868
865
  # @yield [response, operation] Access the result along with the RPC operation
869
- # @yieldparam response [Google::Iam::V1::Policy]
870
- # @yieldparam operation [GRPC::ActiveCall::Operation]
866
+ # @yieldparam response [::Google::Iam::V1::Policy]
867
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
871
868
  #
872
- # @return [Google::Iam::V1::Policy]
869
+ # @return [::Google::Iam::V1::Policy]
873
870
  #
874
- # @raise [Google::Cloud::Error] if the RPC is aborted.
871
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
875
872
  #
876
873
  def set_iam_policy request, options = nil
877
- raise ArgumentError, "request must be provided" if request.nil?
874
+ raise ::ArgumentError, "request must be provided" if request.nil?
878
875
 
879
- request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::SetIamPolicyRequest
876
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
880
877
 
881
878
  # Converts hash and nil to an options object
882
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
879
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
883
880
 
884
881
  # Customize the options with defaults
885
882
  metadata = @config.rpcs.set_iam_policy.metadata.to_h
886
883
 
887
884
  # Set x-goog-api-client and x-goog-user-project headers
888
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
885
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
889
886
  lib_name: @config.lib_name, lib_version: @config.lib_version,
890
887
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
891
888
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -906,8 +903,8 @@ module Google
906
903
  yield response, operation if block_given?
907
904
  return response
908
905
  end
909
- rescue GRPC::BadStatus => e
910
- raise Google::Cloud::Error.from_error(e)
906
+ rescue ::GRPC::BadStatus => e
907
+ raise ::Google::Cloud::Error.from_error(e)
911
908
  end
912
909
 
913
910
  ##
@@ -916,46 +913,50 @@ module Google
916
913
  # the input permissions that the caller is allowed for that resource.
917
914
  #
918
915
  # @overload test_iam_permissions(request, options = nil)
919
- # @param request [Google::Iam::V1::TestIamPermissionsRequest | Hash]
920
- # Tests the access control policy for a billing account. This method takes
921
- # the resource and a set of permissions as input and returns the subset of
922
- # the input permissions that the caller is allowed for that resource.
923
- # @param options [Gapic::CallOptions, Hash]
916
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
917
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
918
+ #
919
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
920
+ # A request object representing the call parameters. Required. To specify no
921
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
922
+ # @param options [::Gapic::CallOptions, ::Hash]
924
923
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
925
924
  #
926
925
  # @overload test_iam_permissions(resource: nil, permissions: nil)
927
- # @param resource [String]
926
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
927
+ # least one keyword argument is required. To specify no parameters, or to keep all
928
+ # the default parameter values, pass an empty Hash as a request object (see above).
929
+ #
930
+ # @param resource [::String]
928
931
  # REQUIRED: The resource for which the policy detail is being requested.
929
- # `resource` is usually specified as a path. For example, a Project
930
- # resource is specified as `projects/{project}`.
931
- # @param permissions [Array<String>]
932
+ # See the operation documentation for the appropriate value for this field.
933
+ # @param permissions [::Array<::String>]
932
934
  # The set of permissions to check for the `resource`. Permissions with
933
935
  # wildcards (such as '*' or 'storage.*') are not allowed. For more
934
936
  # information see
935
937
  # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
936
938
  #
937
- #
938
939
  # @yield [response, operation] Access the result along with the RPC operation
939
- # @yieldparam response [Google::Iam::V1::TestIamPermissionsResponse]
940
- # @yieldparam operation [GRPC::ActiveCall::Operation]
940
+ # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
941
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
941
942
  #
942
- # @return [Google::Iam::V1::TestIamPermissionsResponse]
943
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
943
944
  #
944
- # @raise [Google::Cloud::Error] if the RPC is aborted.
945
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
945
946
  #
946
947
  def test_iam_permissions request, options = nil
947
- raise ArgumentError, "request must be provided" if request.nil?
948
+ raise ::ArgumentError, "request must be provided" if request.nil?
948
949
 
949
- request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::TestIamPermissionsRequest
950
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
950
951
 
951
952
  # Converts hash and nil to an options object
952
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
953
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
953
954
 
954
955
  # Customize the options with defaults
955
956
  metadata = @config.rpcs.test_iam_permissions.metadata.to_h
956
957
 
957
958
  # Set x-goog-api-client and x-goog-user-project headers
958
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
959
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
959
960
  lib_name: @config.lib_name, lib_version: @config.lib_version,
960
961
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
961
962
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -976,8 +977,8 @@ module Google
976
977
  yield response, operation if block_given?
977
978
  return response
978
979
  end
979
- rescue GRPC::BadStatus => e
980
- raise Google::Cloud::Error.from_error(e)
980
+ rescue ::GRPC::BadStatus => e
981
+ raise ::Google::Cloud::Error.from_error(e)
981
982
  end
982
983
 
983
984
  ##
@@ -987,7 +988,7 @@ module Google
987
988
  # providing control over timeouts, retry behavior, logging, transport
988
989
  # parameters, and other low-level controls. Certain parameters can also be
989
990
  # applied individually to specific RPCs. See
990
- # {Google::Cloud::Billing::V1::CloudBilling::Client::Configuration::Rpcs}
991
+ # {::Google::Cloud::Billing::V1::CloudBilling::Client::Configuration::Rpcs}
991
992
  # for a list of RPCs that can be configured independently.
992
993
  #
993
994
  # Configuration can be applied globally to all clients, or to a single client
@@ -998,22 +999,22 @@ module Google
998
999
  # To modify the global config, setting the timeout for get_billing_account
999
1000
  # to 20 seconds, and all remaining timeouts to 10 seconds:
1000
1001
  #
1001
- # Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
1002
- # config.timeout = 10_000
1003
- # config.rpcs.get_billing_account.timeout = 20_000
1002
+ # ::Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
1003
+ # config.timeout = 10.0
1004
+ # config.rpcs.get_billing_account.timeout = 20.0
1004
1005
  # end
1005
1006
  #
1006
1007
  # To apply the above configuration only to a new client:
1007
1008
  #
1008
- # client = Google::Cloud::Billing::V1::CloudBilling::Client.new do |config|
1009
- # config.timeout = 10_000
1010
- # config.rpcs.get_billing_account.timeout = 20_000
1009
+ # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config|
1010
+ # config.timeout = 10.0
1011
+ # config.rpcs.get_billing_account.timeout = 20.0
1011
1012
  # end
1012
1013
  #
1013
1014
  # @!attribute [rw] endpoint
1014
1015
  # The hostname or hostname:port of the service endpoint.
1015
1016
  # Defaults to `"cloudbilling.googleapis.com"`.
1016
- # @return [String]
1017
+ # @return [::String]
1017
1018
  # @!attribute [rw] credentials
1018
1019
  # Credentials to send with calls. You may provide any of the following types:
1019
1020
  # * (`String`) The path to a service account key file in JSON format
@@ -1025,29 +1026,29 @@ module Google
1025
1026
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1026
1027
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1027
1028
  # * (`nil`) indicating no credentials
1028
- # @return [Object]
1029
+ # @return [::Object]
1029
1030
  # @!attribute [rw] scope
1030
1031
  # The OAuth scopes
1031
- # @return [Array<String>]
1032
+ # @return [::Array<::String>]
1032
1033
  # @!attribute [rw] lib_name
1033
1034
  # The library name as recorded in instrumentation and logging
1034
- # @return [String]
1035
+ # @return [::String]
1035
1036
  # @!attribute [rw] lib_version
1036
1037
  # The library version as recorded in instrumentation and logging
1037
- # @return [String]
1038
+ # @return [::String]
1038
1039
  # @!attribute [rw] channel_args
1039
1040
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1040
1041
  # `GRPC::Core::Channel` object is provided as the credential.
1041
- # @return [Hash]
1042
+ # @return [::Hash]
1042
1043
  # @!attribute [rw] interceptors
1043
1044
  # An array of interceptors that are run before calls are executed.
1044
- # @return [Array<GRPC::ClientInterceptor>]
1045
+ # @return [::Array<::GRPC::ClientInterceptor>]
1045
1046
  # @!attribute [rw] timeout
1046
- # The call timeout in milliseconds.
1047
- # @return [Numeric]
1047
+ # The call timeout in seconds.
1048
+ # @return [::Numeric]
1048
1049
  # @!attribute [rw] metadata
1049
1050
  # Additional gRPC headers to be sent with the call.
1050
- # @return [Hash{Symbol=>String}]
1051
+ # @return [::Hash{::Symbol=>::String}]
1051
1052
  # @!attribute [rw] retry_policy
1052
1053
  # The retry policy. The value is a hash with the following keys:
1053
1054
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -1055,25 +1056,29 @@ module Google
1055
1056
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1056
1057
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1057
1058
  # trigger a retry.
1058
- # @return [Hash]
1059
+ # @return [::Hash]
1060
+ # @!attribute [rw] quota_project
1061
+ # A separate project against which to charge quota.
1062
+ # @return [::String]
1059
1063
  #
1060
1064
  class Configuration
1061
- extend Gapic::Config
1065
+ extend ::Gapic::Config
1062
1066
 
1063
- config_attr :endpoint, "cloudbilling.googleapis.com", String
1064
- config_attr :credentials, nil do |value|
1067
+ config_attr :endpoint, "cloudbilling.googleapis.com", ::String
1068
+ config_attr :credentials, nil do |value|
1065
1069
  allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1066
1070
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1067
1071
  allowed.any? { |klass| klass === value }
1068
1072
  end
1069
- config_attr :scope, nil, String, Array, nil
1070
- config_attr :lib_name, nil, String, nil
1071
- config_attr :lib_version, nil, String, nil
1072
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
1073
- config_attr :interceptors, nil, Array, nil
1074
- config_attr :timeout, nil, Numeric, nil
1075
- config_attr :metadata, nil, Hash, nil
1076
- config_attr :retry_policy, nil, Hash, Proc, nil
1073
+ config_attr :scope, nil, ::String, ::Array, nil
1074
+ config_attr :lib_name, nil, ::String, nil
1075
+ config_attr :lib_version, nil, ::String, nil
1076
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1077
+ config_attr :interceptors, nil, ::Array, nil
1078
+ config_attr :timeout, nil, ::Numeric, nil
1079
+ config_attr :metadata, nil, ::Hash, nil
1080
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1081
+ config_attr :quota_project, nil, ::String, nil
1077
1082
 
1078
1083
  # @private
1079
1084
  def initialize parent_config = nil
@@ -1089,7 +1094,7 @@ module Google
1089
1094
  def rpcs
1090
1095
  @rpcs ||= begin
1091
1096
  parent_rpcs = nil
1092
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
1097
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
1093
1098
  Rpcs.new parent_rpcs
1094
1099
  end
1095
1100
  end
@@ -1114,77 +1119,77 @@ module Google
1114
1119
  class Rpcs
1115
1120
  ##
1116
1121
  # RPC-specific configuration for `get_billing_account`
1117
- # @return [Gapic::Config::Method]
1122
+ # @return [::Gapic::Config::Method]
1118
1123
  #
1119
1124
  attr_reader :get_billing_account
1120
1125
  ##
1121
1126
  # RPC-specific configuration for `list_billing_accounts`
1122
- # @return [Gapic::Config::Method]
1127
+ # @return [::Gapic::Config::Method]
1123
1128
  #
1124
1129
  attr_reader :list_billing_accounts
1125
1130
  ##
1126
1131
  # RPC-specific configuration for `update_billing_account`
1127
- # @return [Gapic::Config::Method]
1132
+ # @return [::Gapic::Config::Method]
1128
1133
  #
1129
1134
  attr_reader :update_billing_account
1130
1135
  ##
1131
1136
  # RPC-specific configuration for `create_billing_account`
1132
- # @return [Gapic::Config::Method]
1137
+ # @return [::Gapic::Config::Method]
1133
1138
  #
1134
1139
  attr_reader :create_billing_account
1135
1140
  ##
1136
1141
  # RPC-specific configuration for `list_project_billing_info`
1137
- # @return [Gapic::Config::Method]
1142
+ # @return [::Gapic::Config::Method]
1138
1143
  #
1139
1144
  attr_reader :list_project_billing_info
1140
1145
  ##
1141
1146
  # RPC-specific configuration for `get_project_billing_info`
1142
- # @return [Gapic::Config::Method]
1147
+ # @return [::Gapic::Config::Method]
1143
1148
  #
1144
1149
  attr_reader :get_project_billing_info
1145
1150
  ##
1146
1151
  # RPC-specific configuration for `update_project_billing_info`
1147
- # @return [Gapic::Config::Method]
1152
+ # @return [::Gapic::Config::Method]
1148
1153
  #
1149
1154
  attr_reader :update_project_billing_info
1150
1155
  ##
1151
1156
  # RPC-specific configuration for `get_iam_policy`
1152
- # @return [Gapic::Config::Method]
1157
+ # @return [::Gapic::Config::Method]
1153
1158
  #
1154
1159
  attr_reader :get_iam_policy
1155
1160
  ##
1156
1161
  # RPC-specific configuration for `set_iam_policy`
1157
- # @return [Gapic::Config::Method]
1162
+ # @return [::Gapic::Config::Method]
1158
1163
  #
1159
1164
  attr_reader :set_iam_policy
1160
1165
  ##
1161
1166
  # RPC-specific configuration for `test_iam_permissions`
1162
- # @return [Gapic::Config::Method]
1167
+ # @return [::Gapic::Config::Method]
1163
1168
  #
1164
1169
  attr_reader :test_iam_permissions
1165
1170
 
1166
1171
  # @private
1167
1172
  def initialize parent_rpcs = nil
1168
1173
  get_billing_account_config = parent_rpcs&.get_billing_account if parent_rpcs&.respond_to? :get_billing_account
1169
- @get_billing_account = Gapic::Config::Method.new get_billing_account_config
1174
+ @get_billing_account = ::Gapic::Config::Method.new get_billing_account_config
1170
1175
  list_billing_accounts_config = parent_rpcs&.list_billing_accounts if parent_rpcs&.respond_to? :list_billing_accounts
1171
- @list_billing_accounts = Gapic::Config::Method.new list_billing_accounts_config
1176
+ @list_billing_accounts = ::Gapic::Config::Method.new list_billing_accounts_config
1172
1177
  update_billing_account_config = parent_rpcs&.update_billing_account if parent_rpcs&.respond_to? :update_billing_account
1173
- @update_billing_account = Gapic::Config::Method.new update_billing_account_config
1178
+ @update_billing_account = ::Gapic::Config::Method.new update_billing_account_config
1174
1179
  create_billing_account_config = parent_rpcs&.create_billing_account if parent_rpcs&.respond_to? :create_billing_account
1175
- @create_billing_account = Gapic::Config::Method.new create_billing_account_config
1180
+ @create_billing_account = ::Gapic::Config::Method.new create_billing_account_config
1176
1181
  list_project_billing_info_config = parent_rpcs&.list_project_billing_info if parent_rpcs&.respond_to? :list_project_billing_info
1177
- @list_project_billing_info = Gapic::Config::Method.new list_project_billing_info_config
1182
+ @list_project_billing_info = ::Gapic::Config::Method.new list_project_billing_info_config
1178
1183
  get_project_billing_info_config = parent_rpcs&.get_project_billing_info if parent_rpcs&.respond_to? :get_project_billing_info
1179
- @get_project_billing_info = Gapic::Config::Method.new get_project_billing_info_config
1184
+ @get_project_billing_info = ::Gapic::Config::Method.new get_project_billing_info_config
1180
1185
  update_project_billing_info_config = parent_rpcs&.update_project_billing_info if parent_rpcs&.respond_to? :update_project_billing_info
1181
- @update_project_billing_info = Gapic::Config::Method.new update_project_billing_info_config
1186
+ @update_project_billing_info = ::Gapic::Config::Method.new update_project_billing_info_config
1182
1187
  get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
1183
- @get_iam_policy = Gapic::Config::Method.new get_iam_policy_config
1188
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1184
1189
  set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
1185
- @set_iam_policy = Gapic::Config::Method.new set_iam_policy_config
1190
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1186
1191
  test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
1187
- @test_iam_permissions = Gapic::Config::Method.new test_iam_permissions_config
1192
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1188
1193
 
1189
1194
  yield self if block_given?
1190
1195
  end
@@ -1196,13 +1201,3 @@ module Google
1196
1201
  end
1197
1202
  end
1198
1203
  end
1199
-
1200
- # rubocop:disable Lint/HandleExceptions
1201
-
1202
- # Once client is loaded, load helpers.rb if it exists.
1203
- begin
1204
- require "google/cloud/billing/v1/cloud_billing/helpers"
1205
- rescue LoadError
1206
- end
1207
-
1208
- # rubocop:enable Lint/HandleExceptions