google-cloud-billing-v1 0.10.0 → 0.12.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/README.md +3 -3
- data/lib/google/cloud/billing/v1/cloud_billing/client.rb +24 -23
- data/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb +1145 -0
- data/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb +639 -0
- data/lib/google/cloud/billing/v1/cloud_billing/rest.rb +53 -0
- data/lib/google/cloud/billing/v1/cloud_billing.rb +7 -1
- data/lib/google/cloud/billing/v1/cloud_billing_pb.rb +25 -49
- data/lib/google/cloud/billing/v1/cloud_catalog/client.rb +14 -16
- data/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb +452 -0
- data/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb +164 -0
- data/lib/google/cloud/billing/v1/cloud_catalog/rest.rb +54 -0
- data/lib/google/cloud/billing/v1/cloud_catalog.rb +7 -1
- data/lib/google/cloud/billing/v1/cloud_catalog_pb.rb +26 -88
- data/lib/google/cloud/billing/v1/rest.rb +38 -0
- data/lib/google/cloud/billing/v1/version.rb +1 -1
- data/lib/google/cloud/billing/v1.rb +7 -2
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/cloud/billing/v1/cloud_billing.rb +16 -12
- data/proto_docs/google/iam/v1/policy.rb +8 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +16 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75169da47651b8aaf8c1566b0ce1c858d3dcb893d4c7b7eaad691a27c1ec67cc
|
4
|
+
data.tar.gz: 8e7512b59892b697d879c444c718e0aebe07094170cbe57109baaab692b0f3c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d86b0238a45b3b93548827e25839c72fcaa05ad3d7c75953a48fbceb1d08f140af1fc5994259dccb63be22c25032136cd06c129e989afb73afa4ce54d5540350
|
7
|
+
data.tar.gz: 611b877e54c057bdfb756c254543388371085a995dc0af57f984f85998b4f9877ce342f1123694e055a985bedb21a720ffbd8fbb742f6d387a0bdeb31d23590c
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the Billing V1 API
|
2
2
|
|
3
|
-
|
3
|
+
Allows developers to manage billing for their Google Cloud Platform projects programmatically.
|
4
4
|
|
5
5
|
Allows developers to manage billing for their Google Cloud Platform projects programmatically.
|
6
6
|
|
@@ -46,8 +46,8 @@ for general usage information.
|
|
46
46
|
## Enabling Logging
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
49
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -171,7 +171,7 @@ module Google
|
|
171
171
|
credentials = @config.credentials
|
172
172
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
173
173
|
# but only if the default endpoint does not have a region prefix.
|
174
|
-
enable_self_signed_jwt = @config.endpoint ==
|
174
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
175
175
|
!@config.endpoint.split(".").first.include?("-")
|
176
176
|
credentials ||= Credentials.default scope: @config.scope,
|
177
177
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -213,8 +213,8 @@ module Google
|
|
213
213
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
214
214
|
#
|
215
215
|
# @param name [::String]
|
216
|
-
# Required. The resource name of the billing account to retrieve. For
|
217
|
-
# `billingAccounts/012345-567890-ABCDEF`.
|
216
|
+
# Required. The resource name of the billing account to retrieve. For
|
217
|
+
# example, `billingAccounts/012345-567890-ABCDEF`.
|
218
218
|
#
|
219
219
|
# @yield [response, operation] Access the result along with the RPC operation
|
220
220
|
# @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount]
|
@@ -335,13 +335,11 @@ module Google
|
|
335
335
|
# # Call the list_billing_accounts method.
|
336
336
|
# result = client.list_billing_accounts request
|
337
337
|
#
|
338
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
339
|
-
# #
|
340
|
-
#
|
341
|
-
# # methods are also available for managing paging directly.
|
342
|
-
# result.each do |response|
|
338
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
339
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
340
|
+
# result.each do |item|
|
343
341
|
# # Each element is of type ::Google::Cloud::Billing::V1::BillingAccount.
|
344
|
-
# p
|
342
|
+
# p item
|
345
343
|
# end
|
346
344
|
#
|
347
345
|
def list_billing_accounts request, options = nil
|
@@ -404,7 +402,8 @@ module Google
|
|
404
402
|
# @param name [::String]
|
405
403
|
# Required. The name of the billing account resource to be updated.
|
406
404
|
# @param account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash]
|
407
|
-
# Required. The billing account resource to replace the resource on the
|
405
|
+
# Required. The billing account resource to replace the resource on the
|
406
|
+
# server.
|
408
407
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
409
408
|
# The update mask applied to the resource.
|
410
409
|
# Only "display_name" is currently supported.
|
@@ -589,8 +588,9 @@ module Google
|
|
589
588
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
590
589
|
#
|
591
590
|
# @param name [::String]
|
592
|
-
# Required. The resource name of the billing account associated with the
|
593
|
-
# you want to list. For example,
|
591
|
+
# Required. The resource name of the billing account associated with the
|
592
|
+
# projects that you want to list. For example,
|
593
|
+
# `billingAccounts/012345-567890-ABCDEF`.
|
594
594
|
# @param page_size [::Integer]
|
595
595
|
# Requested page size. The maximum page size is 100; this is also the
|
596
596
|
# default.
|
@@ -619,13 +619,11 @@ module Google
|
|
619
619
|
# # Call the list_project_billing_info method.
|
620
620
|
# result = client.list_project_billing_info request
|
621
621
|
#
|
622
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
623
|
-
# #
|
624
|
-
#
|
625
|
-
# # methods are also available for managing paging directly.
|
626
|
-
# result.each do |response|
|
622
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
623
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
624
|
+
# result.each do |item|
|
627
625
|
# # Each element is of type ::Google::Cloud::Billing::V1::ProjectBillingInfo.
|
628
|
-
# p
|
626
|
+
# p item
|
629
627
|
# end
|
630
628
|
#
|
631
629
|
def list_project_billing_info request, options = nil
|
@@ -809,8 +807,9 @@ module Google
|
|
809
807
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
810
808
|
#
|
811
809
|
# @param name [::String]
|
812
|
-
# Required. The resource name of the project associated with the billing
|
813
|
-
# that you want to update. For example,
|
810
|
+
# Required. The resource name of the project associated with the billing
|
811
|
+
# information that you want to update. For example,
|
812
|
+
# `projects/tokyo-rain-123`.
|
814
813
|
# @param project_billing_info [::Google::Cloud::Billing::V1::ProjectBillingInfo, ::Hash]
|
815
814
|
# The new billing information for the project. Read-only fields are ignored;
|
816
815
|
# thus, you can leave empty all fields except `billing_account_name`.
|
@@ -1203,9 +1202,9 @@ module Google
|
|
1203
1202
|
# * (`String`) The path to a service account key file in JSON format
|
1204
1203
|
# * (`Hash`) A service account key as a Hash
|
1205
1204
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1206
|
-
# (see the [googleauth docs](https://
|
1205
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1207
1206
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1208
|
-
# (see the [signet docs](https://
|
1207
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1209
1208
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1210
1209
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1211
1210
|
# * (`nil`) indicating no credentials
|
@@ -1247,7 +1246,9 @@ module Google
|
|
1247
1246
|
class Configuration
|
1248
1247
|
extend ::Gapic::Config
|
1249
1248
|
|
1250
|
-
|
1249
|
+
DEFAULT_ENDPOINT = "cloudbilling.googleapis.com"
|
1250
|
+
|
1251
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1251
1252
|
config_attr :credentials, nil do |value|
|
1252
1253
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1253
1254
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|