google-cloud-security-private_ca-v1beta1 0.3.2 → 0.3.6

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::V1beta1::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::V1beta1::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::V1beta1::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:
108
- #
109
- # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
103
+ # @example
110
104
  #
111
- # To create a new CertificateAuthorityService client with a custom
112
- # configuration:
105
+ # # Create a client using the default configuration
106
+ # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
113
107
  #
114
- # client = ::Google::Cloud::Security::PrivateCA::V1beta1::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::V1beta1::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
@@ -148,6 +142,7 @@ module Google
148
142
 
149
143
  @operations_client = Operations.new do |config|
150
144
  config.credentials = credentials
145
+ config.quota_project = @quota_project_id
151
146
  config.endpoint = @config.endpoint
152
147
  end
153
148
 
@@ -222,6 +217,21 @@ module Google
222
217
  #
223
218
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
224
219
  #
220
+ # @example Basic example
221
+ # require "google/cloud/security/private_ca/v1beta1"
222
+ #
223
+ # # Create a client object. The client can be reused for multiple calls.
224
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
225
+ #
226
+ # # Create a request. To set request fields, pass in keyword arguments.
227
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateRequest.new
228
+ #
229
+ # # Call the create_certificate method.
230
+ # result = client.create_certificate request
231
+ #
232
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate.
233
+ # p result
234
+ #
225
235
  def create_certificate request, options = nil
226
236
  raise ::ArgumentError, "request must be provided" if request.nil?
227
237
 
@@ -239,16 +249,20 @@ module Google
239
249
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
240
250
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
241
251
 
242
- header_params = {
243
- "parent" => request.parent
244
- }
252
+ header_params = {}
253
+ if request.parent
254
+ header_params["parent"] = request.parent
255
+ end
256
+
245
257
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
246
258
  metadata[:"x-goog-request-params"] ||= request_params_header
247
259
 
248
260
  options.apply_defaults timeout: @config.rpcs.create_certificate.timeout,
249
261
  metadata: metadata,
250
262
  retry_policy: @config.rpcs.create_certificate.retry_policy
251
- options.apply_defaults metadata: @config.metadata,
263
+
264
+ options.apply_defaults timeout: @config.timeout,
265
+ metadata: @config.metadata,
252
266
  retry_policy: @config.retry_policy
253
267
 
254
268
  @certificate_authority_service_stub.call_rpc :create_certificate, request, options: options do |response, operation|
@@ -288,6 +302,21 @@ module Google
288
302
  #
289
303
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
290
304
  #
305
+ # @example Basic example
306
+ # require "google/cloud/security/private_ca/v1beta1"
307
+ #
308
+ # # Create a client object. The client can be reused for multiple calls.
309
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
310
+ #
311
+ # # Create a request. To set request fields, pass in keyword arguments.
312
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRequest.new
313
+ #
314
+ # # Call the get_certificate method.
315
+ # result = client.get_certificate request
316
+ #
317
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate.
318
+ # p result
319
+ #
291
320
  def get_certificate request, options = nil
292
321
  raise ::ArgumentError, "request must be provided" if request.nil?
293
322
 
@@ -305,16 +334,20 @@ module Google
305
334
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
306
335
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
336
 
308
- header_params = {
309
- "name" => request.name
310
- }
337
+ header_params = {}
338
+ if request.name
339
+ header_params["name"] = request.name
340
+ end
341
+
311
342
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
312
343
  metadata[:"x-goog-request-params"] ||= request_params_header
313
344
 
314
345
  options.apply_defaults timeout: @config.rpcs.get_certificate.timeout,
315
346
  metadata: metadata,
316
347
  retry_policy: @config.rpcs.get_certificate.retry_policy
317
- options.apply_defaults metadata: @config.metadata,
348
+
349
+ options.apply_defaults timeout: @config.timeout,
350
+ metadata: @config.metadata,
318
351
  retry_policy: @config.retry_policy
319
352
 
320
353
  @certificate_authority_service_stub.call_rpc :get_certificate, request, options: options do |response, operation|
@@ -374,6 +407,27 @@ module Google
374
407
  #
375
408
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
376
409
  #
410
+ # @example Basic example
411
+ # require "google/cloud/security/private_ca/v1beta1"
412
+ #
413
+ # # Create a client object. The client can be reused for multiple calls.
414
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
415
+ #
416
+ # # Create a request. To set request fields, pass in keyword arguments.
417
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificatesRequest.new
418
+ #
419
+ # # Call the list_certificates method.
420
+ # result = client.list_certificates request
421
+ #
422
+ # # The returned object is of type Gapic::PagedEnumerable. You can
423
+ # # iterate over all elements by calling #each, and the enumerable
424
+ # # will lazily make API calls to fetch subsequent pages. Other
425
+ # # methods are also available for managing paging directly.
426
+ # result.each do |response|
427
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::Certificate.
428
+ # p response
429
+ # end
430
+ #
377
431
  def list_certificates request, options = nil
378
432
  raise ::ArgumentError, "request must be provided" if request.nil?
379
433
 
@@ -391,16 +445,20 @@ module Google
391
445
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
392
446
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
393
447
 
394
- header_params = {
395
- "parent" => request.parent
396
- }
448
+ header_params = {}
449
+ if request.parent
450
+ header_params["parent"] = request.parent
451
+ end
452
+
397
453
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
398
454
  metadata[:"x-goog-request-params"] ||= request_params_header
399
455
 
400
456
  options.apply_defaults timeout: @config.rpcs.list_certificates.timeout,
401
457
  metadata: metadata,
402
458
  retry_policy: @config.rpcs.list_certificates.retry_policy
403
- options.apply_defaults metadata: @config.metadata,
459
+
460
+ options.apply_defaults timeout: @config.timeout,
461
+ metadata: @config.metadata,
404
462
  retry_policy: @config.retry_policy
405
463
 
406
464
  @certificate_authority_service_stub.call_rpc :list_certificates, request, options: options do |response, operation|
@@ -458,6 +516,21 @@ module Google
458
516
  #
459
517
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
460
518
  #
519
+ # @example Basic example
520
+ # require "google/cloud/security/private_ca/v1beta1"
521
+ #
522
+ # # Create a client object. The client can be reused for multiple calls.
523
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
524
+ #
525
+ # # Create a request. To set request fields, pass in keyword arguments.
526
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::RevokeCertificateRequest.new
527
+ #
528
+ # # Call the revoke_certificate method.
529
+ # result = client.revoke_certificate request
530
+ #
531
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate.
532
+ # p result
533
+ #
461
534
  def revoke_certificate request, options = nil
462
535
  raise ::ArgumentError, "request must be provided" if request.nil?
463
536
 
@@ -475,16 +548,20 @@ module Google
475
548
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
476
549
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
477
550
 
478
- header_params = {
479
- "name" => request.name
480
- }
551
+ header_params = {}
552
+ if request.name
553
+ header_params["name"] = request.name
554
+ end
555
+
481
556
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
482
557
  metadata[:"x-goog-request-params"] ||= request_params_header
483
558
 
484
559
  options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout,
485
560
  metadata: metadata,
486
561
  retry_policy: @config.rpcs.revoke_certificate.retry_policy
487
- options.apply_defaults metadata: @config.metadata,
562
+
563
+ options.apply_defaults timeout: @config.timeout,
564
+ metadata: @config.metadata,
488
565
  retry_policy: @config.retry_policy
489
566
 
490
567
  @certificate_authority_service_stub.call_rpc :revoke_certificate, request, options: options do |response, operation|
@@ -541,6 +618,21 @@ module Google
541
618
  #
542
619
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
543
620
  #
621
+ # @example Basic example
622
+ # require "google/cloud/security/private_ca/v1beta1"
623
+ #
624
+ # # Create a client object. The client can be reused for multiple calls.
625
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
626
+ #
627
+ # # Create a request. To set request fields, pass in keyword arguments.
628
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRequest.new
629
+ #
630
+ # # Call the update_certificate method.
631
+ # result = client.update_certificate request
632
+ #
633
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::Certificate.
634
+ # p result
635
+ #
544
636
  def update_certificate request, options = nil
545
637
  raise ::ArgumentError, "request must be provided" if request.nil?
546
638
 
@@ -558,16 +650,20 @@ module Google
558
650
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
559
651
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
560
652
 
561
- header_params = {
562
- "certificate.name" => request.certificate.name
563
- }
653
+ header_params = {}
654
+ if request.certificate&.name
655
+ header_params["certificate.name"] = request.certificate.name
656
+ end
657
+
564
658
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
565
659
  metadata[:"x-goog-request-params"] ||= request_params_header
566
660
 
567
661
  options.apply_defaults timeout: @config.rpcs.update_certificate.timeout,
568
662
  metadata: metadata,
569
663
  retry_policy: @config.rpcs.update_certificate.retry_policy
570
- options.apply_defaults metadata: @config.metadata,
664
+
665
+ options.apply_defaults timeout: @config.timeout,
666
+ metadata: @config.metadata,
571
667
  retry_policy: @config.retry_policy
572
668
 
573
669
  @certificate_authority_service_stub.call_rpc :update_certificate, request, options: options do |response, operation|
@@ -633,6 +729,28 @@ module Google
633
729
  #
634
730
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
635
731
  #
732
+ # @example Basic example
733
+ # require "google/cloud/security/private_ca/v1beta1"
734
+ #
735
+ # # Create a client object. The client can be reused for multiple calls.
736
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
737
+ #
738
+ # # Create a request. To set request fields, pass in keyword arguments.
739
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::ActivateCertificateAuthorityRequest.new
740
+ #
741
+ # # Call the activate_certificate_authority method.
742
+ # result = client.activate_certificate_authority request
743
+ #
744
+ # # The returned object is of type Gapic::Operation. You can use this
745
+ # # object to check the status of an operation, cancel it, or wait
746
+ # # for results. Here is how to block until completion:
747
+ # result.wait_until_done! timeout: 60
748
+ # if result.response?
749
+ # p result.response
750
+ # else
751
+ # puts "Error!"
752
+ # end
753
+ #
636
754
  def activate_certificate_authority request, options = nil
637
755
  raise ::ArgumentError, "request must be provided" if request.nil?
638
756
 
@@ -650,16 +768,20 @@ module Google
650
768
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
651
769
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
652
770
 
653
- header_params = {
654
- "name" => request.name
655
- }
771
+ header_params = {}
772
+ if request.name
773
+ header_params["name"] = request.name
774
+ end
775
+
656
776
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
657
777
  metadata[:"x-goog-request-params"] ||= request_params_header
658
778
 
659
779
  options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout,
660
780
  metadata: metadata,
661
781
  retry_policy: @config.rpcs.activate_certificate_authority.retry_policy
662
- options.apply_defaults metadata: @config.metadata,
782
+
783
+ options.apply_defaults timeout: @config.timeout,
784
+ metadata: @config.metadata,
663
785
  retry_policy: @config.retry_policy
664
786
 
665
787
  @certificate_authority_service_stub.call_rpc :activate_certificate_authority, request, options: options do |response, operation|
@@ -721,6 +843,28 @@ module Google
721
843
  #
722
844
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
723
845
  #
846
+ # @example Basic example
847
+ # require "google/cloud/security/private_ca/v1beta1"
848
+ #
849
+ # # Create a client object. The client can be reused for multiple calls.
850
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
851
+ #
852
+ # # Create a request. To set request fields, pass in keyword arguments.
853
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::CreateCertificateAuthorityRequest.new
854
+ #
855
+ # # Call the create_certificate_authority method.
856
+ # result = client.create_certificate_authority request
857
+ #
858
+ # # The returned object is of type Gapic::Operation. You can use this
859
+ # # object to check the status of an operation, cancel it, or wait
860
+ # # for results. Here is how to block until completion:
861
+ # result.wait_until_done! timeout: 60
862
+ # if result.response?
863
+ # p result.response
864
+ # else
865
+ # puts "Error!"
866
+ # end
867
+ #
724
868
  def create_certificate_authority request, options = nil
725
869
  raise ::ArgumentError, "request must be provided" if request.nil?
726
870
 
@@ -738,16 +882,20 @@ module Google
738
882
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
739
883
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
740
884
 
741
- header_params = {
742
- "parent" => request.parent
743
- }
885
+ header_params = {}
886
+ if request.parent
887
+ header_params["parent"] = request.parent
888
+ end
889
+
744
890
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
745
891
  metadata[:"x-goog-request-params"] ||= request_params_header
746
892
 
747
893
  options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout,
748
894
  metadata: metadata,
749
895
  retry_policy: @config.rpcs.create_certificate_authority.retry_policy
750
- options.apply_defaults metadata: @config.metadata,
896
+
897
+ options.apply_defaults timeout: @config.timeout,
898
+ metadata: @config.metadata,
751
899
  retry_policy: @config.retry_policy
752
900
 
753
901
  @certificate_authority_service_stub.call_rpc :create_certificate_authority, request, options: options do |response, operation|
@@ -803,6 +951,28 @@ module Google
803
951
  #
804
952
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
805
953
  #
954
+ # @example Basic example
955
+ # require "google/cloud/security/private_ca/v1beta1"
956
+ #
957
+ # # Create a client object. The client can be reused for multiple calls.
958
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
959
+ #
960
+ # # Create a request. To set request fields, pass in keyword arguments.
961
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::DisableCertificateAuthorityRequest.new
962
+ #
963
+ # # Call the disable_certificate_authority method.
964
+ # result = client.disable_certificate_authority request
965
+ #
966
+ # # The returned object is of type Gapic::Operation. You can use this
967
+ # # object to check the status of an operation, cancel it, or wait
968
+ # # for results. Here is how to block until completion:
969
+ # result.wait_until_done! timeout: 60
970
+ # if result.response?
971
+ # p result.response
972
+ # else
973
+ # puts "Error!"
974
+ # end
975
+ #
806
976
  def disable_certificate_authority request, options = nil
807
977
  raise ::ArgumentError, "request must be provided" if request.nil?
808
978
 
@@ -820,16 +990,20 @@ module Google
820
990
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
821
991
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
822
992
 
823
- header_params = {
824
- "name" => request.name
825
- }
993
+ header_params = {}
994
+ if request.name
995
+ header_params["name"] = request.name
996
+ end
997
+
826
998
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
827
999
  metadata[:"x-goog-request-params"] ||= request_params_header
828
1000
 
829
1001
  options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout,
830
1002
  metadata: metadata,
831
1003
  retry_policy: @config.rpcs.disable_certificate_authority.retry_policy
832
- options.apply_defaults metadata: @config.metadata,
1004
+
1005
+ options.apply_defaults timeout: @config.timeout,
1006
+ metadata: @config.metadata,
833
1007
  retry_policy: @config.retry_policy
834
1008
 
835
1009
  @certificate_authority_service_stub.call_rpc :disable_certificate_authority, request, options: options do |response, operation|
@@ -885,6 +1059,28 @@ module Google
885
1059
  #
886
1060
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
887
1061
  #
1062
+ # @example Basic example
1063
+ # require "google/cloud/security/private_ca/v1beta1"
1064
+ #
1065
+ # # Create a client object. The client can be reused for multiple calls.
1066
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1067
+ #
1068
+ # # Create a request. To set request fields, pass in keyword arguments.
1069
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::EnableCertificateAuthorityRequest.new
1070
+ #
1071
+ # # Call the enable_certificate_authority method.
1072
+ # result = client.enable_certificate_authority request
1073
+ #
1074
+ # # The returned object is of type Gapic::Operation. You can use this
1075
+ # # object to check the status of an operation, cancel it, or wait
1076
+ # # for results. Here is how to block until completion:
1077
+ # result.wait_until_done! timeout: 60
1078
+ # if result.response?
1079
+ # p result.response
1080
+ # else
1081
+ # puts "Error!"
1082
+ # end
1083
+ #
888
1084
  def enable_certificate_authority request, options = nil
889
1085
  raise ::ArgumentError, "request must be provided" if request.nil?
890
1086
 
@@ -902,16 +1098,20 @@ module Google
902
1098
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
903
1099
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
904
1100
 
905
- header_params = {
906
- "name" => request.name
907
- }
1101
+ header_params = {}
1102
+ if request.name
1103
+ header_params["name"] = request.name
1104
+ end
1105
+
908
1106
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
909
1107
  metadata[:"x-goog-request-params"] ||= request_params_header
910
1108
 
911
1109
  options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout,
912
1110
  metadata: metadata,
913
1111
  retry_policy: @config.rpcs.enable_certificate_authority.retry_policy
914
- options.apply_defaults metadata: @config.metadata,
1112
+
1113
+ options.apply_defaults timeout: @config.timeout,
1114
+ metadata: @config.metadata,
915
1115
  retry_policy: @config.retry_policy
916
1116
 
917
1117
  @certificate_authority_service_stub.call_rpc :enable_certificate_authority, request, options: options do |response, operation|
@@ -959,6 +1159,21 @@ module Google
959
1159
  #
960
1160
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
961
1161
  #
1162
+ # @example Basic example
1163
+ # require "google/cloud/security/private_ca/v1beta1"
1164
+ #
1165
+ # # Create a client object. The client can be reused for multiple calls.
1166
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1167
+ #
1168
+ # # Create a request. To set request fields, pass in keyword arguments.
1169
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrRequest.new
1170
+ #
1171
+ # # Call the fetch_certificate_authority_csr method.
1172
+ # result = client.fetch_certificate_authority_csr request
1173
+ #
1174
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::FetchCertificateAuthorityCsrResponse.
1175
+ # p result
1176
+ #
962
1177
  def fetch_certificate_authority_csr request, options = nil
963
1178
  raise ::ArgumentError, "request must be provided" if request.nil?
964
1179
 
@@ -976,16 +1191,20 @@ module Google
976
1191
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
977
1192
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
978
1193
 
979
- header_params = {
980
- "name" => request.name
981
- }
1194
+ header_params = {}
1195
+ if request.name
1196
+ header_params["name"] = request.name
1197
+ end
1198
+
982
1199
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
983
1200
  metadata[:"x-goog-request-params"] ||= request_params_header
984
1201
 
985
1202
  options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout,
986
1203
  metadata: metadata,
987
1204
  retry_policy: @config.rpcs.fetch_certificate_authority_csr.retry_policy
988
- options.apply_defaults metadata: @config.metadata,
1205
+
1206
+ options.apply_defaults timeout: @config.timeout,
1207
+ metadata: @config.metadata,
989
1208
  retry_policy: @config.retry_policy
990
1209
 
991
1210
  @certificate_authority_service_stub.call_rpc :fetch_certificate_authority_csr, request, options: options do |response, operation|
@@ -1026,6 +1245,21 @@ module Google
1026
1245
  #
1027
1246
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1028
1247
  #
1248
+ # @example Basic example
1249
+ # require "google/cloud/security/private_ca/v1beta1"
1250
+ #
1251
+ # # Create a client object. The client can be reused for multiple calls.
1252
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1253
+ #
1254
+ # # Create a request. To set request fields, pass in keyword arguments.
1255
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateAuthorityRequest.new
1256
+ #
1257
+ # # Call the get_certificate_authority method.
1258
+ # result = client.get_certificate_authority request
1259
+ #
1260
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority.
1261
+ # p result
1262
+ #
1029
1263
  def get_certificate_authority request, options = nil
1030
1264
  raise ::ArgumentError, "request must be provided" if request.nil?
1031
1265
 
@@ -1043,16 +1277,20 @@ module Google
1043
1277
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1044
1278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1045
1279
 
1046
- header_params = {
1047
- "name" => request.name
1048
- }
1280
+ header_params = {}
1281
+ if request.name
1282
+ header_params["name"] = request.name
1283
+ end
1284
+
1049
1285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1050
1286
  metadata[:"x-goog-request-params"] ||= request_params_header
1051
1287
 
1052
1288
  options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout,
1053
1289
  metadata: metadata,
1054
1290
  retry_policy: @config.rpcs.get_certificate_authority.retry_policy
1055
- options.apply_defaults metadata: @config.metadata,
1291
+
1292
+ options.apply_defaults timeout: @config.timeout,
1293
+ metadata: @config.metadata,
1056
1294
  retry_policy: @config.retry_policy
1057
1295
 
1058
1296
  @certificate_authority_service_stub.call_rpc :get_certificate_authority, request, options: options do |response, operation|
@@ -1108,6 +1346,27 @@ module Google
1108
1346
  #
1109
1347
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1110
1348
  #
1349
+ # @example Basic example
1350
+ # require "google/cloud/security/private_ca/v1beta1"
1351
+ #
1352
+ # # Create a client object. The client can be reused for multiple calls.
1353
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1354
+ #
1355
+ # # Create a request. To set request fields, pass in keyword arguments.
1356
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateAuthoritiesRequest.new
1357
+ #
1358
+ # # Call the list_certificate_authorities method.
1359
+ # result = client.list_certificate_authorities request
1360
+ #
1361
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1362
+ # # iterate over all elements by calling #each, and the enumerable
1363
+ # # will lazily make API calls to fetch subsequent pages. Other
1364
+ # # methods are also available for managing paging directly.
1365
+ # result.each do |response|
1366
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthority.
1367
+ # p response
1368
+ # end
1369
+ #
1111
1370
  def list_certificate_authorities request, options = nil
1112
1371
  raise ::ArgumentError, "request must be provided" if request.nil?
1113
1372
 
@@ -1125,16 +1384,20 @@ module Google
1125
1384
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1126
1385
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1127
1386
 
1128
- header_params = {
1129
- "parent" => request.parent
1130
- }
1387
+ header_params = {}
1388
+ if request.parent
1389
+ header_params["parent"] = request.parent
1390
+ end
1391
+
1131
1392
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1132
1393
  metadata[:"x-goog-request-params"] ||= request_params_header
1133
1394
 
1134
1395
  options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout,
1135
1396
  metadata: metadata,
1136
1397
  retry_policy: @config.rpcs.list_certificate_authorities.retry_policy
1137
- options.apply_defaults metadata: @config.metadata,
1398
+
1399
+ options.apply_defaults timeout: @config.timeout,
1400
+ metadata: @config.metadata,
1138
1401
  retry_policy: @config.retry_policy
1139
1402
 
1140
1403
  @certificate_authority_service_stub.call_rpc :list_certificate_authorities, request, options: options do |response, operation|
@@ -1190,6 +1453,28 @@ module Google
1190
1453
  #
1191
1454
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1192
1455
  #
1456
+ # @example Basic example
1457
+ # require "google/cloud/security/private_ca/v1beta1"
1458
+ #
1459
+ # # Create a client object. The client can be reused for multiple calls.
1460
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1461
+ #
1462
+ # # Create a request. To set request fields, pass in keyword arguments.
1463
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::RestoreCertificateAuthorityRequest.new
1464
+ #
1465
+ # # Call the restore_certificate_authority method.
1466
+ # result = client.restore_certificate_authority request
1467
+ #
1468
+ # # The returned object is of type Gapic::Operation. You can use this
1469
+ # # object to check the status of an operation, cancel it, or wait
1470
+ # # for results. Here is how to block until completion:
1471
+ # result.wait_until_done! timeout: 60
1472
+ # if result.response?
1473
+ # p result.response
1474
+ # else
1475
+ # puts "Error!"
1476
+ # end
1477
+ #
1193
1478
  def restore_certificate_authority request, options = nil
1194
1479
  raise ::ArgumentError, "request must be provided" if request.nil?
1195
1480
 
@@ -1207,16 +1492,20 @@ module Google
1207
1492
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1208
1493
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1209
1494
 
1210
- header_params = {
1211
- "name" => request.name
1212
- }
1495
+ header_params = {}
1496
+ if request.name
1497
+ header_params["name"] = request.name
1498
+ end
1499
+
1213
1500
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1214
1501
  metadata[:"x-goog-request-params"] ||= request_params_header
1215
1502
 
1216
1503
  options.apply_defaults timeout: @config.rpcs.restore_certificate_authority.timeout,
1217
1504
  metadata: metadata,
1218
1505
  retry_policy: @config.rpcs.restore_certificate_authority.retry_policy
1219
- options.apply_defaults metadata: @config.metadata,
1506
+
1507
+ options.apply_defaults timeout: @config.timeout,
1508
+ metadata: @config.metadata,
1220
1509
  retry_policy: @config.retry_policy
1221
1510
 
1222
1511
  @certificate_authority_service_stub.call_rpc :restore_certificate_authority, request, options: options do |response, operation|
@@ -1272,6 +1561,28 @@ module Google
1272
1561
  #
1273
1562
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1274
1563
  #
1564
+ # @example Basic example
1565
+ # require "google/cloud/security/private_ca/v1beta1"
1566
+ #
1567
+ # # Create a client object. The client can be reused for multiple calls.
1568
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1569
+ #
1570
+ # # Create a request. To set request fields, pass in keyword arguments.
1571
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::ScheduleDeleteCertificateAuthorityRequest.new
1572
+ #
1573
+ # # Call the schedule_delete_certificate_authority method.
1574
+ # result = client.schedule_delete_certificate_authority request
1575
+ #
1576
+ # # The returned object is of type Gapic::Operation. You can use this
1577
+ # # object to check the status of an operation, cancel it, or wait
1578
+ # # for results. Here is how to block until completion:
1579
+ # result.wait_until_done! timeout: 60
1580
+ # if result.response?
1581
+ # p result.response
1582
+ # else
1583
+ # puts "Error!"
1584
+ # end
1585
+ #
1275
1586
  def schedule_delete_certificate_authority request, options = nil
1276
1587
  raise ::ArgumentError, "request must be provided" if request.nil?
1277
1588
 
@@ -1289,16 +1600,20 @@ module Google
1289
1600
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1290
1601
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1291
1602
 
1292
- header_params = {
1293
- "name" => request.name
1294
- }
1603
+ header_params = {}
1604
+ if request.name
1605
+ header_params["name"] = request.name
1606
+ end
1607
+
1295
1608
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1296
1609
  metadata[:"x-goog-request-params"] ||= request_params_header
1297
1610
 
1298
1611
  options.apply_defaults timeout: @config.rpcs.schedule_delete_certificate_authority.timeout,
1299
1612
  metadata: metadata,
1300
1613
  retry_policy: @config.rpcs.schedule_delete_certificate_authority.retry_policy
1301
- options.apply_defaults metadata: @config.metadata,
1614
+
1615
+ options.apply_defaults timeout: @config.timeout,
1616
+ metadata: @config.metadata,
1302
1617
  retry_policy: @config.retry_policy
1303
1618
 
1304
1619
  @certificate_authority_service_stub.call_rpc :schedule_delete_certificate_authority, request, options: options do |response, operation|
@@ -1355,6 +1670,28 @@ module Google
1355
1670
  #
1356
1671
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1357
1672
  #
1673
+ # @example Basic example
1674
+ # require "google/cloud/security/private_ca/v1beta1"
1675
+ #
1676
+ # # Create a client object. The client can be reused for multiple calls.
1677
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1678
+ #
1679
+ # # Create a request. To set request fields, pass in keyword arguments.
1680
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateAuthorityRequest.new
1681
+ #
1682
+ # # Call the update_certificate_authority method.
1683
+ # result = client.update_certificate_authority request
1684
+ #
1685
+ # # The returned object is of type Gapic::Operation. You can use this
1686
+ # # object to check the status of an operation, cancel it, or wait
1687
+ # # for results. Here is how to block until completion:
1688
+ # result.wait_until_done! timeout: 60
1689
+ # if result.response?
1690
+ # p result.response
1691
+ # else
1692
+ # puts "Error!"
1693
+ # end
1694
+ #
1358
1695
  def update_certificate_authority request, options = nil
1359
1696
  raise ::ArgumentError, "request must be provided" if request.nil?
1360
1697
 
@@ -1372,16 +1709,20 @@ module Google
1372
1709
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1373
1710
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1374
1711
 
1375
- header_params = {
1376
- "certificate_authority.name" => request.certificate_authority.name
1377
- }
1712
+ header_params = {}
1713
+ if request.certificate_authority&.name
1714
+ header_params["certificate_authority.name"] = request.certificate_authority.name
1715
+ end
1716
+
1378
1717
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1379
1718
  metadata[:"x-goog-request-params"] ||= request_params_header
1380
1719
 
1381
1720
  options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout,
1382
1721
  metadata: metadata,
1383
1722
  retry_policy: @config.rpcs.update_certificate_authority.retry_policy
1384
- options.apply_defaults metadata: @config.metadata,
1723
+
1724
+ options.apply_defaults timeout: @config.timeout,
1725
+ metadata: @config.metadata,
1385
1726
  retry_policy: @config.retry_policy
1386
1727
 
1387
1728
  @certificate_authority_service_stub.call_rpc :update_certificate_authority, request, options: options do |response, operation|
@@ -1423,6 +1764,21 @@ module Google
1423
1764
  #
1424
1765
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1425
1766
  #
1767
+ # @example Basic example
1768
+ # require "google/cloud/security/private_ca/v1beta1"
1769
+ #
1770
+ # # Create a client object. The client can be reused for multiple calls.
1771
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1772
+ #
1773
+ # # Create a request. To set request fields, pass in keyword arguments.
1774
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::GetCertificateRevocationListRequest.new
1775
+ #
1776
+ # # Call the get_certificate_revocation_list method.
1777
+ # result = client.get_certificate_revocation_list request
1778
+ #
1779
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList.
1780
+ # p result
1781
+ #
1426
1782
  def get_certificate_revocation_list request, options = nil
1427
1783
  raise ::ArgumentError, "request must be provided" if request.nil?
1428
1784
 
@@ -1440,16 +1796,20 @@ module Google
1440
1796
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1441
1797
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1442
1798
 
1443
- header_params = {
1444
- "name" => request.name
1445
- }
1799
+ header_params = {}
1800
+ if request.name
1801
+ header_params["name"] = request.name
1802
+ end
1803
+
1446
1804
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1447
1805
  metadata[:"x-goog-request-params"] ||= request_params_header
1448
1806
 
1449
1807
  options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout,
1450
1808
  metadata: metadata,
1451
1809
  retry_policy: @config.rpcs.get_certificate_revocation_list.retry_policy
1452
- options.apply_defaults metadata: @config.metadata,
1810
+
1811
+ options.apply_defaults timeout: @config.timeout,
1812
+ metadata: @config.metadata,
1453
1813
  retry_policy: @config.retry_policy
1454
1814
 
1455
1815
  @certificate_authority_service_stub.call_rpc :get_certificate_revocation_list, request, options: options do |response, operation|
@@ -1505,6 +1865,27 @@ module Google
1505
1865
  #
1506
1866
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1507
1867
  #
1868
+ # @example Basic example
1869
+ # require "google/cloud/security/private_ca/v1beta1"
1870
+ #
1871
+ # # Create a client object. The client can be reused for multiple calls.
1872
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1873
+ #
1874
+ # # Create a request. To set request fields, pass in keyword arguments.
1875
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::ListCertificateRevocationListsRequest.new
1876
+ #
1877
+ # # Call the list_certificate_revocation_lists method.
1878
+ # result = client.list_certificate_revocation_lists request
1879
+ #
1880
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1881
+ # # iterate over all elements by calling #each, and the enumerable
1882
+ # # will lazily make API calls to fetch subsequent pages. Other
1883
+ # # methods are also available for managing paging directly.
1884
+ # result.each do |response|
1885
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateRevocationList.
1886
+ # p response
1887
+ # end
1888
+ #
1508
1889
  def list_certificate_revocation_lists request, options = nil
1509
1890
  raise ::ArgumentError, "request must be provided" if request.nil?
1510
1891
 
@@ -1522,16 +1903,20 @@ module Google
1522
1903
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1523
1904
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1524
1905
 
1525
- header_params = {
1526
- "parent" => request.parent
1527
- }
1906
+ header_params = {}
1907
+ if request.parent
1908
+ header_params["parent"] = request.parent
1909
+ end
1910
+
1528
1911
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1529
1912
  metadata[:"x-goog-request-params"] ||= request_params_header
1530
1913
 
1531
1914
  options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout,
1532
1915
  metadata: metadata,
1533
1916
  retry_policy: @config.rpcs.list_certificate_revocation_lists.retry_policy
1534
- options.apply_defaults metadata: @config.metadata,
1917
+
1918
+ options.apply_defaults timeout: @config.timeout,
1919
+ metadata: @config.metadata,
1535
1920
  retry_policy: @config.retry_policy
1536
1921
 
1537
1922
  @certificate_authority_service_stub.call_rpc :list_certificate_revocation_lists, request, options: options do |response, operation|
@@ -1588,6 +1973,28 @@ module Google
1588
1973
  #
1589
1974
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1590
1975
  #
1976
+ # @example Basic example
1977
+ # require "google/cloud/security/private_ca/v1beta1"
1978
+ #
1979
+ # # Create a client object. The client can be reused for multiple calls.
1980
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
1981
+ #
1982
+ # # Create a request. To set request fields, pass in keyword arguments.
1983
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::UpdateCertificateRevocationListRequest.new
1984
+ #
1985
+ # # Call the update_certificate_revocation_list method.
1986
+ # result = client.update_certificate_revocation_list request
1987
+ #
1988
+ # # The returned object is of type Gapic::Operation. You can use this
1989
+ # # object to check the status of an operation, cancel it, or wait
1990
+ # # for results. Here is how to block until completion:
1991
+ # result.wait_until_done! timeout: 60
1992
+ # if result.response?
1993
+ # p result.response
1994
+ # else
1995
+ # puts "Error!"
1996
+ # end
1997
+ #
1591
1998
  def update_certificate_revocation_list request, options = nil
1592
1999
  raise ::ArgumentError, "request must be provided" if request.nil?
1593
2000
 
@@ -1605,16 +2012,20 @@ module Google
1605
2012
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1606
2013
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1607
2014
 
1608
- header_params = {
1609
- "certificate_revocation_list.name" => request.certificate_revocation_list.name
1610
- }
2015
+ header_params = {}
2016
+ if request.certificate_revocation_list&.name
2017
+ header_params["certificate_revocation_list.name"] = request.certificate_revocation_list.name
2018
+ end
2019
+
1611
2020
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1612
2021
  metadata[:"x-goog-request-params"] ||= request_params_header
1613
2022
 
1614
2023
  options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout,
1615
2024
  metadata: metadata,
1616
2025
  retry_policy: @config.rpcs.update_certificate_revocation_list.retry_policy
1617
- options.apply_defaults metadata: @config.metadata,
2026
+
2027
+ options.apply_defaults timeout: @config.timeout,
2028
+ metadata: @config.metadata,
1618
2029
  retry_policy: @config.retry_policy
1619
2030
 
1620
2031
  @certificate_authority_service_stub.call_rpc :update_certificate_revocation_list, request, options: options do |response, operation|
@@ -1655,6 +2066,21 @@ module Google
1655
2066
  #
1656
2067
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1657
2068
  #
2069
+ # @example Basic example
2070
+ # require "google/cloud/security/private_ca/v1beta1"
2071
+ #
2072
+ # # Create a client object. The client can be reused for multiple calls.
2073
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
2074
+ #
2075
+ # # Create a request. To set request fields, pass in keyword arguments.
2076
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::GetReusableConfigRequest.new
2077
+ #
2078
+ # # Call the get_reusable_config method.
2079
+ # result = client.get_reusable_config request
2080
+ #
2081
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig.
2082
+ # p result
2083
+ #
1658
2084
  def get_reusable_config request, options = nil
1659
2085
  raise ::ArgumentError, "request must be provided" if request.nil?
1660
2086
 
@@ -1672,16 +2098,20 @@ module Google
1672
2098
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1673
2099
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1674
2100
 
1675
- header_params = {
1676
- "name" => request.name
1677
- }
2101
+ header_params = {}
2102
+ if request.name
2103
+ header_params["name"] = request.name
2104
+ end
2105
+
1678
2106
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1679
2107
  metadata[:"x-goog-request-params"] ||= request_params_header
1680
2108
 
1681
2109
  options.apply_defaults timeout: @config.rpcs.get_reusable_config.timeout,
1682
2110
  metadata: metadata,
1683
2111
  retry_policy: @config.rpcs.get_reusable_config.retry_policy
1684
- options.apply_defaults metadata: @config.metadata,
2112
+
2113
+ options.apply_defaults timeout: @config.timeout,
2114
+ metadata: @config.metadata,
1685
2115
  retry_policy: @config.retry_policy
1686
2116
 
1687
2117
  @certificate_authority_service_stub.call_rpc :get_reusable_config, request, options: options do |response, operation|
@@ -1737,6 +2167,27 @@ module Google
1737
2167
  #
1738
2168
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1739
2169
  #
2170
+ # @example Basic example
2171
+ # require "google/cloud/security/private_ca/v1beta1"
2172
+ #
2173
+ # # Create a client object. The client can be reused for multiple calls.
2174
+ # client = Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new
2175
+ #
2176
+ # # Create a request. To set request fields, pass in keyword arguments.
2177
+ # request = Google::Cloud::Security::PrivateCA::V1beta1::ListReusableConfigsRequest.new
2178
+ #
2179
+ # # Call the list_reusable_configs method.
2180
+ # result = client.list_reusable_configs request
2181
+ #
2182
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2183
+ # # iterate over all elements by calling #each, and the enumerable
2184
+ # # will lazily make API calls to fetch subsequent pages. Other
2185
+ # # methods are also available for managing paging directly.
2186
+ # result.each do |response|
2187
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1beta1::ReusableConfig.
2188
+ # p response
2189
+ # end
2190
+ #
1740
2191
  def list_reusable_configs request, options = nil
1741
2192
  raise ::ArgumentError, "request must be provided" if request.nil?
1742
2193
 
@@ -1754,16 +2205,20 @@ module Google
1754
2205
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION
1755
2206
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1756
2207
 
1757
- header_params = {
1758
- "parent" => request.parent
1759
- }
2208
+ header_params = {}
2209
+ if request.parent
2210
+ header_params["parent"] = request.parent
2211
+ end
2212
+
1760
2213
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1761
2214
  metadata[:"x-goog-request-params"] ||= request_params_header
1762
2215
 
1763
2216
  options.apply_defaults timeout: @config.rpcs.list_reusable_configs.timeout,
1764
2217
  metadata: metadata,
1765
2218
  retry_policy: @config.rpcs.list_reusable_configs.retry_policy
1766
- options.apply_defaults metadata: @config.metadata,
2219
+
2220
+ options.apply_defaults timeout: @config.timeout,
2221
+ metadata: @config.metadata,
1767
2222
  retry_policy: @config.retry_policy
1768
2223
 
1769
2224
  @certificate_authority_service_stub.call_rpc :list_reusable_configs, request, options: options do |response, operation|
@@ -1788,22 +2243,21 @@ module Google
1788
2243
  # Configuration can be applied globally to all clients, or to a single client
1789
2244
  # on construction.
1790
2245
  #
1791
- # # Examples
1792
- #
1793
- # To modify the global config, setting the timeout for create_certificate
1794
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1795
- #
1796
- # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.configure do |config|
1797
- # config.timeout = 10.0
1798
- # config.rpcs.create_certificate.timeout = 20.0
1799
- # end
1800
- #
1801
- # To apply the above configuration only to a new client:
1802
- #
1803
- # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config|
1804
- # config.timeout = 10.0
1805
- # config.rpcs.create_certificate.timeout = 20.0
1806
- # end
2246
+ # @example
2247
+ #
2248
+ # # Modify the global config, setting the timeout for
2249
+ # # create_certificate to 20 seconds,
2250
+ # # and all remaining timeouts to 10 seconds.
2251
+ # ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.configure do |config|
2252
+ # config.timeout = 10.0
2253
+ # config.rpcs.create_certificate.timeout = 20.0
2254
+ # end
2255
+ #
2256
+ # # Apply the above configuration only to a new client.
2257
+ # client = ::Google::Cloud::Security::PrivateCA::V1beta1::CertificateAuthorityService::Client.new do |config|
2258
+ # config.timeout = 10.0
2259
+ # config.rpcs.create_certificate.timeout = 20.0
2260
+ # end
1807
2261
  #
1808
2262
  # @!attribute [rw] endpoint
1809
2263
  # The hostname or hostname:port of the service endpoint.