google-cloud-security-private_ca-v1beta1 0.9.0 → 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.
@@ -34,6 +34,9 @@ module Google
34
34
  # certificate authorities and issued certificates.
35
35
  #
36
36
  class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
37
40
  # @private
38
41
  DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$"
39
42
 
@@ -161,8 +164,19 @@ module Google
161
164
  endpoint: @config.endpoint,
162
165
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
166
  universe_domain: @config.universe_domain,
164
- credentials: credentials
167
+ credentials: credentials,
168
+ logger: @config.logger
165
169
  )
170
+
171
+ @certificate_authority_service_stub.logger(stub: true)&.info do |entry|
172
+ entry.set_system_name
173
+ entry.set_service
174
+ entry.message = "Created client for #{entry.service}"
175
+ entry.set_credentials_fields credentials
176
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
177
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
178
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
179
+ end
166
180
  end
167
181
 
168
182
  ##
@@ -172,6 +186,15 @@ module Google
172
186
  #
173
187
  attr_reader :operations_client
174
188
 
189
+ ##
190
+ # The logger used for request/response debug logging.
191
+ #
192
+ # @return [Logger]
193
+ #
194
+ def logger
195
+ @certificate_authority_service_stub.logger
196
+ end
197
+
175
198
  # Service calls
176
199
 
177
200
  ##
@@ -252,12 +275,13 @@ module Google
252
275
  # Customize the options with defaults
253
276
  call_metadata = @config.rpcs.create_certificate.metadata.to_h
254
277
 
255
- # Set x-goog-api-client and x-goog-user-project headers
278
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
256
279
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
257
280
  lib_name: @config.lib_name, lib_version: @config.lib_version,
258
281
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
259
282
  transports_version_send: [:rest]
260
283
 
284
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
261
285
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
262
286
 
263
287
  options.apply_defaults timeout: @config.rpcs.create_certificate.timeout,
@@ -270,7 +294,6 @@ module Google
270
294
 
271
295
  @certificate_authority_service_stub.create_certificate request, options do |result, operation|
272
296
  yield result, operation if block_given?
273
- return result
274
297
  end
275
298
  rescue ::Gapic::Rest::Error => e
276
299
  raise ::Google::Cloud::Error.from_error(e)
@@ -330,12 +353,13 @@ module Google
330
353
  # Customize the options with defaults
331
354
  call_metadata = @config.rpcs.get_certificate.metadata.to_h
332
355
 
333
- # Set x-goog-api-client and x-goog-user-project headers
356
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
334
357
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
335
358
  lib_name: @config.lib_name, lib_version: @config.lib_version,
336
359
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
337
360
  transports_version_send: [:rest]
338
361
 
362
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
339
363
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
364
 
341
365
  options.apply_defaults timeout: @config.rpcs.get_certificate.timeout,
@@ -348,7 +372,6 @@ module Google
348
372
 
349
373
  @certificate_authority_service_stub.get_certificate request, options do |result, operation|
350
374
  yield result, operation if block_given?
351
- return result
352
375
  end
353
376
  rescue ::Gapic::Rest::Error => e
354
377
  raise ::Google::Cloud::Error.from_error(e)
@@ -432,12 +455,13 @@ module Google
432
455
  # Customize the options with defaults
433
456
  call_metadata = @config.rpcs.list_certificates.metadata.to_h
434
457
 
435
- # Set x-goog-api-client and x-goog-user-project headers
458
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
436
459
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
437
460
  lib_name: @config.lib_name, lib_version: @config.lib_version,
438
461
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
439
462
  transports_version_send: [:rest]
440
463
 
464
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
441
465
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
442
466
 
443
467
  options.apply_defaults timeout: @config.rpcs.list_certificates.timeout,
@@ -450,7 +474,6 @@ module Google
450
474
 
451
475
  @certificate_authority_service_stub.list_certificates request, options do |result, operation|
452
476
  yield result, operation if block_given?
453
- return result
454
477
  end
455
478
  rescue ::Gapic::Rest::Error => e
456
479
  raise ::Google::Cloud::Error.from_error(e)
@@ -527,12 +550,13 @@ module Google
527
550
  # Customize the options with defaults
528
551
  call_metadata = @config.rpcs.revoke_certificate.metadata.to_h
529
552
 
530
- # Set x-goog-api-client and x-goog-user-project headers
553
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
531
554
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
532
555
  lib_name: @config.lib_name, lib_version: @config.lib_version,
533
556
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
534
557
  transports_version_send: [:rest]
535
558
 
559
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
536
560
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
537
561
 
538
562
  options.apply_defaults timeout: @config.rpcs.revoke_certificate.timeout,
@@ -545,7 +569,6 @@ module Google
545
569
 
546
570
  @certificate_authority_service_stub.revoke_certificate request, options do |result, operation|
547
571
  yield result, operation if block_given?
548
- return result
549
572
  end
550
573
  rescue ::Gapic::Rest::Error => e
551
574
  raise ::Google::Cloud::Error.from_error(e)
@@ -622,12 +645,13 @@ module Google
622
645
  # Customize the options with defaults
623
646
  call_metadata = @config.rpcs.update_certificate.metadata.to_h
624
647
 
625
- # Set x-goog-api-client and x-goog-user-project headers
648
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
626
649
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
627
650
  lib_name: @config.lib_name, lib_version: @config.lib_version,
628
651
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
629
652
  transports_version_send: [:rest]
630
653
 
654
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
631
655
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
632
656
 
633
657
  options.apply_defaults timeout: @config.rpcs.update_certificate.timeout,
@@ -640,7 +664,6 @@ module Google
640
664
 
641
665
  @certificate_authority_service_stub.update_certificate request, options do |result, operation|
642
666
  yield result, operation if block_given?
643
- return result
644
667
  end
645
668
  rescue ::Gapic::Rest::Error => e
646
669
  raise ::Google::Cloud::Error.from_error(e)
@@ -733,12 +756,13 @@ module Google
733
756
  # Customize the options with defaults
734
757
  call_metadata = @config.rpcs.activate_certificate_authority.metadata.to_h
735
758
 
736
- # Set x-goog-api-client and x-goog-user-project headers
759
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
737
760
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
738
761
  lib_name: @config.lib_name, lib_version: @config.lib_version,
739
762
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
740
763
  transports_version_send: [:rest]
741
764
 
765
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
742
766
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
743
767
 
744
768
  options.apply_defaults timeout: @config.rpcs.activate_certificate_authority.timeout,
@@ -752,7 +776,7 @@ module Google
752
776
  @certificate_authority_service_stub.activate_certificate_authority request, options do |result, operation|
753
777
  result = ::Gapic::Operation.new result, @operations_client, options: options
754
778
  yield result, operation if block_given?
755
- return result
779
+ throw :response, result
756
780
  end
757
781
  rescue ::Gapic::Rest::Error => e
758
782
  raise ::Google::Cloud::Error.from_error(e)
@@ -840,12 +864,13 @@ module Google
840
864
  # Customize the options with defaults
841
865
  call_metadata = @config.rpcs.create_certificate_authority.metadata.to_h
842
866
 
843
- # Set x-goog-api-client and x-goog-user-project headers
867
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
844
868
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
845
869
  lib_name: @config.lib_name, lib_version: @config.lib_version,
846
870
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
847
871
  transports_version_send: [:rest]
848
872
 
873
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
849
874
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
850
875
 
851
876
  options.apply_defaults timeout: @config.rpcs.create_certificate_authority.timeout,
@@ -859,7 +884,7 @@ module Google
859
884
  @certificate_authority_service_stub.create_certificate_authority request, options do |result, operation|
860
885
  result = ::Gapic::Operation.new result, @operations_client, options: options
861
886
  yield result, operation if block_given?
862
- return result
887
+ throw :response, result
863
888
  end
864
889
  rescue ::Gapic::Rest::Error => e
865
890
  raise ::Google::Cloud::Error.from_error(e)
@@ -941,12 +966,13 @@ module Google
941
966
  # Customize the options with defaults
942
967
  call_metadata = @config.rpcs.disable_certificate_authority.metadata.to_h
943
968
 
944
- # Set x-goog-api-client and x-goog-user-project headers
969
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
945
970
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
946
971
  lib_name: @config.lib_name, lib_version: @config.lib_version,
947
972
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
948
973
  transports_version_send: [:rest]
949
974
 
975
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
950
976
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
951
977
 
952
978
  options.apply_defaults timeout: @config.rpcs.disable_certificate_authority.timeout,
@@ -960,7 +986,7 @@ module Google
960
986
  @certificate_authority_service_stub.disable_certificate_authority request, options do |result, operation|
961
987
  result = ::Gapic::Operation.new result, @operations_client, options: options
962
988
  yield result, operation if block_given?
963
- return result
989
+ throw :response, result
964
990
  end
965
991
  rescue ::Gapic::Rest::Error => e
966
992
  raise ::Google::Cloud::Error.from_error(e)
@@ -1042,12 +1068,13 @@ module Google
1042
1068
  # Customize the options with defaults
1043
1069
  call_metadata = @config.rpcs.enable_certificate_authority.metadata.to_h
1044
1070
 
1045
- # Set x-goog-api-client and x-goog-user-project headers
1071
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1046
1072
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1047
1073
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1048
1074
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1049
1075
  transports_version_send: [:rest]
1050
1076
 
1077
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1051
1078
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1052
1079
 
1053
1080
  options.apply_defaults timeout: @config.rpcs.enable_certificate_authority.timeout,
@@ -1061,7 +1088,7 @@ module Google
1061
1088
  @certificate_authority_service_stub.enable_certificate_authority request, options do |result, operation|
1062
1089
  result = ::Gapic::Operation.new result, @operations_client, options: options
1063
1090
  yield result, operation if block_given?
1064
- return result
1091
+ throw :response, result
1065
1092
  end
1066
1093
  rescue ::Gapic::Rest::Error => e
1067
1094
  raise ::Google::Cloud::Error.from_error(e)
@@ -1128,12 +1155,13 @@ module Google
1128
1155
  # Customize the options with defaults
1129
1156
  call_metadata = @config.rpcs.fetch_certificate_authority_csr.metadata.to_h
1130
1157
 
1131
- # Set x-goog-api-client and x-goog-user-project headers
1158
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1132
1159
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1133
1160
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1134
1161
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1135
1162
  transports_version_send: [:rest]
1136
1163
 
1164
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1137
1165
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1138
1166
 
1139
1167
  options.apply_defaults timeout: @config.rpcs.fetch_certificate_authority_csr.timeout,
@@ -1146,7 +1174,6 @@ module Google
1146
1174
 
1147
1175
  @certificate_authority_service_stub.fetch_certificate_authority_csr request, options do |result, operation|
1148
1176
  yield result, operation if block_given?
1149
- return result
1150
1177
  end
1151
1178
  rescue ::Gapic::Rest::Error => e
1152
1179
  raise ::Google::Cloud::Error.from_error(e)
@@ -1207,12 +1234,13 @@ module Google
1207
1234
  # Customize the options with defaults
1208
1235
  call_metadata = @config.rpcs.get_certificate_authority.metadata.to_h
1209
1236
 
1210
- # Set x-goog-api-client and x-goog-user-project headers
1237
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1211
1238
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1212
1239
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1213
1240
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1214
1241
  transports_version_send: [:rest]
1215
1242
 
1243
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1216
1244
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1217
1245
 
1218
1246
  options.apply_defaults timeout: @config.rpcs.get_certificate_authority.timeout,
@@ -1225,7 +1253,6 @@ module Google
1225
1253
 
1226
1254
  @certificate_authority_service_stub.get_certificate_authority request, options do |result, operation|
1227
1255
  yield result, operation if block_given?
1228
- return result
1229
1256
  end
1230
1257
  rescue ::Gapic::Rest::Error => e
1231
1258
  raise ::Google::Cloud::Error.from_error(e)
@@ -1305,12 +1332,13 @@ module Google
1305
1332
  # Customize the options with defaults
1306
1333
  call_metadata = @config.rpcs.list_certificate_authorities.metadata.to_h
1307
1334
 
1308
- # Set x-goog-api-client and x-goog-user-project headers
1335
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1309
1336
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1310
1337
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1311
1338
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1312
1339
  transports_version_send: [:rest]
1313
1340
 
1341
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1314
1342
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1315
1343
 
1316
1344
  options.apply_defaults timeout: @config.rpcs.list_certificate_authorities.timeout,
@@ -1323,7 +1351,6 @@ module Google
1323
1351
 
1324
1352
  @certificate_authority_service_stub.list_certificate_authorities request, options do |result, operation|
1325
1353
  yield result, operation if block_given?
1326
- return result
1327
1354
  end
1328
1355
  rescue ::Gapic::Rest::Error => e
1329
1356
  raise ::Google::Cloud::Error.from_error(e)
@@ -1405,12 +1432,13 @@ module Google
1405
1432
  # Customize the options with defaults
1406
1433
  call_metadata = @config.rpcs.restore_certificate_authority.metadata.to_h
1407
1434
 
1408
- # Set x-goog-api-client and x-goog-user-project headers
1435
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1409
1436
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1410
1437
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1411
1438
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1412
1439
  transports_version_send: [:rest]
1413
1440
 
1441
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1414
1442
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1415
1443
 
1416
1444
  options.apply_defaults timeout: @config.rpcs.restore_certificate_authority.timeout,
@@ -1424,7 +1452,7 @@ module Google
1424
1452
  @certificate_authority_service_stub.restore_certificate_authority request, options do |result, operation|
1425
1453
  result = ::Gapic::Operation.new result, @operations_client, options: options
1426
1454
  yield result, operation if block_given?
1427
- return result
1455
+ throw :response, result
1428
1456
  end
1429
1457
  rescue ::Gapic::Rest::Error => e
1430
1458
  raise ::Google::Cloud::Error.from_error(e)
@@ -1506,12 +1534,13 @@ module Google
1506
1534
  # Customize the options with defaults
1507
1535
  call_metadata = @config.rpcs.schedule_delete_certificate_authority.metadata.to_h
1508
1536
 
1509
- # Set x-goog-api-client and x-goog-user-project headers
1537
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1510
1538
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1511
1539
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1512
1540
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1513
1541
  transports_version_send: [:rest]
1514
1542
 
1543
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1515
1544
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1516
1545
 
1517
1546
  options.apply_defaults timeout: @config.rpcs.schedule_delete_certificate_authority.timeout,
@@ -1525,7 +1554,7 @@ module Google
1525
1554
  @certificate_authority_service_stub.schedule_delete_certificate_authority request, options do |result, operation|
1526
1555
  result = ::Gapic::Operation.new result, @operations_client, options: options
1527
1556
  yield result, operation if block_given?
1528
- return result
1557
+ throw :response, result
1529
1558
  end
1530
1559
  rescue ::Gapic::Rest::Error => e
1531
1560
  raise ::Google::Cloud::Error.from_error(e)
@@ -1608,12 +1637,13 @@ module Google
1608
1637
  # Customize the options with defaults
1609
1638
  call_metadata = @config.rpcs.update_certificate_authority.metadata.to_h
1610
1639
 
1611
- # Set x-goog-api-client and x-goog-user-project headers
1640
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1612
1641
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1613
1642
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1614
1643
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1615
1644
  transports_version_send: [:rest]
1616
1645
 
1646
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1617
1647
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1618
1648
 
1619
1649
  options.apply_defaults timeout: @config.rpcs.update_certificate_authority.timeout,
@@ -1627,7 +1657,7 @@ module Google
1627
1657
  @certificate_authority_service_stub.update_certificate_authority request, options do |result, operation|
1628
1658
  result = ::Gapic::Operation.new result, @operations_client, options: options
1629
1659
  yield result, operation if block_given?
1630
- return result
1660
+ throw :response, result
1631
1661
  end
1632
1662
  rescue ::Gapic::Rest::Error => e
1633
1663
  raise ::Google::Cloud::Error.from_error(e)
@@ -1688,12 +1718,13 @@ module Google
1688
1718
  # Customize the options with defaults
1689
1719
  call_metadata = @config.rpcs.get_certificate_revocation_list.metadata.to_h
1690
1720
 
1691
- # Set x-goog-api-client and x-goog-user-project headers
1721
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1692
1722
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1693
1723
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1694
1724
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1695
1725
  transports_version_send: [:rest]
1696
1726
 
1727
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1697
1728
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1698
1729
 
1699
1730
  options.apply_defaults timeout: @config.rpcs.get_certificate_revocation_list.timeout,
@@ -1706,7 +1737,6 @@ module Google
1706
1737
 
1707
1738
  @certificate_authority_service_stub.get_certificate_revocation_list request, options do |result, operation|
1708
1739
  yield result, operation if block_given?
1709
- return result
1710
1740
  end
1711
1741
  rescue ::Gapic::Rest::Error => e
1712
1742
  raise ::Google::Cloud::Error.from_error(e)
@@ -1786,12 +1816,13 @@ module Google
1786
1816
  # Customize the options with defaults
1787
1817
  call_metadata = @config.rpcs.list_certificate_revocation_lists.metadata.to_h
1788
1818
 
1789
- # Set x-goog-api-client and x-goog-user-project headers
1819
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1790
1820
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1791
1821
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1792
1822
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1793
1823
  transports_version_send: [:rest]
1794
1824
 
1825
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1795
1826
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1796
1827
 
1797
1828
  options.apply_defaults timeout: @config.rpcs.list_certificate_revocation_lists.timeout,
@@ -1804,7 +1835,6 @@ module Google
1804
1835
 
1805
1836
  @certificate_authority_service_stub.list_certificate_revocation_lists request, options do |result, operation|
1806
1837
  yield result, operation if block_given?
1807
- return result
1808
1838
  end
1809
1839
  rescue ::Gapic::Rest::Error => e
1810
1840
  raise ::Google::Cloud::Error.from_error(e)
@@ -1887,12 +1917,13 @@ module Google
1887
1917
  # Customize the options with defaults
1888
1918
  call_metadata = @config.rpcs.update_certificate_revocation_list.metadata.to_h
1889
1919
 
1890
- # Set x-goog-api-client and x-goog-user-project headers
1920
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1891
1921
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1892
1922
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1893
1923
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1894
1924
  transports_version_send: [:rest]
1895
1925
 
1926
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1896
1927
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1897
1928
 
1898
1929
  options.apply_defaults timeout: @config.rpcs.update_certificate_revocation_list.timeout,
@@ -1906,7 +1937,7 @@ module Google
1906
1937
  @certificate_authority_service_stub.update_certificate_revocation_list request, options do |result, operation|
1907
1938
  result = ::Gapic::Operation.new result, @operations_client, options: options
1908
1939
  yield result, operation if block_given?
1909
- return result
1940
+ throw :response, result
1910
1941
  end
1911
1942
  rescue ::Gapic::Rest::Error => e
1912
1943
  raise ::Google::Cloud::Error.from_error(e)
@@ -1966,12 +1997,13 @@ module Google
1966
1997
  # Customize the options with defaults
1967
1998
  call_metadata = @config.rpcs.get_reusable_config.metadata.to_h
1968
1999
 
1969
- # Set x-goog-api-client and x-goog-user-project headers
2000
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1970
2001
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1971
2002
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1972
2003
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
1973
2004
  transports_version_send: [:rest]
1974
2005
 
2006
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1975
2007
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1976
2008
 
1977
2009
  options.apply_defaults timeout: @config.rpcs.get_reusable_config.timeout,
@@ -1984,7 +2016,6 @@ module Google
1984
2016
 
1985
2017
  @certificate_authority_service_stub.get_reusable_config request, options do |result, operation|
1986
2018
  yield result, operation if block_given?
1987
- return result
1988
2019
  end
1989
2020
  rescue ::Gapic::Rest::Error => e
1990
2021
  raise ::Google::Cloud::Error.from_error(e)
@@ -2064,12 +2095,13 @@ module Google
2064
2095
  # Customize the options with defaults
2065
2096
  call_metadata = @config.rpcs.list_reusable_configs.metadata.to_h
2066
2097
 
2067
- # Set x-goog-api-client and x-goog-user-project headers
2098
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2068
2099
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2069
2100
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2070
2101
  gapic_version: ::Google::Cloud::Security::PrivateCA::V1beta1::VERSION,
2071
2102
  transports_version_send: [:rest]
2072
2103
 
2104
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2073
2105
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2074
2106
 
2075
2107
  options.apply_defaults timeout: @config.rpcs.list_reusable_configs.timeout,
@@ -2082,7 +2114,6 @@ module Google
2082
2114
 
2083
2115
  @certificate_authority_service_stub.list_reusable_configs request, options do |result, operation|
2084
2116
  yield result, operation if block_given?
2085
- return result
2086
2117
  end
2087
2118
  rescue ::Gapic::Rest::Error => e
2088
2119
  raise ::Google::Cloud::Error.from_error(e)
@@ -2162,6 +2193,11 @@ module Google
2162
2193
  # default endpoint URL. The default value of nil uses the environment
2163
2194
  # universe (usually the default "googleapis.com" universe).
2164
2195
  # @return [::String,nil]
2196
+ # @!attribute [rw] logger
2197
+ # A custom logger to use for request/response debug logging, or the value
2198
+ # `:default` (the default) to construct a default logger, or `nil` to
2199
+ # explicitly disable logging.
2200
+ # @return [::Logger,:default,nil]
2165
2201
  #
2166
2202
  class Configuration
2167
2203
  extend ::Gapic::Config
@@ -2183,6 +2219,7 @@ module Google
2183
2219
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2184
2220
  config_attr :quota_project, nil, ::String, nil
2185
2221
  config_attr :universe_domain, nil, ::String, nil
2222
+ config_attr :logger, :default, ::Logger, nil, :default
2186
2223
 
2187
2224
  # @private
2188
2225
  def initialize parent_config = nil