google-cloud-security-private_ca-v1 0.1.1 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,13 +43,12 @@ module Google
43
43
  # See {::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client::Configuration}
44
44
  # for a description of the configuration fields.
45
45
  #
46
- # ## Example
46
+ # @example
47
47
  #
48
- # To modify the configuration for all CertificateAuthorityService clients:
49
- #
50
- # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config|
51
- # config.timeout = 10.0
52
- # end
48
+ # # Modify the configuration for all CertificateAuthorityService clients
49
+ # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
53
52
  #
54
53
  # @yield [config] Configure the Client client.
55
54
  # @yieldparam config [Client::Configuration]
@@ -101,19 +100,15 @@ module Google
101
100
  ##
102
101
  # Create a new CertificateAuthorityService client object.
103
102
  #
104
- # ## Examples
105
- #
106
- # To create a new CertificateAuthorityService client with the default
107
- # configuration:
103
+ # @example
108
104
  #
109
- # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
105
+ # # Create a client using the default configuration
106
+ # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new
110
107
  #
111
- # To create a new CertificateAuthorityService client with a custom
112
- # configuration:
113
- #
114
- # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config|
115
- # config.timeout = 10.0
116
- # end
108
+ # # Create a client using a custom configuration
109
+ # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config|
110
+ # config.timeout = 10.0
111
+ # end
117
112
  #
118
113
  # @yield [config] Configure the CertificateAuthorityService client.
119
114
  # @yieldparam config [Client::Configuration]
@@ -133,10 +128,9 @@ module Google
133
128
 
134
129
  # Create credentials
135
130
  credentials = @config.credentials
136
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
131
+ # Use self-signed JWT if the endpoint is unchanged from default,
137
132
  # but only if the default endpoint does not have a region prefix.
138
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
139
- @config.endpoint == Client.configure.endpoint &&
133
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
140
134
  !@config.endpoint.split(".").first.include?("-")
141
135
  credentials ||= Credentials.default scope: @config.scope,
142
136
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -237,6 +231,21 @@ module Google
237
231
  #
238
232
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
239
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
+ #
240
249
  def create_certificate request, options = nil
241
250
  raise ::ArgumentError, "request must be provided" if request.nil?
242
251
 
@@ -254,16 +263,20 @@ module Google
254
263
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
255
264
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
256
265
 
257
- header_params = {
258
- "parent" => request.parent
259
- }
266
+ header_params = {}
267
+ if request.parent
268
+ header_params["parent"] = request.parent
269
+ end
270
+
260
271
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
261
272
  metadata[:"x-goog-request-params"] ||= request_params_header
262
273
 
263
274
  options.apply_defaults timeout: @config.rpcs.create_certificate.timeout,
264
275
  metadata: metadata,
265
276
  retry_policy: @config.rpcs.create_certificate.retry_policy
266
- options.apply_defaults metadata: @config.metadata,
277
+
278
+ options.apply_defaults timeout: @config.timeout,
279
+ metadata: @config.metadata,
267
280
  retry_policy: @config.retry_policy
268
281
 
269
282
  @certificate_authority_service_stub.call_rpc :create_certificate, request, options: options do |response, operation|
@@ -303,6 +316,21 @@ module Google
303
316
  #
304
317
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
305
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
+ #
306
334
  def get_certificate request, options = nil
307
335
  raise ::ArgumentError, "request must be provided" if request.nil?
308
336
 
@@ -320,16 +348,20 @@ module Google
320
348
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
321
349
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
322
350
 
323
- header_params = {
324
- "name" => request.name
325
- }
351
+ header_params = {}
352
+ if request.name
353
+ header_params["name"] = request.name
354
+ end
355
+
326
356
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
327
357
  metadata[:"x-goog-request-params"] ||= request_params_header
328
358
 
329
359
  options.apply_defaults timeout: @config.rpcs.get_certificate.timeout,
330
360
  metadata: metadata,
331
361
  retry_policy: @config.rpcs.get_certificate.retry_policy
332
- options.apply_defaults metadata: @config.metadata,
362
+
363
+ options.apply_defaults timeout: @config.timeout,
364
+ metadata: @config.metadata,
333
365
  retry_policy: @config.retry_policy
334
366
 
335
367
  @certificate_authority_service_stub.call_rpc :get_certificate, request, options: options do |response, operation|
@@ -389,6 +421,27 @@ module Google
389
421
  #
390
422
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
391
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
+ #
392
445
  def list_certificates request, options = nil
393
446
  raise ::ArgumentError, "request must be provided" if request.nil?
394
447
 
@@ -406,16 +459,20 @@ module Google
406
459
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
407
460
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
408
461
 
409
- header_params = {
410
- "parent" => request.parent
411
- }
462
+ header_params = {}
463
+ if request.parent
464
+ header_params["parent"] = request.parent
465
+ end
466
+
412
467
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
413
468
  metadata[:"x-goog-request-params"] ||= request_params_header
414
469
 
415
470
  options.apply_defaults timeout: @config.rpcs.list_certificates.timeout,
416
471
  metadata: metadata,
417
472
  retry_policy: @config.rpcs.list_certificates.retry_policy
418
- options.apply_defaults metadata: @config.metadata,
473
+
474
+ options.apply_defaults timeout: @config.timeout,
475
+ metadata: @config.metadata,
419
476
  retry_policy: @config.retry_policy
420
477
 
421
478
  @certificate_authority_service_stub.call_rpc :list_certificates, request, options: options do |response, operation|
@@ -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,16 +563,20 @@ 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
 
500
574
  options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout,
501
575
  metadata: metadata,
502
576
  retry_policy: @config.rpcs.revoke_certificate.retry_policy
503
- options.apply_defaults metadata: @config.metadata,
577
+
578
+ options.apply_defaults timeout: @config.timeout,
579
+ metadata: @config.metadata,
504
580
  retry_policy: @config.retry_policy
505
581
 
506
582
  @certificate_authority_service_stub.call_rpc :revoke_certificate, request, options: options do |response, operation|
@@ -557,6 +633,21 @@ module Google
557
633
  #
558
634
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
559
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
+ #
560
651
  def update_certificate request, options = nil
561
652
  raise ::ArgumentError, "request must be provided" if request.nil?
562
653
 
@@ -574,16 +665,20 @@ module Google
574
665
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
575
666
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
576
667
 
577
- header_params = {
578
- "certificate.name" => request.certificate.name
579
- }
668
+ header_params = {}
669
+ if request.certificate&.name
670
+ header_params["certificate.name"] = request.certificate.name
671
+ end
672
+
580
673
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
581
674
  metadata[:"x-goog-request-params"] ||= request_params_header
582
675
 
583
676
  options.apply_defaults timeout: @config.rpcs.update_certificate.timeout,
584
677
  metadata: metadata,
585
678
  retry_policy: @config.rpcs.update_certificate.retry_policy
586
- options.apply_defaults metadata: @config.metadata,
679
+
680
+ options.apply_defaults timeout: @config.timeout,
681
+ metadata: @config.metadata,
587
682
  retry_policy: @config.retry_policy
588
683
 
589
684
  @certificate_authority_service_stub.call_rpc :update_certificate, request, options: options do |response, operation|
@@ -649,6 +744,28 @@ module Google
649
744
  #
650
745
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
651
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
+ #
652
769
  def activate_certificate_authority request, options = nil
653
770
  raise ::ArgumentError, "request must be provided" if request.nil?
654
771
 
@@ -666,16 +783,20 @@ module Google
666
783
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
667
784
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
668
785
 
669
- header_params = {
670
- "name" => request.name
671
- }
786
+ header_params = {}
787
+ if request.name
788
+ header_params["name"] = request.name
789
+ end
790
+
672
791
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
673
792
  metadata[:"x-goog-request-params"] ||= request_params_header
674
793
 
675
794
  options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout,
676
795
  metadata: metadata,
677
796
  retry_policy: @config.rpcs.activate_certificate_authority.retry_policy
678
- options.apply_defaults metadata: @config.metadata,
797
+
798
+ options.apply_defaults timeout: @config.timeout,
799
+ metadata: @config.metadata,
679
800
  retry_policy: @config.retry_policy
680
801
 
681
802
  @certificate_authority_service_stub.call_rpc :activate_certificate_authority, request, options: options do |response, operation|
@@ -737,6 +858,28 @@ module Google
737
858
  #
738
859
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
739
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
+ #
740
883
  def create_certificate_authority request, options = nil
741
884
  raise ::ArgumentError, "request must be provided" if request.nil?
742
885
 
@@ -754,16 +897,20 @@ module Google
754
897
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
755
898
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
756
899
 
757
- header_params = {
758
- "parent" => request.parent
759
- }
900
+ header_params = {}
901
+ if request.parent
902
+ header_params["parent"] = request.parent
903
+ end
904
+
760
905
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
761
906
  metadata[:"x-goog-request-params"] ||= request_params_header
762
907
 
763
908
  options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout,
764
909
  metadata: metadata,
765
910
  retry_policy: @config.rpcs.create_certificate_authority.retry_policy
766
- options.apply_defaults metadata: @config.metadata,
911
+
912
+ options.apply_defaults timeout: @config.timeout,
913
+ metadata: @config.metadata,
767
914
  retry_policy: @config.retry_policy
768
915
 
769
916
  @certificate_authority_service_stub.call_rpc :create_certificate_authority, request, options: options do |response, operation|
@@ -819,6 +966,28 @@ module Google
819
966
  #
820
967
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
821
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
+ #
822
991
  def disable_certificate_authority request, options = nil
823
992
  raise ::ArgumentError, "request must be provided" if request.nil?
824
993
 
@@ -836,16 +1005,20 @@ module Google
836
1005
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
837
1006
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
838
1007
 
839
- header_params = {
840
- "name" => request.name
841
- }
1008
+ header_params = {}
1009
+ if request.name
1010
+ header_params["name"] = request.name
1011
+ end
1012
+
842
1013
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
843
1014
  metadata[:"x-goog-request-params"] ||= request_params_header
844
1015
 
845
1016
  options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout,
846
1017
  metadata: metadata,
847
1018
  retry_policy: @config.rpcs.disable_certificate_authority.retry_policy
848
- options.apply_defaults metadata: @config.metadata,
1019
+
1020
+ options.apply_defaults timeout: @config.timeout,
1021
+ metadata: @config.metadata,
849
1022
  retry_policy: @config.retry_policy
850
1023
 
851
1024
  @certificate_authority_service_stub.call_rpc :disable_certificate_authority, request, options: options do |response, operation|
@@ -901,6 +1074,28 @@ module Google
901
1074
  #
902
1075
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
903
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
+ #
904
1099
  def enable_certificate_authority request, options = nil
905
1100
  raise ::ArgumentError, "request must be provided" if request.nil?
906
1101
 
@@ -918,16 +1113,20 @@ module Google
918
1113
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
919
1114
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
920
1115
 
921
- header_params = {
922
- "name" => request.name
923
- }
1116
+ header_params = {}
1117
+ if request.name
1118
+ header_params["name"] = request.name
1119
+ end
1120
+
924
1121
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
925
1122
  metadata[:"x-goog-request-params"] ||= request_params_header
926
1123
 
927
1124
  options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout,
928
1125
  metadata: metadata,
929
1126
  retry_policy: @config.rpcs.enable_certificate_authority.retry_policy
930
- options.apply_defaults metadata: @config.metadata,
1127
+
1128
+ options.apply_defaults timeout: @config.timeout,
1129
+ metadata: @config.metadata,
931
1130
  retry_policy: @config.retry_policy
932
1131
 
933
1132
  @certificate_authority_service_stub.call_rpc :enable_certificate_authority, request, options: options do |response, operation|
@@ -975,6 +1174,21 @@ module Google
975
1174
  #
976
1175
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
977
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
+ #
978
1192
  def fetch_certificate_authority_csr request, options = nil
979
1193
  raise ::ArgumentError, "request must be provided" if request.nil?
980
1194
 
@@ -992,16 +1206,20 @@ module Google
992
1206
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
993
1207
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
994
1208
 
995
- header_params = {
996
- "name" => request.name
997
- }
1209
+ header_params = {}
1210
+ if request.name
1211
+ header_params["name"] = request.name
1212
+ end
1213
+
998
1214
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
999
1215
  metadata[:"x-goog-request-params"] ||= request_params_header
1000
1216
 
1001
1217
  options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout,
1002
1218
  metadata: metadata,
1003
1219
  retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy
1004
- options.apply_defaults metadata: @config.metadata,
1220
+
1221
+ options.apply_defaults timeout: @config.timeout,
1222
+ metadata: @config.metadata,
1005
1223
  retry_policy: @config.retry_policy
1006
1224
 
1007
1225
  @certificate_authority_service_stub.call_rpc :fetch_certificate_authority_csr, request, options: options do |response, operation|
@@ -1042,6 +1260,21 @@ module Google
1042
1260
  #
1043
1261
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1044
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
+ #
1045
1278
  def get_certificate_authority request, options = nil
1046
1279
  raise ::ArgumentError, "request must be provided" if request.nil?
1047
1280
 
@@ -1059,16 +1292,20 @@ module Google
1059
1292
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1060
1293
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1061
1294
 
1062
- header_params = {
1063
- "name" => request.name
1064
- }
1295
+ header_params = {}
1296
+ if request.name
1297
+ header_params["name"] = request.name
1298
+ end
1299
+
1065
1300
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1066
1301
  metadata[:"x-goog-request-params"] ||= request_params_header
1067
1302
 
1068
1303
  options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout,
1069
1304
  metadata: metadata,
1070
1305
  retry_policy: @config.rpcs.get_certificate_authority.retry_policy
1071
- options.apply_defaults metadata: @config.metadata,
1306
+
1307
+ options.apply_defaults timeout: @config.timeout,
1308
+ metadata: @config.metadata,
1072
1309
  retry_policy: @config.retry_policy
1073
1310
 
1074
1311
  @certificate_authority_service_stub.call_rpc :get_certificate_authority, request, options: options do |response, operation|
@@ -1124,6 +1361,27 @@ module Google
1124
1361
  #
1125
1362
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1126
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
+ #
1127
1385
  def list_certificate_authorities request, options = nil
1128
1386
  raise ::ArgumentError, "request must be provided" if request.nil?
1129
1387
 
@@ -1141,16 +1399,20 @@ module Google
1141
1399
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1142
1400
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1143
1401
 
1144
- header_params = {
1145
- "parent" => request.parent
1146
- }
1402
+ header_params = {}
1403
+ if request.parent
1404
+ header_params["parent"] = request.parent
1405
+ end
1406
+
1147
1407
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1148
1408
  metadata[:"x-goog-request-params"] ||= request_params_header
1149
1409
 
1150
1410
  options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout,
1151
1411
  metadata: metadata,
1152
1412
  retry_policy: @config.rpcs.list_certificate_authorities.retry_policy
1153
- options.apply_defaults metadata: @config.metadata,
1413
+
1414
+ options.apply_defaults timeout: @config.timeout,
1415
+ metadata: @config.metadata,
1154
1416
  retry_policy: @config.retry_policy
1155
1417
 
1156
1418
  @certificate_authority_service_stub.call_rpc :list_certificate_authorities, request, options: options do |response, operation|
@@ -1206,6 +1468,28 @@ module Google
1206
1468
  #
1207
1469
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1208
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
+ #
1209
1493
  def undelete_certificate_authority request, options = nil
1210
1494
  raise ::ArgumentError, "request must be provided" if request.nil?
1211
1495
 
@@ -1223,16 +1507,20 @@ module Google
1223
1507
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1224
1508
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1225
1509
 
1226
- header_params = {
1227
- "name" => request.name
1228
- }
1510
+ header_params = {}
1511
+ if request.name
1512
+ header_params["name"] = request.name
1513
+ end
1514
+
1229
1515
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1230
1516
  metadata[:"x-goog-request-params"] ||= request_params_header
1231
1517
 
1232
1518
  options.apply_defaults timeout: @config.rpcs.undelete_certificate_authority.timeout,
1233
1519
  metadata: metadata,
1234
1520
  retry_policy: @config.rpcs.undelete_certificate_authority.retry_policy
1235
- options.apply_defaults metadata: @config.metadata,
1521
+
1522
+ options.apply_defaults timeout: @config.timeout,
1523
+ metadata: @config.metadata,
1236
1524
  retry_policy: @config.retry_policy
1237
1525
 
1238
1526
  @certificate_authority_service_stub.call_rpc :undelete_certificate_authority, request, options: options do |response, operation|
@@ -1291,6 +1579,28 @@ module Google
1291
1579
  #
1292
1580
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1293
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
+ #
1294
1604
  def delete_certificate_authority request, options = nil
1295
1605
  raise ::ArgumentError, "request must be provided" if request.nil?
1296
1606
 
@@ -1308,16 +1618,20 @@ module Google
1308
1618
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1309
1619
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1310
1620
 
1311
- header_params = {
1312
- "name" => request.name
1313
- }
1621
+ header_params = {}
1622
+ if request.name
1623
+ header_params["name"] = request.name
1624
+ end
1625
+
1314
1626
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1315
1627
  metadata[:"x-goog-request-params"] ||= request_params_header
1316
1628
 
1317
1629
  options.apply_defaults timeout: @config.rpcs.delete_certificate_authority.timeout,
1318
1630
  metadata: metadata,
1319
1631
  retry_policy: @config.rpcs.delete_certificate_authority.retry_policy
1320
- options.apply_defaults metadata: @config.metadata,
1632
+
1633
+ options.apply_defaults timeout: @config.timeout,
1634
+ metadata: @config.metadata,
1321
1635
  retry_policy: @config.retry_policy
1322
1636
 
1323
1637
  @certificate_authority_service_stub.call_rpc :delete_certificate_authority, request, options: options do |response, operation|
@@ -1374,6 +1688,28 @@ module Google
1374
1688
  #
1375
1689
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1376
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
+ #
1377
1713
  def update_certificate_authority request, options = nil
1378
1714
  raise ::ArgumentError, "request must be provided" if request.nil?
1379
1715
 
@@ -1391,16 +1727,20 @@ module Google
1391
1727
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1392
1728
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1393
1729
 
1394
- header_params = {
1395
- "certificate_authority.name" => request.certificate_authority.name
1396
- }
1730
+ header_params = {}
1731
+ if request.certificate_authority&.name
1732
+ header_params["certificate_authority.name"] = request.certificate_authority.name
1733
+ end
1734
+
1397
1735
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1398
1736
  metadata[:"x-goog-request-params"] ||= request_params_header
1399
1737
 
1400
1738
  options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout,
1401
1739
  metadata: metadata,
1402
1740
  retry_policy: @config.rpcs.update_certificate_authority.retry_policy
1403
- options.apply_defaults metadata: @config.metadata,
1741
+
1742
+ options.apply_defaults timeout: @config.timeout,
1743
+ metadata: @config.metadata,
1404
1744
  retry_policy: @config.retry_policy
1405
1745
 
1406
1746
  @certificate_authority_service_stub.call_rpc :update_certificate_authority, request, options: options do |response, operation|
@@ -1461,6 +1801,28 @@ module Google
1461
1801
  #
1462
1802
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1463
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
+ #
1464
1826
  def create_ca_pool request, options = nil
1465
1827
  raise ::ArgumentError, "request must be provided" if request.nil?
1466
1828
 
@@ -1478,16 +1840,20 @@ module Google
1478
1840
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1479
1841
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1480
1842
 
1481
- header_params = {
1482
- "parent" => request.parent
1483
- }
1843
+ header_params = {}
1844
+ if request.parent
1845
+ header_params["parent"] = request.parent
1846
+ end
1847
+
1484
1848
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1485
1849
  metadata[:"x-goog-request-params"] ||= request_params_header
1486
1850
 
1487
1851
  options.apply_defaults timeout: @config.rpcs.create_ca_pool.timeout,
1488
1852
  metadata: metadata,
1489
1853
  retry_policy: @config.rpcs.create_ca_pool.retry_policy
1490
- options.apply_defaults metadata: @config.metadata,
1854
+
1855
+ options.apply_defaults timeout: @config.timeout,
1856
+ metadata: @config.metadata,
1491
1857
  retry_policy: @config.retry_policy
1492
1858
 
1493
1859
  @certificate_authority_service_stub.call_rpc :create_ca_pool, request, options: options do |response, operation|
@@ -1544,6 +1910,28 @@ module Google
1544
1910
  #
1545
1911
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1546
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
+ #
1547
1935
  def update_ca_pool request, options = nil
1548
1936
  raise ::ArgumentError, "request must be provided" if request.nil?
1549
1937
 
@@ -1561,16 +1949,20 @@ module Google
1561
1949
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1562
1950
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1563
1951
 
1564
- header_params = {
1565
- "ca_pool.name" => request.ca_pool.name
1566
- }
1952
+ header_params = {}
1953
+ if request.ca_pool&.name
1954
+ header_params["ca_pool.name"] = request.ca_pool.name
1955
+ end
1956
+
1567
1957
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1568
1958
  metadata[:"x-goog-request-params"] ||= request_params_header
1569
1959
 
1570
1960
  options.apply_defaults timeout: @config.rpcs.update_ca_pool.timeout,
1571
1961
  metadata: metadata,
1572
1962
  retry_policy: @config.rpcs.update_ca_pool.retry_policy
1573
- options.apply_defaults metadata: @config.metadata,
1963
+
1964
+ options.apply_defaults timeout: @config.timeout,
1965
+ metadata: @config.metadata,
1574
1966
  retry_policy: @config.retry_policy
1575
1967
 
1576
1968
  @certificate_authority_service_stub.call_rpc :update_ca_pool, request, options: options do |response, operation|
@@ -1611,6 +2003,21 @@ module Google
1611
2003
  #
1612
2004
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1613
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
+ #
1614
2021
  def get_ca_pool request, options = nil
1615
2022
  raise ::ArgumentError, "request must be provided" if request.nil?
1616
2023
 
@@ -1628,16 +2035,20 @@ module Google
1628
2035
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1629
2036
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1630
2037
 
1631
- header_params = {
1632
- "name" => request.name
1633
- }
2038
+ header_params = {}
2039
+ if request.name
2040
+ header_params["name"] = request.name
2041
+ end
2042
+
1634
2043
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1635
2044
  metadata[:"x-goog-request-params"] ||= request_params_header
1636
2045
 
1637
2046
  options.apply_defaults timeout: @config.rpcs.get_ca_pool.timeout,
1638
2047
  metadata: metadata,
1639
2048
  retry_policy: @config.rpcs.get_ca_pool.retry_policy
1640
- options.apply_defaults metadata: @config.metadata,
2049
+
2050
+ options.apply_defaults timeout: @config.timeout,
2051
+ metadata: @config.metadata,
1641
2052
  retry_policy: @config.retry_policy
1642
2053
 
1643
2054
  @certificate_authority_service_stub.call_rpc :get_ca_pool, request, options: options do |response, operation|
@@ -1693,6 +2104,27 @@ module Google
1693
2104
  #
1694
2105
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1695
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
+ #
1696
2128
  def list_ca_pools request, options = nil
1697
2129
  raise ::ArgumentError, "request must be provided" if request.nil?
1698
2130
 
@@ -1710,16 +2142,20 @@ module Google
1710
2142
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1711
2143
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1712
2144
 
1713
- header_params = {
1714
- "parent" => request.parent
1715
- }
2145
+ header_params = {}
2146
+ if request.parent
2147
+ header_params["parent"] = request.parent
2148
+ end
2149
+
1716
2150
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1717
2151
  metadata[:"x-goog-request-params"] ||= request_params_header
1718
2152
 
1719
2153
  options.apply_defaults timeout: @config.rpcs.list_ca_pools.timeout,
1720
2154
  metadata: metadata,
1721
2155
  retry_policy: @config.rpcs.list_ca_pools.retry_policy
1722
- options.apply_defaults metadata: @config.metadata,
2156
+
2157
+ options.apply_defaults timeout: @config.timeout,
2158
+ metadata: @config.metadata,
1723
2159
  retry_policy: @config.retry_policy
1724
2160
 
1725
2161
  @certificate_authority_service_stub.call_rpc :list_ca_pools, request, options: options do |response, operation|
@@ -1775,6 +2211,28 @@ module Google
1775
2211
  #
1776
2212
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1777
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
+ #
1778
2236
  def delete_ca_pool request, options = nil
1779
2237
  raise ::ArgumentError, "request must be provided" if request.nil?
1780
2238
 
@@ -1792,16 +2250,20 @@ module Google
1792
2250
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1793
2251
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1794
2252
 
1795
- header_params = {
1796
- "name" => request.name
1797
- }
2253
+ header_params = {}
2254
+ if request.name
2255
+ header_params["name"] = request.name
2256
+ end
2257
+
1798
2258
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1799
2259
  metadata[:"x-goog-request-params"] ||= request_params_header
1800
2260
 
1801
2261
  options.apply_defaults timeout: @config.rpcs.delete_ca_pool.timeout,
1802
2262
  metadata: metadata,
1803
2263
  retry_policy: @config.rpcs.delete_ca_pool.retry_policy
1804
- options.apply_defaults metadata: @config.metadata,
2264
+
2265
+ options.apply_defaults timeout: @config.timeout,
2266
+ metadata: @config.metadata,
1805
2267
  retry_policy: @config.retry_policy
1806
2268
 
1807
2269
  @certificate_authority_service_stub.call_rpc :delete_ca_pool, request, options: options do |response, operation|
@@ -1859,6 +2321,21 @@ module Google
1859
2321
  #
1860
2322
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1861
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
+ #
1862
2339
  def fetch_ca_certs request, options = nil
1863
2340
  raise ::ArgumentError, "request must be provided" if request.nil?
1864
2341
 
@@ -1876,16 +2353,20 @@ module Google
1876
2353
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1877
2354
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1878
2355
 
1879
- header_params = {
1880
- "ca_pool" => request.ca_pool
1881
- }
2356
+ header_params = {}
2357
+ if request.ca_pool
2358
+ header_params["ca_pool"] = request.ca_pool
2359
+ end
2360
+
1882
2361
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1883
2362
  metadata[:"x-goog-request-params"] ||= request_params_header
1884
2363
 
1885
2364
  options.apply_defaults timeout: @config.rpcs.fetch_ca_certs.timeout,
1886
2365
  metadata: metadata,
1887
2366
  retry_policy: @config.rpcs.fetch_ca_certs.retry_policy
1888
- options.apply_defaults metadata: @config.metadata,
2367
+
2368
+ options.apply_defaults timeout: @config.timeout,
2369
+ metadata: @config.metadata,
1889
2370
  retry_policy: @config.retry_policy
1890
2371
 
1891
2372
  @certificate_authority_service_stub.call_rpc :fetch_ca_certs, request, options: options do |response, operation|
@@ -1926,6 +2407,21 @@ module Google
1926
2407
  #
1927
2408
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1928
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
+ #
1929
2425
  def get_certificate_revocation_list request, options = nil
1930
2426
  raise ::ArgumentError, "request must be provided" if request.nil?
1931
2427
 
@@ -1943,16 +2439,20 @@ module Google
1943
2439
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
1944
2440
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1945
2441
 
1946
- header_params = {
1947
- "name" => request.name
1948
- }
2442
+ header_params = {}
2443
+ if request.name
2444
+ header_params["name"] = request.name
2445
+ end
2446
+
1949
2447
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1950
2448
  metadata[:"x-goog-request-params"] ||= request_params_header
1951
2449
 
1952
2450
  options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout,
1953
2451
  metadata: metadata,
1954
2452
  retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy
1955
- options.apply_defaults metadata: @config.metadata,
2453
+
2454
+ options.apply_defaults timeout: @config.timeout,
2455
+ metadata: @config.metadata,
1956
2456
  retry_policy: @config.retry_policy
1957
2457
 
1958
2458
  @certificate_authority_service_stub.call_rpc :get_certificate_revocation_list, request, options: options do |response, operation|
@@ -2008,6 +2508,27 @@ module Google
2008
2508
  #
2009
2509
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2010
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
+ #
2011
2532
  def list_certificate_revocation_lists request, options = nil
2012
2533
  raise ::ArgumentError, "request must be provided" if request.nil?
2013
2534
 
@@ -2025,16 +2546,20 @@ module Google
2025
2546
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2026
2547
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2027
2548
 
2028
- header_params = {
2029
- "parent" => request.parent
2030
- }
2549
+ header_params = {}
2550
+ if request.parent
2551
+ header_params["parent"] = request.parent
2552
+ end
2553
+
2031
2554
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2032
2555
  metadata[:"x-goog-request-params"] ||= request_params_header
2033
2556
 
2034
2557
  options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout,
2035
2558
  metadata: metadata,
2036
2559
  retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy
2037
- options.apply_defaults metadata: @config.metadata,
2560
+
2561
+ options.apply_defaults timeout: @config.timeout,
2562
+ metadata: @config.metadata,
2038
2563
  retry_policy: @config.retry_policy
2039
2564
 
2040
2565
  @certificate_authority_service_stub.call_rpc :list_certificate_revocation_lists, request, options: options do |response, operation|
@@ -2091,6 +2616,28 @@ module Google
2091
2616
  #
2092
2617
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2093
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
+ #
2094
2641
  def update_certificate_revocation_list request, options = nil
2095
2642
  raise ::ArgumentError, "request must be provided" if request.nil?
2096
2643
 
@@ -2108,16 +2655,20 @@ module Google
2108
2655
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2109
2656
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2110
2657
 
2111
- header_params = {
2112
- "certificate_revocation_list.name" => request.certificate_revocation_list.name
2113
- }
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
+
2114
2663
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2115
2664
  metadata[:"x-goog-request-params"] ||= request_params_header
2116
2665
 
2117
2666
  options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout,
2118
2667
  metadata: metadata,
2119
2668
  retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy
2120
- options.apply_defaults metadata: @config.metadata,
2669
+
2670
+ options.apply_defaults timeout: @config.timeout,
2671
+ metadata: @config.metadata,
2121
2672
  retry_policy: @config.retry_policy
2122
2673
 
2123
2674
  @certificate_authority_service_stub.call_rpc :update_certificate_revocation_list, request, options: options do |response, operation|
@@ -2179,6 +2730,28 @@ module Google
2179
2730
  #
2180
2731
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2181
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
+ #
2182
2755
  def create_certificate_template request, options = nil
2183
2756
  raise ::ArgumentError, "request must be provided" if request.nil?
2184
2757
 
@@ -2196,16 +2769,20 @@ module Google
2196
2769
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2197
2770
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2198
2771
 
2199
- header_params = {
2200
- "parent" => request.parent
2201
- }
2772
+ header_params = {}
2773
+ if request.parent
2774
+ header_params["parent"] = request.parent
2775
+ end
2776
+
2202
2777
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2203
2778
  metadata[:"x-goog-request-params"] ||= request_params_header
2204
2779
 
2205
2780
  options.apply_defaults timeout: @config.rpcs.create_certificate_template.timeout,
2206
2781
  metadata: metadata,
2207
2782
  retry_policy: @config.rpcs.create_certificate_template.retry_policy
2208
- options.apply_defaults metadata: @config.metadata,
2783
+
2784
+ options.apply_defaults timeout: @config.timeout,
2785
+ metadata: @config.metadata,
2209
2786
  retry_policy: @config.retry_policy
2210
2787
 
2211
2788
  @certificate_authority_service_stub.call_rpc :create_certificate_template, request, options: options do |response, operation|
@@ -2261,6 +2838,28 @@ module Google
2261
2838
  #
2262
2839
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2263
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
+ #
2264
2863
  def delete_certificate_template request, options = nil
2265
2864
  raise ::ArgumentError, "request must be provided" if request.nil?
2266
2865
 
@@ -2278,16 +2877,20 @@ module Google
2278
2877
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2279
2878
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2280
2879
 
2281
- header_params = {
2282
- "name" => request.name
2283
- }
2880
+ header_params = {}
2881
+ if request.name
2882
+ header_params["name"] = request.name
2883
+ end
2884
+
2284
2885
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2285
2886
  metadata[:"x-goog-request-params"] ||= request_params_header
2286
2887
 
2287
2888
  options.apply_defaults timeout: @config.rpcs.delete_certificate_template.timeout,
2288
2889
  metadata: metadata,
2289
2890
  retry_policy: @config.rpcs.delete_certificate_template.retry_policy
2290
- options.apply_defaults metadata: @config.metadata,
2891
+
2892
+ options.apply_defaults timeout: @config.timeout,
2893
+ metadata: @config.metadata,
2291
2894
  retry_policy: @config.retry_policy
2292
2895
 
2293
2896
  @certificate_authority_service_stub.call_rpc :delete_certificate_template, request, options: options do |response, operation|
@@ -2329,6 +2932,21 @@ module Google
2329
2932
  #
2330
2933
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2331
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
+ #
2332
2950
  def get_certificate_template request, options = nil
2333
2951
  raise ::ArgumentError, "request must be provided" if request.nil?
2334
2952
 
@@ -2346,16 +2964,20 @@ module Google
2346
2964
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2347
2965
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2348
2966
 
2349
- header_params = {
2350
- "name" => request.name
2351
- }
2967
+ header_params = {}
2968
+ if request.name
2969
+ header_params["name"] = request.name
2970
+ end
2971
+
2352
2972
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2353
2973
  metadata[:"x-goog-request-params"] ||= request_params_header
2354
2974
 
2355
2975
  options.apply_defaults timeout: @config.rpcs.get_certificate_template.timeout,
2356
2976
  metadata: metadata,
2357
2977
  retry_policy: @config.rpcs.get_certificate_template.retry_policy
2358
- options.apply_defaults metadata: @config.metadata,
2978
+
2979
+ options.apply_defaults timeout: @config.timeout,
2980
+ metadata: @config.metadata,
2359
2981
  retry_policy: @config.retry_policy
2360
2982
 
2361
2983
  @certificate_authority_service_stub.call_rpc :get_certificate_template, request, options: options do |response, operation|
@@ -2411,6 +3033,27 @@ module Google
2411
3033
  #
2412
3034
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2413
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
+ #
2414
3057
  def list_certificate_templates request, options = nil
2415
3058
  raise ::ArgumentError, "request must be provided" if request.nil?
2416
3059
 
@@ -2428,16 +3071,20 @@ module Google
2428
3071
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2429
3072
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2430
3073
 
2431
- header_params = {
2432
- "parent" => request.parent
2433
- }
3074
+ header_params = {}
3075
+ if request.parent
3076
+ header_params["parent"] = request.parent
3077
+ end
3078
+
2434
3079
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2435
3080
  metadata[:"x-goog-request-params"] ||= request_params_header
2436
3081
 
2437
3082
  options.apply_defaults timeout: @config.rpcs.list_certificate_templates.timeout,
2438
3083
  metadata: metadata,
2439
3084
  retry_policy: @config.rpcs.list_certificate_templates.retry_policy
2440
- options.apply_defaults metadata: @config.metadata,
3085
+
3086
+ options.apply_defaults timeout: @config.timeout,
3087
+ metadata: @config.metadata,
2441
3088
  retry_policy: @config.retry_policy
2442
3089
 
2443
3090
  @certificate_authority_service_stub.call_rpc :list_certificate_templates, request, options: options do |response, operation|
@@ -2494,6 +3141,28 @@ module Google
2494
3141
  #
2495
3142
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2496
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
+ #
2497
3166
  def update_certificate_template request, options = nil
2498
3167
  raise ::ArgumentError, "request must be provided" if request.nil?
2499
3168
 
@@ -2511,16 +3180,20 @@ module Google
2511
3180
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1::VERSION
2512
3181
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2513
3182
 
2514
- header_params = {
2515
- "certificate_template.name" => request.certificate_template.name
2516
- }
3183
+ header_params = {}
3184
+ if request.certificate_template&.name
3185
+ header_params["certificate_template.name"] = request.certificate_template.name
3186
+ end
3187
+
2517
3188
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2518
3189
  metadata[:"x-goog-request-params"] ||= request_params_header
2519
3190
 
2520
3191
  options.apply_defaults timeout: @config.rpcs.update_certificate_template.timeout,
2521
3192
  metadata: metadata,
2522
3193
  retry_policy: @config.rpcs.update_certificate_template.retry_policy
2523
- options.apply_defaults metadata: @config.metadata,
3194
+
3195
+ options.apply_defaults timeout: @config.timeout,
3196
+ metadata: @config.metadata,
2524
3197
  retry_policy: @config.retry_policy
2525
3198
 
2526
3199
  @certificate_authority_service_stub.call_rpc :update_certificate_template, request, options: options do |response, operation|
@@ -2545,22 +3218,21 @@ module Google
2545
3218
  # Configuration can be applied globally to all clients, or to a single client
2546
3219
  # on construction.
2547
3220
  #
2548
- # # Examples
2549
- #
2550
- # To modify the global config, setting the timeout for create_certificate
2551
- # to 20 seconds, and all remaining timeouts to 10 seconds:
2552
- #
2553
- # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config|
2554
- # config.timeout = 10.0
2555
- # config.rpcs.create_certificate.timeout = 20.0
2556
- # end
2557
- #
2558
- # To apply the above configuration only to a new client:
2559
- #
2560
- # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config|
2561
- # config.timeout = 10.0
2562
- # config.rpcs.create_certificate.timeout = 20.0
2563
- # end
3221
+ # @example
3222
+ #
3223
+ # # Modify the global config, setting the timeout for
3224
+ # # create_certificate to 20 seconds,
3225
+ # # and all remaining timeouts to 10 seconds.
3226
+ # ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.configure do |config|
3227
+ # config.timeout = 10.0
3228
+ # config.rpcs.create_certificate.timeout = 20.0
3229
+ # end
3230
+ #
3231
+ # # Apply the above configuration only to a new client.
3232
+ # client = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Client.new do |config|
3233
+ # config.timeout = 10.0
3234
+ # config.rpcs.create_certificate.timeout = 20.0
3235
+ # end
2564
3236
  #
2565
3237
  # @!attribute [rw] endpoint
2566
3238
  # The hostname or hostname:port of the service endpoint.