google-cloud-app_hub-v1 0.1.0 → 0.2.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.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/app_hub/v1/app_hub/client.rb +103 -55
- data/lib/google/cloud/app_hub/v1/app_hub/operations.rb +25 -20
- data/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb +97 -55
- data/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb +54 -42
- data/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb +230 -164
- data/lib/google/cloud/app_hub/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +70 -10
- data/proto_docs/google/api/field_info.rb +23 -0
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -34,6 +34,9 @@ module Google
|
|
34
34
|
# The App Hub API allows you to manage App Hub resources.
|
35
35
|
#
|
36
36
|
class Client
|
37
|
+
# @private
|
38
|
+
API_VERSION = ""
|
39
|
+
|
37
40
|
# @private
|
38
41
|
DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$"
|
39
42
|
|
@@ -255,15 +258,27 @@ module Google
|
|
255
258
|
endpoint: @config.endpoint,
|
256
259
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
257
260
|
universe_domain: @config.universe_domain,
|
258
|
-
credentials: credentials
|
261
|
+
credentials: credentials,
|
262
|
+
logger: @config.logger
|
259
263
|
)
|
260
264
|
|
265
|
+
@app_hub_stub.logger(stub: true)&.info do |entry|
|
266
|
+
entry.set_system_name
|
267
|
+
entry.set_service
|
268
|
+
entry.message = "Created client for #{entry.service}"
|
269
|
+
entry.set_credentials_fields credentials
|
270
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
271
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
272
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
273
|
+
end
|
274
|
+
|
261
275
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
262
276
|
config.credentials = credentials
|
263
277
|
config.quota_project = @quota_project_id
|
264
278
|
config.endpoint = @app_hub_stub.endpoint
|
265
279
|
config.universe_domain = @app_hub_stub.universe_domain
|
266
280
|
config.bindings_override = @config.bindings_override
|
281
|
+
config.logger = @app_hub_stub.logger if config.respond_to? :logger=
|
267
282
|
end
|
268
283
|
|
269
284
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -272,6 +287,7 @@ module Google
|
|
272
287
|
config.endpoint = @app_hub_stub.endpoint
|
273
288
|
config.universe_domain = @app_hub_stub.universe_domain
|
274
289
|
config.bindings_override = @config.bindings_override
|
290
|
+
config.logger = @app_hub_stub.logger if config.respond_to? :logger=
|
275
291
|
end
|
276
292
|
end
|
277
293
|
|
@@ -296,6 +312,15 @@ module Google
|
|
296
312
|
#
|
297
313
|
attr_reader :iam_policy_client
|
298
314
|
|
315
|
+
##
|
316
|
+
# The logger used for request/response debug logging.
|
317
|
+
#
|
318
|
+
# @return [Logger]
|
319
|
+
#
|
320
|
+
def logger
|
321
|
+
@app_hub_stub.logger
|
322
|
+
end
|
323
|
+
|
299
324
|
# Service calls
|
300
325
|
|
301
326
|
##
|
@@ -355,12 +380,13 @@ module Google
|
|
355
380
|
# Customize the options with defaults
|
356
381
|
call_metadata = @config.rpcs.lookup_service_project_attachment.metadata.to_h
|
357
382
|
|
358
|
-
# Set x-goog-api-client
|
383
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
359
384
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
360
385
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
361
386
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
362
387
|
transports_version_send: [:rest]
|
363
388
|
|
389
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
364
390
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
365
391
|
|
366
392
|
options.apply_defaults timeout: @config.rpcs.lookup_service_project_attachment.timeout,
|
@@ -373,7 +399,6 @@ module Google
|
|
373
399
|
|
374
400
|
@app_hub_stub.lookup_service_project_attachment request, options do |result, operation|
|
375
401
|
yield result, operation if block_given?
|
376
|
-
return result
|
377
402
|
end
|
378
403
|
rescue ::Gapic::Rest::Error => e
|
379
404
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -448,12 +473,13 @@ module Google
|
|
448
473
|
# Customize the options with defaults
|
449
474
|
call_metadata = @config.rpcs.list_service_project_attachments.metadata.to_h
|
450
475
|
|
451
|
-
# Set x-goog-api-client
|
476
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
452
477
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
453
478
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
454
479
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
455
480
|
transports_version_send: [:rest]
|
456
481
|
|
482
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
457
483
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
458
484
|
|
459
485
|
options.apply_defaults timeout: @config.rpcs.list_service_project_attachments.timeout,
|
@@ -466,7 +492,6 @@ module Google
|
|
466
492
|
|
467
493
|
@app_hub_stub.list_service_project_attachments request, options do |result, operation|
|
468
494
|
yield result, operation if block_given?
|
469
|
-
return result
|
470
495
|
end
|
471
496
|
rescue ::Gapic::Rest::Error => e
|
472
497
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -555,12 +580,13 @@ module Google
|
|
555
580
|
# Customize the options with defaults
|
556
581
|
call_metadata = @config.rpcs.create_service_project_attachment.metadata.to_h
|
557
582
|
|
558
|
-
# Set x-goog-api-client
|
583
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
559
584
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
560
585
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
561
586
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
562
587
|
transports_version_send: [:rest]
|
563
588
|
|
589
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
564
590
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
565
591
|
|
566
592
|
options.apply_defaults timeout: @config.rpcs.create_service_project_attachment.timeout,
|
@@ -574,7 +600,7 @@ module Google
|
|
574
600
|
@app_hub_stub.create_service_project_attachment request, options do |result, operation|
|
575
601
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
576
602
|
yield result, operation if block_given?
|
577
|
-
|
603
|
+
throw :response, result
|
578
604
|
end
|
579
605
|
rescue ::Gapic::Rest::Error => e
|
580
606
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -636,12 +662,13 @@ module Google
|
|
636
662
|
# Customize the options with defaults
|
637
663
|
call_metadata = @config.rpcs.get_service_project_attachment.metadata.to_h
|
638
664
|
|
639
|
-
# Set x-goog-api-client
|
665
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
640
666
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
641
667
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
642
668
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
643
669
|
transports_version_send: [:rest]
|
644
670
|
|
671
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
645
672
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
646
673
|
|
647
674
|
options.apply_defaults timeout: @config.rpcs.get_service_project_attachment.timeout,
|
@@ -654,7 +681,6 @@ module Google
|
|
654
681
|
|
655
682
|
@app_hub_stub.get_service_project_attachment request, options do |result, operation|
|
656
683
|
yield result, operation if block_given?
|
657
|
-
return result
|
658
684
|
end
|
659
685
|
rescue ::Gapic::Rest::Error => e
|
660
686
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -737,12 +763,13 @@ module Google
|
|
737
763
|
# Customize the options with defaults
|
738
764
|
call_metadata = @config.rpcs.delete_service_project_attachment.metadata.to_h
|
739
765
|
|
740
|
-
# Set x-goog-api-client
|
766
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
741
767
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
742
768
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
743
769
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
744
770
|
transports_version_send: [:rest]
|
745
771
|
|
772
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
746
773
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
747
774
|
|
748
775
|
options.apply_defaults timeout: @config.rpcs.delete_service_project_attachment.timeout,
|
@@ -756,7 +783,7 @@ module Google
|
|
756
783
|
@app_hub_stub.delete_service_project_attachment request, options do |result, operation|
|
757
784
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
758
785
|
yield result, operation if block_given?
|
759
|
-
|
786
|
+
throw :response, result
|
760
787
|
end
|
761
788
|
rescue ::Gapic::Rest::Error => e
|
762
789
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -820,12 +847,13 @@ module Google
|
|
820
847
|
# Customize the options with defaults
|
821
848
|
call_metadata = @config.rpcs.detach_service_project_attachment.metadata.to_h
|
822
849
|
|
823
|
-
# Set x-goog-api-client
|
850
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
824
851
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
825
852
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
826
853
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
827
854
|
transports_version_send: [:rest]
|
828
855
|
|
856
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
829
857
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
830
858
|
|
831
859
|
options.apply_defaults timeout: @config.rpcs.detach_service_project_attachment.timeout,
|
@@ -838,7 +866,6 @@ module Google
|
|
838
866
|
|
839
867
|
@app_hub_stub.detach_service_project_attachment request, options do |result, operation|
|
840
868
|
yield result, operation if block_given?
|
841
|
-
return result
|
842
869
|
end
|
843
870
|
rescue ::Gapic::Rest::Error => e
|
844
871
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -913,12 +940,13 @@ module Google
|
|
913
940
|
# Customize the options with defaults
|
914
941
|
call_metadata = @config.rpcs.list_discovered_services.metadata.to_h
|
915
942
|
|
916
|
-
# Set x-goog-api-client
|
943
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
917
944
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
918
945
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
919
946
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
920
947
|
transports_version_send: [:rest]
|
921
948
|
|
949
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
922
950
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
923
951
|
|
924
952
|
options.apply_defaults timeout: @config.rpcs.list_discovered_services.timeout,
|
@@ -931,7 +959,6 @@ module Google
|
|
931
959
|
|
932
960
|
@app_hub_stub.list_discovered_services request, options do |result, operation|
|
933
961
|
yield result, operation if block_given?
|
934
|
-
return result
|
935
962
|
end
|
936
963
|
rescue ::Gapic::Rest::Error => e
|
937
964
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -993,12 +1020,13 @@ module Google
|
|
993
1020
|
# Customize the options with defaults
|
994
1021
|
call_metadata = @config.rpcs.get_discovered_service.metadata.to_h
|
995
1022
|
|
996
|
-
# Set x-goog-api-client
|
1023
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
997
1024
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
998
1025
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
999
1026
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1000
1027
|
transports_version_send: [:rest]
|
1001
1028
|
|
1029
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1002
1030
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1003
1031
|
|
1004
1032
|
options.apply_defaults timeout: @config.rpcs.get_discovered_service.timeout,
|
@@ -1011,7 +1039,6 @@ module Google
|
|
1011
1039
|
|
1012
1040
|
@app_hub_stub.get_discovered_service request, options do |result, operation|
|
1013
1041
|
yield result, operation if block_given?
|
1014
|
-
return result
|
1015
1042
|
end
|
1016
1043
|
rescue ::Gapic::Rest::Error => e
|
1017
1044
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1077,12 +1104,13 @@ module Google
|
|
1077
1104
|
# Customize the options with defaults
|
1078
1105
|
call_metadata = @config.rpcs.lookup_discovered_service.metadata.to_h
|
1079
1106
|
|
1080
|
-
# Set x-goog-api-client
|
1107
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1081
1108
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1082
1109
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1083
1110
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1084
1111
|
transports_version_send: [:rest]
|
1085
1112
|
|
1113
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1086
1114
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1087
1115
|
|
1088
1116
|
options.apply_defaults timeout: @config.rpcs.lookup_discovered_service.timeout,
|
@@ -1095,7 +1123,6 @@ module Google
|
|
1095
1123
|
|
1096
1124
|
@app_hub_stub.lookup_discovered_service request, options do |result, operation|
|
1097
1125
|
yield result, operation if block_given?
|
1098
|
-
return result
|
1099
1126
|
end
|
1100
1127
|
rescue ::Gapic::Rest::Error => e
|
1101
1128
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1170,12 +1197,13 @@ module Google
|
|
1170
1197
|
# Customize the options with defaults
|
1171
1198
|
call_metadata = @config.rpcs.list_services.metadata.to_h
|
1172
1199
|
|
1173
|
-
# Set x-goog-api-client
|
1200
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1174
1201
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1175
1202
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1176
1203
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1177
1204
|
transports_version_send: [:rest]
|
1178
1205
|
|
1206
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1179
1207
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1180
1208
|
|
1181
1209
|
options.apply_defaults timeout: @config.rpcs.list_services.timeout,
|
@@ -1188,7 +1216,6 @@ module Google
|
|
1188
1216
|
|
1189
1217
|
@app_hub_stub.list_services request, options do |result, operation|
|
1190
1218
|
yield result, operation if block_given?
|
1191
|
-
return result
|
1192
1219
|
end
|
1193
1220
|
rescue ::Gapic::Rest::Error => e
|
1194
1221
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1278,12 +1305,13 @@ module Google
|
|
1278
1305
|
# Customize the options with defaults
|
1279
1306
|
call_metadata = @config.rpcs.create_service.metadata.to_h
|
1280
1307
|
|
1281
|
-
# Set x-goog-api-client
|
1308
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1282
1309
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1283
1310
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1284
1311
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1285
1312
|
transports_version_send: [:rest]
|
1286
1313
|
|
1314
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1287
1315
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1288
1316
|
|
1289
1317
|
options.apply_defaults timeout: @config.rpcs.create_service.timeout,
|
@@ -1297,7 +1325,7 @@ module Google
|
|
1297
1325
|
@app_hub_stub.create_service request, options do |result, operation|
|
1298
1326
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1299
1327
|
yield result, operation if block_given?
|
1300
|
-
|
1328
|
+
throw :response, result
|
1301
1329
|
end
|
1302
1330
|
rescue ::Gapic::Rest::Error => e
|
1303
1331
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1359,12 +1387,13 @@ module Google
|
|
1359
1387
|
# Customize the options with defaults
|
1360
1388
|
call_metadata = @config.rpcs.get_service.metadata.to_h
|
1361
1389
|
|
1362
|
-
# Set x-goog-api-client
|
1390
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1363
1391
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1364
1392
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1365
1393
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1366
1394
|
transports_version_send: [:rest]
|
1367
1395
|
|
1396
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1368
1397
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1369
1398
|
|
1370
1399
|
options.apply_defaults timeout: @config.rpcs.get_service.timeout,
|
@@ -1377,7 +1406,6 @@ module Google
|
|
1377
1406
|
|
1378
1407
|
@app_hub_stub.get_service request, options do |result, operation|
|
1379
1408
|
yield result, operation if block_given?
|
1380
|
-
return result
|
1381
1409
|
end
|
1382
1410
|
rescue ::Gapic::Rest::Error => e
|
1383
1411
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1468,12 +1496,13 @@ module Google
|
|
1468
1496
|
# Customize the options with defaults
|
1469
1497
|
call_metadata = @config.rpcs.update_service.metadata.to_h
|
1470
1498
|
|
1471
|
-
# Set x-goog-api-client
|
1499
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1472
1500
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1473
1501
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1474
1502
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1475
1503
|
transports_version_send: [:rest]
|
1476
1504
|
|
1505
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1477
1506
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1478
1507
|
|
1479
1508
|
options.apply_defaults timeout: @config.rpcs.update_service.timeout,
|
@@ -1487,7 +1516,7 @@ module Google
|
|
1487
1516
|
@app_hub_stub.update_service request, options do |result, operation|
|
1488
1517
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1489
1518
|
yield result, operation if block_given?
|
1490
|
-
|
1519
|
+
throw :response, result
|
1491
1520
|
end
|
1492
1521
|
rescue ::Gapic::Rest::Error => e
|
1493
1522
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1570,12 +1599,13 @@ module Google
|
|
1570
1599
|
# Customize the options with defaults
|
1571
1600
|
call_metadata = @config.rpcs.delete_service.metadata.to_h
|
1572
1601
|
|
1573
|
-
# Set x-goog-api-client
|
1602
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1574
1603
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1575
1604
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1576
1605
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1577
1606
|
transports_version_send: [:rest]
|
1578
1607
|
|
1608
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1579
1609
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1580
1610
|
|
1581
1611
|
options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
|
@@ -1589,7 +1619,7 @@ module Google
|
|
1589
1619
|
@app_hub_stub.delete_service request, options do |result, operation|
|
1590
1620
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1591
1621
|
yield result, operation if block_given?
|
1592
|
-
|
1622
|
+
throw :response, result
|
1593
1623
|
end
|
1594
1624
|
rescue ::Gapic::Rest::Error => e
|
1595
1625
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1664,12 +1694,13 @@ module Google
|
|
1664
1694
|
# Customize the options with defaults
|
1665
1695
|
call_metadata = @config.rpcs.list_discovered_workloads.metadata.to_h
|
1666
1696
|
|
1667
|
-
# Set x-goog-api-client
|
1697
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1668
1698
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1669
1699
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1670
1700
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1671
1701
|
transports_version_send: [:rest]
|
1672
1702
|
|
1703
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1673
1704
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1674
1705
|
|
1675
1706
|
options.apply_defaults timeout: @config.rpcs.list_discovered_workloads.timeout,
|
@@ -1682,7 +1713,6 @@ module Google
|
|
1682
1713
|
|
1683
1714
|
@app_hub_stub.list_discovered_workloads request, options do |result, operation|
|
1684
1715
|
yield result, operation if block_given?
|
1685
|
-
return result
|
1686
1716
|
end
|
1687
1717
|
rescue ::Gapic::Rest::Error => e
|
1688
1718
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1744,12 +1774,13 @@ module Google
|
|
1744
1774
|
# Customize the options with defaults
|
1745
1775
|
call_metadata = @config.rpcs.get_discovered_workload.metadata.to_h
|
1746
1776
|
|
1747
|
-
# Set x-goog-api-client
|
1777
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1748
1778
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1749
1779
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1750
1780
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1751
1781
|
transports_version_send: [:rest]
|
1752
1782
|
|
1783
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1753
1784
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1754
1785
|
|
1755
1786
|
options.apply_defaults timeout: @config.rpcs.get_discovered_workload.timeout,
|
@@ -1762,7 +1793,6 @@ module Google
|
|
1762
1793
|
|
1763
1794
|
@app_hub_stub.get_discovered_workload request, options do |result, operation|
|
1764
1795
|
yield result, operation if block_given?
|
1765
|
-
return result
|
1766
1796
|
end
|
1767
1797
|
rescue ::Gapic::Rest::Error => e
|
1768
1798
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1828,12 +1858,13 @@ module Google
|
|
1828
1858
|
# Customize the options with defaults
|
1829
1859
|
call_metadata = @config.rpcs.lookup_discovered_workload.metadata.to_h
|
1830
1860
|
|
1831
|
-
# Set x-goog-api-client
|
1861
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1832
1862
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1833
1863
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1834
1864
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1835
1865
|
transports_version_send: [:rest]
|
1836
1866
|
|
1867
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1837
1868
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1838
1869
|
|
1839
1870
|
options.apply_defaults timeout: @config.rpcs.lookup_discovered_workload.timeout,
|
@@ -1846,7 +1877,6 @@ module Google
|
|
1846
1877
|
|
1847
1878
|
@app_hub_stub.lookup_discovered_workload request, options do |result, operation|
|
1848
1879
|
yield result, operation if block_given?
|
1849
|
-
return result
|
1850
1880
|
end
|
1851
1881
|
rescue ::Gapic::Rest::Error => e
|
1852
1882
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1921,12 +1951,13 @@ module Google
|
|
1921
1951
|
# Customize the options with defaults
|
1922
1952
|
call_metadata = @config.rpcs.list_workloads.metadata.to_h
|
1923
1953
|
|
1924
|
-
# Set x-goog-api-client
|
1954
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1925
1955
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1926
1956
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1927
1957
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
1928
1958
|
transports_version_send: [:rest]
|
1929
1959
|
|
1960
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1930
1961
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1931
1962
|
|
1932
1963
|
options.apply_defaults timeout: @config.rpcs.list_workloads.timeout,
|
@@ -1939,7 +1970,6 @@ module Google
|
|
1939
1970
|
|
1940
1971
|
@app_hub_stub.list_workloads request, options do |result, operation|
|
1941
1972
|
yield result, operation if block_given?
|
1942
|
-
return result
|
1943
1973
|
end
|
1944
1974
|
rescue ::Gapic::Rest::Error => e
|
1945
1975
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2029,12 +2059,13 @@ module Google
|
|
2029
2059
|
# Customize the options with defaults
|
2030
2060
|
call_metadata = @config.rpcs.create_workload.metadata.to_h
|
2031
2061
|
|
2032
|
-
# Set x-goog-api-client
|
2062
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2033
2063
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2034
2064
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2035
2065
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
2036
2066
|
transports_version_send: [:rest]
|
2037
2067
|
|
2068
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2038
2069
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2039
2070
|
|
2040
2071
|
options.apply_defaults timeout: @config.rpcs.create_workload.timeout,
|
@@ -2048,7 +2079,7 @@ module Google
|
|
2048
2079
|
@app_hub_stub.create_workload request, options do |result, operation|
|
2049
2080
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2050
2081
|
yield result, operation if block_given?
|
2051
|
-
|
2082
|
+
throw :response, result
|
2052
2083
|
end
|
2053
2084
|
rescue ::Gapic::Rest::Error => e
|
2054
2085
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2110,12 +2141,13 @@ module Google
|
|
2110
2141
|
# Customize the options with defaults
|
2111
2142
|
call_metadata = @config.rpcs.get_workload.metadata.to_h
|
2112
2143
|
|
2113
|
-
# Set x-goog-api-client
|
2144
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2114
2145
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2115
2146
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2116
2147
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
2117
2148
|
transports_version_send: [:rest]
|
2118
2149
|
|
2150
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2119
2151
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2120
2152
|
|
2121
2153
|
options.apply_defaults timeout: @config.rpcs.get_workload.timeout,
|
@@ -2128,7 +2160,6 @@ module Google
|
|
2128
2160
|
|
2129
2161
|
@app_hub_stub.get_workload request, options do |result, operation|
|
2130
2162
|
yield result, operation if block_given?
|
2131
|
-
return result
|
2132
2163
|
end
|
2133
2164
|
rescue ::Gapic::Rest::Error => e
|
2134
2165
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2219,12 +2250,13 @@ module Google
|
|
2219
2250
|
# Customize the options with defaults
|
2220
2251
|
call_metadata = @config.rpcs.update_workload.metadata.to_h
|
2221
2252
|
|
2222
|
-
# Set x-goog-api-client
|
2253
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2223
2254
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2224
2255
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2225
2256
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
2226
2257
|
transports_version_send: [:rest]
|
2227
2258
|
|
2259
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2228
2260
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2229
2261
|
|
2230
2262
|
options.apply_defaults timeout: @config.rpcs.update_workload.timeout,
|
@@ -2238,7 +2270,7 @@ module Google
|
|
2238
2270
|
@app_hub_stub.update_workload request, options do |result, operation|
|
2239
2271
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2240
2272
|
yield result, operation if block_given?
|
2241
|
-
|
2273
|
+
throw :response, result
|
2242
2274
|
end
|
2243
2275
|
rescue ::Gapic::Rest::Error => e
|
2244
2276
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2321,12 +2353,13 @@ module Google
|
|
2321
2353
|
# Customize the options with defaults
|
2322
2354
|
call_metadata = @config.rpcs.delete_workload.metadata.to_h
|
2323
2355
|
|
2324
|
-
# Set x-goog-api-client
|
2356
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2325
2357
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2326
2358
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2327
2359
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
2328
2360
|
transports_version_send: [:rest]
|
2329
2361
|
|
2362
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2330
2363
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2331
2364
|
|
2332
2365
|
options.apply_defaults timeout: @config.rpcs.delete_workload.timeout,
|
@@ -2340,7 +2373,7 @@ module Google
|
|
2340
2373
|
@app_hub_stub.delete_workload request, options do |result, operation|
|
2341
2374
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2342
2375
|
yield result, operation if block_given?
|
2343
|
-
|
2376
|
+
throw :response, result
|
2344
2377
|
end
|
2345
2378
|
rescue ::Gapic::Rest::Error => e
|
2346
2379
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2414,12 +2447,13 @@ module Google
|
|
2414
2447
|
# Customize the options with defaults
|
2415
2448
|
call_metadata = @config.rpcs.list_applications.metadata.to_h
|
2416
2449
|
|
2417
|
-
# Set x-goog-api-client
|
2450
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2418
2451
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2419
2452
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2420
2453
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
2421
2454
|
transports_version_send: [:rest]
|
2422
2455
|
|
2456
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2423
2457
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2424
2458
|
|
2425
2459
|
options.apply_defaults timeout: @config.rpcs.list_applications.timeout,
|
@@ -2432,7 +2466,6 @@ module Google
|
|
2432
2466
|
|
2433
2467
|
@app_hub_stub.list_applications request, options do |result, operation|
|
2434
2468
|
yield result, operation if block_given?
|
2435
|
-
return result
|
2436
2469
|
end
|
2437
2470
|
rescue ::Gapic::Rest::Error => e
|
2438
2471
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2521,12 +2554,13 @@ module Google
|
|
2521
2554
|
# Customize the options with defaults
|
2522
2555
|
call_metadata = @config.rpcs.create_application.metadata.to_h
|
2523
2556
|
|
2524
|
-
# Set x-goog-api-client
|
2557
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2525
2558
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2526
2559
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2527
2560
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
2528
2561
|
transports_version_send: [:rest]
|
2529
2562
|
|
2563
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2530
2564
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2531
2565
|
|
2532
2566
|
options.apply_defaults timeout: @config.rpcs.create_application.timeout,
|
@@ -2540,7 +2574,7 @@ module Google
|
|
2540
2574
|
@app_hub_stub.create_application request, options do |result, operation|
|
2541
2575
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2542
2576
|
yield result, operation if block_given?
|
2543
|
-
|
2577
|
+
throw :response, result
|
2544
2578
|
end
|
2545
2579
|
rescue ::Gapic::Rest::Error => e
|
2546
2580
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2602,12 +2636,13 @@ module Google
|
|
2602
2636
|
# Customize the options with defaults
|
2603
2637
|
call_metadata = @config.rpcs.get_application.metadata.to_h
|
2604
2638
|
|
2605
|
-
# Set x-goog-api-client
|
2639
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2606
2640
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2607
2641
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2608
2642
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
2609
2643
|
transports_version_send: [:rest]
|
2610
2644
|
|
2645
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2611
2646
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2612
2647
|
|
2613
2648
|
options.apply_defaults timeout: @config.rpcs.get_application.timeout,
|
@@ -2620,7 +2655,6 @@ module Google
|
|
2620
2655
|
|
2621
2656
|
@app_hub_stub.get_application request, options do |result, operation|
|
2622
2657
|
yield result, operation if block_given?
|
2623
|
-
return result
|
2624
2658
|
end
|
2625
2659
|
rescue ::Gapic::Rest::Error => e
|
2626
2660
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2711,12 +2745,13 @@ module Google
|
|
2711
2745
|
# Customize the options with defaults
|
2712
2746
|
call_metadata = @config.rpcs.update_application.metadata.to_h
|
2713
2747
|
|
2714
|
-
# Set x-goog-api-client
|
2748
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2715
2749
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2716
2750
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2717
2751
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
2718
2752
|
transports_version_send: [:rest]
|
2719
2753
|
|
2754
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2720
2755
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2721
2756
|
|
2722
2757
|
options.apply_defaults timeout: @config.rpcs.update_application.timeout,
|
@@ -2730,7 +2765,7 @@ module Google
|
|
2730
2765
|
@app_hub_stub.update_application request, options do |result, operation|
|
2731
2766
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2732
2767
|
yield result, operation if block_given?
|
2733
|
-
|
2768
|
+
throw :response, result
|
2734
2769
|
end
|
2735
2770
|
rescue ::Gapic::Rest::Error => e
|
2736
2771
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2813,12 +2848,13 @@ module Google
|
|
2813
2848
|
# Customize the options with defaults
|
2814
2849
|
call_metadata = @config.rpcs.delete_application.metadata.to_h
|
2815
2850
|
|
2816
|
-
# Set x-goog-api-client
|
2851
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2817
2852
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2818
2853
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2819
2854
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION,
|
2820
2855
|
transports_version_send: [:rest]
|
2821
2856
|
|
2857
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2822
2858
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2823
2859
|
|
2824
2860
|
options.apply_defaults timeout: @config.rpcs.delete_application.timeout,
|
@@ -2832,7 +2868,7 @@ module Google
|
|
2832
2868
|
@app_hub_stub.delete_application request, options do |result, operation|
|
2833
2869
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2834
2870
|
yield result, operation if block_given?
|
2835
|
-
|
2871
|
+
throw :response, result
|
2836
2872
|
end
|
2837
2873
|
rescue ::Gapic::Rest::Error => e
|
2838
2874
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2912,6 +2948,11 @@ module Google
|
|
2912
2948
|
# default endpoint URL. The default value of nil uses the environment
|
2913
2949
|
# universe (usually the default "googleapis.com" universe).
|
2914
2950
|
# @return [::String,nil]
|
2951
|
+
# @!attribute [rw] logger
|
2952
|
+
# A custom logger to use for request/response debug logging, or the value
|
2953
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2954
|
+
# explicitly disable logging.
|
2955
|
+
# @return [::Logger,:default,nil]
|
2915
2956
|
#
|
2916
2957
|
class Configuration
|
2917
2958
|
extend ::Gapic::Config
|
@@ -2940,6 +2981,7 @@ module Google
|
|
2940
2981
|
# by the host service.
|
2941
2982
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
2942
2983
|
config_attr :bindings_override, {}, ::Hash, nil
|
2984
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2943
2985
|
|
2944
2986
|
# @private
|
2945
2987
|
def initialize parent_config = nil
|