google-cloud-deploy-v1 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -199,6 +199,7 @@ module Google
199
199
 
200
200
  @operations_client = Operations.new do |config|
201
201
  config.credentials = credentials
202
+ config.quota_project = @quota_project_id
202
203
  config.endpoint = @config.endpoint
203
204
  end
204
205
 
@@ -253,7 +254,7 @@ module Google
253
254
  # When paginating, all other provided parameters match
254
255
  # the call that provided the page token.
255
256
  # @param filter [::String]
256
- # Filter builds to be returned. See https://google.aip.dev/160 for more
257
+ # Filter pipelines to be returned. See https://google.aip.dev/160 for more
257
258
  # details.
258
259
  # @param order_by [::String]
259
260
  # Field to sort by. See https://google.aip.dev/132#ordering for more details.
@@ -266,6 +267,27 @@ module Google
266
267
  #
267
268
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
268
269
  #
270
+ # @example Basic example
271
+ # require "google/cloud/deploy/v1"
272
+ #
273
+ # # Create a client object. The client can be reused for multiple calls.
274
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
275
+ #
276
+ # # Create a request. To set request fields, pass in keyword arguments.
277
+ # request = Google::Cloud::Deploy::V1::ListDeliveryPipelinesRequest.new
278
+ #
279
+ # # Call the list_delivery_pipelines method.
280
+ # result = client.list_delivery_pipelines request
281
+ #
282
+ # # The returned object is of type Gapic::PagedEnumerable. You can
283
+ # # iterate over all elements by calling #each, and the enumerable
284
+ # # will lazily make API calls to fetch subsequent pages. Other
285
+ # # methods are also available for managing paging directly.
286
+ # result.each do |response|
287
+ # # Each element is of type ::Google::Cloud::Deploy::V1::DeliveryPipeline.
288
+ # p response
289
+ # end
290
+ #
269
291
  def list_delivery_pipelines request, options = nil
270
292
  raise ::ArgumentError, "request must be provided" if request.nil?
271
293
 
@@ -283,9 +305,11 @@ module Google
283
305
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
284
306
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
285
307
 
286
- header_params = {
287
- "parent" => request.parent
288
- }
308
+ header_params = {}
309
+ if request.parent
310
+ header_params["parent"] = request.parent
311
+ end
312
+
289
313
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
290
314
  metadata[:"x-goog-request-params"] ||= request_params_header
291
315
 
@@ -336,6 +360,21 @@ module Google
336
360
  #
337
361
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
338
362
  #
363
+ # @example Basic example
364
+ # require "google/cloud/deploy/v1"
365
+ #
366
+ # # Create a client object. The client can be reused for multiple calls.
367
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
368
+ #
369
+ # # Create a request. To set request fields, pass in keyword arguments.
370
+ # request = Google::Cloud::Deploy::V1::GetDeliveryPipelineRequest.new
371
+ #
372
+ # # Call the get_delivery_pipeline method.
373
+ # result = client.get_delivery_pipeline request
374
+ #
375
+ # # The returned object is of type Google::Cloud::Deploy::V1::DeliveryPipeline.
376
+ # p result
377
+ #
339
378
  def get_delivery_pipeline request, options = nil
340
379
  raise ::ArgumentError, "request must be provided" if request.nil?
341
380
 
@@ -353,9 +392,11 @@ module Google
353
392
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
354
393
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
355
394
 
356
- header_params = {
357
- "name" => request.name
358
- }
395
+ header_params = {}
396
+ if request.name
397
+ header_params["name"] = request.name
398
+ end
399
+
359
400
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
360
401
  metadata[:"x-goog-request-params"] ||= request_params_header
361
402
 
@@ -426,6 +467,28 @@ module Google
426
467
  #
427
468
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
428
469
  #
470
+ # @example Basic example
471
+ # require "google/cloud/deploy/v1"
472
+ #
473
+ # # Create a client object. The client can be reused for multiple calls.
474
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
475
+ #
476
+ # # Create a request. To set request fields, pass in keyword arguments.
477
+ # request = Google::Cloud::Deploy::V1::CreateDeliveryPipelineRequest.new
478
+ #
479
+ # # Call the create_delivery_pipeline method.
480
+ # result = client.create_delivery_pipeline request
481
+ #
482
+ # # The returned object is of type Gapic::Operation. You can use this
483
+ # # object to check the status of an operation, cancel it, or wait
484
+ # # for results. Here is how to block until completion:
485
+ # result.wait_until_done! timeout: 60
486
+ # if result.response?
487
+ # p result.response
488
+ # else
489
+ # puts "Error!"
490
+ # end
491
+ #
429
492
  def create_delivery_pipeline request, options = nil
430
493
  raise ::ArgumentError, "request must be provided" if request.nil?
431
494
 
@@ -443,9 +506,11 @@ module Google
443
506
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
444
507
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
445
508
 
446
- header_params = {
447
- "parent" => request.parent
448
- }
509
+ header_params = {}
510
+ if request.parent
511
+ header_params["parent"] = request.parent
512
+ end
513
+
449
514
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
450
515
  metadata[:"x-goog-request-params"] ||= request_params_header
451
516
 
@@ -521,6 +586,28 @@ module Google
521
586
  #
522
587
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
523
588
  #
589
+ # @example Basic example
590
+ # require "google/cloud/deploy/v1"
591
+ #
592
+ # # Create a client object. The client can be reused for multiple calls.
593
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
594
+ #
595
+ # # Create a request. To set request fields, pass in keyword arguments.
596
+ # request = Google::Cloud::Deploy::V1::UpdateDeliveryPipelineRequest.new
597
+ #
598
+ # # Call the update_delivery_pipeline method.
599
+ # result = client.update_delivery_pipeline request
600
+ #
601
+ # # The returned object is of type Gapic::Operation. You can use this
602
+ # # object to check the status of an operation, cancel it, or wait
603
+ # # for results. Here is how to block until completion:
604
+ # result.wait_until_done! timeout: 60
605
+ # if result.response?
606
+ # p result.response
607
+ # else
608
+ # puts "Error!"
609
+ # end
610
+ #
524
611
  def update_delivery_pipeline request, options = nil
525
612
  raise ::ArgumentError, "request must be provided" if request.nil?
526
613
 
@@ -538,9 +625,11 @@ module Google
538
625
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
539
626
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
540
627
 
541
- header_params = {
542
- "delivery_pipeline.name" => request.delivery_pipeline.name
543
- }
628
+ header_params = {}
629
+ if request.delivery_pipeline&.name
630
+ header_params["delivery_pipeline.name"] = request.delivery_pipeline.name
631
+ end
632
+
544
633
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
545
634
  metadata[:"x-goog-request-params"] ||= request_params_header
546
635
 
@@ -619,6 +708,28 @@ module Google
619
708
  #
620
709
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
621
710
  #
711
+ # @example Basic example
712
+ # require "google/cloud/deploy/v1"
713
+ #
714
+ # # Create a client object. The client can be reused for multiple calls.
715
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
716
+ #
717
+ # # Create a request. To set request fields, pass in keyword arguments.
718
+ # request = Google::Cloud::Deploy::V1::DeleteDeliveryPipelineRequest.new
719
+ #
720
+ # # Call the delete_delivery_pipeline method.
721
+ # result = client.delete_delivery_pipeline request
722
+ #
723
+ # # The returned object is of type Gapic::Operation. You can use this
724
+ # # object to check the status of an operation, cancel it, or wait
725
+ # # for results. Here is how to block until completion:
726
+ # result.wait_until_done! timeout: 60
727
+ # if result.response?
728
+ # p result.response
729
+ # else
730
+ # puts "Error!"
731
+ # end
732
+ #
622
733
  def delete_delivery_pipeline request, options = nil
623
734
  raise ::ArgumentError, "request must be provided" if request.nil?
624
735
 
@@ -636,9 +747,11 @@ module Google
636
747
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
637
748
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
638
749
 
639
- header_params = {
640
- "name" => request.name
641
- }
750
+ header_params = {}
751
+ if request.name
752
+ header_params["name"] = request.name
753
+ end
754
+
642
755
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
643
756
  metadata[:"x-goog-request-params"] ||= request_params_header
644
757
 
@@ -691,7 +804,7 @@ module Google
691
804
  # When paginating, all other provided parameters match
692
805
  # the call that provided the page token.
693
806
  # @param filter [::String]
694
- # Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
807
+ # Optional. Filter targets to be returned. See https://google.aip.dev/160 for more
695
808
  # details.
696
809
  # @param order_by [::String]
697
810
  # Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
@@ -704,6 +817,27 @@ module Google
704
817
  #
705
818
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
706
819
  #
820
+ # @example Basic example
821
+ # require "google/cloud/deploy/v1"
822
+ #
823
+ # # Create a client object. The client can be reused for multiple calls.
824
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
825
+ #
826
+ # # Create a request. To set request fields, pass in keyword arguments.
827
+ # request = Google::Cloud::Deploy::V1::ListTargetsRequest.new
828
+ #
829
+ # # Call the list_targets method.
830
+ # result = client.list_targets request
831
+ #
832
+ # # The returned object is of type Gapic::PagedEnumerable. You can
833
+ # # iterate over all elements by calling #each, and the enumerable
834
+ # # will lazily make API calls to fetch subsequent pages. Other
835
+ # # methods are also available for managing paging directly.
836
+ # result.each do |response|
837
+ # # Each element is of type ::Google::Cloud::Deploy::V1::Target.
838
+ # p response
839
+ # end
840
+ #
707
841
  def list_targets request, options = nil
708
842
  raise ::ArgumentError, "request must be provided" if request.nil?
709
843
 
@@ -721,9 +855,11 @@ module Google
721
855
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
722
856
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
723
857
 
724
- header_params = {
725
- "parent" => request.parent
726
- }
858
+ header_params = {}
859
+ if request.parent
860
+ header_params["parent"] = request.parent
861
+ end
862
+
727
863
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
728
864
  metadata[:"x-goog-request-params"] ||= request_params_header
729
865
 
@@ -774,6 +910,21 @@ module Google
774
910
  #
775
911
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
776
912
  #
913
+ # @example Basic example
914
+ # require "google/cloud/deploy/v1"
915
+ #
916
+ # # Create a client object. The client can be reused for multiple calls.
917
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
918
+ #
919
+ # # Create a request. To set request fields, pass in keyword arguments.
920
+ # request = Google::Cloud::Deploy::V1::GetTargetRequest.new
921
+ #
922
+ # # Call the get_target method.
923
+ # result = client.get_target request
924
+ #
925
+ # # The returned object is of type Google::Cloud::Deploy::V1::Target.
926
+ # p result
927
+ #
777
928
  def get_target request, options = nil
778
929
  raise ::ArgumentError, "request must be provided" if request.nil?
779
930
 
@@ -791,9 +942,11 @@ module Google
791
942
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
792
943
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
793
944
 
794
- header_params = {
795
- "name" => request.name
796
- }
945
+ header_params = {}
946
+ if request.name
947
+ header_params["name"] = request.name
948
+ end
949
+
797
950
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
798
951
  metadata[:"x-goog-request-params"] ||= request_params_header
799
952
 
@@ -865,6 +1018,28 @@ module Google
865
1018
  #
866
1019
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
867
1020
  #
1021
+ # @example Basic example
1022
+ # require "google/cloud/deploy/v1"
1023
+ #
1024
+ # # Create a client object. The client can be reused for multiple calls.
1025
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1026
+ #
1027
+ # # Create a request. To set request fields, pass in keyword arguments.
1028
+ # request = Google::Cloud::Deploy::V1::CreateTargetRequest.new
1029
+ #
1030
+ # # Call the create_target method.
1031
+ # result = client.create_target request
1032
+ #
1033
+ # # The returned object is of type Gapic::Operation. You can use this
1034
+ # # object to check the status of an operation, cancel it, or wait
1035
+ # # for results. Here is how to block until completion:
1036
+ # result.wait_until_done! timeout: 60
1037
+ # if result.response?
1038
+ # p result.response
1039
+ # else
1040
+ # puts "Error!"
1041
+ # end
1042
+ #
868
1043
  def create_target request, options = nil
869
1044
  raise ::ArgumentError, "request must be provided" if request.nil?
870
1045
 
@@ -882,9 +1057,11 @@ module Google
882
1057
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
883
1058
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
884
1059
 
885
- header_params = {
886
- "parent" => request.parent
887
- }
1060
+ header_params = {}
1061
+ if request.parent
1062
+ header_params["parent"] = request.parent
1063
+ end
1064
+
888
1065
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
889
1066
  metadata[:"x-goog-request-params"] ||= request_params_header
890
1067
 
@@ -960,6 +1137,28 @@ module Google
960
1137
  #
961
1138
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
962
1139
  #
1140
+ # @example Basic example
1141
+ # require "google/cloud/deploy/v1"
1142
+ #
1143
+ # # Create a client object. The client can be reused for multiple calls.
1144
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1145
+ #
1146
+ # # Create a request. To set request fields, pass in keyword arguments.
1147
+ # request = Google::Cloud::Deploy::V1::UpdateTargetRequest.new
1148
+ #
1149
+ # # Call the update_target method.
1150
+ # result = client.update_target request
1151
+ #
1152
+ # # The returned object is of type Gapic::Operation. You can use this
1153
+ # # object to check the status of an operation, cancel it, or wait
1154
+ # # for results. Here is how to block until completion:
1155
+ # result.wait_until_done! timeout: 60
1156
+ # if result.response?
1157
+ # p result.response
1158
+ # else
1159
+ # puts "Error!"
1160
+ # end
1161
+ #
963
1162
  def update_target request, options = nil
964
1163
  raise ::ArgumentError, "request must be provided" if request.nil?
965
1164
 
@@ -977,9 +1176,11 @@ module Google
977
1176
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
978
1177
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
979
1178
 
980
- header_params = {
981
- "target.name" => request.target.name
982
- }
1179
+ header_params = {}
1180
+ if request.target&.name
1181
+ header_params["target.name"] = request.target.name
1182
+ end
1183
+
983
1184
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
984
1185
  metadata[:"x-goog-request-params"] ||= request_params_header
985
1186
 
@@ -1054,6 +1255,28 @@ module Google
1054
1255
  #
1055
1256
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1056
1257
  #
1258
+ # @example Basic example
1259
+ # require "google/cloud/deploy/v1"
1260
+ #
1261
+ # # Create a client object. The client can be reused for multiple calls.
1262
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1263
+ #
1264
+ # # Create a request. To set request fields, pass in keyword arguments.
1265
+ # request = Google::Cloud::Deploy::V1::DeleteTargetRequest.new
1266
+ #
1267
+ # # Call the delete_target method.
1268
+ # result = client.delete_target request
1269
+ #
1270
+ # # The returned object is of type Gapic::Operation. You can use this
1271
+ # # object to check the status of an operation, cancel it, or wait
1272
+ # # for results. Here is how to block until completion:
1273
+ # result.wait_until_done! timeout: 60
1274
+ # if result.response?
1275
+ # p result.response
1276
+ # else
1277
+ # puts "Error!"
1278
+ # end
1279
+ #
1057
1280
  def delete_target request, options = nil
1058
1281
  raise ::ArgumentError, "request must be provided" if request.nil?
1059
1282
 
@@ -1071,9 +1294,11 @@ module Google
1071
1294
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1072
1295
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1073
1296
 
1074
- header_params = {
1075
- "name" => request.name
1076
- }
1297
+ header_params = {}
1298
+ if request.name
1299
+ header_params["name"] = request.name
1300
+ end
1301
+
1077
1302
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1078
1303
  metadata[:"x-goog-request-params"] ||= request_params_header
1079
1304
 
@@ -1125,7 +1350,7 @@ module Google
1125
1350
  # When paginating, all other provided parameters match
1126
1351
  # the call that provided the page token.
1127
1352
  # @param filter [::String]
1128
- # Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
1353
+ # Optional. Filter releases to be returned. See https://google.aip.dev/160 for more
1129
1354
  # details.
1130
1355
  # @param order_by [::String]
1131
1356
  # Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
@@ -1138,6 +1363,27 @@ module Google
1138
1363
  #
1139
1364
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1140
1365
  #
1366
+ # @example Basic example
1367
+ # require "google/cloud/deploy/v1"
1368
+ #
1369
+ # # Create a client object. The client can be reused for multiple calls.
1370
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1371
+ #
1372
+ # # Create a request. To set request fields, pass in keyword arguments.
1373
+ # request = Google::Cloud::Deploy::V1::ListReleasesRequest.new
1374
+ #
1375
+ # # Call the list_releases method.
1376
+ # result = client.list_releases request
1377
+ #
1378
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1379
+ # # iterate over all elements by calling #each, and the enumerable
1380
+ # # will lazily make API calls to fetch subsequent pages. Other
1381
+ # # methods are also available for managing paging directly.
1382
+ # result.each do |response|
1383
+ # # Each element is of type ::Google::Cloud::Deploy::V1::Release.
1384
+ # p response
1385
+ # end
1386
+ #
1141
1387
  def list_releases request, options = nil
1142
1388
  raise ::ArgumentError, "request must be provided" if request.nil?
1143
1389
 
@@ -1155,9 +1401,11 @@ module Google
1155
1401
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1156
1402
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1157
1403
 
1158
- header_params = {
1159
- "parent" => request.parent
1160
- }
1404
+ header_params = {}
1405
+ if request.parent
1406
+ header_params["parent"] = request.parent
1407
+ end
1408
+
1161
1409
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1162
1410
  metadata[:"x-goog-request-params"] ||= request_params_header
1163
1411
 
@@ -1208,6 +1456,21 @@ module Google
1208
1456
  #
1209
1457
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1210
1458
  #
1459
+ # @example Basic example
1460
+ # require "google/cloud/deploy/v1"
1461
+ #
1462
+ # # Create a client object. The client can be reused for multiple calls.
1463
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1464
+ #
1465
+ # # Create a request. To set request fields, pass in keyword arguments.
1466
+ # request = Google::Cloud::Deploy::V1::GetReleaseRequest.new
1467
+ #
1468
+ # # Call the get_release method.
1469
+ # result = client.get_release request
1470
+ #
1471
+ # # The returned object is of type Google::Cloud::Deploy::V1::Release.
1472
+ # p result
1473
+ #
1211
1474
  def get_release request, options = nil
1212
1475
  raise ::ArgumentError, "request must be provided" if request.nil?
1213
1476
 
@@ -1225,9 +1488,11 @@ module Google
1225
1488
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1226
1489
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1227
1490
 
1228
- header_params = {
1229
- "name" => request.name
1230
- }
1491
+ header_params = {}
1492
+ if request.name
1493
+ header_params["name"] = request.name
1494
+ end
1495
+
1231
1496
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1232
1497
  metadata[:"x-goog-request-params"] ||= request_params_header
1233
1498
 
@@ -1299,6 +1564,28 @@ module Google
1299
1564
  #
1300
1565
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1301
1566
  #
1567
+ # @example Basic example
1568
+ # require "google/cloud/deploy/v1"
1569
+ #
1570
+ # # Create a client object. The client can be reused for multiple calls.
1571
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1572
+ #
1573
+ # # Create a request. To set request fields, pass in keyword arguments.
1574
+ # request = Google::Cloud::Deploy::V1::CreateReleaseRequest.new
1575
+ #
1576
+ # # Call the create_release method.
1577
+ # result = client.create_release request
1578
+ #
1579
+ # # The returned object is of type Gapic::Operation. You can use this
1580
+ # # object to check the status of an operation, cancel it, or wait
1581
+ # # for results. Here is how to block until completion:
1582
+ # result.wait_until_done! timeout: 60
1583
+ # if result.response?
1584
+ # p result.response
1585
+ # else
1586
+ # puts "Error!"
1587
+ # end
1588
+ #
1302
1589
  def create_release request, options = nil
1303
1590
  raise ::ArgumentError, "request must be provided" if request.nil?
1304
1591
 
@@ -1316,9 +1603,11 @@ module Google
1316
1603
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1317
1604
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1318
1605
 
1319
- header_params = {
1320
- "parent" => request.parent
1321
- }
1606
+ header_params = {}
1607
+ if request.parent
1608
+ header_params["parent"] = request.parent
1609
+ end
1610
+
1322
1611
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1323
1612
  metadata[:"x-goog-request-params"] ||= request_params_header
1324
1613
 
@@ -1372,6 +1661,21 @@ module Google
1372
1661
  #
1373
1662
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1374
1663
  #
1664
+ # @example Basic example
1665
+ # require "google/cloud/deploy/v1"
1666
+ #
1667
+ # # Create a client object. The client can be reused for multiple calls.
1668
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1669
+ #
1670
+ # # Create a request. To set request fields, pass in keyword arguments.
1671
+ # request = Google::Cloud::Deploy::V1::ApproveRolloutRequest.new
1672
+ #
1673
+ # # Call the approve_rollout method.
1674
+ # result = client.approve_rollout request
1675
+ #
1676
+ # # The returned object is of type Google::Cloud::Deploy::V1::ApproveRolloutResponse.
1677
+ # p result
1678
+ #
1375
1679
  def approve_rollout request, options = nil
1376
1680
  raise ::ArgumentError, "request must be provided" if request.nil?
1377
1681
 
@@ -1389,9 +1693,11 @@ module Google
1389
1693
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1390
1694
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1391
1695
 
1392
- header_params = {
1393
- "name" => request.name
1394
- }
1696
+ header_params = {}
1697
+ if request.name
1698
+ header_params["name"] = request.name
1699
+ end
1700
+
1395
1701
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1396
1702
  metadata[:"x-goog-request-params"] ||= request_params_header
1397
1703
 
@@ -1442,7 +1748,7 @@ module Google
1442
1748
  # When paginating, all other provided parameters match
1443
1749
  # the call that provided the page token.
1444
1750
  # @param filter [::String]
1445
- # Optional. Filter builds to be returned. See https://google.aip.dev/160 for more
1751
+ # Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more
1446
1752
  # details.
1447
1753
  # @param order_by [::String]
1448
1754
  # Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
@@ -1455,6 +1761,27 @@ module Google
1455
1761
  #
1456
1762
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1457
1763
  #
1764
+ # @example Basic example
1765
+ # require "google/cloud/deploy/v1"
1766
+ #
1767
+ # # Create a client object. The client can be reused for multiple calls.
1768
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1769
+ #
1770
+ # # Create a request. To set request fields, pass in keyword arguments.
1771
+ # request = Google::Cloud::Deploy::V1::ListRolloutsRequest.new
1772
+ #
1773
+ # # Call the list_rollouts method.
1774
+ # result = client.list_rollouts request
1775
+ #
1776
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1777
+ # # iterate over all elements by calling #each, and the enumerable
1778
+ # # will lazily make API calls to fetch subsequent pages. Other
1779
+ # # methods are also available for managing paging directly.
1780
+ # result.each do |response|
1781
+ # # Each element is of type ::Google::Cloud::Deploy::V1::Rollout.
1782
+ # p response
1783
+ # end
1784
+ #
1458
1785
  def list_rollouts request, options = nil
1459
1786
  raise ::ArgumentError, "request must be provided" if request.nil?
1460
1787
 
@@ -1472,9 +1799,11 @@ module Google
1472
1799
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1473
1800
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1474
1801
 
1475
- header_params = {
1476
- "parent" => request.parent
1477
- }
1802
+ header_params = {}
1803
+ if request.parent
1804
+ header_params["parent"] = request.parent
1805
+ end
1806
+
1478
1807
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1479
1808
  metadata[:"x-goog-request-params"] ||= request_params_header
1480
1809
 
@@ -1525,6 +1854,21 @@ module Google
1525
1854
  #
1526
1855
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1527
1856
  #
1857
+ # @example Basic example
1858
+ # require "google/cloud/deploy/v1"
1859
+ #
1860
+ # # Create a client object. The client can be reused for multiple calls.
1861
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1862
+ #
1863
+ # # Create a request. To set request fields, pass in keyword arguments.
1864
+ # request = Google::Cloud::Deploy::V1::GetRolloutRequest.new
1865
+ #
1866
+ # # Call the get_rollout method.
1867
+ # result = client.get_rollout request
1868
+ #
1869
+ # # The returned object is of type Google::Cloud::Deploy::V1::Rollout.
1870
+ # p result
1871
+ #
1528
1872
  def get_rollout request, options = nil
1529
1873
  raise ::ArgumentError, "request must be provided" if request.nil?
1530
1874
 
@@ -1542,9 +1886,11 @@ module Google
1542
1886
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1543
1887
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1544
1888
 
1545
- header_params = {
1546
- "name" => request.name
1547
- }
1889
+ header_params = {}
1890
+ if request.name
1891
+ header_params["name"] = request.name
1892
+ end
1893
+
1548
1894
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1549
1895
  metadata[:"x-goog-request-params"] ||= request_params_header
1550
1896
 
@@ -1616,6 +1962,28 @@ module Google
1616
1962
  #
1617
1963
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1618
1964
  #
1965
+ # @example Basic example
1966
+ # require "google/cloud/deploy/v1"
1967
+ #
1968
+ # # Create a client object. The client can be reused for multiple calls.
1969
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
1970
+ #
1971
+ # # Create a request. To set request fields, pass in keyword arguments.
1972
+ # request = Google::Cloud::Deploy::V1::CreateRolloutRequest.new
1973
+ #
1974
+ # # Call the create_rollout method.
1975
+ # result = client.create_rollout request
1976
+ #
1977
+ # # The returned object is of type Gapic::Operation. You can use this
1978
+ # # object to check the status of an operation, cancel it, or wait
1979
+ # # for results. Here is how to block until completion:
1980
+ # result.wait_until_done! timeout: 60
1981
+ # if result.response?
1982
+ # p result.response
1983
+ # else
1984
+ # puts "Error!"
1985
+ # end
1986
+ #
1619
1987
  def create_rollout request, options = nil
1620
1988
  raise ::ArgumentError, "request must be provided" if request.nil?
1621
1989
 
@@ -1633,9 +2001,11 @@ module Google
1633
2001
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1634
2002
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1635
2003
 
1636
- header_params = {
1637
- "parent" => request.parent
1638
- }
2004
+ header_params = {}
2005
+ if request.parent
2006
+ header_params["parent"] = request.parent
2007
+ end
2008
+
1639
2009
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1640
2010
  metadata[:"x-goog-request-params"] ||= request_params_header
1641
2011
 
@@ -1685,6 +2055,21 @@ module Google
1685
2055
  #
1686
2056
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1687
2057
  #
2058
+ # @example Basic example
2059
+ # require "google/cloud/deploy/v1"
2060
+ #
2061
+ # # Create a client object. The client can be reused for multiple calls.
2062
+ # client = Google::Cloud::Deploy::V1::CloudDeploy::Client.new
2063
+ #
2064
+ # # Create a request. To set request fields, pass in keyword arguments.
2065
+ # request = Google::Cloud::Deploy::V1::GetConfigRequest.new
2066
+ #
2067
+ # # Call the get_config method.
2068
+ # result = client.get_config request
2069
+ #
2070
+ # # The returned object is of type Google::Cloud::Deploy::V1::Config.
2071
+ # p result
2072
+ #
1688
2073
  def get_config request, options = nil
1689
2074
  raise ::ArgumentError, "request must be provided" if request.nil?
1690
2075
 
@@ -1702,9 +2087,11 @@ module Google
1702
2087
  gapic_version: ::Google::Cloud::Deploy::V1::VERSION
1703
2088
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1704
2089
 
1705
- header_params = {
1706
- "name" => request.name
1707
- }
2090
+ header_params = {}
2091
+ if request.name
2092
+ header_params["name"] = request.name
2093
+ end
2094
+
1708
2095
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1709
2096
  metadata[:"x-goog-request-params"] ||= request_params_header
1710
2097