google-cloud-bigquery-reservation-v1 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f40ed2d914c5c6cbe86653c0b5be4d2dfceea516b00399a456de06d4fa4267db
4
- data.tar.gz: 7e65142bac2c1705cad029bb7725e71ac6e51f8a65f9e4a09c42f208dcfc5a2d
3
+ metadata.gz: 3cbf765f55b385d57d78df6ee03d94926125269badf4316365a3f24f4e3e9e81
4
+ data.tar.gz: 1e478f1588ce6838ea125b06a22c84359b2c6802d912fbcc94b7de6a7d5e2e7c
5
5
  SHA512:
6
- metadata.gz: 0f98d554bd713ed30bf7f99079ff295b552708dd03846257b389a3805f4fbed5e470369b6fc4d9e9cf3d5ab35b3b6a2a6ba540fb1d5c98c38ff2687eba378612
7
- data.tar.gz: 4b742a4c8b70b16e3d8754456d26d9ac42d37a024dbabe274a421382d45f388ac2a93e83716efd7c8065a6c5c258f96aa0042f945305ec92a34d26095bbb7d16
6
+ metadata.gz: fdc7b8174922325541b8405e7418dff7aae3fb4fdecd5ebf837f6a1828d9338fb3766eed22718fe9675e691fb9fb423edc0dcaf47a8ed0dff77f92067ad8c6bc
7
+ data.tar.gz: fa6c5c6612d23f4329503614b89124745c3c02cb8ffb54eddffd96ccc3ecd1c76a59e0d72ceb799cb26d60d87c164894af8ae030ac39f7600ae2267b14d39b0d
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/bigquery/reservation/v1/reservation.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'
@@ -11,6 +9,8 @@ require 'google/protobuf/empty_pb'
11
9
  require 'google/protobuf/field_mask_pb'
12
10
  require 'google/protobuf/timestamp_pb'
13
11
  require 'google/rpc/status_pb'
12
+ require 'google/protobuf'
13
+
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_file("google/cloud/bigquery/reservation/v1/reservation.proto", :syntax => :proto3) do
16
16
  add_message "google.cloud.bigquery.reservation.v1.Reservation" do
@@ -262,6 +262,21 @@ module Google
262
262
  #
263
263
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
264
264
  #
265
+ # @example Basic example
266
+ # require "google/cloud/bigquery/reservation/v1"
267
+ #
268
+ # # Create a client object. The client can be reused for multiple calls.
269
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
270
+ #
271
+ # # Create a request. To set request fields, pass in keyword arguments.
272
+ # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new
273
+ #
274
+ # # Call the create_reservation method.
275
+ # result = client.create_reservation request
276
+ #
277
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation.
278
+ # p result
279
+ #
265
280
  def create_reservation request, options = nil
266
281
  raise ::ArgumentError, "request must be provided" if request.nil?
267
282
 
@@ -279,9 +294,11 @@ module Google
279
294
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
280
295
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
281
296
 
282
- header_params = {
283
- "parent" => request.parent
284
- }
297
+ header_params = {}
298
+ if request.parent
299
+ header_params["parent"] = request.parent
300
+ end
301
+
285
302
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
286
303
  metadata[:"x-goog-request-params"] ||= request_params_header
287
304
 
@@ -335,6 +352,27 @@ module Google
335
352
  #
336
353
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
337
354
  #
355
+ # @example Basic example
356
+ # require "google/cloud/bigquery/reservation/v1"
357
+ #
358
+ # # Create a client object. The client can be reused for multiple calls.
359
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
360
+ #
361
+ # # Create a request. To set request fields, pass in keyword arguments.
362
+ # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new
363
+ #
364
+ # # Call the list_reservations method.
365
+ # result = client.list_reservations request
366
+ #
367
+ # # The returned object is of type Gapic::PagedEnumerable. You can
368
+ # # iterate over all elements by calling #each, and the enumerable
369
+ # # will lazily make API calls to fetch subsequent pages. Other
370
+ # # methods are also available for managing paging directly.
371
+ # result.each do |response|
372
+ # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Reservation.
373
+ # p response
374
+ # end
375
+ #
338
376
  def list_reservations request, options = nil
339
377
  raise ::ArgumentError, "request must be provided" if request.nil?
340
378
 
@@ -352,9 +390,11 @@ module Google
352
390
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
353
391
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
354
392
 
355
- header_params = {
356
- "parent" => request.parent
357
- }
393
+ header_params = {}
394
+ if request.parent
395
+ header_params["parent"] = request.parent
396
+ end
397
+
358
398
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
359
399
  metadata[:"x-goog-request-params"] ||= request_params_header
360
400
 
@@ -405,6 +445,21 @@ module Google
405
445
  #
406
446
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
407
447
  #
448
+ # @example Basic example
449
+ # require "google/cloud/bigquery/reservation/v1"
450
+ #
451
+ # # Create a client object. The client can be reused for multiple calls.
452
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
453
+ #
454
+ # # Create a request. To set request fields, pass in keyword arguments.
455
+ # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new
456
+ #
457
+ # # Call the get_reservation method.
458
+ # result = client.get_reservation request
459
+ #
460
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation.
461
+ # p result
462
+ #
408
463
  def get_reservation request, options = nil
409
464
  raise ::ArgumentError, "request must be provided" if request.nil?
410
465
 
@@ -422,9 +477,11 @@ module Google
422
477
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
423
478
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
424
479
 
425
- header_params = {
426
- "name" => request.name
427
- }
480
+ header_params = {}
481
+ if request.name
482
+ header_params["name"] = request.name
483
+ end
484
+
428
485
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
429
486
  metadata[:"x-goog-request-params"] ||= request_params_header
430
487
 
@@ -476,6 +533,21 @@ module Google
476
533
  #
477
534
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
478
535
  #
536
+ # @example Basic example
537
+ # require "google/cloud/bigquery/reservation/v1"
538
+ #
539
+ # # Create a client object. The client can be reused for multiple calls.
540
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
541
+ #
542
+ # # Create a request. To set request fields, pass in keyword arguments.
543
+ # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new
544
+ #
545
+ # # Call the delete_reservation method.
546
+ # result = client.delete_reservation request
547
+ #
548
+ # # The returned object is of type Google::Protobuf::Empty.
549
+ # p result
550
+ #
479
551
  def delete_reservation request, options = nil
480
552
  raise ::ArgumentError, "request must be provided" if request.nil?
481
553
 
@@ -493,9 +565,11 @@ module Google
493
565
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
494
566
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
495
567
 
496
- header_params = {
497
- "name" => request.name
498
- }
568
+ header_params = {}
569
+ if request.name
570
+ header_params["name"] = request.name
571
+ end
572
+
499
573
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
500
574
  metadata[:"x-goog-request-params"] ||= request_params_header
501
575
 
@@ -546,6 +620,21 @@ module Google
546
620
  #
547
621
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
548
622
  #
623
+ # @example Basic example
624
+ # require "google/cloud/bigquery/reservation/v1"
625
+ #
626
+ # # Create a client object. The client can be reused for multiple calls.
627
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
628
+ #
629
+ # # Create a request. To set request fields, pass in keyword arguments.
630
+ # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new
631
+ #
632
+ # # Call the update_reservation method.
633
+ # result = client.update_reservation request
634
+ #
635
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation.
636
+ # p result
637
+ #
549
638
  def update_reservation request, options = nil
550
639
  raise ::ArgumentError, "request must be provided" if request.nil?
551
640
 
@@ -563,9 +652,11 @@ module Google
563
652
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
564
653
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
565
654
 
566
- header_params = {
567
- "reservation.name" => request.reservation.name
568
- }
655
+ header_params = {}
656
+ if request.reservation&.name
657
+ header_params["reservation.name"] = request.reservation.name
658
+ end
659
+
569
660
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
570
661
  metadata[:"x-goog-request-params"] ||= request_params_header
571
662
 
@@ -626,6 +717,21 @@ module Google
626
717
  #
627
718
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
628
719
  #
720
+ # @example Basic example
721
+ # require "google/cloud/bigquery/reservation/v1"
722
+ #
723
+ # # Create a client object. The client can be reused for multiple calls.
724
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
725
+ #
726
+ # # Create a request. To set request fields, pass in keyword arguments.
727
+ # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new
728
+ #
729
+ # # Call the create_capacity_commitment method.
730
+ # result = client.create_capacity_commitment request
731
+ #
732
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.
733
+ # p result
734
+ #
629
735
  def create_capacity_commitment request, options = nil
630
736
  raise ::ArgumentError, "request must be provided" if request.nil?
631
737
 
@@ -643,9 +749,11 @@ module Google
643
749
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
644
750
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
645
751
 
646
- header_params = {
647
- "parent" => request.parent
648
- }
752
+ header_params = {}
753
+ if request.parent
754
+ header_params["parent"] = request.parent
755
+ end
756
+
649
757
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
650
758
  metadata[:"x-goog-request-params"] ||= request_params_header
651
759
 
@@ -699,6 +807,27 @@ module Google
699
807
  #
700
808
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
701
809
  #
810
+ # @example Basic example
811
+ # require "google/cloud/bigquery/reservation/v1"
812
+ #
813
+ # # Create a client object. The client can be reused for multiple calls.
814
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
815
+ #
816
+ # # Create a request. To set request fields, pass in keyword arguments.
817
+ # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new
818
+ #
819
+ # # Call the list_capacity_commitments method.
820
+ # result = client.list_capacity_commitments request
821
+ #
822
+ # # The returned object is of type Gapic::PagedEnumerable. You can
823
+ # # iterate over all elements by calling #each, and the enumerable
824
+ # # will lazily make API calls to fetch subsequent pages. Other
825
+ # # methods are also available for managing paging directly.
826
+ # result.each do |response|
827
+ # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.
828
+ # p response
829
+ # end
830
+ #
702
831
  def list_capacity_commitments request, options = nil
703
832
  raise ::ArgumentError, "request must be provided" if request.nil?
704
833
 
@@ -716,9 +845,11 @@ module Google
716
845
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
717
846
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
718
847
 
719
- header_params = {
720
- "parent" => request.parent
721
- }
848
+ header_params = {}
849
+ if request.parent
850
+ header_params["parent"] = request.parent
851
+ end
852
+
722
853
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
723
854
  metadata[:"x-goog-request-params"] ||= request_params_header
724
855
 
@@ -769,6 +900,21 @@ module Google
769
900
  #
770
901
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
771
902
  #
903
+ # @example Basic example
904
+ # require "google/cloud/bigquery/reservation/v1"
905
+ #
906
+ # # Create a client object. The client can be reused for multiple calls.
907
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
908
+ #
909
+ # # Create a request. To set request fields, pass in keyword arguments.
910
+ # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new
911
+ #
912
+ # # Call the get_capacity_commitment method.
913
+ # result = client.get_capacity_commitment request
914
+ #
915
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.
916
+ # p result
917
+ #
772
918
  def get_capacity_commitment request, options = nil
773
919
  raise ::ArgumentError, "request must be provided" if request.nil?
774
920
 
@@ -786,9 +932,11 @@ module Google
786
932
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
787
933
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
788
934
 
789
- header_params = {
790
- "name" => request.name
791
- }
935
+ header_params = {}
936
+ if request.name
937
+ header_params["name"] = request.name
938
+ end
939
+
792
940
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
793
941
  metadata[:"x-goog-request-params"] ||= request_params_header
794
942
 
@@ -844,6 +992,21 @@ module Google
844
992
  #
845
993
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
846
994
  #
995
+ # @example Basic example
996
+ # require "google/cloud/bigquery/reservation/v1"
997
+ #
998
+ # # Create a client object. The client can be reused for multiple calls.
999
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1000
+ #
1001
+ # # Create a request. To set request fields, pass in keyword arguments.
1002
+ # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new
1003
+ #
1004
+ # # Call the delete_capacity_commitment method.
1005
+ # result = client.delete_capacity_commitment request
1006
+ #
1007
+ # # The returned object is of type Google::Protobuf::Empty.
1008
+ # p result
1009
+ #
847
1010
  def delete_capacity_commitment request, options = nil
848
1011
  raise ::ArgumentError, "request must be provided" if request.nil?
849
1012
 
@@ -861,9 +1024,11 @@ module Google
861
1024
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
862
1025
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
863
1026
 
864
- header_params = {
865
- "name" => request.name
866
- }
1027
+ header_params = {}
1028
+ if request.name
1029
+ header_params["name"] = request.name
1030
+ end
1031
+
867
1032
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
868
1033
  metadata[:"x-goog-request-params"] ||= request_params_header
869
1034
 
@@ -920,6 +1085,21 @@ module Google
920
1085
  #
921
1086
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
922
1087
  #
1088
+ # @example Basic example
1089
+ # require "google/cloud/bigquery/reservation/v1"
1090
+ #
1091
+ # # Create a client object. The client can be reused for multiple calls.
1092
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1093
+ #
1094
+ # # Create a request. To set request fields, pass in keyword arguments.
1095
+ # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new
1096
+ #
1097
+ # # Call the update_capacity_commitment method.
1098
+ # result = client.update_capacity_commitment request
1099
+ #
1100
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.
1101
+ # p result
1102
+ #
923
1103
  def update_capacity_commitment request, options = nil
924
1104
  raise ::ArgumentError, "request must be provided" if request.nil?
925
1105
 
@@ -937,9 +1117,11 @@ module Google
937
1117
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
938
1118
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
939
1119
 
940
- header_params = {
941
- "capacity_commitment.name" => request.capacity_commitment.name
942
- }
1120
+ header_params = {}
1121
+ if request.capacity_commitment&.name
1122
+ header_params["capacity_commitment.name"] = request.capacity_commitment.name
1123
+ end
1124
+
943
1125
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
944
1126
  metadata[:"x-goog-request-params"] ||= request_params_header
945
1127
 
@@ -998,6 +1180,21 @@ module Google
998
1180
  #
999
1181
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1000
1182
  #
1183
+ # @example Basic example
1184
+ # require "google/cloud/bigquery/reservation/v1"
1185
+ #
1186
+ # # Create a client object. The client can be reused for multiple calls.
1187
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1188
+ #
1189
+ # # Create a request. To set request fields, pass in keyword arguments.
1190
+ # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new
1191
+ #
1192
+ # # Call the split_capacity_commitment method.
1193
+ # result = client.split_capacity_commitment request
1194
+ #
1195
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.
1196
+ # p result
1197
+ #
1001
1198
  def split_capacity_commitment request, options = nil
1002
1199
  raise ::ArgumentError, "request must be provided" if request.nil?
1003
1200
 
@@ -1015,9 +1212,11 @@ module Google
1015
1212
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1016
1213
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1017
1214
 
1018
- header_params = {
1019
- "name" => request.name
1020
- }
1215
+ header_params = {}
1216
+ if request.name
1217
+ header_params["name"] = request.name
1218
+ end
1219
+
1021
1220
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1022
1221
  metadata[:"x-goog-request-params"] ||= request_params_header
1023
1222
 
@@ -1079,6 +1278,21 @@ module Google
1079
1278
  #
1080
1279
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1081
1280
  #
1281
+ # @example Basic example
1282
+ # require "google/cloud/bigquery/reservation/v1"
1283
+ #
1284
+ # # Create a client object. The client can be reused for multiple calls.
1285
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1286
+ #
1287
+ # # Create a request. To set request fields, pass in keyword arguments.
1288
+ # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new
1289
+ #
1290
+ # # Call the merge_capacity_commitments method.
1291
+ # result = client.merge_capacity_commitments request
1292
+ #
1293
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.
1294
+ # p result
1295
+ #
1082
1296
  def merge_capacity_commitments request, options = nil
1083
1297
  raise ::ArgumentError, "request must be provided" if request.nil?
1084
1298
 
@@ -1096,9 +1310,11 @@ module Google
1096
1310
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1097
1311
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1098
1312
 
1099
- header_params = {
1100
- "parent" => request.parent
1101
- }
1313
+ header_params = {}
1314
+ if request.parent
1315
+ header_params["parent"] = request.parent
1316
+ end
1317
+
1102
1318
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1103
1319
  metadata[:"x-goog-request-params"] ||= request_params_header
1104
1320
 
@@ -1189,6 +1405,21 @@ module Google
1189
1405
  #
1190
1406
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1191
1407
  #
1408
+ # @example Basic example
1409
+ # require "google/cloud/bigquery/reservation/v1"
1410
+ #
1411
+ # # Create a client object. The client can be reused for multiple calls.
1412
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1413
+ #
1414
+ # # Create a request. To set request fields, pass in keyword arguments.
1415
+ # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new
1416
+ #
1417
+ # # Call the create_assignment method.
1418
+ # result = client.create_assignment request
1419
+ #
1420
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment.
1421
+ # p result
1422
+ #
1192
1423
  def create_assignment request, options = nil
1193
1424
  raise ::ArgumentError, "request must be provided" if request.nil?
1194
1425
 
@@ -1206,9 +1437,11 @@ module Google
1206
1437
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1207
1438
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1208
1439
 
1209
- header_params = {
1210
- "parent" => request.parent
1211
- }
1440
+ header_params = {}
1441
+ if request.parent
1442
+ header_params["parent"] = request.parent
1443
+ end
1444
+
1212
1445
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1213
1446
  metadata[:"x-goog-request-params"] ||= request_params_header
1214
1447
 
@@ -1287,6 +1520,27 @@ module Google
1287
1520
  #
1288
1521
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1289
1522
  #
1523
+ # @example Basic example
1524
+ # require "google/cloud/bigquery/reservation/v1"
1525
+ #
1526
+ # # Create a client object. The client can be reused for multiple calls.
1527
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1528
+ #
1529
+ # # Create a request. To set request fields, pass in keyword arguments.
1530
+ # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new
1531
+ #
1532
+ # # Call the list_assignments method.
1533
+ # result = client.list_assignments request
1534
+ #
1535
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1536
+ # # iterate over all elements by calling #each, and the enumerable
1537
+ # # will lazily make API calls to fetch subsequent pages. Other
1538
+ # # methods are also available for managing paging directly.
1539
+ # result.each do |response|
1540
+ # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment.
1541
+ # p response
1542
+ # end
1543
+ #
1290
1544
  def list_assignments request, options = nil
1291
1545
  raise ::ArgumentError, "request must be provided" if request.nil?
1292
1546
 
@@ -1304,9 +1558,11 @@ module Google
1304
1558
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1305
1559
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1306
1560
 
1307
- header_params = {
1308
- "parent" => request.parent
1309
- }
1561
+ header_params = {}
1562
+ if request.parent
1563
+ header_params["parent"] = request.parent
1564
+ end
1565
+
1310
1566
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1311
1567
  metadata[:"x-goog-request-params"] ||= request_params_header
1312
1568
 
@@ -1371,6 +1627,21 @@ module Google
1371
1627
  #
1372
1628
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1373
1629
  #
1630
+ # @example Basic example
1631
+ # require "google/cloud/bigquery/reservation/v1"
1632
+ #
1633
+ # # Create a client object. The client can be reused for multiple calls.
1634
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1635
+ #
1636
+ # # Create a request. To set request fields, pass in keyword arguments.
1637
+ # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new
1638
+ #
1639
+ # # Call the delete_assignment method.
1640
+ # result = client.delete_assignment request
1641
+ #
1642
+ # # The returned object is of type Google::Protobuf::Empty.
1643
+ # p result
1644
+ #
1374
1645
  def delete_assignment request, options = nil
1375
1646
  raise ::ArgumentError, "request must be provided" if request.nil?
1376
1647
 
@@ -1388,9 +1659,11 @@ module Google
1388
1659
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1389
1660
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1390
1661
 
1391
- header_params = {
1392
- "name" => request.name
1393
- }
1662
+ header_params = {}
1663
+ if request.name
1664
+ header_params["name"] = request.name
1665
+ end
1666
+
1394
1667
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1395
1668
  metadata[:"x-goog-request-params"] ||= request_params_header
1396
1669
 
@@ -1477,6 +1750,27 @@ module Google
1477
1750
  #
1478
1751
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1479
1752
  #
1753
+ # @example Basic example
1754
+ # require "google/cloud/bigquery/reservation/v1"
1755
+ #
1756
+ # # Create a client object. The client can be reused for multiple calls.
1757
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1758
+ #
1759
+ # # Create a request. To set request fields, pass in keyword arguments.
1760
+ # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new
1761
+ #
1762
+ # # Call the search_assignments method.
1763
+ # result = client.search_assignments request
1764
+ #
1765
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1766
+ # # iterate over all elements by calling #each, and the enumerable
1767
+ # # will lazily make API calls to fetch subsequent pages. Other
1768
+ # # methods are also available for managing paging directly.
1769
+ # result.each do |response|
1770
+ # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment.
1771
+ # p response
1772
+ # end
1773
+ #
1480
1774
  def search_assignments request, options = nil
1481
1775
  raise ::ArgumentError, "request must be provided" if request.nil?
1482
1776
 
@@ -1494,9 +1788,11 @@ module Google
1494
1788
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1495
1789
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1496
1790
 
1497
- header_params = {
1498
- "parent" => request.parent
1499
- }
1791
+ header_params = {}
1792
+ if request.parent
1793
+ header_params["parent"] = request.parent
1794
+ end
1795
+
1500
1796
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1501
1797
  metadata[:"x-goog-request-params"] ||= request_params_header
1502
1798
 
@@ -1579,6 +1875,27 @@ module Google
1579
1875
  #
1580
1876
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1581
1877
  #
1878
+ # @example Basic example
1879
+ # require "google/cloud/bigquery/reservation/v1"
1880
+ #
1881
+ # # Create a client object. The client can be reused for multiple calls.
1882
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1883
+ #
1884
+ # # Create a request. To set request fields, pass in keyword arguments.
1885
+ # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new
1886
+ #
1887
+ # # Call the search_all_assignments method.
1888
+ # result = client.search_all_assignments request
1889
+ #
1890
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1891
+ # # iterate over all elements by calling #each, and the enumerable
1892
+ # # will lazily make API calls to fetch subsequent pages. Other
1893
+ # # methods are also available for managing paging directly.
1894
+ # result.each do |response|
1895
+ # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::Assignment.
1896
+ # p response
1897
+ # end
1898
+ #
1582
1899
  def search_all_assignments request, options = nil
1583
1900
  raise ::ArgumentError, "request must be provided" if request.nil?
1584
1901
 
@@ -1596,9 +1913,11 @@ module Google
1596
1913
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1597
1914
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1598
1915
 
1599
- header_params = {
1600
- "parent" => request.parent
1601
- }
1916
+ header_params = {}
1917
+ if request.parent
1918
+ header_params["parent"] = request.parent
1919
+ end
1920
+
1602
1921
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1603
1922
  metadata[:"x-goog-request-params"] ||= request_params_header
1604
1923
 
@@ -1657,6 +1976,21 @@ module Google
1657
1976
  #
1658
1977
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1659
1978
  #
1979
+ # @example Basic example
1980
+ # require "google/cloud/bigquery/reservation/v1"
1981
+ #
1982
+ # # Create a client object. The client can be reused for multiple calls.
1983
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
1984
+ #
1985
+ # # Create a request. To set request fields, pass in keyword arguments.
1986
+ # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new
1987
+ #
1988
+ # # Call the move_assignment method.
1989
+ # result = client.move_assignment request
1990
+ #
1991
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment.
1992
+ # p result
1993
+ #
1660
1994
  def move_assignment request, options = nil
1661
1995
  raise ::ArgumentError, "request must be provided" if request.nil?
1662
1996
 
@@ -1674,9 +2008,11 @@ module Google
1674
2008
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1675
2009
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1676
2010
 
1677
- header_params = {
1678
- "name" => request.name
1679
- }
2011
+ header_params = {}
2012
+ if request.name
2013
+ header_params["name"] = request.name
2014
+ end
2015
+
1680
2016
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1681
2017
  metadata[:"x-goog-request-params"] ||= request_params_header
1682
2018
 
@@ -1726,6 +2062,21 @@ module Google
1726
2062
  #
1727
2063
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1728
2064
  #
2065
+ # @example Basic example
2066
+ # require "google/cloud/bigquery/reservation/v1"
2067
+ #
2068
+ # # Create a client object. The client can be reused for multiple calls.
2069
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
2070
+ #
2071
+ # # Create a request. To set request fields, pass in keyword arguments.
2072
+ # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new
2073
+ #
2074
+ # # Call the get_bi_reservation method.
2075
+ # result = client.get_bi_reservation request
2076
+ #
2077
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation.
2078
+ # p result
2079
+ #
1729
2080
  def get_bi_reservation request, options = nil
1730
2081
  raise ::ArgumentError, "request must be provided" if request.nil?
1731
2082
 
@@ -1743,9 +2094,11 @@ module Google
1743
2094
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1744
2095
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1745
2096
 
1746
- header_params = {
1747
- "name" => request.name
1748
- }
2097
+ header_params = {}
2098
+ if request.name
2099
+ header_params["name"] = request.name
2100
+ end
2101
+
1749
2102
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1750
2103
  metadata[:"x-goog-request-params"] ||= request_params_header
1751
2104
 
@@ -1803,6 +2156,21 @@ module Google
1803
2156
  #
1804
2157
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1805
2158
  #
2159
+ # @example Basic example
2160
+ # require "google/cloud/bigquery/reservation/v1"
2161
+ #
2162
+ # # Create a client object. The client can be reused for multiple calls.
2163
+ # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new
2164
+ #
2165
+ # # Create a request. To set request fields, pass in keyword arguments.
2166
+ # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new
2167
+ #
2168
+ # # Call the update_bi_reservation method.
2169
+ # result = client.update_bi_reservation request
2170
+ #
2171
+ # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation.
2172
+ # p result
2173
+ #
1806
2174
  def update_bi_reservation request, options = nil
1807
2175
  raise ::ArgumentError, "request must be provided" if request.nil?
1808
2176
 
@@ -1820,9 +2188,11 @@ module Google
1820
2188
  gapic_version: ::Google::Cloud::Bigquery::Reservation::V1::VERSION
1821
2189
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1822
2190
 
1823
- header_params = {
1824
- "bi_reservation.name" => request.bi_reservation.name
1825
- }
2191
+ header_params = {}
2192
+ if request.bi_reservation&.name
2193
+ header_params["bi_reservation.name"] = request.bi_reservation.name
2194
+ end
2195
+
1826
2196
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1827
2197
  metadata[:"x-goog-request-params"] ||= request_params_header
1828
2198
 
@@ -42,7 +42,7 @@ module Google
42
42
  # `projects/myproject/locations/US/capacityCommitments/id`.
43
43
  class Service
44
44
 
45
- include GRPC::GenericService
45
+ include ::GRPC::GenericService
46
46
 
47
47
  self.marshal_class_method = :encode
48
48
  self.unmarshal_class_method = :decode
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigquery
23
23
  module Reservation
24
24
  module V1
25
- VERSION = "0.4.0"
25
+ VERSION = "0.4.1"
26
26
  end
27
27
  end
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigquery-reservation-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
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-09-07 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