google-cloud-billing-v1 0.4.0 → 0.4.1
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 +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/billing/v1/cloud_billing/client.rb +208 -208
- data/lib/google/cloud/billing/v1/cloud_billing/credentials.rb +1 -1
- data/lib/google/cloud/billing/v1/cloud_billing/paths.rb +1 -1
- data/lib/google/cloud/billing/v1/cloud_billing.rb +1 -1
- data/lib/google/cloud/billing/v1/cloud_catalog/client.rb +76 -76
- data/lib/google/cloud/billing/v1/cloud_catalog/credentials.rb +1 -1
- data/lib/google/cloud/billing/v1/cloud_catalog/paths.rb +1 -1
- data/lib/google/cloud/billing/v1/cloud_catalog.rb +1 -1
- data/lib/google/cloud/billing/v1/version.rb +1 -1
- data/lib/google/cloud/billing/v1.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/billing/v1/cloud_billing.rb +48 -48
- data/proto_docs/google/cloud/billing/v1/cloud_catalog.rb +66 -66
- data/proto_docs/google/iam/v1/iam_policy.rb +15 -15
- data/proto_docs/google/iam/v1/options.rb +3 -3
- data/proto_docs/google/iam/v1/policy.rb +26 -26
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/type/expr.rb +6 -6
- data/proto_docs/google/type/money.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '069d513cbc1c7fac56c88af8ae481229b31a39f28b68a28d23e5d84477a8c75f'
|
4
|
+
data.tar.gz: add53c1300a218d45e91fd25f881d5df067f777dfdc753c3117ada5644c16420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c614a78c093e6a3814ed4b9fd1b330bf0ea2fd24c3f149e4d9c16dba1ee3e55c1b934aff4e2bdc21024aad46d45bba521374f7235c03b7da6d385a9de2828ae5
|
7
|
+
data.tar.gz: f17a11ce837e8e4b5b3d85a7463103f18b7d543cf2454bb5d60be6e1e86a280ceca63f289ce05046117c54b69942c60ad3e8585cb750ba84e3527511256fce77
|
data/AUTHENTICATION.md
CHANGED
@@ -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
@@ -25,7 +25,7 @@ In order to use this library, you first need to go through the following steps:
|
|
25
25
|
```ruby
|
26
26
|
require "google/cloud/billing/v1"
|
27
27
|
|
28
|
-
client = Google::Cloud::Billing::V1::CloudBilling::Client.new
|
28
|
+
client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new
|
29
29
|
request = my_create_request
|
30
30
|
response = client.get_billing_account request
|
31
31
|
```
|
@@ -38,15 +38,15 @@ module Google
|
|
38
38
|
##
|
39
39
|
# Configure the CloudBilling Client class.
|
40
40
|
#
|
41
|
-
# See {Google::Cloud::Billing::V1::CloudBilling::Client::Configuration}
|
41
|
+
# See {::Google::Cloud::Billing::V1::CloudBilling::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
44
|
# ## Example
|
45
45
|
#
|
46
46
|
# To modify the configuration for all CloudBilling clients:
|
47
47
|
#
|
48
|
-
# Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
|
49
|
-
# config.timeout =
|
48
|
+
# ::Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
50
|
# end
|
51
51
|
#
|
52
52
|
# @yield [config] Configure the Client client.
|
@@ -152,7 +152,7 @@ module Google
|
|
152
152
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
153
153
|
# should be made on {Client.configure}.
|
154
154
|
#
|
155
|
-
# See {Google::Cloud::Billing::V1::CloudBilling::Client::Configuration}
|
155
|
+
# See {::Google::Cloud::Billing::V1::CloudBilling::Client::Configuration}
|
156
156
|
# for a description of the configuration fields.
|
157
157
|
#
|
158
158
|
# @yield [config] Configure the Client client.
|
@@ -173,13 +173,13 @@ module Google
|
|
173
173
|
# To create a new CloudBilling client with the default
|
174
174
|
# configuration:
|
175
175
|
#
|
176
|
-
# client = Google::Cloud::Billing::V1::CloudBilling::Client.new
|
176
|
+
# client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new
|
177
177
|
#
|
178
178
|
# To create a new CloudBilling client with a custom
|
179
179
|
# configuration:
|
180
180
|
#
|
181
|
-
# client = Google::Cloud::Billing::V1::CloudBilling::Client.new do |config|
|
182
|
-
# config.timeout =
|
181
|
+
# client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config|
|
182
|
+
# config.timeout = 10.0
|
183
183
|
# end
|
184
184
|
#
|
185
185
|
# @yield [config] Configure the CloudBilling client.
|
@@ -206,8 +206,8 @@ module Google
|
|
206
206
|
end
|
207
207
|
@quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
|
208
208
|
|
209
|
-
@cloud_billing_stub = Gapic::ServiceStub.new(
|
210
|
-
Google::Cloud::Billing::V1::CloudBilling::Stub,
|
209
|
+
@cloud_billing_stub = ::Gapic::ServiceStub.new(
|
210
|
+
::Google::Cloud::Billing::V1::CloudBilling::Stub,
|
211
211
|
credentials: credentials,
|
212
212
|
endpoint: @config.endpoint,
|
213
213
|
channel_args: @config.channel_args,
|
@@ -224,12 +224,12 @@ module Google
|
|
224
224
|
#
|
225
225
|
# @overload get_billing_account(request, options = nil)
|
226
226
|
# Pass arguments to `get_billing_account` via a request object, either of type
|
227
|
-
# {Google::Cloud::Billing::V1::GetBillingAccountRequest} or an equivalent Hash.
|
227
|
+
# {::Google::Cloud::Billing::V1::GetBillingAccountRequest} or an equivalent Hash.
|
228
228
|
#
|
229
|
-
# @param request [Google::Cloud::Billing::V1::GetBillingAccountRequest, Hash]
|
229
|
+
# @param request [::Google::Cloud::Billing::V1::GetBillingAccountRequest, ::Hash]
|
230
230
|
# A request object representing the call parameters. Required. To specify no
|
231
231
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
232
|
-
# @param options [Gapic::CallOptions, Hash]
|
232
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
233
233
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
234
234
|
#
|
235
235
|
# @overload get_billing_account(name: nil)
|
@@ -237,31 +237,31 @@ module Google
|
|
237
237
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
238
238
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
239
239
|
#
|
240
|
-
# @param name [String]
|
240
|
+
# @param name [::String]
|
241
241
|
# Required. The resource name of the billing account to retrieve. For example,
|
242
242
|
# `billingAccounts/012345-567890-ABCDEF`.
|
243
243
|
#
|
244
244
|
# @yield [response, operation] Access the result along with the RPC operation
|
245
|
-
# @yieldparam response [Google::Cloud::Billing::V1::BillingAccount]
|
246
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
245
|
+
# @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
|
246
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
247
247
|
#
|
248
|
-
# @return [Google::Cloud::Billing::V1::BillingAccount]
|
248
|
+
# @return [::Google::Cloud::Billing::V1::BillingAccount]
|
249
249
|
#
|
250
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
250
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
251
251
|
#
|
252
252
|
def get_billing_account request, options = nil
|
253
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
253
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
254
254
|
|
255
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::GetBillingAccountRequest
|
255
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetBillingAccountRequest
|
256
256
|
|
257
257
|
# Converts hash and nil to an options object
|
258
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
258
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
259
259
|
|
260
260
|
# Customize the options with defaults
|
261
261
|
metadata = @config.rpcs.get_billing_account.metadata.to_h
|
262
262
|
|
263
263
|
# Set x-goog-api-client and x-goog-user-project headers
|
264
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
264
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
265
265
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
266
266
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
267
267
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -282,8 +282,8 @@ module Google
|
|
282
282
|
yield response, operation if block_given?
|
283
283
|
return response
|
284
284
|
end
|
285
|
-
rescue GRPC::BadStatus => e
|
286
|
-
raise Google::Cloud::Error.from_error(e)
|
285
|
+
rescue ::GRPC::BadStatus => e
|
286
|
+
raise ::Google::Cloud::Error.from_error(e)
|
287
287
|
end
|
288
288
|
|
289
289
|
##
|
@@ -293,12 +293,12 @@ module Google
|
|
293
293
|
#
|
294
294
|
# @overload list_billing_accounts(request, options = nil)
|
295
295
|
# Pass arguments to `list_billing_accounts` via a request object, either of type
|
296
|
-
# {Google::Cloud::Billing::V1::ListBillingAccountsRequest} or an equivalent Hash.
|
296
|
+
# {::Google::Cloud::Billing::V1::ListBillingAccountsRequest} or an equivalent Hash.
|
297
297
|
#
|
298
|
-
# @param request [Google::Cloud::Billing::V1::ListBillingAccountsRequest, Hash]
|
298
|
+
# @param request [::Google::Cloud::Billing::V1::ListBillingAccountsRequest, ::Hash]
|
299
299
|
# A request object representing the call parameters. Required. To specify no
|
300
300
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
301
|
-
# @param options [Gapic::CallOptions, Hash]
|
301
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
302
302
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
303
303
|
#
|
304
304
|
# @overload list_billing_accounts(page_size: nil, page_token: nil, filter: nil)
|
@@ -306,14 +306,14 @@ module Google
|
|
306
306
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
307
307
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
308
308
|
#
|
309
|
-
# @param page_size [Integer]
|
309
|
+
# @param page_size [::Integer]
|
310
310
|
# Requested page size. The maximum page size is 100; this is also the
|
311
311
|
# default.
|
312
|
-
# @param page_token [String]
|
312
|
+
# @param page_token [::String]
|
313
313
|
# A token identifying a page of results to return. This should be a
|
314
314
|
# `next_page_token` value returned from a previous `ListBillingAccounts`
|
315
315
|
# call. If unspecified, the first page of results is returned.
|
316
|
-
# @param filter [String]
|
316
|
+
# @param filter [::String]
|
317
317
|
# Options for how to filter the returned billing accounts.
|
318
318
|
# Currently this only supports filtering for
|
319
319
|
# [subaccounts](https://cloud.google.com/billing/docs/concepts) under a
|
@@ -322,26 +322,26 @@ module Google
|
|
322
322
|
# Boolean algebra and other fields are not currently supported.
|
323
323
|
#
|
324
324
|
# @yield [response, operation] Access the result along with the RPC operation
|
325
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
326
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
325
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>]
|
326
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
327
327
|
#
|
328
|
-
# @return [Gapic::PagedEnumerable
|
328
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>]
|
329
329
|
#
|
330
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
330
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
331
331
|
#
|
332
332
|
def list_billing_accounts request, options = nil
|
333
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
333
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
334
334
|
|
335
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::ListBillingAccountsRequest
|
335
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListBillingAccountsRequest
|
336
336
|
|
337
337
|
# Converts hash and nil to an options object
|
338
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
338
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
339
339
|
|
340
340
|
# Customize the options with defaults
|
341
341
|
metadata = @config.rpcs.list_billing_accounts.metadata.to_h
|
342
342
|
|
343
343
|
# Set x-goog-api-client and x-goog-user-project headers
|
344
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
344
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
345
345
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
346
346
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
347
347
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -353,12 +353,12 @@ module Google
|
|
353
353
|
retry_policy: @config.retry_policy
|
354
354
|
|
355
355
|
@cloud_billing_stub.call_rpc :list_billing_accounts, request, options: options do |response, operation|
|
356
|
-
response = Gapic::PagedEnumerable.new @cloud_billing_stub, :list_billing_accounts, request, response, operation, options
|
356
|
+
response = ::Gapic::PagedEnumerable.new @cloud_billing_stub, :list_billing_accounts, request, response, operation, options
|
357
357
|
yield response, operation if block_given?
|
358
358
|
return response
|
359
359
|
end
|
360
|
-
rescue GRPC::BadStatus => e
|
361
|
-
raise Google::Cloud::Error.from_error(e)
|
360
|
+
rescue ::GRPC::BadStatus => e
|
361
|
+
raise ::Google::Cloud::Error.from_error(e)
|
362
362
|
end
|
363
363
|
|
364
364
|
##
|
@@ -371,12 +371,12 @@ module Google
|
|
371
371
|
#
|
372
372
|
# @overload update_billing_account(request, options = nil)
|
373
373
|
# Pass arguments to `update_billing_account` via a request object, either of type
|
374
|
-
# {Google::Cloud::Billing::V1::UpdateBillingAccountRequest} or an equivalent Hash.
|
374
|
+
# {::Google::Cloud::Billing::V1::UpdateBillingAccountRequest} or an equivalent Hash.
|
375
375
|
#
|
376
|
-
# @param request [Google::Cloud::Billing::V1::UpdateBillingAccountRequest, Hash]
|
376
|
+
# @param request [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, ::Hash]
|
377
377
|
# A request object representing the call parameters. Required. To specify no
|
378
378
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
379
|
-
# @param options [Gapic::CallOptions, Hash]
|
379
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
380
380
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
381
381
|
#
|
382
382
|
# @overload update_billing_account(name: nil, account: nil, update_mask: nil)
|
@@ -384,35 +384,35 @@ module Google
|
|
384
384
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
385
385
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
386
386
|
#
|
387
|
-
# @param name [String]
|
387
|
+
# @param name [::String]
|
388
388
|
# Required. The name of the billing account resource to be updated.
|
389
|
-
# @param account [Google::Cloud::Billing::V1::BillingAccount, Hash]
|
389
|
+
# @param account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash]
|
390
390
|
# Required. The billing account resource to replace the resource on the server.
|
391
|
-
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
391
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
392
392
|
# The update mask applied to the resource.
|
393
393
|
# Only "display_name" is currently supported.
|
394
394
|
#
|
395
395
|
# @yield [response, operation] Access the result along with the RPC operation
|
396
|
-
# @yieldparam response [Google::Cloud::Billing::V1::BillingAccount]
|
397
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
396
|
+
# @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
|
397
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
398
398
|
#
|
399
|
-
# @return [Google::Cloud::Billing::V1::BillingAccount]
|
399
|
+
# @return [::Google::Cloud::Billing::V1::BillingAccount]
|
400
400
|
#
|
401
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
401
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
402
402
|
#
|
403
403
|
def update_billing_account request, options = nil
|
404
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
404
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
405
405
|
|
406
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::UpdateBillingAccountRequest
|
406
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest
|
407
407
|
|
408
408
|
# Converts hash and nil to an options object
|
409
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
409
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
410
410
|
|
411
411
|
# Customize the options with defaults
|
412
412
|
metadata = @config.rpcs.update_billing_account.metadata.to_h
|
413
413
|
|
414
414
|
# Set x-goog-api-client and x-goog-user-project headers
|
415
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
415
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
416
416
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
417
417
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
418
418
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -433,8 +433,8 @@ module Google
|
|
433
433
|
yield response, operation if block_given?
|
434
434
|
return response
|
435
435
|
end
|
436
|
-
rescue GRPC::BadStatus => e
|
437
|
-
raise Google::Cloud::Error.from_error(e)
|
436
|
+
rescue ::GRPC::BadStatus => e
|
437
|
+
raise ::Google::Cloud::Error.from_error(e)
|
438
438
|
end
|
439
439
|
|
440
440
|
##
|
@@ -451,12 +451,12 @@ module Google
|
|
451
451
|
#
|
452
452
|
# @overload create_billing_account(request, options = nil)
|
453
453
|
# Pass arguments to `create_billing_account` via a request object, either of type
|
454
|
-
# {Google::Cloud::Billing::V1::CreateBillingAccountRequest} or an equivalent Hash.
|
454
|
+
# {::Google::Cloud::Billing::V1::CreateBillingAccountRequest} or an equivalent Hash.
|
455
455
|
#
|
456
|
-
# @param request [Google::Cloud::Billing::V1::CreateBillingAccountRequest, Hash]
|
456
|
+
# @param request [::Google::Cloud::Billing::V1::CreateBillingAccountRequest, ::Hash]
|
457
457
|
# A request object representing the call parameters. Required. To specify no
|
458
458
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
459
|
-
# @param options [Gapic::CallOptions, Hash]
|
459
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
460
460
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
461
461
|
#
|
462
462
|
# @overload create_billing_account(billing_account: nil)
|
@@ -464,33 +464,33 @@ module Google
|
|
464
464
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
465
465
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
466
466
|
#
|
467
|
-
# @param billing_account [Google::Cloud::Billing::V1::BillingAccount, Hash]
|
467
|
+
# @param billing_account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash]
|
468
468
|
# Required. The billing account resource to create.
|
469
469
|
# Currently CreateBillingAccount only supports subaccount creation, so
|
470
470
|
# any created billing accounts must be under a provided master billing
|
471
471
|
# account.
|
472
472
|
#
|
473
473
|
# @yield [response, operation] Access the result along with the RPC operation
|
474
|
-
# @yieldparam response [Google::Cloud::Billing::V1::BillingAccount]
|
475
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
474
|
+
# @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
|
475
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
476
476
|
#
|
477
|
-
# @return [Google::Cloud::Billing::V1::BillingAccount]
|
477
|
+
# @return [::Google::Cloud::Billing::V1::BillingAccount]
|
478
478
|
#
|
479
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
479
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
480
480
|
#
|
481
481
|
def create_billing_account request, options = nil
|
482
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
482
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
483
483
|
|
484
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::CreateBillingAccountRequest
|
484
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::CreateBillingAccountRequest
|
485
485
|
|
486
486
|
# Converts hash and nil to an options object
|
487
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
487
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
488
488
|
|
489
489
|
# Customize the options with defaults
|
490
490
|
metadata = @config.rpcs.create_billing_account.metadata.to_h
|
491
491
|
|
492
492
|
# Set x-goog-api-client and x-goog-user-project headers
|
493
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
493
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
494
494
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
495
495
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
496
496
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -505,8 +505,8 @@ module Google
|
|
505
505
|
yield response, operation if block_given?
|
506
506
|
return response
|
507
507
|
end
|
508
|
-
rescue GRPC::BadStatus => e
|
509
|
-
raise Google::Cloud::Error.from_error(e)
|
508
|
+
rescue ::GRPC::BadStatus => e
|
509
|
+
raise ::Google::Cloud::Error.from_error(e)
|
510
510
|
end
|
511
511
|
|
512
512
|
##
|
@@ -517,12 +517,12 @@ module Google
|
|
517
517
|
#
|
518
518
|
# @overload list_project_billing_info(request, options = nil)
|
519
519
|
# Pass arguments to `list_project_billing_info` via a request object, either of type
|
520
|
-
# {Google::Cloud::Billing::V1::ListProjectBillingInfoRequest} or an equivalent Hash.
|
520
|
+
# {::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest} or an equivalent Hash.
|
521
521
|
#
|
522
|
-
# @param request [Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, Hash]
|
522
|
+
# @param request [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, ::Hash]
|
523
523
|
# A request object representing the call parameters. Required. To specify no
|
524
524
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
525
|
-
# @param options [Gapic::CallOptions, Hash]
|
525
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
526
526
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
527
527
|
#
|
528
528
|
# @overload list_project_billing_info(name: nil, page_size: nil, page_token: nil)
|
@@ -530,38 +530,38 @@ module Google
|
|
530
530
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
531
531
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
532
532
|
#
|
533
|
-
# @param name [String]
|
533
|
+
# @param name [::String]
|
534
534
|
# Required. The resource name of the billing account associated with the projects that
|
535
535
|
# you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
|
536
|
-
# @param page_size [Integer]
|
536
|
+
# @param page_size [::Integer]
|
537
537
|
# Requested page size. The maximum page size is 100; this is also the
|
538
538
|
# default.
|
539
|
-
# @param page_token [String]
|
539
|
+
# @param page_token [::String]
|
540
540
|
# A token identifying a page of results to be returned. This should be a
|
541
541
|
# `next_page_token` value returned from a previous `ListProjectBillingInfo`
|
542
542
|
# call. If unspecified, the first page of results is returned.
|
543
543
|
#
|
544
544
|
# @yield [response, operation] Access the result along with the RPC operation
|
545
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
546
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
545
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>]
|
546
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
547
547
|
#
|
548
|
-
# @return [Gapic::PagedEnumerable
|
548
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>]
|
549
549
|
#
|
550
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
550
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
551
551
|
#
|
552
552
|
def list_project_billing_info request, options = nil
|
553
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
553
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
554
554
|
|
555
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::ListProjectBillingInfoRequest
|
555
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest
|
556
556
|
|
557
557
|
# Converts hash and nil to an options object
|
558
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
558
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
559
559
|
|
560
560
|
# Customize the options with defaults
|
561
561
|
metadata = @config.rpcs.list_project_billing_info.metadata.to_h
|
562
562
|
|
563
563
|
# Set x-goog-api-client and x-goog-user-project headers
|
564
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
564
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
565
565
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
566
566
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
567
567
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -579,12 +579,12 @@ module Google
|
|
579
579
|
retry_policy: @config.retry_policy
|
580
580
|
|
581
581
|
@cloud_billing_stub.call_rpc :list_project_billing_info, request, options: options do |response, operation|
|
582
|
-
response = Gapic::PagedEnumerable.new @cloud_billing_stub, :list_project_billing_info, request, response, operation, options
|
582
|
+
response = ::Gapic::PagedEnumerable.new @cloud_billing_stub, :list_project_billing_info, request, response, operation, options
|
583
583
|
yield response, operation if block_given?
|
584
584
|
return response
|
585
585
|
end
|
586
|
-
rescue GRPC::BadStatus => e
|
587
|
-
raise Google::Cloud::Error.from_error(e)
|
586
|
+
rescue ::GRPC::BadStatus => e
|
587
|
+
raise ::Google::Cloud::Error.from_error(e)
|
588
588
|
end
|
589
589
|
|
590
590
|
##
|
@@ -595,12 +595,12 @@ module Google
|
|
595
595
|
#
|
596
596
|
# @overload get_project_billing_info(request, options = nil)
|
597
597
|
# Pass arguments to `get_project_billing_info` via a request object, either of type
|
598
|
-
# {Google::Cloud::Billing::V1::GetProjectBillingInfoRequest} or an equivalent Hash.
|
598
|
+
# {::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest} or an equivalent Hash.
|
599
599
|
#
|
600
|
-
# @param request [Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, Hash]
|
600
|
+
# @param request [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, ::Hash]
|
601
601
|
# A request object representing the call parameters. Required. To specify no
|
602
602
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
603
|
-
# @param options [Gapic::CallOptions, Hash]
|
603
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
604
604
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
605
605
|
#
|
606
606
|
# @overload get_project_billing_info(name: nil)
|
@@ -608,31 +608,31 @@ module Google
|
|
608
608
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
609
609
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
610
610
|
#
|
611
|
-
# @param name [String]
|
611
|
+
# @param name [::String]
|
612
612
|
# Required. The resource name of the project for which billing information is
|
613
613
|
# retrieved. For example, `projects/tokyo-rain-123`.
|
614
614
|
#
|
615
615
|
# @yield [response, operation] Access the result along with the RPC operation
|
616
|
-
# @yieldparam response [Google::Cloud::Billing::V1::ProjectBillingInfo]
|
617
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
616
|
+
# @yieldparam response [::Google::Cloud::Billing::V1::ProjectBillingInfo]
|
617
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
618
618
|
#
|
619
|
-
# @return [Google::Cloud::Billing::V1::ProjectBillingInfo]
|
619
|
+
# @return [::Google::Cloud::Billing::V1::ProjectBillingInfo]
|
620
620
|
#
|
621
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
621
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
622
622
|
#
|
623
623
|
def get_project_billing_info request, options = nil
|
624
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
624
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
625
625
|
|
626
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::GetProjectBillingInfoRequest
|
626
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest
|
627
627
|
|
628
628
|
# Converts hash and nil to an options object
|
629
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
629
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
630
630
|
|
631
631
|
# Customize the options with defaults
|
632
632
|
metadata = @config.rpcs.get_project_billing_info.metadata.to_h
|
633
633
|
|
634
634
|
# Set x-goog-api-client and x-goog-user-project headers
|
635
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
635
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
636
636
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
637
637
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
638
638
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -653,8 +653,8 @@ module Google
|
|
653
653
|
yield response, operation if block_given?
|
654
654
|
return response
|
655
655
|
end
|
656
|
-
rescue GRPC::BadStatus => e
|
657
|
-
raise Google::Cloud::Error.from_error(e)
|
656
|
+
rescue ::GRPC::BadStatus => e
|
657
|
+
raise ::Google::Cloud::Error.from_error(e)
|
658
658
|
end
|
659
659
|
|
660
660
|
##
|
@@ -692,12 +692,12 @@ module Google
|
|
692
692
|
#
|
693
693
|
# @overload update_project_billing_info(request, options = nil)
|
694
694
|
# Pass arguments to `update_project_billing_info` via a request object, either of type
|
695
|
-
# {Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest} or an equivalent Hash.
|
695
|
+
# {::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest} or an equivalent Hash.
|
696
696
|
#
|
697
|
-
# @param request [Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, Hash]
|
697
|
+
# @param request [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, ::Hash]
|
698
698
|
# A request object representing the call parameters. Required. To specify no
|
699
699
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
700
|
-
# @param options [Gapic::CallOptions, Hash]
|
700
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
701
701
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
702
702
|
#
|
703
703
|
# @overload update_project_billing_info(name: nil, project_billing_info: nil)
|
@@ -705,34 +705,34 @@ module Google
|
|
705
705
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
706
706
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
707
707
|
#
|
708
|
-
# @param name [String]
|
708
|
+
# @param name [::String]
|
709
709
|
# Required. The resource name of the project associated with the billing information
|
710
710
|
# that you want to update. For example, `projects/tokyo-rain-123`.
|
711
|
-
# @param project_billing_info [Google::Cloud::Billing::V1::ProjectBillingInfo, Hash]
|
711
|
+
# @param project_billing_info [::Google::Cloud::Billing::V1::ProjectBillingInfo, ::Hash]
|
712
712
|
# The new billing information for the project. Read-only fields are ignored;
|
713
713
|
# thus, you can leave empty all fields except `billing_account_name`.
|
714
714
|
#
|
715
715
|
# @yield [response, operation] Access the result along with the RPC operation
|
716
|
-
# @yieldparam response [Google::Cloud::Billing::V1::ProjectBillingInfo]
|
717
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
716
|
+
# @yieldparam response [::Google::Cloud::Billing::V1::ProjectBillingInfo]
|
717
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
718
718
|
#
|
719
|
-
# @return [Google::Cloud::Billing::V1::ProjectBillingInfo]
|
719
|
+
# @return [::Google::Cloud::Billing::V1::ProjectBillingInfo]
|
720
720
|
#
|
721
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
721
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
722
722
|
#
|
723
723
|
def update_project_billing_info request, options = nil
|
724
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
724
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
725
725
|
|
726
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest
|
726
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest
|
727
727
|
|
728
728
|
# Converts hash and nil to an options object
|
729
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
729
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
730
730
|
|
731
731
|
# Customize the options with defaults
|
732
732
|
metadata = @config.rpcs.update_project_billing_info.metadata.to_h
|
733
733
|
|
734
734
|
# Set x-goog-api-client and x-goog-user-project headers
|
735
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
735
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
736
736
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
737
737
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
738
738
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -753,8 +753,8 @@ module Google
|
|
753
753
|
yield response, operation if block_given?
|
754
754
|
return response
|
755
755
|
end
|
756
|
-
rescue GRPC::BadStatus => e
|
757
|
-
raise Google::Cloud::Error.from_error(e)
|
756
|
+
rescue ::GRPC::BadStatus => e
|
757
|
+
raise ::Google::Cloud::Error.from_error(e)
|
758
758
|
end
|
759
759
|
|
760
760
|
##
|
@@ -765,12 +765,12 @@ module Google
|
|
765
765
|
#
|
766
766
|
# @overload get_iam_policy(request, options = nil)
|
767
767
|
# Pass arguments to `get_iam_policy` via a request object, either of type
|
768
|
-
# {Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
768
|
+
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
769
769
|
#
|
770
|
-
# @param request [Google::Iam::V1::GetIamPolicyRequest, Hash]
|
770
|
+
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
771
771
|
# A request object representing the call parameters. Required. To specify no
|
772
772
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
773
|
-
# @param options [Gapic::CallOptions, Hash]
|
773
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
774
774
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
775
775
|
#
|
776
776
|
# @overload get_iam_policy(resource: nil, options: nil)
|
@@ -778,34 +778,34 @@ module Google
|
|
778
778
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
779
779
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
780
780
|
#
|
781
|
-
# @param resource [String]
|
781
|
+
# @param resource [::String]
|
782
782
|
# REQUIRED: The resource for which the policy is being requested.
|
783
783
|
# See the operation documentation for the appropriate value for this field.
|
784
|
-
# @param options [Google::Iam::V1::GetPolicyOptions, Hash]
|
784
|
+
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
785
785
|
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
786
786
|
# `GetIamPolicy`. This field is only used by Cloud IAM.
|
787
787
|
#
|
788
788
|
# @yield [response, operation] Access the result along with the RPC operation
|
789
|
-
# @yieldparam response [Google::Iam::V1::Policy]
|
790
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
789
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
790
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
791
791
|
#
|
792
|
-
# @return [Google::Iam::V1::Policy]
|
792
|
+
# @return [::Google::Iam::V1::Policy]
|
793
793
|
#
|
794
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
794
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
795
795
|
#
|
796
796
|
def get_iam_policy request, options = nil
|
797
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
797
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
798
798
|
|
799
|
-
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::GetIamPolicyRequest
|
799
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
|
800
800
|
|
801
801
|
# Converts hash and nil to an options object
|
802
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
802
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
803
803
|
|
804
804
|
# Customize the options with defaults
|
805
805
|
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
806
806
|
|
807
807
|
# Set x-goog-api-client and x-goog-user-project headers
|
808
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
808
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
809
809
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
810
810
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
811
811
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -826,8 +826,8 @@ module Google
|
|
826
826
|
yield response, operation if block_given?
|
827
827
|
return response
|
828
828
|
end
|
829
|
-
rescue GRPC::BadStatus => e
|
830
|
-
raise Google::Cloud::Error.from_error(e)
|
829
|
+
rescue ::GRPC::BadStatus => e
|
830
|
+
raise ::Google::Cloud::Error.from_error(e)
|
831
831
|
end
|
832
832
|
|
833
833
|
##
|
@@ -839,12 +839,12 @@ module Google
|
|
839
839
|
#
|
840
840
|
# @overload set_iam_policy(request, options = nil)
|
841
841
|
# Pass arguments to `set_iam_policy` via a request object, either of type
|
842
|
-
# {Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
842
|
+
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
843
843
|
#
|
844
|
-
# @param request [Google::Iam::V1::SetIamPolicyRequest, Hash]
|
844
|
+
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
845
845
|
# A request object representing the call parameters. Required. To specify no
|
846
846
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
847
|
-
# @param options [Gapic::CallOptions, Hash]
|
847
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
848
848
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
849
849
|
#
|
850
850
|
# @overload set_iam_policy(resource: nil, policy: nil)
|
@@ -852,36 +852,36 @@ module Google
|
|
852
852
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
853
853
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
854
854
|
#
|
855
|
-
# @param resource [String]
|
855
|
+
# @param resource [::String]
|
856
856
|
# REQUIRED: The resource for which the policy is being specified.
|
857
857
|
# See the operation documentation for the appropriate value for this field.
|
858
|
-
# @param policy [Google::Iam::V1::Policy, Hash]
|
858
|
+
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
859
859
|
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
860
860
|
# the policy is limited to a few 10s of KB. An empty policy is a
|
861
861
|
# valid policy but certain Cloud Platform services (such as Projects)
|
862
862
|
# might reject them.
|
863
863
|
#
|
864
864
|
# @yield [response, operation] Access the result along with the RPC operation
|
865
|
-
# @yieldparam response [Google::Iam::V1::Policy]
|
866
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
865
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
866
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
867
867
|
#
|
868
|
-
# @return [Google::Iam::V1::Policy]
|
868
|
+
# @return [::Google::Iam::V1::Policy]
|
869
869
|
#
|
870
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
870
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
871
871
|
#
|
872
872
|
def set_iam_policy request, options = nil
|
873
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
873
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
874
874
|
|
875
|
-
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::SetIamPolicyRequest
|
875
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
|
876
876
|
|
877
877
|
# Converts hash and nil to an options object
|
878
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
878
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
879
879
|
|
880
880
|
# Customize the options with defaults
|
881
881
|
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
882
882
|
|
883
883
|
# Set x-goog-api-client and x-goog-user-project headers
|
884
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
884
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
885
885
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
886
886
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
887
887
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -902,8 +902,8 @@ module Google
|
|
902
902
|
yield response, operation if block_given?
|
903
903
|
return response
|
904
904
|
end
|
905
|
-
rescue GRPC::BadStatus => e
|
906
|
-
raise Google::Cloud::Error.from_error(e)
|
905
|
+
rescue ::GRPC::BadStatus => e
|
906
|
+
raise ::Google::Cloud::Error.from_error(e)
|
907
907
|
end
|
908
908
|
|
909
909
|
##
|
@@ -913,12 +913,12 @@ module Google
|
|
913
913
|
#
|
914
914
|
# @overload test_iam_permissions(request, options = nil)
|
915
915
|
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
916
|
-
# {Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
916
|
+
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
917
917
|
#
|
918
|
-
# @param request [Google::Iam::V1::TestIamPermissionsRequest, Hash]
|
918
|
+
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
919
919
|
# A request object representing the call parameters. Required. To specify no
|
920
920
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
921
|
-
# @param options [Gapic::CallOptions, Hash]
|
921
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
922
922
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
923
923
|
#
|
924
924
|
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
@@ -926,36 +926,36 @@ module Google
|
|
926
926
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
927
927
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
928
928
|
#
|
929
|
-
# @param resource [String]
|
929
|
+
# @param resource [::String]
|
930
930
|
# REQUIRED: The resource for which the policy detail is being requested.
|
931
931
|
# See the operation documentation for the appropriate value for this field.
|
932
|
-
# @param permissions [Array
|
932
|
+
# @param permissions [::Array<::String>]
|
933
933
|
# The set of permissions to check for the `resource`. Permissions with
|
934
934
|
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
935
935
|
# information see
|
936
936
|
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
937
937
|
#
|
938
938
|
# @yield [response, operation] Access the result along with the RPC operation
|
939
|
-
# @yieldparam response [Google::Iam::V1::TestIamPermissionsResponse]
|
940
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
939
|
+
# @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
|
940
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
941
941
|
#
|
942
|
-
# @return [Google::Iam::V1::TestIamPermissionsResponse]
|
942
|
+
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
943
943
|
#
|
944
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
944
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
945
945
|
#
|
946
946
|
def test_iam_permissions request, options = nil
|
947
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
947
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
948
948
|
|
949
|
-
request = Gapic::Protobuf.coerce request, to: Google::Iam::V1::TestIamPermissionsRequest
|
949
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
|
950
950
|
|
951
951
|
# Converts hash and nil to an options object
|
952
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
952
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
953
953
|
|
954
954
|
# Customize the options with defaults
|
955
955
|
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
956
956
|
|
957
957
|
# Set x-goog-api-client and x-goog-user-project headers
|
958
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
958
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
959
959
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
960
960
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
961
961
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -976,8 +976,8 @@ module Google
|
|
976
976
|
yield response, operation if block_given?
|
977
977
|
return response
|
978
978
|
end
|
979
|
-
rescue GRPC::BadStatus => e
|
980
|
-
raise Google::Cloud::Error.from_error(e)
|
979
|
+
rescue ::GRPC::BadStatus => e
|
980
|
+
raise ::Google::Cloud::Error.from_error(e)
|
981
981
|
end
|
982
982
|
|
983
983
|
##
|
@@ -987,7 +987,7 @@ module Google
|
|
987
987
|
# providing control over timeouts, retry behavior, logging, transport
|
988
988
|
# parameters, and other low-level controls. Certain parameters can also be
|
989
989
|
# applied individually to specific RPCs. See
|
990
|
-
# {Google::Cloud::Billing::V1::CloudBilling::Client::Configuration::Rpcs}
|
990
|
+
# {::Google::Cloud::Billing::V1::CloudBilling::Client::Configuration::Rpcs}
|
991
991
|
# for a list of RPCs that can be configured independently.
|
992
992
|
#
|
993
993
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -998,22 +998,22 @@ module Google
|
|
998
998
|
# To modify the global config, setting the timeout for get_billing_account
|
999
999
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1000
1000
|
#
|
1001
|
-
# Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
|
1002
|
-
# config.timeout =
|
1003
|
-
# config.rpcs.get_billing_account.timeout =
|
1001
|
+
# ::Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config|
|
1002
|
+
# config.timeout = 10.0
|
1003
|
+
# config.rpcs.get_billing_account.timeout = 20.0
|
1004
1004
|
# end
|
1005
1005
|
#
|
1006
1006
|
# To apply the above configuration only to a new client:
|
1007
1007
|
#
|
1008
|
-
# client = Google::Cloud::Billing::V1::CloudBilling::Client.new do |config|
|
1009
|
-
# config.timeout =
|
1010
|
-
# config.rpcs.get_billing_account.timeout =
|
1008
|
+
# client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config|
|
1009
|
+
# config.timeout = 10.0
|
1010
|
+
# config.rpcs.get_billing_account.timeout = 20.0
|
1011
1011
|
# end
|
1012
1012
|
#
|
1013
1013
|
# @!attribute [rw] endpoint
|
1014
1014
|
# The hostname or hostname:port of the service endpoint.
|
1015
1015
|
# Defaults to `"cloudbilling.googleapis.com"`.
|
1016
|
-
# @return [String]
|
1016
|
+
# @return [::String]
|
1017
1017
|
# @!attribute [rw] credentials
|
1018
1018
|
# Credentials to send with calls. You may provide any of the following types:
|
1019
1019
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1025,29 +1025,29 @@ module Google
|
|
1025
1025
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1026
1026
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1027
1027
|
# * (`nil`) indicating no credentials
|
1028
|
-
# @return [Object]
|
1028
|
+
# @return [::Object]
|
1029
1029
|
# @!attribute [rw] scope
|
1030
1030
|
# The OAuth scopes
|
1031
|
-
# @return [Array
|
1031
|
+
# @return [::Array<::String>]
|
1032
1032
|
# @!attribute [rw] lib_name
|
1033
1033
|
# The library name as recorded in instrumentation and logging
|
1034
|
-
# @return [String]
|
1034
|
+
# @return [::String]
|
1035
1035
|
# @!attribute [rw] lib_version
|
1036
1036
|
# The library version as recorded in instrumentation and logging
|
1037
|
-
# @return [String]
|
1037
|
+
# @return [::String]
|
1038
1038
|
# @!attribute [rw] channel_args
|
1039
1039
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1040
1040
|
# `GRPC::Core::Channel` object is provided as the credential.
|
1041
|
-
# @return [Hash]
|
1041
|
+
# @return [::Hash]
|
1042
1042
|
# @!attribute [rw] interceptors
|
1043
1043
|
# An array of interceptors that are run before calls are executed.
|
1044
|
-
# @return [Array
|
1044
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1045
1045
|
# @!attribute [rw] timeout
|
1046
|
-
# The call timeout in
|
1047
|
-
# @return [Numeric]
|
1046
|
+
# The call timeout in seconds.
|
1047
|
+
# @return [::Numeric]
|
1048
1048
|
# @!attribute [rw] metadata
|
1049
1049
|
# Additional gRPC headers to be sent with the call.
|
1050
|
-
# @return [Hash{Symbol
|
1050
|
+
# @return [::Hash{::Symbol=>::String}]
|
1051
1051
|
# @!attribute [rw] retry_policy
|
1052
1052
|
# The retry policy. The value is a hash with the following keys:
|
1053
1053
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -1055,10 +1055,10 @@ module Google
|
|
1055
1055
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1056
1056
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1057
1057
|
# trigger a retry.
|
1058
|
-
# @return [Hash]
|
1058
|
+
# @return [::Hash]
|
1059
1059
|
#
|
1060
1060
|
class Configuration
|
1061
|
-
extend Gapic::Config
|
1061
|
+
extend ::Gapic::Config
|
1062
1062
|
|
1063
1063
|
config_attr :endpoint, "cloudbilling.googleapis.com", String
|
1064
1064
|
config_attr :credentials, nil do |value|
|
@@ -1066,14 +1066,14 @@ module Google
|
|
1066
1066
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1067
1067
|
allowed.any? { |klass| klass === value }
|
1068
1068
|
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
|
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
|
1077
1077
|
|
1078
1078
|
# @private
|
1079
1079
|
def initialize parent_config = nil
|
@@ -1114,77 +1114,77 @@ module Google
|
|
1114
1114
|
class Rpcs
|
1115
1115
|
##
|
1116
1116
|
# RPC-specific configuration for `get_billing_account`
|
1117
|
-
# @return [Gapic::Config::Method]
|
1117
|
+
# @return [::Gapic::Config::Method]
|
1118
1118
|
#
|
1119
1119
|
attr_reader :get_billing_account
|
1120
1120
|
##
|
1121
1121
|
# RPC-specific configuration for `list_billing_accounts`
|
1122
|
-
# @return [Gapic::Config::Method]
|
1122
|
+
# @return [::Gapic::Config::Method]
|
1123
1123
|
#
|
1124
1124
|
attr_reader :list_billing_accounts
|
1125
1125
|
##
|
1126
1126
|
# RPC-specific configuration for `update_billing_account`
|
1127
|
-
# @return [Gapic::Config::Method]
|
1127
|
+
# @return [::Gapic::Config::Method]
|
1128
1128
|
#
|
1129
1129
|
attr_reader :update_billing_account
|
1130
1130
|
##
|
1131
1131
|
# RPC-specific configuration for `create_billing_account`
|
1132
|
-
# @return [Gapic::Config::Method]
|
1132
|
+
# @return [::Gapic::Config::Method]
|
1133
1133
|
#
|
1134
1134
|
attr_reader :create_billing_account
|
1135
1135
|
##
|
1136
1136
|
# RPC-specific configuration for `list_project_billing_info`
|
1137
|
-
# @return [Gapic::Config::Method]
|
1137
|
+
# @return [::Gapic::Config::Method]
|
1138
1138
|
#
|
1139
1139
|
attr_reader :list_project_billing_info
|
1140
1140
|
##
|
1141
1141
|
# RPC-specific configuration for `get_project_billing_info`
|
1142
|
-
# @return [Gapic::Config::Method]
|
1142
|
+
# @return [::Gapic::Config::Method]
|
1143
1143
|
#
|
1144
1144
|
attr_reader :get_project_billing_info
|
1145
1145
|
##
|
1146
1146
|
# RPC-specific configuration for `update_project_billing_info`
|
1147
|
-
# @return [Gapic::Config::Method]
|
1147
|
+
# @return [::Gapic::Config::Method]
|
1148
1148
|
#
|
1149
1149
|
attr_reader :update_project_billing_info
|
1150
1150
|
##
|
1151
1151
|
# RPC-specific configuration for `get_iam_policy`
|
1152
|
-
# @return [Gapic::Config::Method]
|
1152
|
+
# @return [::Gapic::Config::Method]
|
1153
1153
|
#
|
1154
1154
|
attr_reader :get_iam_policy
|
1155
1155
|
##
|
1156
1156
|
# RPC-specific configuration for `set_iam_policy`
|
1157
|
-
# @return [Gapic::Config::Method]
|
1157
|
+
# @return [::Gapic::Config::Method]
|
1158
1158
|
#
|
1159
1159
|
attr_reader :set_iam_policy
|
1160
1160
|
##
|
1161
1161
|
# RPC-specific configuration for `test_iam_permissions`
|
1162
|
-
# @return [Gapic::Config::Method]
|
1162
|
+
# @return [::Gapic::Config::Method]
|
1163
1163
|
#
|
1164
1164
|
attr_reader :test_iam_permissions
|
1165
1165
|
|
1166
1166
|
# @private
|
1167
1167
|
def initialize parent_rpcs = nil
|
1168
1168
|
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
|
1169
|
+
@get_billing_account = ::Gapic::Config::Method.new get_billing_account_config
|
1170
1170
|
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
|
1171
|
+
@list_billing_accounts = ::Gapic::Config::Method.new list_billing_accounts_config
|
1172
1172
|
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
|
1173
|
+
@update_billing_account = ::Gapic::Config::Method.new update_billing_account_config
|
1174
1174
|
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
|
1175
|
+
@create_billing_account = ::Gapic::Config::Method.new create_billing_account_config
|
1176
1176
|
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
|
1177
|
+
@list_project_billing_info = ::Gapic::Config::Method.new list_project_billing_info_config
|
1178
1178
|
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
|
1179
|
+
@get_project_billing_info = ::Gapic::Config::Method.new get_project_billing_info_config
|
1180
1180
|
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
|
1181
|
+
@update_project_billing_info = ::Gapic::Config::Method.new update_project_billing_info_config
|
1182
1182
|
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
|
1183
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1184
1184
|
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
|
1185
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1186
1186
|
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
|
1187
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1188
1188
|
|
1189
1189
|
yield self if block_given?
|
1190
1190
|
end
|