google-cloud-security-private_ca-v1 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -231,6 +231,21 @@ module Google
231
231
  #
232
232
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
233
233
  #
234
+ # @example Basic example
235
+ # require "google/cloud/security/private_ca/v1"
236
+ #
237
+ # # Create a client object. The client can be reused for multiple calls.
238
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
239
+ #
240
+ # # Create a request. To set request fields, pass in keyword arguments.
241
+ # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new
242
+ #
243
+ # # Call the create_certificate method.
244
+ # result = client.create_certificate request
245
+ #
246
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
247
+ # p result
248
+ #
234
249
  def create_certificate request, options = nil
235
250
  raise ::ArgumentError, "request must be provided" if request.nil?
236
251
 
@@ -248,9 +263,11 @@ module Google
248
263
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
249
264
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
250
265
 
251
- header_params = {
252
- "parent" => request.parent
253
- }
266
+ header_params = {}
267
+ if request.parent
268
+ header_params["parent"] = request.parent
269
+ end
270
+
254
271
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
255
272
  metadata[:"x-goog-request-params"] ||= request_params_header
256
273
 
@@ -299,6 +316,21 @@ module Google
299
316
  #
300
317
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
301
318
  #
319
+ # @example Basic example
320
+ # require "google/cloud/security/private_ca/v1"
321
+ #
322
+ # # Create a client object. The client can be reused for multiple calls.
323
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
324
+ #
325
+ # # Create a request. To set request fields, pass in keyword arguments.
326
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new
327
+ #
328
+ # # Call the get_certificate method.
329
+ # result = client.get_certificate request
330
+ #
331
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
332
+ # p result
333
+ #
302
334
  def get_certificate request, options = nil
303
335
  raise ::ArgumentError, "request must be provided" if request.nil?
304
336
 
@@ -316,9 +348,11 @@ module Google
316
348
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
317
349
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
318
350
 
319
- header_params = {
320
- "name" => request.name
321
- }
351
+ header_params = {}
352
+ if request.name
353
+ header_params["name"] = request.name
354
+ end
355
+
322
356
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
323
357
  metadata[:"x-goog-request-params"] ||= request_params_header
324
358
 
@@ -387,6 +421,27 @@ module Google
387
421
  #
388
422
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
389
423
  #
424
+ # @example Basic example
425
+ # require "google/cloud/security/private_ca/v1"
426
+ #
427
+ # # Create a client object. The client can be reused for multiple calls.
428
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
429
+ #
430
+ # # Create a request. To set request fields, pass in keyword arguments.
431
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new
432
+ #
433
+ # # Call the list_certificates method.
434
+ # result = client.list_certificates request
435
+ #
436
+ # # The returned object is of type Gapic::PagedEnumerable. You can
437
+ # # iterate over all elements by calling #each, and the enumerable
438
+ # # will lazily make API calls to fetch subsequent pages. Other
439
+ # # methods are also available for managing paging directly.
440
+ # result.each do |response|
441
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::Certificate.
442
+ # p response
443
+ # end
444
+ #
390
445
  def list_certificates request, options = nil
391
446
  raise ::ArgumentError, "request must be provided" if request.nil?
392
447
 
@@ -404,9 +459,11 @@ module Google
404
459
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
405
460
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
406
461
 
407
- header_params = {
408
- "parent" => request.parent
409
- }
462
+ header_params = {}
463
+ if request.parent
464
+ header_params["parent"] = request.parent
465
+ end
466
+
410
467
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
411
468
  metadata[:"x-goog-request-params"] ||= request_params_header
412
469
 
@@ -474,6 +531,21 @@ module Google
474
531
  #
475
532
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
476
533
  #
534
+ # @example Basic example
535
+ # require "google/cloud/security/private_ca/v1"
536
+ #
537
+ # # Create a client object. The client can be reused for multiple calls.
538
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
539
+ #
540
+ # # Create a request. To set request fields, pass in keyword arguments.
541
+ # request = Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new
542
+ #
543
+ # # Call the revoke_certificate method.
544
+ # result = client.revoke_certificate request
545
+ #
546
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
547
+ # p result
548
+ #
477
549
  def revoke_certificate request, options = nil
478
550
  raise ::ArgumentError, "request must be provided" if request.nil?
479
551
 
@@ -491,9 +563,11 @@ module Google
491
563
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
492
564
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
493
565
 
494
- header_params = {
495
- "name" => request.name
496
- }
566
+ header_params = {}
567
+ if request.name
568
+ header_params["name"] = request.name
569
+ end
570
+
497
571
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
498
572
  metadata[:"x-goog-request-params"] ||= request_params_header
499
573
 
@@ -559,6 +633,21 @@ module Google
559
633
  #
560
634
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
561
635
  #
636
+ # @example Basic example
637
+ # require "google/cloud/security/private_ca/v1"
638
+ #
639
+ # # Create a client object. The client can be reused for multiple calls.
640
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
641
+ #
642
+ # # Create a request. To set request fields, pass in keyword arguments.
643
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new
644
+ #
645
+ # # Call the update_certificate method.
646
+ # result = client.update_certificate request
647
+ #
648
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
649
+ # p result
650
+ #
562
651
  def update_certificate request, options = nil
563
652
  raise ::ArgumentError, "request must be provided" if request.nil?
564
653
 
@@ -576,9 +665,11 @@ module Google
576
665
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
577
666
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
578
667
 
579
- header_params = {
580
- "certificate.name" => request.certificate.name
581
- }
668
+ header_params = {}
669
+ if request.certificate&.name
670
+ header_params["certificate.name"] = request.certificate.name
671
+ end
672
+
582
673
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
583
674
  metadata[:"x-goog-request-params"] ||= request_params_header
584
675
 
@@ -653,6 +744,28 @@ module Google
653
744
  #
654
745
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
655
746
  #
747
+ # @example Basic example
748
+ # require "google/cloud/security/private_ca/v1"
749
+ #
750
+ # # Create a client object. The client can be reused for multiple calls.
751
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
752
+ #
753
+ # # Create a request. To set request fields, pass in keyword arguments.
754
+ # request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new
755
+ #
756
+ # # Call the activate_certificate_authority method.
757
+ # result = client.activate_certificate_authority request
758
+ #
759
+ # # The returned object is of type Gapic::Operation. You can use this
760
+ # # object to check the status of an operation, cancel it, or wait
761
+ # # for results. Here is how to block until completion:
762
+ # result.wait_until_done! timeout: 60
763
+ # if result.response?
764
+ # p result.response
765
+ # else
766
+ # puts "Error!"
767
+ # end
768
+ #
656
769
  def activate_certificate_authority request, options = nil
657
770
  raise ::ArgumentError, "request must be provided" if request.nil?
658
771
 
@@ -670,9 +783,11 @@ module Google
670
783
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
671
784
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
672
785
 
673
- header_params = {
674
- "name" => request.name
675
- }
786
+ header_params = {}
787
+ if request.name
788
+ header_params["name"] = request.name
789
+ end
790
+
676
791
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
677
792
  metadata[:"x-goog-request-params"] ||= request_params_header
678
793
 
@@ -743,6 +858,28 @@ module Google
743
858
  #
744
859
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
745
860
  #
861
+ # @example Basic example
862
+ # require "google/cloud/security/private_ca/v1"
863
+ #
864
+ # # Create a client object. The client can be reused for multiple calls.
865
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
866
+ #
867
+ # # Create a request. To set request fields, pass in keyword arguments.
868
+ # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new
869
+ #
870
+ # # Call the create_certificate_authority method.
871
+ # result = client.create_certificate_authority request
872
+ #
873
+ # # The returned object is of type Gapic::Operation. You can use this
874
+ # # object to check the status of an operation, cancel it, or wait
875
+ # # for results. Here is how to block until completion:
876
+ # result.wait_until_done! timeout: 60
877
+ # if result.response?
878
+ # p result.response
879
+ # else
880
+ # puts "Error!"
881
+ # end
882
+ #
746
883
  def create_certificate_authority request, options = nil
747
884
  raise ::ArgumentError, "request must be provided" if request.nil?
748
885
 
@@ -760,9 +897,11 @@ module Google
760
897
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
761
898
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
762
899
 
763
- header_params = {
764
- "parent" => request.parent
765
- }
900
+ header_params = {}
901
+ if request.parent
902
+ header_params["parent"] = request.parent
903
+ end
904
+
766
905
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
767
906
  metadata[:"x-goog-request-params"] ||= request_params_header
768
907
 
@@ -827,6 +966,28 @@ module Google
827
966
  #
828
967
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
829
968
  #
969
+ # @example Basic example
970
+ # require "google/cloud/security/private_ca/v1"
971
+ #
972
+ # # Create a client object. The client can be reused for multiple calls.
973
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
974
+ #
975
+ # # Create a request. To set request fields, pass in keyword arguments.
976
+ # request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new
977
+ #
978
+ # # Call the disable_certificate_authority method.
979
+ # result = client.disable_certificate_authority request
980
+ #
981
+ # # The returned object is of type Gapic::Operation. You can use this
982
+ # # object to check the status of an operation, cancel it, or wait
983
+ # # for results. Here is how to block until completion:
984
+ # result.wait_until_done! timeout: 60
985
+ # if result.response?
986
+ # p result.response
987
+ # else
988
+ # puts "Error!"
989
+ # end
990
+ #
830
991
  def disable_certificate_authority request, options = nil
831
992
  raise ::ArgumentError, "request must be provided" if request.nil?
832
993
 
@@ -844,9 +1005,11 @@ module Google
844
1005
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
845
1006
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
846
1007
 
847
- header_params = {
848
- "name" => request.name
849
- }
1008
+ header_params = {}
1009
+ if request.name
1010
+ header_params["name"] = request.name
1011
+ end
1012
+
850
1013
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
851
1014
  metadata[:"x-goog-request-params"] ||= request_params_header
852
1015
 
@@ -911,6 +1074,28 @@ module Google
911
1074
  #
912
1075
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
913
1076
  #
1077
+ # @example Basic example
1078
+ # require "google/cloud/security/private_ca/v1"
1079
+ #
1080
+ # # Create a client object. The client can be reused for multiple calls.
1081
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
1082
+ #
1083
+ # # Create a request. To set request fields, pass in keyword arguments.
1084
+ # request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new
1085
+ #
1086
+ # # Call the enable_certificate_authority method.
1087
+ # result = client.enable_certificate_authority request
1088
+ #
1089
+ # # The returned object is of type Gapic::Operation. You can use this
1090
+ # # object to check the status of an operation, cancel it, or wait
1091
+ # # for results. Here is how to block until completion:
1092
+ # result.wait_until_done! timeout: 60
1093
+ # if result.response?
1094
+ # p result.response
1095
+ # else
1096
+ # puts "Error!"
1097
+ # end
1098
+ #
914
1099
  def enable_certificate_authority request, options = nil
915
1100
  raise ::ArgumentError, "request must be provided" if request.nil?
916
1101
 
@@ -928,9 +1113,11 @@ module Google
928
1113
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
929
1114
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
930
1115
 
931
- header_params = {
932
- "name" => request.name
933
- }
1116
+ header_params = {}
1117
+ if request.name
1118
+ header_params["name"] = request.name
1119
+ end
1120
+
934
1121
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
935
1122
  metadata[:"x-goog-request-params"] ||= request_params_header
936
1123
 
@@ -987,6 +1174,21 @@ module Google
987
1174
  #
988
1175
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
989
1176
  #
1177
+ # @example Basic example
1178
+ # require "google/cloud/security/private_ca/v1"
1179
+ #
1180
+ # # Create a client object. The client can be reused for multiple calls.
1181
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
1182
+ #
1183
+ # # Create a request. To set request fields, pass in keyword arguments.
1184
+ # request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new
1185
+ #
1186
+ # # Call the fetch_certificate_authority_csr method.
1187
+ # result = client.fetch_certificate_authority_csr request
1188
+ #
1189
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse.
1190
+ # p result
1191
+ #
990
1192
  def fetch_certificate_authority_csr request, options = nil
991
1193
  raise ::ArgumentError, "request must be provided" if request.nil?
992
1194
 
@@ -1004,9 +1206,11 @@ module Google
1004
1206
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1005
1207
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1006
1208
 
1007
- header_params = {
1008
- "name" => request.name
1009
- }
1209
+ header_params = {}
1210
+ if request.name
1211
+ header_params["name"] = request.name
1212
+ end
1213
+
1010
1214
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1011
1215
  metadata[:"x-goog-request-params"] ||= request_params_header
1012
1216
 
@@ -1056,6 +1260,21 @@ module Google
1056
1260
  #
1057
1261
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1058
1262
  #
1263
+ # @example Basic example
1264
+ # require "google/cloud/security/private_ca/v1"
1265
+ #
1266
+ # # Create a client object. The client can be reused for multiple calls.
1267
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
1268
+ #
1269
+ # # Create a request. To set request fields, pass in keyword arguments.
1270
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new
1271
+ #
1272
+ # # Call the get_certificate_authority method.
1273
+ # result = client.get_certificate_authority request
1274
+ #
1275
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.
1276
+ # p result
1277
+ #
1059
1278
  def get_certificate_authority request, options = nil
1060
1279
  raise ::ArgumentError, "request must be provided" if request.nil?
1061
1280
 
@@ -1073,9 +1292,11 @@ module Google
1073
1292
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1074
1293
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1075
1294
 
1076
- header_params = {
1077
- "name" => request.name
1078
- }
1295
+ header_params = {}
1296
+ if request.name
1297
+ header_params["name"] = request.name
1298
+ end
1299
+
1079
1300
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1080
1301
  metadata[:"x-goog-request-params"] ||= request_params_header
1081
1302
 
@@ -1140,6 +1361,27 @@ module Google
1140
1361
  #
1141
1362
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1142
1363
  #
1364
+ # @example Basic example
1365
+ # require "google/cloud/security/private_ca/v1"
1366
+ #
1367
+ # # Create a client object. The client can be reused for multiple calls.
1368
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
1369
+ #
1370
+ # # Create a request. To set request fields, pass in keyword arguments.
1371
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new
1372
+ #
1373
+ # # Call the list_certificate_authorities method.
1374
+ # result = client.list_certificate_authorities request
1375
+ #
1376
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1377
+ # # iterate over all elements by calling #each, and the enumerable
1378
+ # # will lazily make API calls to fetch subsequent pages. Other
1379
+ # # methods are also available for managing paging directly.
1380
+ # result.each do |response|
1381
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.
1382
+ # p response
1383
+ # end
1384
+ #
1143
1385
  def list_certificate_authorities request, options = nil
1144
1386
  raise ::ArgumentError, "request must be provided" if request.nil?
1145
1387
 
@@ -1157,9 +1399,11 @@ module Google
1157
1399
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1158
1400
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1159
1401
 
1160
- header_params = {
1161
- "parent" => request.parent
1162
- }
1402
+ header_params = {}
1403
+ if request.parent
1404
+ header_params["parent"] = request.parent
1405
+ end
1406
+
1163
1407
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1164
1408
  metadata[:"x-goog-request-params"] ||= request_params_header
1165
1409
 
@@ -1224,6 +1468,28 @@ module Google
1224
1468
  #
1225
1469
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1226
1470
  #
1471
+ # @example Basic example
1472
+ # require "google/cloud/security/private_ca/v1"
1473
+ #
1474
+ # # Create a client object. The client can be reused for multiple calls.
1475
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
1476
+ #
1477
+ # # Create a request. To set request fields, pass in keyword arguments.
1478
+ # request = Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new
1479
+ #
1480
+ # # Call the undelete_certificate_authority method.
1481
+ # result = client.undelete_certificate_authority request
1482
+ #
1483
+ # # The returned object is of type Gapic::Operation. You can use this
1484
+ # # object to check the status of an operation, cancel it, or wait
1485
+ # # for results. Here is how to block until completion:
1486
+ # result.wait_until_done! timeout: 60
1487
+ # if result.response?
1488
+ # p result.response
1489
+ # else
1490
+ # puts "Error!"
1491
+ # end
1492
+ #
1227
1493
  def undelete_certificate_authority request, options = nil
1228
1494
  raise ::ArgumentError, "request must be provided" if request.nil?
1229
1495
 
@@ -1241,9 +1507,11 @@ module Google
1241
1507
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1242
1508
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1243
1509
 
1244
- header_params = {
1245
- "name" => request.name
1246
- }
1510
+ header_params = {}
1511
+ if request.name
1512
+ header_params["name"] = request.name
1513
+ end
1514
+
1247
1515
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1248
1516
  metadata[:"x-goog-request-params"] ||= request_params_header
1249
1517
 
@@ -1311,6 +1579,28 @@ module Google
1311
1579
  #
1312
1580
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1313
1581
  #
1582
+ # @example Basic example
1583
+ # require "google/cloud/security/private_ca/v1"
1584
+ #
1585
+ # # Create a client object. The client can be reused for multiple calls.
1586
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
1587
+ #
1588
+ # # Create a request. To set request fields, pass in keyword arguments.
1589
+ # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new
1590
+ #
1591
+ # # Call the delete_certificate_authority method.
1592
+ # result = client.delete_certificate_authority request
1593
+ #
1594
+ # # The returned object is of type Gapic::Operation. You can use this
1595
+ # # object to check the status of an operation, cancel it, or wait
1596
+ # # for results. Here is how to block until completion:
1597
+ # result.wait_until_done! timeout: 60
1598
+ # if result.response?
1599
+ # p result.response
1600
+ # else
1601
+ # puts "Error!"
1602
+ # end
1603
+ #
1314
1604
  def delete_certificate_authority request, options = nil
1315
1605
  raise ::ArgumentError, "request must be provided" if request.nil?
1316
1606
 
@@ -1328,9 +1618,11 @@ module Google
1328
1618
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1329
1619
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1330
1620
 
1331
- header_params = {
1332
- "name" => request.name
1333
- }
1621
+ header_params = {}
1622
+ if request.name
1623
+ header_params["name"] = request.name
1624
+ end
1625
+
1334
1626
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1335
1627
  metadata[:"x-goog-request-params"] ||= request_params_header
1336
1628
 
@@ -1396,6 +1688,28 @@ module Google
1396
1688
  #
1397
1689
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1398
1690
  #
1691
+ # @example Basic example
1692
+ # require "google/cloud/security/private_ca/v1"
1693
+ #
1694
+ # # Create a client object. The client can be reused for multiple calls.
1695
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
1696
+ #
1697
+ # # Create a request. To set request fields, pass in keyword arguments.
1698
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new
1699
+ #
1700
+ # # Call the update_certificate_authority method.
1701
+ # result = client.update_certificate_authority request
1702
+ #
1703
+ # # The returned object is of type Gapic::Operation. You can use this
1704
+ # # object to check the status of an operation, cancel it, or wait
1705
+ # # for results. Here is how to block until completion:
1706
+ # result.wait_until_done! timeout: 60
1707
+ # if result.response?
1708
+ # p result.response
1709
+ # else
1710
+ # puts "Error!"
1711
+ # end
1712
+ #
1399
1713
  def update_certificate_authority request, options = nil
1400
1714
  raise ::ArgumentError, "request must be provided" if request.nil?
1401
1715
 
@@ -1413,9 +1727,11 @@ module Google
1413
1727
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1414
1728
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1415
1729
 
1416
- header_params = {
1417
- "certificate_authority.name" => request.certificate_authority.name
1418
- }
1730
+ header_params = {}
1731
+ if request.certificate_authority&.name
1732
+ header_params["certificate_authority.name"] = request.certificate_authority.name
1733
+ end
1734
+
1419
1735
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1420
1736
  metadata[:"x-goog-request-params"] ||= request_params_header
1421
1737
 
@@ -1485,6 +1801,28 @@ module Google
1485
1801
  #
1486
1802
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1487
1803
  #
1804
+ # @example Basic example
1805
+ # require "google/cloud/security/private_ca/v1"
1806
+ #
1807
+ # # Create a client object. The client can be reused for multiple calls.
1808
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
1809
+ #
1810
+ # # Create a request. To set request fields, pass in keyword arguments.
1811
+ # request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new
1812
+ #
1813
+ # # Call the create_ca_pool method.
1814
+ # result = client.create_ca_pool request
1815
+ #
1816
+ # # The returned object is of type Gapic::Operation. You can use this
1817
+ # # object to check the status of an operation, cancel it, or wait
1818
+ # # for results. Here is how to block until completion:
1819
+ # result.wait_until_done! timeout: 60
1820
+ # if result.response?
1821
+ # p result.response
1822
+ # else
1823
+ # puts "Error!"
1824
+ # end
1825
+ #
1488
1826
  def create_ca_pool request, options = nil
1489
1827
  raise ::ArgumentError, "request must be provided" if request.nil?
1490
1828
 
@@ -1502,9 +1840,11 @@ module Google
1502
1840
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1503
1841
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1504
1842
 
1505
- header_params = {
1506
- "parent" => request.parent
1507
- }
1843
+ header_params = {}
1844
+ if request.parent
1845
+ header_params["parent"] = request.parent
1846
+ end
1847
+
1508
1848
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1509
1849
  metadata[:"x-goog-request-params"] ||= request_params_header
1510
1850
 
@@ -1570,6 +1910,28 @@ module Google
1570
1910
  #
1571
1911
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1572
1912
  #
1913
+ # @example Basic example
1914
+ # require "google/cloud/security/private_ca/v1"
1915
+ #
1916
+ # # Create a client object. The client can be reused for multiple calls.
1917
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
1918
+ #
1919
+ # # Create a request. To set request fields, pass in keyword arguments.
1920
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new
1921
+ #
1922
+ # # Call the update_ca_pool method.
1923
+ # result = client.update_ca_pool request
1924
+ #
1925
+ # # The returned object is of type Gapic::Operation. You can use this
1926
+ # # object to check the status of an operation, cancel it, or wait
1927
+ # # for results. Here is how to block until completion:
1928
+ # result.wait_until_done! timeout: 60
1929
+ # if result.response?
1930
+ # p result.response
1931
+ # else
1932
+ # puts "Error!"
1933
+ # end
1934
+ #
1573
1935
  def update_ca_pool request, options = nil
1574
1936
  raise ::ArgumentError, "request must be provided" if request.nil?
1575
1937
 
@@ -1587,9 +1949,11 @@ module Google
1587
1949
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1588
1950
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1589
1951
 
1590
- header_params = {
1591
- "ca_pool.name" => request.ca_pool.name
1592
- }
1952
+ header_params = {}
1953
+ if request.ca_pool&.name
1954
+ header_params["ca_pool.name"] = request.ca_pool.name
1955
+ end
1956
+
1593
1957
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1594
1958
  metadata[:"x-goog-request-params"] ||= request_params_header
1595
1959
 
@@ -1639,6 +2003,21 @@ module Google
1639
2003
  #
1640
2004
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1641
2005
  #
2006
+ # @example Basic example
2007
+ # require "google/cloud/security/private_ca/v1"
2008
+ #
2009
+ # # Create a client object. The client can be reused for multiple calls.
2010
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2011
+ #
2012
+ # # Create a request. To set request fields, pass in keyword arguments.
2013
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new
2014
+ #
2015
+ # # Call the get_ca_pool method.
2016
+ # result = client.get_ca_pool request
2017
+ #
2018
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool.
2019
+ # p result
2020
+ #
1642
2021
  def get_ca_pool request, options = nil
1643
2022
  raise ::ArgumentError, "request must be provided" if request.nil?
1644
2023
 
@@ -1656,9 +2035,11 @@ module Google
1656
2035
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1657
2036
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1658
2037
 
1659
- header_params = {
1660
- "name" => request.name
1661
- }
2038
+ header_params = {}
2039
+ if request.name
2040
+ header_params["name"] = request.name
2041
+ end
2042
+
1662
2043
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1663
2044
  metadata[:"x-goog-request-params"] ||= request_params_header
1664
2045
 
@@ -1723,6 +2104,27 @@ module Google
1723
2104
  #
1724
2105
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1725
2106
  #
2107
+ # @example Basic example
2108
+ # require "google/cloud/security/private_ca/v1"
2109
+ #
2110
+ # # Create a client object. The client can be reused for multiple calls.
2111
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2112
+ #
2113
+ # # Create a request. To set request fields, pass in keyword arguments.
2114
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new
2115
+ #
2116
+ # # Call the list_ca_pools method.
2117
+ # result = client.list_ca_pools request
2118
+ #
2119
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2120
+ # # iterate over all elements by calling #each, and the enumerable
2121
+ # # will lazily make API calls to fetch subsequent pages. Other
2122
+ # # methods are also available for managing paging directly.
2123
+ # result.each do |response|
2124
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CaPool.
2125
+ # p response
2126
+ # end
2127
+ #
1726
2128
  def list_ca_pools request, options = nil
1727
2129
  raise ::ArgumentError, "request must be provided" if request.nil?
1728
2130
 
@@ -1740,9 +2142,11 @@ module Google
1740
2142
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1741
2143
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1742
2144
 
1743
- header_params = {
1744
- "parent" => request.parent
1745
- }
2145
+ header_params = {}
2146
+ if request.parent
2147
+ header_params["parent"] = request.parent
2148
+ end
2149
+
1746
2150
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1747
2151
  metadata[:"x-goog-request-params"] ||= request_params_header
1748
2152
 
@@ -1807,6 +2211,28 @@ module Google
1807
2211
  #
1808
2212
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1809
2213
  #
2214
+ # @example Basic example
2215
+ # require "google/cloud/security/private_ca/v1"
2216
+ #
2217
+ # # Create a client object. The client can be reused for multiple calls.
2218
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2219
+ #
2220
+ # # Create a request. To set request fields, pass in keyword arguments.
2221
+ # request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new
2222
+ #
2223
+ # # Call the delete_ca_pool method.
2224
+ # result = client.delete_ca_pool request
2225
+ #
2226
+ # # The returned object is of type Gapic::Operation. You can use this
2227
+ # # object to check the status of an operation, cancel it, or wait
2228
+ # # for results. Here is how to block until completion:
2229
+ # result.wait_until_done! timeout: 60
2230
+ # if result.response?
2231
+ # p result.response
2232
+ # else
2233
+ # puts "Error!"
2234
+ # end
2235
+ #
1810
2236
  def delete_ca_pool request, options = nil
1811
2237
  raise ::ArgumentError, "request must be provided" if request.nil?
1812
2238
 
@@ -1824,9 +2250,11 @@ module Google
1824
2250
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1825
2251
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1826
2252
 
1827
- header_params = {
1828
- "name" => request.name
1829
- }
2253
+ header_params = {}
2254
+ if request.name
2255
+ header_params["name"] = request.name
2256
+ end
2257
+
1830
2258
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1831
2259
  metadata[:"x-goog-request-params"] ||= request_params_header
1832
2260
 
@@ -1893,6 +2321,21 @@ module Google
1893
2321
  #
1894
2322
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1895
2323
  #
2324
+ # @example Basic example
2325
+ # require "google/cloud/security/private_ca/v1"
2326
+ #
2327
+ # # Create a client object. The client can be reused for multiple calls.
2328
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2329
+ #
2330
+ # # Create a request. To set request fields, pass in keyword arguments.
2331
+ # request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new
2332
+ #
2333
+ # # Call the fetch_ca_certs method.
2334
+ # result = client.fetch_ca_certs request
2335
+ #
2336
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse.
2337
+ # p result
2338
+ #
1896
2339
  def fetch_ca_certs request, options = nil
1897
2340
  raise ::ArgumentError, "request must be provided" if request.nil?
1898
2341
 
@@ -1910,9 +2353,11 @@ module Google
1910
2353
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1911
2354
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1912
2355
 
1913
- header_params = {
1914
- "ca_pool" => request.ca_pool
1915
- }
2356
+ header_params = {}
2357
+ if request.ca_pool
2358
+ header_params["ca_pool"] = request.ca_pool
2359
+ end
2360
+
1916
2361
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1917
2362
  metadata[:"x-goog-request-params"] ||= request_params_header
1918
2363
 
@@ -1962,6 +2407,21 @@ module Google
1962
2407
  #
1963
2408
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1964
2409
  #
2410
+ # @example Basic example
2411
+ # require "google/cloud/security/private_ca/v1"
2412
+ #
2413
+ # # Create a client object. The client can be reused for multiple calls.
2414
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2415
+ #
2416
+ # # Create a request. To set request fields, pass in keyword arguments.
2417
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new
2418
+ #
2419
+ # # Call the get_certificate_revocation_list method.
2420
+ # result = client.get_certificate_revocation_list request
2421
+ #
2422
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.
2423
+ # p result
2424
+ #
1965
2425
  def get_certificate_revocation_list request, options = nil
1966
2426
  raise ::ArgumentError, "request must be provided" if request.nil?
1967
2427
 
@@ -1979,9 +2439,11 @@ module Google
1979
2439
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1980
2440
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1981
2441
 
1982
- header_params = {
1983
- "name" => request.name
1984
- }
2442
+ header_params = {}
2443
+ if request.name
2444
+ header_params["name"] = request.name
2445
+ end
2446
+
1985
2447
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1986
2448
  metadata[:"x-goog-request-params"] ||= request_params_header
1987
2449
 
@@ -2046,6 +2508,27 @@ module Google
2046
2508
  #
2047
2509
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2048
2510
  #
2511
+ # @example Basic example
2512
+ # require "google/cloud/security/private_ca/v1"
2513
+ #
2514
+ # # Create a client object. The client can be reused for multiple calls.
2515
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2516
+ #
2517
+ # # Create a request. To set request fields, pass in keyword arguments.
2518
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new
2519
+ #
2520
+ # # Call the list_certificate_revocation_lists method.
2521
+ # result = client.list_certificate_revocation_lists request
2522
+ #
2523
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2524
+ # # iterate over all elements by calling #each, and the enumerable
2525
+ # # will lazily make API calls to fetch subsequent pages. Other
2526
+ # # methods are also available for managing paging directly.
2527
+ # result.each do |response|
2528
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.
2529
+ # p response
2530
+ # end
2531
+ #
2049
2532
  def list_certificate_revocation_lists request, options = nil
2050
2533
  raise ::ArgumentError, "request must be provided" if request.nil?
2051
2534
 
@@ -2063,9 +2546,11 @@ module Google
2063
2546
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2064
2547
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2065
2548
 
2066
- header_params = {
2067
- "parent" => request.parent
2068
- }
2549
+ header_params = {}
2550
+ if request.parent
2551
+ header_params["parent"] = request.parent
2552
+ end
2553
+
2069
2554
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2070
2555
  metadata[:"x-goog-request-params"] ||= request_params_header
2071
2556
 
@@ -2131,6 +2616,28 @@ module Google
2131
2616
  #
2132
2617
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2133
2618
  #
2619
+ # @example Basic example
2620
+ # require "google/cloud/security/private_ca/v1"
2621
+ #
2622
+ # # Create a client object. The client can be reused for multiple calls.
2623
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2624
+ #
2625
+ # # Create a request. To set request fields, pass in keyword arguments.
2626
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new
2627
+ #
2628
+ # # Call the update_certificate_revocation_list method.
2629
+ # result = client.update_certificate_revocation_list request
2630
+ #
2631
+ # # The returned object is of type Gapic::Operation. You can use this
2632
+ # # object to check the status of an operation, cancel it, or wait
2633
+ # # for results. Here is how to block until completion:
2634
+ # result.wait_until_done! timeout: 60
2635
+ # if result.response?
2636
+ # p result.response
2637
+ # else
2638
+ # puts "Error!"
2639
+ # end
2640
+ #
2134
2641
  def update_certificate_revocation_list request, options = nil
2135
2642
  raise ::ArgumentError, "request must be provided" if request.nil?
2136
2643
 
@@ -2148,9 +2655,11 @@ module Google
2148
2655
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2149
2656
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2150
2657
 
2151
- header_params = {
2152
- "certificate_revocation_list.name" => request.certificate_revocation_list.name
2153
- }
2658
+ header_params = {}
2659
+ if request.certificate_revocation_list&.name
2660
+ header_params["certificate_revocation_list.name"] = request.certificate_revocation_list.name
2661
+ end
2662
+
2154
2663
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2155
2664
  metadata[:"x-goog-request-params"] ||= request_params_header
2156
2665
 
@@ -2221,6 +2730,28 @@ module Google
2221
2730
  #
2222
2731
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2223
2732
  #
2733
+ # @example Basic example
2734
+ # require "google/cloud/security/private_ca/v1"
2735
+ #
2736
+ # # Create a client object. The client can be reused for multiple calls.
2737
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2738
+ #
2739
+ # # Create a request. To set request fields, pass in keyword arguments.
2740
+ # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new
2741
+ #
2742
+ # # Call the create_certificate_template method.
2743
+ # result = client.create_certificate_template request
2744
+ #
2745
+ # # The returned object is of type Gapic::Operation. You can use this
2746
+ # # object to check the status of an operation, cancel it, or wait
2747
+ # # for results. Here is how to block until completion:
2748
+ # result.wait_until_done! timeout: 60
2749
+ # if result.response?
2750
+ # p result.response
2751
+ # else
2752
+ # puts "Error!"
2753
+ # end
2754
+ #
2224
2755
  def create_certificate_template request, options = nil
2225
2756
  raise ::ArgumentError, "request must be provided" if request.nil?
2226
2757
 
@@ -2238,9 +2769,11 @@ module Google
2238
2769
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2239
2770
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2240
2771
 
2241
- header_params = {
2242
- "parent" => request.parent
2243
- }
2772
+ header_params = {}
2773
+ if request.parent
2774
+ header_params["parent"] = request.parent
2775
+ end
2776
+
2244
2777
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2245
2778
  metadata[:"x-goog-request-params"] ||= request_params_header
2246
2779
 
@@ -2305,6 +2838,28 @@ module Google
2305
2838
  #
2306
2839
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2307
2840
  #
2841
+ # @example Basic example
2842
+ # require "google/cloud/security/private_ca/v1"
2843
+ #
2844
+ # # Create a client object. The client can be reused for multiple calls.
2845
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2846
+ #
2847
+ # # Create a request. To set request fields, pass in keyword arguments.
2848
+ # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new
2849
+ #
2850
+ # # Call the delete_certificate_template method.
2851
+ # result = client.delete_certificate_template request
2852
+ #
2853
+ # # The returned object is of type Gapic::Operation. You can use this
2854
+ # # object to check the status of an operation, cancel it, or wait
2855
+ # # for results. Here is how to block until completion:
2856
+ # result.wait_until_done! timeout: 60
2857
+ # if result.response?
2858
+ # p result.response
2859
+ # else
2860
+ # puts "Error!"
2861
+ # end
2862
+ #
2308
2863
  def delete_certificate_template request, options = nil
2309
2864
  raise ::ArgumentError, "request must be provided" if request.nil?
2310
2865
 
@@ -2322,9 +2877,11 @@ module Google
2322
2877
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2323
2878
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2324
2879
 
2325
- header_params = {
2326
- "name" => request.name
2327
- }
2880
+ header_params = {}
2881
+ if request.name
2882
+ header_params["name"] = request.name
2883
+ end
2884
+
2328
2885
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2329
2886
  metadata[:"x-goog-request-params"] ||= request_params_header
2330
2887
 
@@ -2375,6 +2932,21 @@ module Google
2375
2932
  #
2376
2933
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2377
2934
  #
2935
+ # @example Basic example
2936
+ # require "google/cloud/security/private_ca/v1"
2937
+ #
2938
+ # # Create a client object. The client can be reused for multiple calls.
2939
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
2940
+ #
2941
+ # # Create a request. To set request fields, pass in keyword arguments.
2942
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new
2943
+ #
2944
+ # # Call the get_certificate_template method.
2945
+ # result = client.get_certificate_template request
2946
+ #
2947
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.
2948
+ # p result
2949
+ #
2378
2950
  def get_certificate_template request, options = nil
2379
2951
  raise ::ArgumentError, "request must be provided" if request.nil?
2380
2952
 
@@ -2392,9 +2964,11 @@ module Google
2392
2964
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2393
2965
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2394
2966
 
2395
- header_params = {
2396
- "name" => request.name
2397
- }
2967
+ header_params = {}
2968
+ if request.name
2969
+ header_params["name"] = request.name
2970
+ end
2971
+
2398
2972
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2399
2973
  metadata[:"x-goog-request-params"] ||= request_params_header
2400
2974
 
@@ -2459,6 +3033,27 @@ module Google
2459
3033
  #
2460
3034
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2461
3035
  #
3036
+ # @example Basic example
3037
+ # require "google/cloud/security/private_ca/v1"
3038
+ #
3039
+ # # Create a client object. The client can be reused for multiple calls.
3040
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
3041
+ #
3042
+ # # Create a request. To set request fields, pass in keyword arguments.
3043
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new
3044
+ #
3045
+ # # Call the list_certificate_templates method.
3046
+ # result = client.list_certificate_templates request
3047
+ #
3048
+ # # The returned object is of type Gapic::PagedEnumerable. You can
3049
+ # # iterate over all elements by calling #each, and the enumerable
3050
+ # # will lazily make API calls to fetch subsequent pages. Other
3051
+ # # methods are also available for managing paging directly.
3052
+ # result.each do |response|
3053
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.
3054
+ # p response
3055
+ # end
3056
+ #
2462
3057
  def list_certificate_templates request, options = nil
2463
3058
  raise ::ArgumentError, "request must be provided" if request.nil?
2464
3059
 
@@ -2476,9 +3071,11 @@ module Google
2476
3071
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2477
3072
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2478
3073
 
2479
- header_params = {
2480
- "parent" => request.parent
2481
- }
3074
+ header_params = {}
3075
+ if request.parent
3076
+ header_params["parent"] = request.parent
3077
+ end
3078
+
2482
3079
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2483
3080
  metadata[:"x-goog-request-params"] ||= request_params_header
2484
3081
 
@@ -2544,6 +3141,28 @@ module Google
2544
3141
  #
2545
3142
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2546
3143
  #
3144
+ # @example Basic example
3145
+ # require "google/cloud/security/private_ca/v1"
3146
+ #
3147
+ # # Create a client object. The client can be reused for multiple calls.
3148
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
3149
+ #
3150
+ # # Create a request. To set request fields, pass in keyword arguments.
3151
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new
3152
+ #
3153
+ # # Call the update_certificate_template method.
3154
+ # result = client.update_certificate_template request
3155
+ #
3156
+ # # The returned object is of type Gapic::Operation. You can use this
3157
+ # # object to check the status of an operation, cancel it, or wait
3158
+ # # for results. Here is how to block until completion:
3159
+ # result.wait_until_done! timeout: 60
3160
+ # if result.response?
3161
+ # p result.response
3162
+ # else
3163
+ # puts "Error!"
3164
+ # end
3165
+ #
2547
3166
  def update_certificate_template request, options = nil
2548
3167
  raise ::ArgumentError, "request must be provided" if request.nil?
2549
3168
 
@@ -2561,9 +3180,11 @@ module Google
2561
3180
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2562
3181
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2563
3182
 
2564
- header_params = {
2565
- "certificate_template.name" => request.certificate_template.name
2566
- }
3183
+ header_params = {}
3184
+ if request.certificate_template&.name
3185
+ header_params["certificate_template.name"] = request.certificate_template.name
3186
+ end
3187
+
2567
3188
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2568
3189
  metadata[:"x-goog-request-params"] ||= request_params_header
2569
3190