google-cloud-billing-v1 0.3.1 → 0.5.2
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 +48 -1
- data/lib/google-cloud-billing-v1.rb +21 -1
- data/lib/google/cloud/billing/v1.rb +16 -0
- data/lib/google/cloud/billing/v1/cloud_billing.rb +30 -1
- data/lib/google/cloud/billing/v1/cloud_billing/client.rb +303 -308
- 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_catalog.rb +32 -1
- data/lib/google/cloud/billing/v1/cloud_catalog/client.rb +101 -99
- 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/version.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 +21 -20
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +126 -34
- 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 +52 -0
- data/proto_docs/google/type/money.rb +5 -5
- metadata +45 -10
- data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -24,7 +24,7 @@ module Google
|
|
24
24
|
module V1
|
25
25
|
module CloudBilling
|
26
26
|
# Credentials for the CloudBilling API.
|
27
|
-
class Credentials < Google::Auth::Credentials
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
28
|
self.scope = [
|
29
29
|
"https://www.googleapis.com/auth/cloud-platform"
|
30
30
|
]
|
@@ -16,5 +16,36 @@
|
|
16
16
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
|
-
require "
|
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_catalog/credentials"
|
26
|
+
require "google/cloud/billing/v1/cloud_catalog/paths"
|
27
|
+
require "google/cloud/billing/v1/cloud_catalog/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Billing
|
32
|
+
module V1
|
33
|
+
##
|
34
|
+
# A catalog of Google Cloud Platform services and SKUs.
|
35
|
+
# Provides pricing information and metadata on Google Cloud Platform services
|
36
|
+
# and SKUs.
|
37
|
+
#
|
38
|
+
# To load this service and instantiate a client:
|
39
|
+
#
|
40
|
+
# require "google/cloud/billing/v1/cloud_catalog"
|
41
|
+
# client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new
|
42
|
+
#
|
43
|
+
module CloudCatalog
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
helper_path = ::File.join __dir__, "cloud_catalog", "helpers.rb"
|
51
|
+
require "google/cloud/billing/v1/cloud_catalog/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_catalog_pb"
|
26
|
-
require "google/cloud/billing/v1/cloud_catalog/credentials"
|
27
|
-
require "google/cloud/billing/v1/cloud_catalog/paths"
|
28
21
|
|
29
22
|
module Google
|
30
23
|
module Cloud
|
@@ -47,15 +40,15 @@ module Google
|
|
47
40
|
##
|
48
41
|
# Configure the CloudCatalog Client class.
|
49
42
|
#
|
50
|
-
# See {Google::Cloud::Billing::V1::CloudCatalog::Client::Configuration}
|
43
|
+
# See {::Google::Cloud::Billing::V1::CloudCatalog::Client::Configuration}
|
51
44
|
# for a description of the configuration fields.
|
52
45
|
#
|
53
46
|
# ## Example
|
54
47
|
#
|
55
48
|
# To modify the configuration for all CloudCatalog clients:
|
56
49
|
#
|
57
|
-
# Google::Cloud::Billing::V1::CloudCatalog::Client.configure do |config|
|
58
|
-
# config.timeout =
|
50
|
+
# ::Google::Cloud::Billing::V1::CloudCatalog::Client.configure do |config|
|
51
|
+
# config.timeout = 10.0
|
59
52
|
# end
|
60
53
|
#
|
61
54
|
# @yield [config] Configure the Client client.
|
@@ -91,7 +84,7 @@ module Google
|
|
91
84
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
92
85
|
# should be made on {Client.configure}.
|
93
86
|
#
|
94
|
-
# See {Google::Cloud::Billing::V1::CloudCatalog::Client::Configuration}
|
87
|
+
# See {::Google::Cloud::Billing::V1::CloudCatalog::Client::Configuration}
|
95
88
|
# for a description of the configuration fields.
|
96
89
|
#
|
97
90
|
# @yield [config] Configure the Client client.
|
@@ -112,13 +105,13 @@ module Google
|
|
112
105
|
# To create a new CloudCatalog client with the default
|
113
106
|
# configuration:
|
114
107
|
#
|
115
|
-
# client = Google::Cloud::Billing::V1::CloudCatalog::Client.new
|
108
|
+
# client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new
|
116
109
|
#
|
117
110
|
# To create a new CloudCatalog client with a custom
|
118
111
|
# configuration:
|
119
112
|
#
|
120
|
-
# client = Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config|
|
121
|
-
# config.timeout =
|
113
|
+
# client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config|
|
114
|
+
# config.timeout = 10.0
|
122
115
|
# end
|
123
116
|
#
|
124
117
|
# @yield [config] Configure the CloudCatalog client.
|
@@ -143,10 +136,11 @@ module Google
|
|
143
136
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
144
137
|
credentials = Credentials.new credentials, scope: @config.scope
|
145
138
|
end
|
146
|
-
@quota_project_id =
|
139
|
+
@quota_project_id = @config.quota_project
|
140
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
147
141
|
|
148
|
-
@cloud_catalog_stub = Gapic::ServiceStub.new(
|
149
|
-
Google::Cloud::Billing::V1::CloudCatalog::Stub,
|
142
|
+
@cloud_catalog_stub = ::Gapic::ServiceStub.new(
|
143
|
+
::Google::Cloud::Billing::V1::CloudCatalog::Stub,
|
150
144
|
credentials: credentials,
|
151
145
|
endpoint: @config.endpoint,
|
152
146
|
channel_args: @config.channel_args,
|
@@ -160,41 +154,48 @@ module Google
|
|
160
154
|
# Lists all public cloud services.
|
161
155
|
#
|
162
156
|
# @overload list_services(request, options = nil)
|
163
|
-
#
|
164
|
-
#
|
165
|
-
#
|
157
|
+
# Pass arguments to `list_services` via a request object, either of type
|
158
|
+
# {::Google::Cloud::Billing::V1::ListServicesRequest} or an equivalent Hash.
|
159
|
+
#
|
160
|
+
# @param request [::Google::Cloud::Billing::V1::ListServicesRequest, ::Hash]
|
161
|
+
# A request object representing the call parameters. Required. To specify no
|
162
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
163
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
166
164
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
167
165
|
#
|
168
166
|
# @overload list_services(page_size: nil, page_token: nil)
|
169
|
-
#
|
167
|
+
# Pass arguments to `list_services` via keyword arguments. Note that at
|
168
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
169
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
170
|
+
#
|
171
|
+
# @param page_size [::Integer]
|
170
172
|
# Requested page size. Defaults to 5000.
|
171
|
-
# @param page_token [String]
|
173
|
+
# @param page_token [::String]
|
172
174
|
# A token identifying a page of results to return. This should be a
|
173
175
|
# `next_page_token` value returned from a previous `ListServices`
|
174
176
|
# call. If unspecified, the first page of results is returned.
|
175
177
|
#
|
176
|
-
#
|
177
178
|
# @yield [response, operation] Access the result along with the RPC operation
|
178
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
179
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
179
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Service>]
|
180
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
180
181
|
#
|
181
|
-
# @return [Gapic::PagedEnumerable
|
182
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Service>]
|
182
183
|
#
|
183
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
184
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
184
185
|
#
|
185
186
|
def list_services request, options = nil
|
186
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
187
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
187
188
|
|
188
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::ListServicesRequest
|
189
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListServicesRequest
|
189
190
|
|
190
191
|
# Converts hash and nil to an options object
|
191
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
192
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
192
193
|
|
193
194
|
# Customize the options with defaults
|
194
195
|
metadata = @config.rpcs.list_services.metadata.to_h
|
195
196
|
|
196
197
|
# Set x-goog-api-client and x-goog-user-project headers
|
197
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
198
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
198
199
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
199
200
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
200
201
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -206,74 +207,81 @@ module Google
|
|
206
207
|
retry_policy: @config.retry_policy
|
207
208
|
|
208
209
|
@cloud_catalog_stub.call_rpc :list_services, request, options: options do |response, operation|
|
209
|
-
response = Gapic::PagedEnumerable.new @cloud_catalog_stub, :list_services, request, response, operation, options
|
210
|
+
response = ::Gapic::PagedEnumerable.new @cloud_catalog_stub, :list_services, request, response, operation, options
|
210
211
|
yield response, operation if block_given?
|
211
212
|
return response
|
212
213
|
end
|
213
|
-
rescue GRPC::BadStatus => e
|
214
|
-
raise Google::Cloud::Error.from_error(e)
|
214
|
+
rescue ::GRPC::BadStatus => e
|
215
|
+
raise ::Google::Cloud::Error.from_error(e)
|
215
216
|
end
|
216
217
|
|
217
218
|
##
|
218
219
|
# Lists all publicly available SKUs for a given cloud service.
|
219
220
|
#
|
220
221
|
# @overload list_skus(request, options = nil)
|
221
|
-
#
|
222
|
-
#
|
223
|
-
#
|
222
|
+
# Pass arguments to `list_skus` via a request object, either of type
|
223
|
+
# {::Google::Cloud::Billing::V1::ListSkusRequest} or an equivalent Hash.
|
224
|
+
#
|
225
|
+
# @param request [::Google::Cloud::Billing::V1::ListSkusRequest, ::Hash]
|
226
|
+
# A request object representing the call parameters. Required. To specify no
|
227
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
228
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
224
229
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
225
230
|
#
|
226
231
|
# @overload list_skus(parent: nil, start_time: nil, end_time: nil, currency_code: nil, page_size: nil, page_token: nil)
|
227
|
-
#
|
232
|
+
# Pass arguments to `list_skus` via keyword arguments. Note that at
|
233
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
234
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
235
|
+
#
|
236
|
+
# @param parent [::String]
|
228
237
|
# Required. The name of the service.
|
229
238
|
# Example: "services/DA34-426B-A397"
|
230
|
-
# @param start_time [Google::Protobuf::Timestamp
|
239
|
+
# @param start_time [::Google::Protobuf::Timestamp, ::Hash]
|
231
240
|
# Optional inclusive start time of the time range for which the pricing
|
232
241
|
# versions will be returned. Timestamps in the future are not allowed.
|
233
242
|
# The time range has to be within a single calendar month in
|
234
243
|
# America/Los_Angeles timezone. Time range as a whole is optional. If not
|
235
244
|
# specified, the latest pricing will be returned (up to 12 hours old at
|
236
245
|
# most).
|
237
|
-
# @param end_time [Google::Protobuf::Timestamp
|
246
|
+
# @param end_time [::Google::Protobuf::Timestamp, ::Hash]
|
238
247
|
# Optional exclusive end time of the time range for which the pricing
|
239
248
|
# versions will be returned. Timestamps in the future are not allowed.
|
240
249
|
# The time range has to be within a single calendar month in
|
241
250
|
# America/Los_Angeles timezone. Time range as a whole is optional. If not
|
242
251
|
# specified, the latest pricing will be returned (up to 12 hours old at
|
243
252
|
# most).
|
244
|
-
# @param currency_code [String]
|
253
|
+
# @param currency_code [::String]
|
245
254
|
# The ISO 4217 currency code for the pricing info in the response proto.
|
246
255
|
# Will use the conversion rate as of start_time.
|
247
256
|
# Optional. If not specified USD will be used.
|
248
|
-
# @param page_size [Integer]
|
257
|
+
# @param page_size [::Integer]
|
249
258
|
# Requested page size. Defaults to 5000.
|
250
|
-
# @param page_token [String]
|
259
|
+
# @param page_token [::String]
|
251
260
|
# A token identifying a page of results to return. This should be a
|
252
261
|
# `next_page_token` value returned from a previous `ListSkus`
|
253
262
|
# call. If unspecified, the first page of results is returned.
|
254
263
|
#
|
255
|
-
#
|
256
264
|
# @yield [response, operation] Access the result along with the RPC operation
|
257
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
258
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
265
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>]
|
266
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
259
267
|
#
|
260
|
-
# @return [Gapic::PagedEnumerable
|
268
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>]
|
261
269
|
#
|
262
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
270
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
263
271
|
#
|
264
272
|
def list_skus request, options = nil
|
265
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
273
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
266
274
|
|
267
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Billing::V1::ListSkusRequest
|
275
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListSkusRequest
|
268
276
|
|
269
277
|
# Converts hash and nil to an options object
|
270
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
278
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
271
279
|
|
272
280
|
# Customize the options with defaults
|
273
281
|
metadata = @config.rpcs.list_skus.metadata.to_h
|
274
282
|
|
275
283
|
# Set x-goog-api-client and x-goog-user-project headers
|
276
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
284
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
277
285
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
278
286
|
gapic_version: ::Google::Cloud::Billing::V1::VERSION
|
279
287
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -291,12 +299,12 @@ module Google
|
|
291
299
|
retry_policy: @config.retry_policy
|
292
300
|
|
293
301
|
@cloud_catalog_stub.call_rpc :list_skus, request, options: options do |response, operation|
|
294
|
-
response = Gapic::PagedEnumerable.new @cloud_catalog_stub, :list_skus, request, response, operation, options
|
302
|
+
response = ::Gapic::PagedEnumerable.new @cloud_catalog_stub, :list_skus, request, response, operation, options
|
295
303
|
yield response, operation if block_given?
|
296
304
|
return response
|
297
305
|
end
|
298
|
-
rescue GRPC::BadStatus => e
|
299
|
-
raise Google::Cloud::Error.from_error(e)
|
306
|
+
rescue ::GRPC::BadStatus => e
|
307
|
+
raise ::Google::Cloud::Error.from_error(e)
|
300
308
|
end
|
301
309
|
|
302
310
|
##
|
@@ -306,7 +314,7 @@ module Google
|
|
306
314
|
# providing control over timeouts, retry behavior, logging, transport
|
307
315
|
# parameters, and other low-level controls. Certain parameters can also be
|
308
316
|
# applied individually to specific RPCs. See
|
309
|
-
# {Google::Cloud::Billing::V1::CloudCatalog::Client::Configuration::Rpcs}
|
317
|
+
# {::Google::Cloud::Billing::V1::CloudCatalog::Client::Configuration::Rpcs}
|
310
318
|
# for a list of RPCs that can be configured independently.
|
311
319
|
#
|
312
320
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -317,22 +325,22 @@ module Google
|
|
317
325
|
# To modify the global config, setting the timeout for list_services
|
318
326
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
319
327
|
#
|
320
|
-
# Google::Cloud::Billing::V1::CloudCatalog::Client.configure do |config|
|
321
|
-
# config.timeout =
|
322
|
-
# config.rpcs.list_services.timeout =
|
328
|
+
# ::Google::Cloud::Billing::V1::CloudCatalog::Client.configure do |config|
|
329
|
+
# config.timeout = 10.0
|
330
|
+
# config.rpcs.list_services.timeout = 20.0
|
323
331
|
# end
|
324
332
|
#
|
325
333
|
# To apply the above configuration only to a new client:
|
326
334
|
#
|
327
|
-
# client = Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config|
|
328
|
-
# config.timeout =
|
329
|
-
# config.rpcs.list_services.timeout =
|
335
|
+
# client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config|
|
336
|
+
# config.timeout = 10.0
|
337
|
+
# config.rpcs.list_services.timeout = 20.0
|
330
338
|
# end
|
331
339
|
#
|
332
340
|
# @!attribute [rw] endpoint
|
333
341
|
# The hostname or hostname:port of the service endpoint.
|
334
342
|
# Defaults to `"cloudbilling.googleapis.com"`.
|
335
|
-
# @return [String]
|
343
|
+
# @return [::String]
|
336
344
|
# @!attribute [rw] credentials
|
337
345
|
# Credentials to send with calls. You may provide any of the following types:
|
338
346
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -344,29 +352,29 @@ module Google
|
|
344
352
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
345
353
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
346
354
|
# * (`nil`) indicating no credentials
|
347
|
-
# @return [Object]
|
355
|
+
# @return [::Object]
|
348
356
|
# @!attribute [rw] scope
|
349
357
|
# The OAuth scopes
|
350
|
-
# @return [Array
|
358
|
+
# @return [::Array<::String>]
|
351
359
|
# @!attribute [rw] lib_name
|
352
360
|
# The library name as recorded in instrumentation and logging
|
353
|
-
# @return [String]
|
361
|
+
# @return [::String]
|
354
362
|
# @!attribute [rw] lib_version
|
355
363
|
# The library version as recorded in instrumentation and logging
|
356
|
-
# @return [String]
|
364
|
+
# @return [::String]
|
357
365
|
# @!attribute [rw] channel_args
|
358
366
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
359
367
|
# `GRPC::Core::Channel` object is provided as the credential.
|
360
|
-
# @return [Hash]
|
368
|
+
# @return [::Hash]
|
361
369
|
# @!attribute [rw] interceptors
|
362
370
|
# An array of interceptors that are run before calls are executed.
|
363
|
-
# @return [Array
|
371
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
364
372
|
# @!attribute [rw] timeout
|
365
|
-
# The call timeout in
|
366
|
-
# @return [Numeric]
|
373
|
+
# The call timeout in seconds.
|
374
|
+
# @return [::Numeric]
|
367
375
|
# @!attribute [rw] metadata
|
368
376
|
# Additional gRPC headers to be sent with the call.
|
369
|
-
# @return [Hash{Symbol
|
377
|
+
# @return [::Hash{::Symbol=>::String}]
|
370
378
|
# @!attribute [rw] retry_policy
|
371
379
|
# The retry policy. The value is a hash with the following keys:
|
372
380
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -374,25 +382,29 @@ module Google
|
|
374
382
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
375
383
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
376
384
|
# trigger a retry.
|
377
|
-
# @return [Hash]
|
385
|
+
# @return [::Hash]
|
386
|
+
# @!attribute [rw] quota_project
|
387
|
+
# A separate project against which to charge quota.
|
388
|
+
# @return [::String]
|
378
389
|
#
|
379
390
|
class Configuration
|
380
|
-
extend Gapic::Config
|
391
|
+
extend ::Gapic::Config
|
381
392
|
|
382
|
-
config_attr :endpoint,
|
383
|
-
config_attr :credentials,
|
393
|
+
config_attr :endpoint, "cloudbilling.googleapis.com", ::String
|
394
|
+
config_attr :credentials, nil do |value|
|
384
395
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
385
396
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
386
397
|
allowed.any? { |klass| klass === value }
|
387
398
|
end
|
388
|
-
config_attr :scope,
|
389
|
-
config_attr :lib_name,
|
390
|
-
config_attr :lib_version,
|
391
|
-
config_attr(:channel_args,
|
392
|
-
config_attr :interceptors,
|
393
|
-
config_attr :timeout,
|
394
|
-
config_attr :metadata,
|
395
|
-
config_attr :retry_policy,
|
399
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
400
|
+
config_attr :lib_name, nil, ::String, nil
|
401
|
+
config_attr :lib_version, nil, ::String, nil
|
402
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
403
|
+
config_attr :interceptors, nil, ::Array, nil
|
404
|
+
config_attr :timeout, nil, ::Numeric, nil
|
405
|
+
config_attr :metadata, nil, ::Hash, nil
|
406
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
407
|
+
config_attr :quota_project, nil, ::String, nil
|
396
408
|
|
397
409
|
# @private
|
398
410
|
def initialize parent_config = nil
|
@@ -408,7 +420,7 @@ module Google
|
|
408
420
|
def rpcs
|
409
421
|
@rpcs ||= begin
|
410
422
|
parent_rpcs = nil
|
411
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
423
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
412
424
|
Rpcs.new parent_rpcs
|
413
425
|
end
|
414
426
|
end
|
@@ -433,21 +445,21 @@ module Google
|
|
433
445
|
class Rpcs
|
434
446
|
##
|
435
447
|
# RPC-specific configuration for `list_services`
|
436
|
-
# @return [Gapic::Config::Method]
|
448
|
+
# @return [::Gapic::Config::Method]
|
437
449
|
#
|
438
450
|
attr_reader :list_services
|
439
451
|
##
|
440
452
|
# RPC-specific configuration for `list_skus`
|
441
|
-
# @return [Gapic::Config::Method]
|
453
|
+
# @return [::Gapic::Config::Method]
|
442
454
|
#
|
443
455
|
attr_reader :list_skus
|
444
456
|
|
445
457
|
# @private
|
446
458
|
def initialize parent_rpcs = nil
|
447
459
|
list_services_config = parent_rpcs&.list_services if parent_rpcs&.respond_to? :list_services
|
448
|
-
@list_services = Gapic::Config::Method.new list_services_config
|
460
|
+
@list_services = ::Gapic::Config::Method.new list_services_config
|
449
461
|
list_skus_config = parent_rpcs&.list_skus if parent_rpcs&.respond_to? :list_skus
|
450
|
-
@list_skus = Gapic::Config::Method.new list_skus_config
|
462
|
+
@list_skus = ::Gapic::Config::Method.new list_skus_config
|
451
463
|
|
452
464
|
yield self if block_given?
|
453
465
|
end
|
@@ -459,13 +471,3 @@ module Google
|
|
459
471
|
end
|
460
472
|
end
|
461
473
|
end
|
462
|
-
|
463
|
-
# rubocop:disable Lint/HandleExceptions
|
464
|
-
|
465
|
-
# Once client is loaded, load helpers.rb if it exists.
|
466
|
-
begin
|
467
|
-
require "google/cloud/billing/v1/cloud_catalog/helpers"
|
468
|
-
rescue LoadError
|
469
|
-
end
|
470
|
-
|
471
|
-
# rubocop:enable Lint/HandleExceptions
|