google-cloud-build-v1 0.11.1 → 0.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a7e10d2dec939423a6a2e3fce03e6595cf746e7dab37ac2cbbc87f4ffc751cf
4
- data.tar.gz: f69870afaa45ca3d115ec2949b110bb8477e2132bb107ea7588a41d5de6afc3b
3
+ metadata.gz: d8bb9c28afc8e7c014e7c4e9fa94db705499589fc857ec2198774165228e4153
4
+ data.tar.gz: 7cd5fbea64fd3877a0a94a914d35e7def918e6d02020d040ffb46c274bc0f288
5
5
  SHA512:
6
- metadata.gz: 1aad1516d0e714ffe1e378393d61346b0be4e009620ca9a1fa30796e418f39c6f70870a179d24ab267a721e773ab2a4b2384d6fe9a9ecf1145d8a85a281fe42b
7
- data.tar.gz: da2ef4790f3790fdbca04aa805cfa9e7e990ae58f2987f2ef9ce8026ed18c2033862805e8571d3f09f47830509de50b424893e27ec45f79e1bb91f72f78e4ffe
6
+ metadata.gz: dab3bf55ecb9cf9959a2566174a5733de47395bb0b2df91b2ed97e9eeffa2faf138067b5378d28a99911f2fca7bb12f1a5d61f181ed626faeb14c187699e2272
7
+ data.tar.gz: d6511b2082252984d0326260df14fb490ee1d99bbfbd8896271169cdfd18e41cf6a06965f94d88118a54480fd1efbf963caae5789d7e0ccba91db823a705f984
@@ -254,6 +254,28 @@ module Google
254
254
  #
255
255
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
256
256
  #
257
+ # @example Basic example
258
+ # require "google/cloud/build/v1"
259
+ #
260
+ # # Create a client object. The client can be reused for multiple calls.
261
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
262
+ #
263
+ # # Create a request. To set request fields, pass in keyword arguments.
264
+ # request = Google::Cloud::Build::V1::CreateBuildRequest.new
265
+ #
266
+ # # Call the create_build method.
267
+ # result = client.create_build request
268
+ #
269
+ # # The returned object is of type Gapic::Operation. You can use this
270
+ # # object to check the status of an operation, cancel it, or wait
271
+ # # for results. Here is how to block until completion:
272
+ # result.wait_until_done! timeout: 60
273
+ # if result.response?
274
+ # p result.response
275
+ # else
276
+ # puts "Error!"
277
+ # end
278
+ #
257
279
  def create_build request, options = nil
258
280
  raise ::ArgumentError, "request must be provided" if request.nil?
259
281
 
@@ -271,9 +293,11 @@ module Google
271
293
  gapic_version: ::Google::Cloud::Build::V1::VERSION
272
294
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
273
295
 
274
- header_params = {
275
- "project_id" => request.project_id
276
- }
296
+ header_params = {}
297
+ if request.project_id
298
+ header_params["project_id"] = request.project_id
299
+ end
300
+
277
301
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
278
302
  metadata[:"x-goog-request-params"] ||= request_params_header
279
303
 
@@ -331,6 +355,21 @@ module Google
331
355
  #
332
356
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
333
357
  #
358
+ # @example Basic example
359
+ # require "google/cloud/build/v1"
360
+ #
361
+ # # Create a client object. The client can be reused for multiple calls.
362
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
363
+ #
364
+ # # Create a request. To set request fields, pass in keyword arguments.
365
+ # request = Google::Cloud::Build::V1::GetBuildRequest.new
366
+ #
367
+ # # Call the get_build method.
368
+ # result = client.get_build request
369
+ #
370
+ # # The returned object is of type Google::Cloud::Build::V1::Build.
371
+ # p result
372
+ #
334
373
  def get_build request, options = nil
335
374
  raise ::ArgumentError, "request must be provided" if request.nil?
336
375
 
@@ -348,10 +387,14 @@ module Google
348
387
  gapic_version: ::Google::Cloud::Build::V1::VERSION
349
388
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
350
389
 
351
- header_params = {
352
- "project_id" => request.project_id,
353
- "id" => request.id
354
- }
390
+ header_params = {}
391
+ if request.project_id
392
+ header_params["project_id"] = request.project_id
393
+ end
394
+ if request.id
395
+ header_params["id"] = request.id
396
+ end
397
+
355
398
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
356
399
  metadata[:"x-goog-request-params"] ||= request_params_header
357
400
 
@@ -420,6 +463,27 @@ module Google
420
463
  #
421
464
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
422
465
  #
466
+ # @example Basic example
467
+ # require "google/cloud/build/v1"
468
+ #
469
+ # # Create a client object. The client can be reused for multiple calls.
470
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
471
+ #
472
+ # # Create a request. To set request fields, pass in keyword arguments.
473
+ # request = Google::Cloud::Build::V1::ListBuildsRequest.new
474
+ #
475
+ # # Call the list_builds method.
476
+ # result = client.list_builds request
477
+ #
478
+ # # The returned object is of type Gapic::PagedEnumerable. You can
479
+ # # iterate over all elements by calling #each, and the enumerable
480
+ # # will lazily make API calls to fetch subsequent pages. Other
481
+ # # methods are also available for managing paging directly.
482
+ # result.each do |response|
483
+ # # Each element is of type ::Google::Cloud::Build::V1::Build.
484
+ # p response
485
+ # end
486
+ #
423
487
  def list_builds request, options = nil
424
488
  raise ::ArgumentError, "request must be provided" if request.nil?
425
489
 
@@ -437,9 +501,11 @@ module Google
437
501
  gapic_version: ::Google::Cloud::Build::V1::VERSION
438
502
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
439
503
 
440
- header_params = {
441
- "project_id" => request.project_id
442
- }
504
+ header_params = {}
505
+ if request.project_id
506
+ header_params["project_id"] = request.project_id
507
+ end
508
+
443
509
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
444
510
  metadata[:"x-goog-request-params"] ||= request_params_header
445
511
 
@@ -494,6 +560,21 @@ module Google
494
560
  #
495
561
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
496
562
  #
563
+ # @example Basic example
564
+ # require "google/cloud/build/v1"
565
+ #
566
+ # # Create a client object. The client can be reused for multiple calls.
567
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
568
+ #
569
+ # # Create a request. To set request fields, pass in keyword arguments.
570
+ # request = Google::Cloud::Build::V1::CancelBuildRequest.new
571
+ #
572
+ # # Call the cancel_build method.
573
+ # result = client.cancel_build request
574
+ #
575
+ # # The returned object is of type Google::Cloud::Build::V1::Build.
576
+ # p result
577
+ #
497
578
  def cancel_build request, options = nil
498
579
  raise ::ArgumentError, "request must be provided" if request.nil?
499
580
 
@@ -511,10 +592,14 @@ module Google
511
592
  gapic_version: ::Google::Cloud::Build::V1::VERSION
512
593
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
513
594
 
514
- header_params = {
515
- "project_id" => request.project_id,
516
- "id" => request.id
517
- }
595
+ header_params = {}
596
+ if request.project_id
597
+ header_params["project_id"] = request.project_id
598
+ end
599
+ if request.id
600
+ header_params["id"] = request.id
601
+ end
602
+
518
603
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
519
604
  metadata[:"x-goog-request-params"] ||= request_params_header
520
605
 
@@ -594,6 +679,28 @@ module Google
594
679
  #
595
680
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
596
681
  #
682
+ # @example Basic example
683
+ # require "google/cloud/build/v1"
684
+ #
685
+ # # Create a client object. The client can be reused for multiple calls.
686
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
687
+ #
688
+ # # Create a request. To set request fields, pass in keyword arguments.
689
+ # request = Google::Cloud::Build::V1::RetryBuildRequest.new
690
+ #
691
+ # # Call the retry_build method.
692
+ # result = client.retry_build request
693
+ #
694
+ # # The returned object is of type Gapic::Operation. You can use this
695
+ # # object to check the status of an operation, cancel it, or wait
696
+ # # for results. Here is how to block until completion:
697
+ # result.wait_until_done! timeout: 60
698
+ # if result.response?
699
+ # p result.response
700
+ # else
701
+ # puts "Error!"
702
+ # end
703
+ #
597
704
  def retry_build request, options = nil
598
705
  raise ::ArgumentError, "request must be provided" if request.nil?
599
706
 
@@ -611,10 +718,14 @@ module Google
611
718
  gapic_version: ::Google::Cloud::Build::V1::VERSION
612
719
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
613
720
 
614
- header_params = {
615
- "project_id" => request.project_id,
616
- "id" => request.id
617
- }
721
+ header_params = {}
722
+ if request.project_id
723
+ header_params["project_id"] = request.project_id
724
+ end
725
+ if request.id
726
+ header_params["id"] = request.id
727
+ end
728
+
618
729
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
619
730
  metadata[:"x-goog-request-params"] ||= request_params_header
620
731
 
@@ -672,6 +783,28 @@ module Google
672
783
  #
673
784
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
674
785
  #
786
+ # @example Basic example
787
+ # require "google/cloud/build/v1"
788
+ #
789
+ # # Create a client object. The client can be reused for multiple calls.
790
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
791
+ #
792
+ # # Create a request. To set request fields, pass in keyword arguments.
793
+ # request = Google::Cloud::Build::V1::ApproveBuildRequest.new
794
+ #
795
+ # # Call the approve_build method.
796
+ # result = client.approve_build request
797
+ #
798
+ # # The returned object is of type Gapic::Operation. You can use this
799
+ # # object to check the status of an operation, cancel it, or wait
800
+ # # for results. Here is how to block until completion:
801
+ # result.wait_until_done! timeout: 60
802
+ # if result.response?
803
+ # p result.response
804
+ # else
805
+ # puts "Error!"
806
+ # end
807
+ #
675
808
  def approve_build request, options = nil
676
809
  raise ::ArgumentError, "request must be provided" if request.nil?
677
810
 
@@ -689,9 +822,11 @@ module Google
689
822
  gapic_version: ::Google::Cloud::Build::V1::VERSION
690
823
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
691
824
 
692
- header_params = {
693
- "name" => request.name
694
- }
825
+ header_params = {}
826
+ if request.name
827
+ header_params["name"] = request.name
828
+ end
829
+
695
830
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
696
831
  metadata[:"x-goog-request-params"] ||= request_params_header
697
832
 
@@ -748,6 +883,21 @@ module Google
748
883
  #
749
884
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
750
885
  #
886
+ # @example Basic example
887
+ # require "google/cloud/build/v1"
888
+ #
889
+ # # Create a client object. The client can be reused for multiple calls.
890
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
891
+ #
892
+ # # Create a request. To set request fields, pass in keyword arguments.
893
+ # request = Google::Cloud::Build::V1::CreateBuildTriggerRequest.new
894
+ #
895
+ # # Call the create_build_trigger method.
896
+ # result = client.create_build_trigger request
897
+ #
898
+ # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger.
899
+ # p result
900
+ #
751
901
  def create_build_trigger request, options = nil
752
902
  raise ::ArgumentError, "request must be provided" if request.nil?
753
903
 
@@ -765,9 +915,11 @@ module Google
765
915
  gapic_version: ::Google::Cloud::Build::V1::VERSION
766
916
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
767
917
 
768
- header_params = {
769
- "project_id" => request.project_id
770
- }
918
+ header_params = {}
919
+ if request.project_id
920
+ header_params["project_id"] = request.project_id
921
+ end
922
+
771
923
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
772
924
  metadata[:"x-goog-request-params"] ||= request_params_header
773
925
 
@@ -823,6 +975,21 @@ module Google
823
975
  #
824
976
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
825
977
  #
978
+ # @example Basic example
979
+ # require "google/cloud/build/v1"
980
+ #
981
+ # # Create a client object. The client can be reused for multiple calls.
982
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
983
+ #
984
+ # # Create a request. To set request fields, pass in keyword arguments.
985
+ # request = Google::Cloud::Build::V1::GetBuildTriggerRequest.new
986
+ #
987
+ # # Call the get_build_trigger method.
988
+ # result = client.get_build_trigger request
989
+ #
990
+ # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger.
991
+ # p result
992
+ #
826
993
  def get_build_trigger request, options = nil
827
994
  raise ::ArgumentError, "request must be provided" if request.nil?
828
995
 
@@ -840,10 +1007,14 @@ module Google
840
1007
  gapic_version: ::Google::Cloud::Build::V1::VERSION
841
1008
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
842
1009
 
843
- header_params = {
844
- "project_id" => request.project_id,
845
- "trigger_id" => request.trigger_id
846
- }
1010
+ header_params = {}
1011
+ if request.project_id
1012
+ header_params["project_id"] = request.project_id
1013
+ end
1014
+ if request.trigger_id
1015
+ header_params["trigger_id"] = request.trigger_id
1016
+ end
1017
+
847
1018
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
848
1019
  metadata[:"x-goog-request-params"] ||= request_params_header
849
1020
 
@@ -901,6 +1072,27 @@ module Google
901
1072
  #
902
1073
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
903
1074
  #
1075
+ # @example Basic example
1076
+ # require "google/cloud/build/v1"
1077
+ #
1078
+ # # Create a client object. The client can be reused for multiple calls.
1079
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1080
+ #
1081
+ # # Create a request. To set request fields, pass in keyword arguments.
1082
+ # request = Google::Cloud::Build::V1::ListBuildTriggersRequest.new
1083
+ #
1084
+ # # Call the list_build_triggers method.
1085
+ # result = client.list_build_triggers request
1086
+ #
1087
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1088
+ # # iterate over all elements by calling #each, and the enumerable
1089
+ # # will lazily make API calls to fetch subsequent pages. Other
1090
+ # # methods are also available for managing paging directly.
1091
+ # result.each do |response|
1092
+ # # Each element is of type ::Google::Cloud::Build::V1::BuildTrigger.
1093
+ # p response
1094
+ # end
1095
+ #
904
1096
  def list_build_triggers request, options = nil
905
1097
  raise ::ArgumentError, "request must be provided" if request.nil?
906
1098
 
@@ -918,9 +1110,11 @@ module Google
918
1110
  gapic_version: ::Google::Cloud::Build::V1::VERSION
919
1111
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
920
1112
 
921
- header_params = {
922
- "project_id" => request.project_id
923
- }
1113
+ header_params = {}
1114
+ if request.project_id
1115
+ header_params["project_id"] = request.project_id
1116
+ end
1117
+
924
1118
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
925
1119
  metadata[:"x-goog-request-params"] ||= request_params_header
926
1120
 
@@ -977,6 +1171,21 @@ module Google
977
1171
  #
978
1172
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
979
1173
  #
1174
+ # @example Basic example
1175
+ # require "google/cloud/build/v1"
1176
+ #
1177
+ # # Create a client object. The client can be reused for multiple calls.
1178
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1179
+ #
1180
+ # # Create a request. To set request fields, pass in keyword arguments.
1181
+ # request = Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new
1182
+ #
1183
+ # # Call the delete_build_trigger method.
1184
+ # result = client.delete_build_trigger request
1185
+ #
1186
+ # # The returned object is of type Google::Protobuf::Empty.
1187
+ # p result
1188
+ #
980
1189
  def delete_build_trigger request, options = nil
981
1190
  raise ::ArgumentError, "request must be provided" if request.nil?
982
1191
 
@@ -994,10 +1203,14 @@ module Google
994
1203
  gapic_version: ::Google::Cloud::Build::V1::VERSION
995
1204
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
996
1205
 
997
- header_params = {
998
- "project_id" => request.project_id,
999
- "trigger_id" => request.trigger_id
1000
- }
1206
+ header_params = {}
1207
+ if request.project_id
1208
+ header_params["project_id"] = request.project_id
1209
+ end
1210
+ if request.trigger_id
1211
+ header_params["trigger_id"] = request.trigger_id
1212
+ end
1213
+
1001
1214
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1002
1215
  metadata[:"x-goog-request-params"] ||= request_params_header
1003
1216
 
@@ -1052,6 +1265,21 @@ module Google
1052
1265
  #
1053
1266
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1054
1267
  #
1268
+ # @example Basic example
1269
+ # require "google/cloud/build/v1"
1270
+ #
1271
+ # # Create a client object. The client can be reused for multiple calls.
1272
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1273
+ #
1274
+ # # Create a request. To set request fields, pass in keyword arguments.
1275
+ # request = Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new
1276
+ #
1277
+ # # Call the update_build_trigger method.
1278
+ # result = client.update_build_trigger request
1279
+ #
1280
+ # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger.
1281
+ # p result
1282
+ #
1055
1283
  def update_build_trigger request, options = nil
1056
1284
  raise ::ArgumentError, "request must be provided" if request.nil?
1057
1285
 
@@ -1069,10 +1297,14 @@ module Google
1069
1297
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1070
1298
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1071
1299
 
1072
- header_params = {
1073
- "project_id" => request.project_id,
1074
- "trigger_id" => request.trigger_id
1075
- }
1300
+ header_params = {}
1301
+ if request.project_id
1302
+ header_params["project_id"] = request.project_id
1303
+ end
1304
+ if request.trigger_id
1305
+ header_params["trigger_id"] = request.trigger_id
1306
+ end
1307
+
1076
1308
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1077
1309
  metadata[:"x-goog-request-params"] ||= request_params_header
1078
1310
 
@@ -1128,6 +1360,28 @@ module Google
1128
1360
  #
1129
1361
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1130
1362
  #
1363
+ # @example Basic example
1364
+ # require "google/cloud/build/v1"
1365
+ #
1366
+ # # Create a client object. The client can be reused for multiple calls.
1367
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1368
+ #
1369
+ # # Create a request. To set request fields, pass in keyword arguments.
1370
+ # request = Google::Cloud::Build::V1::RunBuildTriggerRequest.new
1371
+ #
1372
+ # # Call the run_build_trigger method.
1373
+ # result = client.run_build_trigger request
1374
+ #
1375
+ # # The returned object is of type Gapic::Operation. You can use this
1376
+ # # object to check the status of an operation, cancel it, or wait
1377
+ # # for results. Here is how to block until completion:
1378
+ # result.wait_until_done! timeout: 60
1379
+ # if result.response?
1380
+ # p result.response
1381
+ # else
1382
+ # puts "Error!"
1383
+ # end
1384
+ #
1131
1385
  def run_build_trigger request, options = nil
1132
1386
  raise ::ArgumentError, "request must be provided" if request.nil?
1133
1387
 
@@ -1145,10 +1399,14 @@ module Google
1145
1399
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1146
1400
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1147
1401
 
1148
- header_params = {
1149
- "project_id" => request.project_id,
1150
- "trigger_id" => request.trigger_id
1151
- }
1402
+ header_params = {}
1403
+ if request.project_id
1404
+ header_params["project_id"] = request.project_id
1405
+ end
1406
+ if request.trigger_id
1407
+ header_params["trigger_id"] = request.trigger_id
1408
+ end
1409
+
1152
1410
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1153
1411
  metadata[:"x-goog-request-params"] ||= request_params_header
1154
1412
 
@@ -1208,6 +1466,21 @@ module Google
1208
1466
  #
1209
1467
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1210
1468
  #
1469
+ # @example Basic example
1470
+ # require "google/cloud/build/v1"
1471
+ #
1472
+ # # Create a client object. The client can be reused for multiple calls.
1473
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1474
+ #
1475
+ # # Create a request. To set request fields, pass in keyword arguments.
1476
+ # request = Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new
1477
+ #
1478
+ # # Call the receive_trigger_webhook method.
1479
+ # result = client.receive_trigger_webhook request
1480
+ #
1481
+ # # The returned object is of type Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse.
1482
+ # p result
1483
+ #
1211
1484
  def receive_trigger_webhook request, options = nil
1212
1485
  raise ::ArgumentError, "request must be provided" if request.nil?
1213
1486
 
@@ -1225,10 +1498,14 @@ module Google
1225
1498
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1226
1499
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1227
1500
 
1228
- header_params = {
1229
- "project_id" => request.project_id,
1230
- "trigger" => request.trigger
1231
- }
1501
+ header_params = {}
1502
+ if request.project_id
1503
+ header_params["project_id"] = request.project_id
1504
+ end
1505
+ if request.trigger
1506
+ header_params["trigger"] = request.trigger
1507
+ end
1508
+
1232
1509
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1233
1510
  metadata[:"x-goog-request-params"] ||= request_params_header
1234
1511
 
@@ -1289,6 +1566,28 @@ module Google
1289
1566
  #
1290
1567
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1291
1568
  #
1569
+ # @example Basic example
1570
+ # require "google/cloud/build/v1"
1571
+ #
1572
+ # # Create a client object. The client can be reused for multiple calls.
1573
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1574
+ #
1575
+ # # Create a request. To set request fields, pass in keyword arguments.
1576
+ # request = Google::Cloud::Build::V1::CreateWorkerPoolRequest.new
1577
+ #
1578
+ # # Call the create_worker_pool method.
1579
+ # result = client.create_worker_pool request
1580
+ #
1581
+ # # The returned object is of type Gapic::Operation. You can use this
1582
+ # # object to check the status of an operation, cancel it, or wait
1583
+ # # for results. Here is how to block until completion:
1584
+ # result.wait_until_done! timeout: 60
1585
+ # if result.response?
1586
+ # p result.response
1587
+ # else
1588
+ # puts "Error!"
1589
+ # end
1590
+ #
1292
1591
  def create_worker_pool request, options = nil
1293
1592
  raise ::ArgumentError, "request must be provided" if request.nil?
1294
1593
 
@@ -1306,9 +1605,11 @@ module Google
1306
1605
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1307
1606
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1308
1607
 
1309
- header_params = {
1310
- "parent" => request.parent
1311
- }
1608
+ header_params = {}
1609
+ if request.parent
1610
+ header_params["parent"] = request.parent
1611
+ end
1612
+
1312
1613
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1313
1614
  metadata[:"x-goog-request-params"] ||= request_params_header
1314
1615
 
@@ -1359,6 +1660,21 @@ module Google
1359
1660
  #
1360
1661
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1361
1662
  #
1663
+ # @example Basic example
1664
+ # require "google/cloud/build/v1"
1665
+ #
1666
+ # # Create a client object. The client can be reused for multiple calls.
1667
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1668
+ #
1669
+ # # Create a request. To set request fields, pass in keyword arguments.
1670
+ # request = Google::Cloud::Build::V1::GetWorkerPoolRequest.new
1671
+ #
1672
+ # # Call the get_worker_pool method.
1673
+ # result = client.get_worker_pool request
1674
+ #
1675
+ # # The returned object is of type Google::Cloud::Build::V1::WorkerPool.
1676
+ # p result
1677
+ #
1362
1678
  def get_worker_pool request, options = nil
1363
1679
  raise ::ArgumentError, "request must be provided" if request.nil?
1364
1680
 
@@ -1376,9 +1692,11 @@ module Google
1376
1692
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1377
1693
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1378
1694
 
1379
- header_params = {
1380
- "name" => request.name
1381
- }
1695
+ header_params = {}
1696
+ if request.name
1697
+ header_params["name"] = request.name
1698
+ end
1699
+
1382
1700
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1383
1701
  metadata[:"x-goog-request-params"] ||= request_params_header
1384
1702
 
@@ -1438,6 +1756,28 @@ module Google
1438
1756
  #
1439
1757
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1440
1758
  #
1759
+ # @example Basic example
1760
+ # require "google/cloud/build/v1"
1761
+ #
1762
+ # # Create a client object. The client can be reused for multiple calls.
1763
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1764
+ #
1765
+ # # Create a request. To set request fields, pass in keyword arguments.
1766
+ # request = Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new
1767
+ #
1768
+ # # Call the delete_worker_pool method.
1769
+ # result = client.delete_worker_pool request
1770
+ #
1771
+ # # The returned object is of type Gapic::Operation. You can use this
1772
+ # # object to check the status of an operation, cancel it, or wait
1773
+ # # for results. Here is how to block until completion:
1774
+ # result.wait_until_done! timeout: 60
1775
+ # if result.response?
1776
+ # p result.response
1777
+ # else
1778
+ # puts "Error!"
1779
+ # end
1780
+ #
1441
1781
  def delete_worker_pool request, options = nil
1442
1782
  raise ::ArgumentError, "request must be provided" if request.nil?
1443
1783
 
@@ -1455,9 +1795,11 @@ module Google
1455
1795
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1456
1796
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1457
1797
 
1458
- header_params = {
1459
- "name" => request.name
1460
- }
1798
+ header_params = {}
1799
+ if request.name
1800
+ header_params["name"] = request.name
1801
+ end
1802
+
1461
1803
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1462
1804
  metadata[:"x-goog-request-params"] ||= request_params_header
1463
1805
 
@@ -1515,6 +1857,28 @@ module Google
1515
1857
  #
1516
1858
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1517
1859
  #
1860
+ # @example Basic example
1861
+ # require "google/cloud/build/v1"
1862
+ #
1863
+ # # Create a client object. The client can be reused for multiple calls.
1864
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1865
+ #
1866
+ # # Create a request. To set request fields, pass in keyword arguments.
1867
+ # request = Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new
1868
+ #
1869
+ # # Call the update_worker_pool method.
1870
+ # result = client.update_worker_pool request
1871
+ #
1872
+ # # The returned object is of type Gapic::Operation. You can use this
1873
+ # # object to check the status of an operation, cancel it, or wait
1874
+ # # for results. Here is how to block until completion:
1875
+ # result.wait_until_done! timeout: 60
1876
+ # if result.response?
1877
+ # p result.response
1878
+ # else
1879
+ # puts "Error!"
1880
+ # end
1881
+ #
1518
1882
  def update_worker_pool request, options = nil
1519
1883
  raise ::ArgumentError, "request must be provided" if request.nil?
1520
1884
 
@@ -1532,9 +1896,11 @@ module Google
1532
1896
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1533
1897
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1534
1898
 
1535
- header_params = {
1536
- "worker_pool.name" => request.worker_pool.name
1537
- }
1899
+ header_params = {}
1900
+ if request.worker_pool&.name
1901
+ header_params["worker_pool.name"] = request.worker_pool.name
1902
+ end
1903
+
1538
1904
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1539
1905
  metadata[:"x-goog-request-params"] ||= request_params_header
1540
1906
 
@@ -1591,6 +1957,27 @@ module Google
1591
1957
  #
1592
1958
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1593
1959
  #
1960
+ # @example Basic example
1961
+ # require "google/cloud/build/v1"
1962
+ #
1963
+ # # Create a client object. The client can be reused for multiple calls.
1964
+ # client = Google::Cloud::Build::V1::CloudBuild::Client.new
1965
+ #
1966
+ # # Create a request. To set request fields, pass in keyword arguments.
1967
+ # request = Google::Cloud::Build::V1::ListWorkerPoolsRequest.new
1968
+ #
1969
+ # # Call the list_worker_pools method.
1970
+ # result = client.list_worker_pools request
1971
+ #
1972
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1973
+ # # iterate over all elements by calling #each, and the enumerable
1974
+ # # will lazily make API calls to fetch subsequent pages. Other
1975
+ # # methods are also available for managing paging directly.
1976
+ # result.each do |response|
1977
+ # # Each element is of type ::Google::Cloud::Build::V1::WorkerPool.
1978
+ # p response
1979
+ # end
1980
+ #
1594
1981
  def list_worker_pools request, options = nil
1595
1982
  raise ::ArgumentError, "request must be provided" if request.nil?
1596
1983
 
@@ -1608,9 +1995,11 @@ module Google
1608
1995
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1609
1996
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1610
1997
 
1611
- header_params = {
1612
- "parent" => request.parent
1613
- }
1998
+ header_params = {}
1999
+ if request.parent
2000
+ header_params["parent"] = request.parent
2001
+ end
2002
+
1614
2003
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1615
2004
  metadata[:"x-goog-request-params"] ||= request_params_header
1616
2005
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::Build::V1::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::Build::V1::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::Build::V1::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::Build::V1::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Build
23
23
  module V1
24
- VERSION = "0.11.1"
24
+ VERSION = "0.11.2"
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-build-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
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-10-21 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