google-cloud-billing-v1 0.15.1 → 0.17.0
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 +72 -101
- data/lib/google/cloud/billing/v1/cloud_billing/client.rb +150 -12
- data/lib/google/cloud/billing/v1/cloud_billing/paths.rb +40 -4
- data/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb +145 -11
- data/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb +112 -2
- data/lib/google/cloud/billing/v1/cloud_billing_pb.rb +2 -1
- data/lib/google/cloud/billing/v1/cloud_billing_services_pb.rb +4 -1
- data/lib/google/cloud/billing/v1/cloud_catalog/client.rb +31 -8
- data/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb +33 -7
- data/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb +14 -2
- data/lib/google/cloud/billing/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/billing/v1/cloud_billing.rb +45 -1
- metadata +5 -5
@@ -34,6 +34,9 @@ module Google
|
|
34
34
|
# and SKUs.
|
35
35
|
#
|
36
36
|
class Client
|
37
|
+
# @private
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "cloudbilling.$UNIVERSE_DOMAIN$"
|
39
|
+
|
37
40
|
include Paths
|
38
41
|
|
39
42
|
# @private
|
@@ -98,6 +101,15 @@ module Google
|
|
98
101
|
@config
|
99
102
|
end
|
100
103
|
|
104
|
+
##
|
105
|
+
# The effective universe domain
|
106
|
+
#
|
107
|
+
# @return [String]
|
108
|
+
#
|
109
|
+
def universe_domain
|
110
|
+
@cloud_catalog_stub.universe_domain
|
111
|
+
end
|
112
|
+
|
101
113
|
##
|
102
114
|
# Create a new CloudCatalog REST client object.
|
103
115
|
#
|
@@ -125,8 +137,9 @@ module Google
|
|
125
137
|
credentials = @config.credentials
|
126
138
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
127
139
|
# but only if the default endpoint does not have a region prefix.
|
128
|
-
enable_self_signed_jwt = @config.endpoint
|
129
|
-
|
140
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
141
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
142
|
+
!@config.endpoint.split(".").first.include?("-"))
|
130
143
|
credentials ||= Credentials.default scope: @config.scope,
|
131
144
|
enable_self_signed_jwt: enable_self_signed_jwt
|
132
145
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -136,7 +149,12 @@ module Google
|
|
136
149
|
@quota_project_id = @config.quota_project
|
137
150
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
138
151
|
|
139
|
-
@cloud_catalog_stub = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ServiceStub.new
|
152
|
+
@cloud_catalog_stub = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ServiceStub.new(
|
153
|
+
endpoint: @config.endpoint,
|
154
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
155
|
+
universe_domain: @config.universe_domain,
|
156
|
+
credentials: credentials
|
157
|
+
)
|
140
158
|
end
|
141
159
|
|
142
160
|
# Service calls
|
@@ -366,9 +384,9 @@ module Google
|
|
366
384
|
# end
|
367
385
|
#
|
368
386
|
# @!attribute [rw] endpoint
|
369
|
-
#
|
370
|
-
#
|
371
|
-
# @return [::String]
|
387
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
388
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
389
|
+
# @return [::String,nil]
|
372
390
|
# @!attribute [rw] credentials
|
373
391
|
# Credentials to send with calls. You may provide any of the following types:
|
374
392
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -405,13 +423,20 @@ module Google
|
|
405
423
|
# @!attribute [rw] quota_project
|
406
424
|
# A separate project against which to charge quota.
|
407
425
|
# @return [::String]
|
426
|
+
# @!attribute [rw] universe_domain
|
427
|
+
# The universe domain within which to make requests. This determines the
|
428
|
+
# default endpoint URL. The default value of nil uses the environment
|
429
|
+
# universe (usually the default "googleapis.com" universe).
|
430
|
+
# @return [::String,nil]
|
408
431
|
#
|
409
432
|
class Configuration
|
410
433
|
extend ::Gapic::Config
|
411
434
|
|
435
|
+
# @private
|
436
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
412
437
|
DEFAULT_ENDPOINT = "cloudbilling.googleapis.com"
|
413
438
|
|
414
|
-
config_attr :endpoint,
|
439
|
+
config_attr :endpoint, nil, ::String, nil
|
415
440
|
config_attr :credentials, nil do |value|
|
416
441
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
417
442
|
allowed.any? { |klass| klass === value }
|
@@ -423,6 +448,7 @@ module Google
|
|
423
448
|
config_attr :metadata, nil, ::Hash, nil
|
424
449
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
425
450
|
config_attr :quota_project, nil, ::String, nil
|
451
|
+
config_attr :universe_domain, nil, ::String, nil
|
426
452
|
|
427
453
|
# @private
|
428
454
|
def initialize parent_config = nil
|
@@ -30,16 +30,28 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
def initialize endpoint:, credentials:
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
34
34
|
# These require statements are intentionally placed here to initialize
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
endpoint_template: endpoint_template,
|
40
|
+
universe_domain: universe_domain,
|
41
|
+
credentials: credentials,
|
39
42
|
numeric_enums: true,
|
40
43
|
raise_faraday_errors: false
|
41
44
|
end
|
42
45
|
|
46
|
+
##
|
47
|
+
# The effective universe domain
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
def universe_domain
|
52
|
+
@client_stub.universe_domain
|
53
|
+
end
|
54
|
+
|
43
55
|
##
|
44
56
|
# Baseline implementation for the list_services REST call
|
45
57
|
#
|
@@ -21,6 +21,7 @@ module Google
|
|
21
21
|
module Api
|
22
22
|
# Required information for every language.
|
23
23
|
# @!attribute [rw] reference_docs_uri
|
24
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
24
25
|
# @return [::String]
|
25
26
|
# Link to automatically generated reference documentation. Example:
|
26
27
|
# https://cloud.google.com/nodejs/docs/reference/asset/latest
|
@@ -304,6 +305,19 @@ module Google
|
|
304
305
|
# seconds: 360 # 6 minutes
|
305
306
|
# total_poll_timeout:
|
306
307
|
# seconds: 54000 # 90 minutes
|
308
|
+
# @!attribute [rw] auto_populated_fields
|
309
|
+
# @return [::Array<::String>]
|
310
|
+
# List of top-level fields of the request message, that should be
|
311
|
+
# automatically populated by the client libraries based on their
|
312
|
+
# (google.api.field_info).format. Currently supported format: UUID4.
|
313
|
+
#
|
314
|
+
# Example of a YAML configuration:
|
315
|
+
#
|
316
|
+
# publishing:
|
317
|
+
# method_settings:
|
318
|
+
# - selector: google.example.v1.ExampleService.CreateExample
|
319
|
+
# auto_populated_fields:
|
320
|
+
# - request_id
|
307
321
|
class MethodSettings
|
308
322
|
include ::Google::Protobuf::MessageExts
|
309
323
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -47,6 +47,16 @@ module Google
|
|
47
47
|
# will be the resource name of the parent billing account that it is being
|
48
48
|
# resold through.
|
49
49
|
# Otherwise this will be empty.
|
50
|
+
# @!attribute [r] parent
|
51
|
+
# @return [::String]
|
52
|
+
# Output only. The billing account's parent resource identifier.
|
53
|
+
# Use the `MoveBillingAccount` method to update the account's parent resource
|
54
|
+
# if it is a organization.
|
55
|
+
# Format:
|
56
|
+
# - `organizations/{organization_id}`, for example,
|
57
|
+
# `organizations/12345678`
|
58
|
+
# - `billingAccounts/{billing_account_id}`, for example,
|
59
|
+
# `billingAccounts/012345-567890-ABCDEF`
|
50
60
|
class BillingAccount
|
51
61
|
include ::Google::Protobuf::MessageExts
|
52
62
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -107,8 +117,17 @@ module Google
|
|
107
117
|
# This only supports filtering for
|
108
118
|
# [subaccounts](https://cloud.google.com/billing/docs/concepts) under a
|
109
119
|
# single provided parent billing account.
|
110
|
-
# (
|
120
|
+
# (for example,
|
121
|
+
# `master_billing_account=billingAccounts/012345-678901-ABCDEF`).
|
111
122
|
# Boolean algebra and other fields are not currently supported.
|
123
|
+
# @!attribute [rw] parent
|
124
|
+
# @return [::String]
|
125
|
+
# Optional. The parent resource to list billing accounts from.
|
126
|
+
# Format:
|
127
|
+
# - `organizations/{organization_id}`, for example,
|
128
|
+
# `organizations/12345678`
|
129
|
+
# - `billingAccounts/{billing_account_id}`, for example,
|
130
|
+
# `billingAccounts/012345-567890-ABCDEF`
|
112
131
|
class ListBillingAccountsRequest
|
113
132
|
include ::Google::Protobuf::MessageExts
|
114
133
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -135,6 +154,14 @@ module Google
|
|
135
154
|
# Currently CreateBillingAccount only supports subaccount creation, so
|
136
155
|
# any created billing accounts must be under a provided parent billing
|
137
156
|
# account.
|
157
|
+
# @!attribute [rw] parent
|
158
|
+
# @return [::String]
|
159
|
+
# Optional. The parent to create a billing account from.
|
160
|
+
# Format:
|
161
|
+
# - `organizations/{organization_id}`, for example,
|
162
|
+
# `organizations/12345678`
|
163
|
+
# - `billingAccounts/{billing_account_id}`, for example,
|
164
|
+
# `billingAccounts/012345-567890-ABCDEF`
|
138
165
|
class CreateBillingAccountRequest
|
139
166
|
include ::Google::Protobuf::MessageExts
|
140
167
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -217,6 +244,23 @@ module Google
|
|
217
244
|
include ::Google::Protobuf::MessageExts
|
218
245
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
219
246
|
end
|
247
|
+
|
248
|
+
# Request message for `MoveBillingAccount` RPC.
|
249
|
+
# @!attribute [rw] name
|
250
|
+
# @return [::String]
|
251
|
+
# Required. The resource name of the billing account to move.
|
252
|
+
# Must be of the form `billingAccounts/{billing_account_id}`.
|
253
|
+
# The specified billing account cannot be a subaccount, since a subaccount
|
254
|
+
# always belongs to the same organization as its parent account.
|
255
|
+
# @!attribute [rw] destination_parent
|
256
|
+
# @return [::String]
|
257
|
+
# Required. The resource name of the Organization to reparent
|
258
|
+
# the billing account under.
|
259
|
+
# Must be of the form `organizations/{organization_id}`.
|
260
|
+
class MoveBillingAccountRequest
|
261
|
+
include ::Google::Protobuf::MessageExts
|
262
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
263
|
+
end
|
220
264
|
end
|
221
265
|
end
|
222
266
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-billing-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.21.1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.21.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
239
|
- !ruby/object:Gem::Version
|
240
240
|
version: '0'
|
241
241
|
requirements: []
|
242
|
-
rubygems_version: 3.
|
242
|
+
rubygems_version: 3.5.3
|
243
243
|
signing_key:
|
244
244
|
specification_version: 4
|
245
245
|
summary: Allows developers to manage billing for their Google Cloud Platform projects
|