google-cloud-security-private_ca-v1 0.8.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,9 @@ module Google
37
37
  # manages private certificate authorities and issued certificates.
38
38
  #
39
39
  class Client
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$"
42
+
40
43
  include Paths
41
44
 
42
45
  # @private
@@ -102,6 +105,15 @@ module Google
102
105
  @config
103
106
  end
104
107
 
108
+ ##
109
+ # The effective universe domain
110
+ #
111
+ # @return [String]
112
+ #
113
+ def universe_domain
114
+ @certificate_authority_service_stub.universe_domain
115
+ end
116
+
105
117
  ##
106
118
  # Create a new CertificateAuthorityService REST client object.
107
119
  #
@@ -129,8 +141,9 @@ module Google
129
141
  credentials = @config.credentials
130
142
  # Use self-signed JWT if the endpoint is unchanged from default,
131
143
  # but only if the default endpoint does not have a region prefix.
132
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
133
- !@config.endpoint.split(".").first.include?("-")
144
+ enable_self_signed_jwt = @config.endpoint.nil? ||
145
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
146
+ !@config.endpoint.split(".").first.include?("-"))
134
147
  credentials ||= Credentials.default scope: @config.scope,
135
148
  enable_self_signed_jwt: enable_self_signed_jwt
136
149
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -144,12 +157,14 @@ module Google
144
157
  config.credentials = credentials
145
158
  config.quota_project = @quota_project_id
146
159
  config.endpoint = @config.endpoint
160
+ config.universe_domain = @config.universe_domain
147
161
  end
148
162
 
149
163
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
150
164
  config.credentials = credentials
151
165
  config.quota_project = @quota_project_id
152
166
  config.endpoint = @config.endpoint
167
+ config.universe_domain = @config.universe_domain
153
168
  config.bindings_override = @config.bindings_override
154
169
  end
155
170
 
@@ -157,10 +172,16 @@ module Google
157
172
  config.credentials = credentials
158
173
  config.quota_project = @quota_project_id
159
174
  config.endpoint = @config.endpoint
175
+ config.universe_domain = @config.universe_domain
160
176
  config.bindings_override = @config.bindings_override
161
177
  end
162
178
 
163
- @certificate_authority_service_stub = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
179
+ @certificate_authority_service_stub = ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::ServiceStub.new(
180
+ endpoint: @config.endpoint,
181
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
182
+ universe_domain: @config.universe_domain,
183
+ credentials: credentials
184
+ )
164
185
  end
165
186
 
166
187
  ##
@@ -270,6 +291,22 @@ module Google
270
291
  # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
271
292
  #
272
293
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
294
+ #
295
+ # @example Basic example
296
+ # require "google/cloud/security/private_ca/v1"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateRequest.new
303
+ #
304
+ # # Call the create_certificate method.
305
+ # result = client.create_certificate request
306
+ #
307
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
308
+ # p result
309
+ #
273
310
  def create_certificate request, options = nil
274
311
  raise ::ArgumentError, "request must be provided" if request.nil?
275
312
 
@@ -334,6 +371,22 @@ module Google
334
371
  # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
335
372
  #
336
373
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
374
+ #
375
+ # @example Basic example
376
+ # require "google/cloud/security/private_ca/v1"
377
+ #
378
+ # # Create a client object. The client can be reused for multiple calls.
379
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
380
+ #
381
+ # # Create a request. To set request fields, pass in keyword arguments.
382
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRequest.new
383
+ #
384
+ # # Call the get_certificate method.
385
+ # result = client.get_certificate request
386
+ #
387
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
388
+ # p result
389
+ #
337
390
  def get_certificate request, options = nil
338
391
  raise ::ArgumentError, "request must be provided" if request.nil?
339
392
 
@@ -418,6 +471,26 @@ module Google
418
471
  # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificatesResponse]
419
472
  #
420
473
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
474
+ #
475
+ # @example Basic example
476
+ # require "google/cloud/security/private_ca/v1"
477
+ #
478
+ # # Create a client object. The client can be reused for multiple calls.
479
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
480
+ #
481
+ # # Create a request. To set request fields, pass in keyword arguments.
482
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCertificatesRequest.new
483
+ #
484
+ # # Call the list_certificates method.
485
+ # result = client.list_certificates request
486
+ #
487
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
488
+ # # over elements, and API calls will be issued to fetch pages as needed.
489
+ # result.each do |item|
490
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::Certificate.
491
+ # p item
492
+ # end
493
+ #
421
494
  def list_certificates request, options = nil
422
495
  raise ::ArgumentError, "request must be provided" if request.nil?
423
496
 
@@ -500,6 +573,22 @@ module Google
500
573
  # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
501
574
  #
502
575
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
576
+ #
577
+ # @example Basic example
578
+ # require "google/cloud/security/private_ca/v1"
579
+ #
580
+ # # Create a client object. The client can be reused for multiple calls.
581
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
582
+ #
583
+ # # Create a request. To set request fields, pass in keyword arguments.
584
+ # request = Google::Cloud::Security::PrivateCA::V1::RevokeCertificateRequest.new
585
+ #
586
+ # # Call the revoke_certificate method.
587
+ # result = client.revoke_certificate request
588
+ #
589
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
590
+ # p result
591
+ #
503
592
  def revoke_certificate request, options = nil
504
593
  raise ::ArgumentError, "request must be provided" if request.nil?
505
594
 
@@ -581,6 +670,22 @@ module Google
581
670
  # @return [::Google::Cloud::Security::PrivateCA::V1::Certificate]
582
671
  #
583
672
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
673
+ #
674
+ # @example Basic example
675
+ # require "google/cloud/security/private_ca/v1"
676
+ #
677
+ # # Create a client object. The client can be reused for multiple calls.
678
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
679
+ #
680
+ # # Create a request. To set request fields, pass in keyword arguments.
681
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRequest.new
682
+ #
683
+ # # Call the update_certificate method.
684
+ # result = client.update_certificate request
685
+ #
686
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::Certificate.
687
+ # p result
688
+ #
584
689
  def update_certificate request, options = nil
585
690
  raise ::ArgumentError, "request must be provided" if request.nil?
586
691
 
@@ -674,6 +779,29 @@ module Google
674
779
  # @return [::Gapic::Operation]
675
780
  #
676
781
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
782
+ #
783
+ # @example Basic example
784
+ # require "google/cloud/security/private_ca/v1"
785
+ #
786
+ # # Create a client object. The client can be reused for multiple calls.
787
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
788
+ #
789
+ # # Create a request. To set request fields, pass in keyword arguments.
790
+ # request = Google::Cloud::Security::PrivateCA::V1::ActivateCertificateAuthorityRequest.new
791
+ #
792
+ # # Call the activate_certificate_authority method.
793
+ # result = client.activate_certificate_authority request
794
+ #
795
+ # # The returned object is of type Gapic::Operation. You can use it to
796
+ # # check the status of an operation, cancel it, or wait for results.
797
+ # # Here is how to wait for a response.
798
+ # result.wait_until_done! timeout: 60
799
+ # if result.response?
800
+ # p result.response
801
+ # else
802
+ # puts "No response received."
803
+ # end
804
+ #
677
805
  def activate_certificate_authority request, options = nil
678
806
  raise ::ArgumentError, "request must be provided" if request.nil?
679
807
 
@@ -763,6 +891,29 @@ module Google
763
891
  # @return [::Gapic::Operation]
764
892
  #
765
893
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
894
+ #
895
+ # @example Basic example
896
+ # require "google/cloud/security/private_ca/v1"
897
+ #
898
+ # # Create a client object. The client can be reused for multiple calls.
899
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
900
+ #
901
+ # # Create a request. To set request fields, pass in keyword arguments.
902
+ # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateAuthorityRequest.new
903
+ #
904
+ # # Call the create_certificate_authority method.
905
+ # result = client.create_certificate_authority request
906
+ #
907
+ # # The returned object is of type Gapic::Operation. You can use it to
908
+ # # check the status of an operation, cancel it, or wait for results.
909
+ # # Here is how to wait for a response.
910
+ # result.wait_until_done! timeout: 60
911
+ # if result.response?
912
+ # p result.response
913
+ # else
914
+ # puts "No response received."
915
+ # end
916
+ #
766
917
  def create_certificate_authority request, options = nil
767
918
  raise ::ArgumentError, "request must be provided" if request.nil?
768
919
 
@@ -848,6 +999,29 @@ module Google
848
999
  # @return [::Gapic::Operation]
849
1000
  #
850
1001
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1002
+ #
1003
+ # @example Basic example
1004
+ # require "google/cloud/security/private_ca/v1"
1005
+ #
1006
+ # # Create a client object. The client can be reused for multiple calls.
1007
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1008
+ #
1009
+ # # Create a request. To set request fields, pass in keyword arguments.
1010
+ # request = Google::Cloud::Security::PrivateCA::V1::DisableCertificateAuthorityRequest.new
1011
+ #
1012
+ # # Call the disable_certificate_authority method.
1013
+ # result = client.disable_certificate_authority request
1014
+ #
1015
+ # # The returned object is of type Gapic::Operation. You can use it to
1016
+ # # check the status of an operation, cancel it, or wait for results.
1017
+ # # Here is how to wait for a response.
1018
+ # result.wait_until_done! timeout: 60
1019
+ # if result.response?
1020
+ # p result.response
1021
+ # else
1022
+ # puts "No response received."
1023
+ # end
1024
+ #
851
1025
  def disable_certificate_authority request, options = nil
852
1026
  raise ::ArgumentError, "request must be provided" if request.nil?
853
1027
 
@@ -928,6 +1102,29 @@ module Google
928
1102
  # @return [::Gapic::Operation]
929
1103
  #
930
1104
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1105
+ #
1106
+ # @example Basic example
1107
+ # require "google/cloud/security/private_ca/v1"
1108
+ #
1109
+ # # Create a client object. The client can be reused for multiple calls.
1110
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1111
+ #
1112
+ # # Create a request. To set request fields, pass in keyword arguments.
1113
+ # request = Google::Cloud::Security::PrivateCA::V1::EnableCertificateAuthorityRequest.new
1114
+ #
1115
+ # # Call the enable_certificate_authority method.
1116
+ # result = client.enable_certificate_authority request
1117
+ #
1118
+ # # The returned object is of type Gapic::Operation. You can use it to
1119
+ # # check the status of an operation, cancel it, or wait for results.
1120
+ # # Here is how to wait for a response.
1121
+ # result.wait_until_done! timeout: 60
1122
+ # if result.response?
1123
+ # p result.response
1124
+ # else
1125
+ # puts "No response received."
1126
+ # end
1127
+ #
931
1128
  def enable_certificate_authority request, options = nil
932
1129
  raise ::ArgumentError, "request must be provided" if request.nil?
933
1130
 
@@ -1003,6 +1200,22 @@ module Google
1003
1200
  # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse]
1004
1201
  #
1005
1202
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1203
+ #
1204
+ # @example Basic example
1205
+ # require "google/cloud/security/private_ca/v1"
1206
+ #
1207
+ # # Create a client object. The client can be reused for multiple calls.
1208
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1209
+ #
1210
+ # # Create a request. To set request fields, pass in keyword arguments.
1211
+ # request = Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrRequest.new
1212
+ #
1213
+ # # Call the fetch_certificate_authority_csr method.
1214
+ # result = client.fetch_certificate_authority_csr request
1215
+ #
1216
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCertificateAuthorityCsrResponse.
1217
+ # p result
1218
+ #
1006
1219
  def fetch_certificate_authority_csr request, options = nil
1007
1220
  raise ::ArgumentError, "request must be provided" if request.nil?
1008
1221
 
@@ -1069,6 +1282,22 @@ module Google
1069
1282
  # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority]
1070
1283
  #
1071
1284
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1285
+ #
1286
+ # @example Basic example
1287
+ # require "google/cloud/security/private_ca/v1"
1288
+ #
1289
+ # # Create a client object. The client can be reused for multiple calls.
1290
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1291
+ #
1292
+ # # Create a request. To set request fields, pass in keyword arguments.
1293
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateAuthorityRequest.new
1294
+ #
1295
+ # # Call the get_certificate_authority method.
1296
+ # result = client.get_certificate_authority request
1297
+ #
1298
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.
1299
+ # p result
1300
+ #
1072
1301
  def get_certificate_authority request, options = nil
1073
1302
  raise ::ArgumentError, "request must be provided" if request.nil?
1074
1303
 
@@ -1151,6 +1380,26 @@ module Google
1151
1380
  # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesResponse]
1152
1381
  #
1153
1382
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1383
+ #
1384
+ # @example Basic example
1385
+ # require "google/cloud/security/private_ca/v1"
1386
+ #
1387
+ # # Create a client object. The client can be reused for multiple calls.
1388
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1389
+ #
1390
+ # # Create a request. To set request fields, pass in keyword arguments.
1391
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateAuthoritiesRequest.new
1392
+ #
1393
+ # # Call the list_certificate_authorities method.
1394
+ # result = client.list_certificate_authorities request
1395
+ #
1396
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1397
+ # # over elements, and API calls will be issued to fetch pages as needed.
1398
+ # result.each do |item|
1399
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateAuthority.
1400
+ # p item
1401
+ # end
1402
+ #
1154
1403
  def list_certificate_authorities request, options = nil
1155
1404
  raise ::ArgumentError, "request must be provided" if request.nil?
1156
1405
 
@@ -1231,6 +1480,29 @@ module Google
1231
1480
  # @return [::Gapic::Operation]
1232
1481
  #
1233
1482
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1483
+ #
1484
+ # @example Basic example
1485
+ # require "google/cloud/security/private_ca/v1"
1486
+ #
1487
+ # # Create a client object. The client can be reused for multiple calls.
1488
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1489
+ #
1490
+ # # Create a request. To set request fields, pass in keyword arguments.
1491
+ # request = Google::Cloud::Security::PrivateCA::V1::UndeleteCertificateAuthorityRequest.new
1492
+ #
1493
+ # # Call the undelete_certificate_authority method.
1494
+ # result = client.undelete_certificate_authority request
1495
+ #
1496
+ # # The returned object is of type Gapic::Operation. You can use it to
1497
+ # # check the status of an operation, cancel it, or wait for results.
1498
+ # # Here is how to wait for a response.
1499
+ # result.wait_until_done! timeout: 60
1500
+ # if result.response?
1501
+ # p result.response
1502
+ # else
1503
+ # puts "No response received."
1504
+ # end
1505
+ #
1234
1506
  def undelete_certificate_authority request, options = nil
1235
1507
  raise ::ArgumentError, "request must be provided" if request.nil?
1236
1508
 
@@ -1323,6 +1595,29 @@ module Google
1323
1595
  # @return [::Gapic::Operation]
1324
1596
  #
1325
1597
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1598
+ #
1599
+ # @example Basic example
1600
+ # require "google/cloud/security/private_ca/v1"
1601
+ #
1602
+ # # Create a client object. The client can be reused for multiple calls.
1603
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1604
+ #
1605
+ # # Create a request. To set request fields, pass in keyword arguments.
1606
+ # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateAuthorityRequest.new
1607
+ #
1608
+ # # Call the delete_certificate_authority method.
1609
+ # result = client.delete_certificate_authority request
1610
+ #
1611
+ # # The returned object is of type Gapic::Operation. You can use it to
1612
+ # # check the status of an operation, cancel it, or wait for results.
1613
+ # # Here is how to wait for a response.
1614
+ # result.wait_until_done! timeout: 60
1615
+ # if result.response?
1616
+ # p result.response
1617
+ # else
1618
+ # puts "No response received."
1619
+ # end
1620
+ #
1326
1621
  def delete_certificate_authority request, options = nil
1327
1622
  raise ::ArgumentError, "request must be provided" if request.nil?
1328
1623
 
@@ -1405,6 +1700,29 @@ module Google
1405
1700
  # @return [::Gapic::Operation]
1406
1701
  #
1407
1702
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1703
+ #
1704
+ # @example Basic example
1705
+ # require "google/cloud/security/private_ca/v1"
1706
+ #
1707
+ # # Create a client object. The client can be reused for multiple calls.
1708
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1709
+ #
1710
+ # # Create a request. To set request fields, pass in keyword arguments.
1711
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateAuthorityRequest.new
1712
+ #
1713
+ # # Call the update_certificate_authority method.
1714
+ # result = client.update_certificate_authority request
1715
+ #
1716
+ # # The returned object is of type Gapic::Operation. You can use it to
1717
+ # # check the status of an operation, cancel it, or wait for results.
1718
+ # # Here is how to wait for a response.
1719
+ # result.wait_until_done! timeout: 60
1720
+ # if result.response?
1721
+ # p result.response
1722
+ # else
1723
+ # puts "No response received."
1724
+ # end
1725
+ #
1408
1726
  def update_certificate_authority request, options = nil
1409
1727
  raise ::ArgumentError, "request must be provided" if request.nil?
1410
1728
 
@@ -1490,6 +1808,29 @@ module Google
1490
1808
  # @return [::Gapic::Operation]
1491
1809
  #
1492
1810
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1811
+ #
1812
+ # @example Basic example
1813
+ # require "google/cloud/security/private_ca/v1"
1814
+ #
1815
+ # # Create a client object. The client can be reused for multiple calls.
1816
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1817
+ #
1818
+ # # Create a request. To set request fields, pass in keyword arguments.
1819
+ # request = Google::Cloud::Security::PrivateCA::V1::CreateCaPoolRequest.new
1820
+ #
1821
+ # # Call the create_ca_pool method.
1822
+ # result = client.create_ca_pool request
1823
+ #
1824
+ # # The returned object is of type Gapic::Operation. You can use it to
1825
+ # # check the status of an operation, cancel it, or wait for results.
1826
+ # # Here is how to wait for a response.
1827
+ # result.wait_until_done! timeout: 60
1828
+ # if result.response?
1829
+ # p result.response
1830
+ # else
1831
+ # puts "No response received."
1832
+ # end
1833
+ #
1493
1834
  def create_ca_pool request, options = nil
1494
1835
  raise ::ArgumentError, "request must be provided" if request.nil?
1495
1836
 
@@ -1570,6 +1911,29 @@ module Google
1570
1911
  # @return [::Gapic::Operation]
1571
1912
  #
1572
1913
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1914
+ #
1915
+ # @example Basic example
1916
+ # require "google/cloud/security/private_ca/v1"
1917
+ #
1918
+ # # Create a client object. The client can be reused for multiple calls.
1919
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
1920
+ #
1921
+ # # Create a request. To set request fields, pass in keyword arguments.
1922
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCaPoolRequest.new
1923
+ #
1924
+ # # Call the update_ca_pool method.
1925
+ # result = client.update_ca_pool request
1926
+ #
1927
+ # # The returned object is of type Gapic::Operation. You can use it to
1928
+ # # check the status of an operation, cancel it, or wait for results.
1929
+ # # Here is how to wait for a response.
1930
+ # result.wait_until_done! timeout: 60
1931
+ # if result.response?
1932
+ # p result.response
1933
+ # else
1934
+ # puts "No response received."
1935
+ # end
1936
+ #
1573
1937
  def update_ca_pool request, options = nil
1574
1938
  raise ::ArgumentError, "request must be provided" if request.nil?
1575
1939
 
@@ -1634,6 +1998,22 @@ module Google
1634
1998
  # @return [::Google::Cloud::Security::PrivateCA::V1::CaPool]
1635
1999
  #
1636
2000
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2001
+ #
2002
+ # @example Basic example
2003
+ # require "google/cloud/security/private_ca/v1"
2004
+ #
2005
+ # # Create a client object. The client can be reused for multiple calls.
2006
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2007
+ #
2008
+ # # Create a request. To set request fields, pass in keyword arguments.
2009
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCaPoolRequest.new
2010
+ #
2011
+ # # Call the get_ca_pool method.
2012
+ # result = client.get_ca_pool request
2013
+ #
2014
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CaPool.
2015
+ # p result
2016
+ #
1637
2017
  def get_ca_pool request, options = nil
1638
2018
  raise ::ArgumentError, "request must be provided" if request.nil?
1639
2019
 
@@ -1713,6 +2093,26 @@ module Google
1713
2093
  # @return [::Google::Cloud::Security::PrivateCA::V1::ListCaPoolsResponse]
1714
2094
  #
1715
2095
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2096
+ #
2097
+ # @example Basic example
2098
+ # require "google/cloud/security/private_ca/v1"
2099
+ #
2100
+ # # Create a client object. The client can be reused for multiple calls.
2101
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2102
+ #
2103
+ # # Create a request. To set request fields, pass in keyword arguments.
2104
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCaPoolsRequest.new
2105
+ #
2106
+ # # Call the list_ca_pools method.
2107
+ # result = client.list_ca_pools request
2108
+ #
2109
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2110
+ # # over elements, and API calls will be issued to fetch pages as needed.
2111
+ # result.each do |item|
2112
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CaPool.
2113
+ # p item
2114
+ # end
2115
+ #
1716
2116
  def list_ca_pools request, options = nil
1717
2117
  raise ::ArgumentError, "request must be provided" if request.nil?
1718
2118
 
@@ -1796,6 +2196,29 @@ module Google
1796
2196
  # @return [::Gapic::Operation]
1797
2197
  #
1798
2198
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2199
+ #
2200
+ # @example Basic example
2201
+ # require "google/cloud/security/private_ca/v1"
2202
+ #
2203
+ # # Create a client object. The client can be reused for multiple calls.
2204
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2205
+ #
2206
+ # # Create a request. To set request fields, pass in keyword arguments.
2207
+ # request = Google::Cloud::Security::PrivateCA::V1::DeleteCaPoolRequest.new
2208
+ #
2209
+ # # Call the delete_ca_pool method.
2210
+ # result = client.delete_ca_pool request
2211
+ #
2212
+ # # The returned object is of type Gapic::Operation. You can use it to
2213
+ # # check the status of an operation, cancel it, or wait for results.
2214
+ # # Here is how to wait for a response.
2215
+ # result.wait_until_done! timeout: 60
2216
+ # if result.response?
2217
+ # p result.response
2218
+ # else
2219
+ # puts "No response received."
2220
+ # end
2221
+ #
1799
2222
  def delete_ca_pool request, options = nil
1800
2223
  raise ::ArgumentError, "request must be provided" if request.nil?
1801
2224
 
@@ -1879,6 +2302,22 @@ module Google
1879
2302
  # @return [::Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse]
1880
2303
  #
1881
2304
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2305
+ #
2306
+ # @example Basic example
2307
+ # require "google/cloud/security/private_ca/v1"
2308
+ #
2309
+ # # Create a client object. The client can be reused for multiple calls.
2310
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2311
+ #
2312
+ # # Create a request. To set request fields, pass in keyword arguments.
2313
+ # request = Google::Cloud::Security::PrivateCA::V1::FetchCaCertsRequest.new
2314
+ #
2315
+ # # Call the fetch_ca_certs method.
2316
+ # result = client.fetch_ca_certs request
2317
+ #
2318
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::FetchCaCertsResponse.
2319
+ # p result
2320
+ #
1882
2321
  def fetch_ca_certs request, options = nil
1883
2322
  raise ::ArgumentError, "request must be provided" if request.nil?
1884
2323
 
@@ -1946,6 +2385,22 @@ module Google
1946
2385
  # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList]
1947
2386
  #
1948
2387
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2388
+ #
2389
+ # @example Basic example
2390
+ # require "google/cloud/security/private_ca/v1"
2391
+ #
2392
+ # # Create a client object. The client can be reused for multiple calls.
2393
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2394
+ #
2395
+ # # Create a request. To set request fields, pass in keyword arguments.
2396
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateRevocationListRequest.new
2397
+ #
2398
+ # # Call the get_certificate_revocation_list method.
2399
+ # result = client.get_certificate_revocation_list request
2400
+ #
2401
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.
2402
+ # p result
2403
+ #
1949
2404
  def get_certificate_revocation_list request, options = nil
1950
2405
  raise ::ArgumentError, "request must be provided" if request.nil?
1951
2406
 
@@ -2027,6 +2482,26 @@ module Google
2027
2482
  # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsResponse]
2028
2483
  #
2029
2484
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2485
+ #
2486
+ # @example Basic example
2487
+ # require "google/cloud/security/private_ca/v1"
2488
+ #
2489
+ # # Create a client object. The client can be reused for multiple calls.
2490
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2491
+ #
2492
+ # # Create a request. To set request fields, pass in keyword arguments.
2493
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateRevocationListsRequest.new
2494
+ #
2495
+ # # Call the list_certificate_revocation_lists method.
2496
+ # result = client.list_certificate_revocation_lists request
2497
+ #
2498
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2499
+ # # over elements, and API calls will be issued to fetch pages as needed.
2500
+ # result.each do |item|
2501
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateRevocationList.
2502
+ # p item
2503
+ # end
2504
+ #
2030
2505
  def list_certificate_revocation_lists request, options = nil
2031
2506
  raise ::ArgumentError, "request must be provided" if request.nil?
2032
2507
 
@@ -2108,6 +2583,29 @@ module Google
2108
2583
  # @return [::Gapic::Operation]
2109
2584
  #
2110
2585
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2586
+ #
2587
+ # @example Basic example
2588
+ # require "google/cloud/security/private_ca/v1"
2589
+ #
2590
+ # # Create a client object. The client can be reused for multiple calls.
2591
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2592
+ #
2593
+ # # Create a request. To set request fields, pass in keyword arguments.
2594
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateRevocationListRequest.new
2595
+ #
2596
+ # # Call the update_certificate_revocation_list method.
2597
+ # result = client.update_certificate_revocation_list request
2598
+ #
2599
+ # # The returned object is of type Gapic::Operation. You can use it to
2600
+ # # check the status of an operation, cancel it, or wait for results.
2601
+ # # Here is how to wait for a response.
2602
+ # result.wait_until_done! timeout: 60
2603
+ # if result.response?
2604
+ # p result.response
2605
+ # else
2606
+ # puts "No response received."
2607
+ # end
2608
+ #
2111
2609
  def update_certificate_revocation_list request, options = nil
2112
2610
  raise ::ArgumentError, "request must be provided" if request.nil?
2113
2611
 
@@ -2196,6 +2694,29 @@ module Google
2196
2694
  # @return [::Gapic::Operation]
2197
2695
  #
2198
2696
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2697
+ #
2698
+ # @example Basic example
2699
+ # require "google/cloud/security/private_ca/v1"
2700
+ #
2701
+ # # Create a client object. The client can be reused for multiple calls.
2702
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2703
+ #
2704
+ # # Create a request. To set request fields, pass in keyword arguments.
2705
+ # request = Google::Cloud::Security::PrivateCA::V1::CreateCertificateTemplateRequest.new
2706
+ #
2707
+ # # Call the create_certificate_template method.
2708
+ # result = client.create_certificate_template request
2709
+ #
2710
+ # # The returned object is of type Gapic::Operation. You can use it to
2711
+ # # check the status of an operation, cancel it, or wait for results.
2712
+ # # Here is how to wait for a response.
2713
+ # result.wait_until_done! timeout: 60
2714
+ # if result.response?
2715
+ # p result.response
2716
+ # else
2717
+ # puts "No response received."
2718
+ # end
2719
+ #
2199
2720
  def create_certificate_template request, options = nil
2200
2721
  raise ::ArgumentError, "request must be provided" if request.nil?
2201
2722
 
@@ -2276,6 +2797,29 @@ module Google
2276
2797
  # @return [::Gapic::Operation]
2277
2798
  #
2278
2799
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2800
+ #
2801
+ # @example Basic example
2802
+ # require "google/cloud/security/private_ca/v1"
2803
+ #
2804
+ # # Create a client object. The client can be reused for multiple calls.
2805
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2806
+ #
2807
+ # # Create a request. To set request fields, pass in keyword arguments.
2808
+ # request = Google::Cloud::Security::PrivateCA::V1::DeleteCertificateTemplateRequest.new
2809
+ #
2810
+ # # Call the delete_certificate_template method.
2811
+ # result = client.delete_certificate_template request
2812
+ #
2813
+ # # The returned object is of type Gapic::Operation. You can use it to
2814
+ # # check the status of an operation, cancel it, or wait for results.
2815
+ # # Here is how to wait for a response.
2816
+ # result.wait_until_done! timeout: 60
2817
+ # if result.response?
2818
+ # p result.response
2819
+ # else
2820
+ # puts "No response received."
2821
+ # end
2822
+ #
2279
2823
  def delete_certificate_template request, options = nil
2280
2824
  raise ::ArgumentError, "request must be provided" if request.nil?
2281
2825
 
@@ -2343,6 +2887,22 @@ module Google
2343
2887
  # @return [::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate]
2344
2888
  #
2345
2889
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2890
+ #
2891
+ # @example Basic example
2892
+ # require "google/cloud/security/private_ca/v1"
2893
+ #
2894
+ # # Create a client object. The client can be reused for multiple calls.
2895
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2896
+ #
2897
+ # # Create a request. To set request fields, pass in keyword arguments.
2898
+ # request = Google::Cloud::Security::PrivateCA::V1::GetCertificateTemplateRequest.new
2899
+ #
2900
+ # # Call the get_certificate_template method.
2901
+ # result = client.get_certificate_template request
2902
+ #
2903
+ # # The returned object is of type Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.
2904
+ # p result
2905
+ #
2346
2906
  def get_certificate_template request, options = nil
2347
2907
  raise ::ArgumentError, "request must be provided" if request.nil?
2348
2908
 
@@ -2424,6 +2984,26 @@ module Google
2424
2984
  # @return [::Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesResponse]
2425
2985
  #
2426
2986
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2987
+ #
2988
+ # @example Basic example
2989
+ # require "google/cloud/security/private_ca/v1"
2990
+ #
2991
+ # # Create a client object. The client can be reused for multiple calls.
2992
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
2993
+ #
2994
+ # # Create a request. To set request fields, pass in keyword arguments.
2995
+ # request = Google::Cloud::Security::PrivateCA::V1::ListCertificateTemplatesRequest.new
2996
+ #
2997
+ # # Call the list_certificate_templates method.
2998
+ # result = client.list_certificate_templates request
2999
+ #
3000
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3001
+ # # over elements, and API calls will be issued to fetch pages as needed.
3002
+ # result.each do |item|
3003
+ # # Each element is of type ::Google::Cloud::Security::PrivateCA::V1::CertificateTemplate.
3004
+ # p item
3005
+ # end
3006
+ #
2427
3007
  def list_certificate_templates request, options = nil
2428
3008
  raise ::ArgumentError, "request must be provided" if request.nil?
2429
3009
 
@@ -2505,6 +3085,29 @@ module Google
2505
3085
  # @return [::Gapic::Operation]
2506
3086
  #
2507
3087
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3088
+ #
3089
+ # @example Basic example
3090
+ # require "google/cloud/security/private_ca/v1"
3091
+ #
3092
+ # # Create a client object. The client can be reused for multiple calls.
3093
+ # client = Google::Cloud::Security::PrivateCA::V1::CertificateAuthorityService::Rest::Client.new
3094
+ #
3095
+ # # Create a request. To set request fields, pass in keyword arguments.
3096
+ # request = Google::Cloud::Security::PrivateCA::V1::UpdateCertificateTemplateRequest.new
3097
+ #
3098
+ # # Call the update_certificate_template method.
3099
+ # result = client.update_certificate_template request
3100
+ #
3101
+ # # The returned object is of type Gapic::Operation. You can use it to
3102
+ # # check the status of an operation, cancel it, or wait for results.
3103
+ # # Here is how to wait for a response.
3104
+ # result.wait_until_done! timeout: 60
3105
+ # if result.response?
3106
+ # p result.response
3107
+ # else
3108
+ # puts "No response received."
3109
+ # end
3110
+ #
2508
3111
  def update_certificate_template request, options = nil
2509
3112
  raise ::ArgumentError, "request must be provided" if request.nil?
2510
3113
 
@@ -2571,9 +3174,9 @@ module Google
2571
3174
  # end
2572
3175
  #
2573
3176
  # @!attribute [rw] endpoint
2574
- # The hostname or hostname:port of the service endpoint.
2575
- # Defaults to `"privateca.googleapis.com"`.
2576
- # @return [::String]
3177
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3178
+ # nil, indicating to use the default endpoint in the current universe domain.
3179
+ # @return [::String,nil]
2577
3180
  # @!attribute [rw] credentials
2578
3181
  # Credentials to send with calls. You may provide any of the following types:
2579
3182
  # * (`String`) The path to a service account key file in JSON format
@@ -2610,13 +3213,20 @@ module Google
2610
3213
  # @!attribute [rw] quota_project
2611
3214
  # A separate project against which to charge quota.
2612
3215
  # @return [::String]
3216
+ # @!attribute [rw] universe_domain
3217
+ # The universe domain within which to make requests. This determines the
3218
+ # default endpoint URL. The default value of nil uses the environment
3219
+ # universe (usually the default "googleapis.com" universe).
3220
+ # @return [::String,nil]
2613
3221
  #
2614
3222
  class Configuration
2615
3223
  extend ::Gapic::Config
2616
3224
 
3225
+ # @private
3226
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2617
3227
  DEFAULT_ENDPOINT = "privateca.googleapis.com"
2618
3228
 
2619
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3229
+ config_attr :endpoint, nil, ::String, nil
2620
3230
  config_attr :credentials, nil do |value|
2621
3231
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2622
3232
  allowed.any? { |klass| klass === value }
@@ -2628,6 +3238,7 @@ module Google
2628
3238
  config_attr :metadata, nil, ::Hash, nil
2629
3239
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2630
3240
  config_attr :quota_project, nil, ::String, nil
3241
+ config_attr :universe_domain, nil, ::String, nil
2631
3242
 
2632
3243
  # @private
2633
3244
  # Overrides for http bindings for the RPCs of this service