google-cloud-billing-v1 0.7.3 → 0.7.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46c8c8e863a00dc969b206aee09d19eefe77abb07fb7f3d521ed494ea6de97d7
4
- data.tar.gz: 3cd826df958c5b9e3d78cd91ef4a2cd72a22c92d639de0e15c136ae63f925132
3
+ metadata.gz: 0cf708f902a606ee63d8f28ebfba9ca908d9e877c778dfe46574b402d825f9fe
4
+ data.tar.gz: 8ff308fc4f0fddc8c959e49822cf44c1bc00448c321338731e84d8988bd00bcd
5
5
  SHA512:
6
- metadata.gz: 6ca396abb04037cbfa1d02932ade35a46c0ece19687d8a3bceee8fdc3716a8754b862267cfd27f3d6da1844ff81411b2f29a59d2ea785dfb9dec75c9e8fb7634
7
- data.tar.gz: 3d5d4bfc42016c1896ba373cc7c14ea4f119a5b60cf4afe4e4d1ae81ce443046a0b7374c3ee7946a3d8d1aba103a50658b41a1f01c114ec4db8b3648e82cea43
6
+ metadata.gz: d14e44b41be9cf707421f39a04cd7bf9bf8a8b42c18bc1b25606577e87e97e1056fc33a4f6c5e73840445260490ac6d54626fd40f2e9307c7aa75417ce5301ad
7
+ data.tar.gz: 4138a3e9122df971de64819bcc059293531d3b16adcb8d466eb15f8428589998f64e68acf8989e3745eaf1288ddf338ea5d0eafec5dea6c92cac5f0c31d9c79f
@@ -223,6 +223,21 @@ module Google
223
223
  #
224
224
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
225
225
  #
226
+ # @example Basic example
227
+ # require "google/cloud/billing/v1"
228
+ #
229
+ # # Create a client object. The client can be reused for multiple calls.
230
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
231
+ #
232
+ # # Create a request. To set request fields, pass in keyword arguments.
233
+ # request = Google::Cloud::Billing::V1::GetBillingAccountRequest.new
234
+ #
235
+ # # Call the get_billing_account method.
236
+ # result = client.get_billing_account request
237
+ #
238
+ # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount.
239
+ # p result
240
+ #
226
241
  def get_billing_account request, options = nil
227
242
  raise ::ArgumentError, "request must be provided" if request.nil?
228
243
 
@@ -240,9 +255,11 @@ module Google
240
255
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
241
256
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
242
257
 
243
- header_params = {
244
- "name" => request.name
245
- }
258
+ header_params = {}
259
+ if request.name
260
+ header_params["name"] = request.name
261
+ end
262
+
246
263
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
247
264
  metadata[:"x-goog-request-params"] ||= request_params_header
248
265
 
@@ -305,6 +322,27 @@ module Google
305
322
  #
306
323
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
307
324
  #
325
+ # @example Basic example
326
+ # require "google/cloud/billing/v1"
327
+ #
328
+ # # Create a client object. The client can be reused for multiple calls.
329
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
330
+ #
331
+ # # Create a request. To set request fields, pass in keyword arguments.
332
+ # request = Google::Cloud::Billing::V1::ListBillingAccountsRequest.new
333
+ #
334
+ # # Call the list_billing_accounts method.
335
+ # result = client.list_billing_accounts request
336
+ #
337
+ # # The returned object is of type Gapic::PagedEnumerable. You can
338
+ # # iterate over all elements by calling #each, and the enumerable
339
+ # # will lazily make API calls to fetch subsequent pages. Other
340
+ # # methods are also available for managing paging directly.
341
+ # result.each do |response|
342
+ # # Each element is of type ::Google::Cloud::Billing::V1::BillingAccount.
343
+ # p response
344
+ # end
345
+ #
308
346
  def list_billing_accounts request, options = nil
309
347
  raise ::ArgumentError, "request must be provided" if request.nil?
310
348
 
@@ -378,6 +416,21 @@ module Google
378
416
  #
379
417
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
380
418
  #
419
+ # @example Basic example
420
+ # require "google/cloud/billing/v1"
421
+ #
422
+ # # Create a client object. The client can be reused for multiple calls.
423
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
424
+ #
425
+ # # Create a request. To set request fields, pass in keyword arguments.
426
+ # request = Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new
427
+ #
428
+ # # Call the update_billing_account method.
429
+ # result = client.update_billing_account request
430
+ #
431
+ # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount.
432
+ # p result
433
+ #
381
434
  def update_billing_account request, options = nil
382
435
  raise ::ArgumentError, "request must be provided" if request.nil?
383
436
 
@@ -395,9 +448,11 @@ module Google
395
448
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
396
449
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
397
450
 
398
- header_params = {
399
- "name" => request.name
400
- }
451
+ header_params = {}
452
+ if request.name
453
+ header_params["name"] = request.name
454
+ end
455
+
401
456
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
402
457
  metadata[:"x-goog-request-params"] ||= request_params_header
403
458
 
@@ -458,6 +513,21 @@ module Google
458
513
  #
459
514
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
460
515
  #
516
+ # @example Basic example
517
+ # require "google/cloud/billing/v1"
518
+ #
519
+ # # Create a client object. The client can be reused for multiple calls.
520
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
521
+ #
522
+ # # Create a request. To set request fields, pass in keyword arguments.
523
+ # request = Google::Cloud::Billing::V1::CreateBillingAccountRequest.new
524
+ #
525
+ # # Call the create_billing_account method.
526
+ # result = client.create_billing_account request
527
+ #
528
+ # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount.
529
+ # p result
530
+ #
461
531
  def create_billing_account request, options = nil
462
532
  raise ::ArgumentError, "request must be provided" if request.nil?
463
533
 
@@ -531,6 +601,27 @@ module Google
531
601
  #
532
602
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
533
603
  #
604
+ # @example Basic example
605
+ # require "google/cloud/billing/v1"
606
+ #
607
+ # # Create a client object. The client can be reused for multiple calls.
608
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
609
+ #
610
+ # # Create a request. To set request fields, pass in keyword arguments.
611
+ # request = Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new
612
+ #
613
+ # # Call the list_project_billing_info method.
614
+ # result = client.list_project_billing_info request
615
+ #
616
+ # # The returned object is of type Gapic::PagedEnumerable. You can
617
+ # # iterate over all elements by calling #each, and the enumerable
618
+ # # will lazily make API calls to fetch subsequent pages. Other
619
+ # # methods are also available for managing paging directly.
620
+ # result.each do |response|
621
+ # # Each element is of type ::Google::Cloud::Billing::V1::ProjectBillingInfo.
622
+ # p response
623
+ # end
624
+ #
534
625
  def list_project_billing_info request, options = nil
535
626
  raise ::ArgumentError, "request must be provided" if request.nil?
536
627
 
@@ -548,9 +639,11 @@ module Google
548
639
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
549
640
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
550
641
 
551
- header_params = {
552
- "name" => request.name
553
- }
642
+ header_params = {}
643
+ if request.name
644
+ header_params["name"] = request.name
645
+ end
646
+
554
647
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
555
648
  metadata[:"x-goog-request-params"] ||= request_params_header
556
649
 
@@ -604,6 +697,21 @@ module Google
604
697
  #
605
698
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
606
699
  #
700
+ # @example Basic example
701
+ # require "google/cloud/billing/v1"
702
+ #
703
+ # # Create a client object. The client can be reused for multiple calls.
704
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
705
+ #
706
+ # # Create a request. To set request fields, pass in keyword arguments.
707
+ # request = Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new
708
+ #
709
+ # # Call the get_project_billing_info method.
710
+ # result = client.get_project_billing_info request
711
+ #
712
+ # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo.
713
+ # p result
714
+ #
607
715
  def get_project_billing_info request, options = nil
608
716
  raise ::ArgumentError, "request must be provided" if request.nil?
609
717
 
@@ -621,9 +729,11 @@ module Google
621
729
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
622
730
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
623
731
 
624
- header_params = {
625
- "name" => request.name
626
- }
732
+ header_params = {}
733
+ if request.name
734
+ header_params["name"] = request.name
735
+ end
736
+
627
737
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
628
738
  metadata[:"x-goog-request-params"] ||= request_params_header
629
739
 
@@ -706,6 +816,21 @@ module Google
706
816
  #
707
817
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
708
818
  #
819
+ # @example Basic example
820
+ # require "google/cloud/billing/v1"
821
+ #
822
+ # # Create a client object. The client can be reused for multiple calls.
823
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
824
+ #
825
+ # # Create a request. To set request fields, pass in keyword arguments.
826
+ # request = Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new
827
+ #
828
+ # # Call the update_project_billing_info method.
829
+ # result = client.update_project_billing_info request
830
+ #
831
+ # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo.
832
+ # p result
833
+ #
709
834
  def update_project_billing_info request, options = nil
710
835
  raise ::ArgumentError, "request must be provided" if request.nil?
711
836
 
@@ -723,9 +848,11 @@ module Google
723
848
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
724
849
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
725
850
 
726
- header_params = {
727
- "name" => request.name
728
- }
851
+ header_params = {}
852
+ if request.name
853
+ header_params["name"] = request.name
854
+ end
855
+
729
856
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
730
857
  metadata[:"x-goog-request-params"] ||= request_params_header
731
858
 
@@ -781,6 +908,21 @@ module Google
781
908
  #
782
909
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
783
910
  #
911
+ # @example Basic example
912
+ # require "google/cloud/billing/v1"
913
+ #
914
+ # # Create a client object. The client can be reused for multiple calls.
915
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
916
+ #
917
+ # # Create a request. To set request fields, pass in keyword arguments.
918
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
919
+ #
920
+ # # Call the get_iam_policy method.
921
+ # result = client.get_iam_policy request
922
+ #
923
+ # # The returned object is of type Google::Iam::V1::Policy.
924
+ # p result
925
+ #
784
926
  def get_iam_policy request, options = nil
785
927
  raise ::ArgumentError, "request must be provided" if request.nil?
786
928
 
@@ -798,9 +940,11 @@ module Google
798
940
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
799
941
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
800
942
 
801
- header_params = {
802
- "resource" => request.resource
803
- }
943
+ header_params = {}
944
+ if request.resource
945
+ header_params["resource"] = request.resource
946
+ end
947
+
804
948
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
805
949
  metadata[:"x-goog-request-params"] ||= request_params_header
806
950
 
@@ -859,6 +1003,21 @@ module Google
859
1003
  #
860
1004
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
861
1005
  #
1006
+ # @example Basic example
1007
+ # require "google/cloud/billing/v1"
1008
+ #
1009
+ # # Create a client object. The client can be reused for multiple calls.
1010
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
1011
+ #
1012
+ # # Create a request. To set request fields, pass in keyword arguments.
1013
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
1014
+ #
1015
+ # # Call the set_iam_policy method.
1016
+ # result = client.set_iam_policy request
1017
+ #
1018
+ # # The returned object is of type Google::Iam::V1::Policy.
1019
+ # p result
1020
+ #
862
1021
  def set_iam_policy request, options = nil
863
1022
  raise ::ArgumentError, "request must be provided" if request.nil?
864
1023
 
@@ -876,9 +1035,11 @@ module Google
876
1035
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
877
1036
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
878
1037
 
879
- header_params = {
880
- "resource" => request.resource
881
- }
1038
+ header_params = {}
1039
+ if request.resource
1040
+ header_params["resource"] = request.resource
1041
+ end
1042
+
882
1043
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
883
1044
  metadata[:"x-goog-request-params"] ||= request_params_header
884
1045
 
@@ -935,6 +1096,21 @@ module Google
935
1096
  #
936
1097
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
937
1098
  #
1099
+ # @example Basic example
1100
+ # require "google/cloud/billing/v1"
1101
+ #
1102
+ # # Create a client object. The client can be reused for multiple calls.
1103
+ # client = Google::Cloud::Billing::V1::CloudBilling::Client.new
1104
+ #
1105
+ # # Create a request. To set request fields, pass in keyword arguments.
1106
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
1107
+ #
1108
+ # # Call the test_iam_permissions method.
1109
+ # result = client.test_iam_permissions request
1110
+ #
1111
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
1112
+ # p result
1113
+ #
938
1114
  def test_iam_permissions request, options = nil
939
1115
  raise ::ArgumentError, "request must be provided" if request.nil?
940
1116
 
@@ -952,9 +1128,11 @@ module Google
952
1128
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
953
1129
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
954
1130
 
955
- header_params = {
956
- "resource" => request.resource
957
- }
1131
+ header_params = {}
1132
+ if request.resource
1133
+ header_params["resource"] = request.resource
1134
+ end
1135
+
958
1136
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
959
1137
  metadata[:"x-goog-request-params"] ||= request_params_header
960
1138
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/billing/v1/cloud_billing.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/iam/v1/iam_policy_pb'
11
9
  require 'google/iam/v1/policy_pb'
12
10
  require 'google/protobuf/field_mask_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/billing/v1/cloud_billing.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.billing.v1.BillingAccount" do
@@ -28,7 +28,7 @@ module Google
28
28
  # Retrieves GCP Console billing accounts and associates them with projects.
29
29
  class Service
30
30
 
31
- include GRPC::GenericService
31
+ include ::GRPC::GenericService
32
32
 
33
33
  self.marshal_class_method = :encode
34
34
  self.unmarshal_class_method = :decode
@@ -183,6 +183,27 @@ module Google
183
183
  #
184
184
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
185
185
  #
186
+ # @example Basic example
187
+ # require "google/cloud/billing/v1"
188
+ #
189
+ # # Create a client object. The client can be reused for multiple calls.
190
+ # client = Google::Cloud::Billing::V1::CloudCatalog::Client.new
191
+ #
192
+ # # Create a request. To set request fields, pass in keyword arguments.
193
+ # request = Google::Cloud::Billing::V1::ListServicesRequest.new
194
+ #
195
+ # # Call the list_services method.
196
+ # result = client.list_services request
197
+ #
198
+ # # The returned object is of type Gapic::PagedEnumerable. You can
199
+ # # iterate over all elements by calling #each, and the enumerable
200
+ # # will lazily make API calls to fetch subsequent pages. Other
201
+ # # methods are also available for managing paging directly.
202
+ # result.each do |response|
203
+ # # Each element is of type ::Google::Cloud::Billing::V1::Service.
204
+ # p response
205
+ # end
206
+ #
186
207
  def list_services request, options = nil
187
208
  raise ::ArgumentError, "request must be provided" if request.nil?
188
209
 
@@ -271,6 +292,27 @@ module Google
271
292
  #
272
293
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
273
294
  #
295
+ # @example Basic example
296
+ # require "google/cloud/billing/v1"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::Billing::V1::CloudCatalog::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Billing::V1::ListSkusRequest.new
303
+ #
304
+ # # Call the list_skus method.
305
+ # result = client.list_skus request
306
+ #
307
+ # # The returned object is of type Gapic::PagedEnumerable. You can
308
+ # # iterate over all elements by calling #each, and the enumerable
309
+ # # will lazily make API calls to fetch subsequent pages. Other
310
+ # # methods are also available for managing paging directly.
311
+ # result.each do |response|
312
+ # # Each element is of type ::Google::Cloud::Billing::V1::Sku.
313
+ # p response
314
+ # end
315
+ #
274
316
  def list_skus request, options = nil
275
317
  raise ::ArgumentError, "request must be provided" if request.nil?
276
318
 
@@ -288,9 +330,11 @@ module Google
288
330
  gapic_version: ::Google::Cloud::Billing::V1::VERSION
289
331
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
290
332
 
291
- header_params = {
292
- "parent" => request.parent
293
- }
333
+ header_params = {}
334
+ if request.parent
335
+ header_params["parent"] = request.parent
336
+ end
337
+
294
338
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
295
339
  metadata[:"x-goog-request-params"] ||= request_params_header
296
340
 
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/billing/v1/cloud_catalog.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
9
7
  require 'google/api/resource_pb'
10
8
  require 'google/protobuf/timestamp_pb'
11
9
  require 'google/type/money_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/billing/v1/cloud_catalog.proto", :syntax => :proto3) do
14
14
  add_message "google.cloud.billing.v1.Service" do
@@ -30,7 +30,7 @@ module Google
30
30
  # and SKUs.
31
31
  class Service
32
32
 
33
- include GRPC::GenericService
33
+ include ::GRPC::GenericService
34
34
 
35
35
  self.marshal_class_method = :encode
36
36
  self.unmarshal_class_method = :decode
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Billing
23
23
  module V1
24
- VERSION = "0.7.3"
24
+ VERSION = "0.7.4"
25
25
  end
26
26
  end
27
27
  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.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-11 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common