google-cloud-tasks-v2beta3 0.13.0 → 0.14.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/tasks/v2beta3/cloud_tasks/client.rb +65 -33
- data/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb +65 -33
- data/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/service_stub.rb +142 -98
- data/lib/google/cloud/tasks/v2beta3/version.rb +1 -1
- data/proto_docs/google/api/client.rb +74 -10
- data/proto_docs/google/api/resource.rb +7 -2
- metadata +5 -5
@@ -34,6 +34,9 @@ module Google
|
|
34
34
|
# work in their applications.
|
35
35
|
#
|
36
36
|
class Client
|
37
|
+
# @private
|
38
|
+
API_VERSION = ""
|
39
|
+
|
37
40
|
# @private
|
38
41
|
DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$"
|
39
42
|
|
@@ -205,15 +208,27 @@ module Google
|
|
205
208
|
endpoint: @config.endpoint,
|
206
209
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
207
210
|
universe_domain: @config.universe_domain,
|
208
|
-
credentials: credentials
|
211
|
+
credentials: credentials,
|
212
|
+
logger: @config.logger
|
209
213
|
)
|
210
214
|
|
215
|
+
@cloud_tasks_stub.logger(stub: true)&.info do |entry|
|
216
|
+
entry.set_system_name
|
217
|
+
entry.set_service
|
218
|
+
entry.message = "Created client for #{entry.service}"
|
219
|
+
entry.set_credentials_fields credentials
|
220
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
221
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
222
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
223
|
+
end
|
224
|
+
|
211
225
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
212
226
|
config.credentials = credentials
|
213
227
|
config.quota_project = @quota_project_id
|
214
228
|
config.endpoint = @cloud_tasks_stub.endpoint
|
215
229
|
config.universe_domain = @cloud_tasks_stub.universe_domain
|
216
230
|
config.bindings_override = @config.bindings_override
|
231
|
+
config.logger = @cloud_tasks_stub.logger if config.respond_to? :logger=
|
217
232
|
end
|
218
233
|
end
|
219
234
|
|
@@ -224,6 +239,15 @@ module Google
|
|
224
239
|
#
|
225
240
|
attr_reader :location_client
|
226
241
|
|
242
|
+
##
|
243
|
+
# The logger used for request/response debug logging.
|
244
|
+
#
|
245
|
+
# @return [Logger]
|
246
|
+
#
|
247
|
+
def logger
|
248
|
+
@cloud_tasks_stub.logger
|
249
|
+
end
|
250
|
+
|
227
251
|
# Service calls
|
228
252
|
|
229
253
|
##
|
@@ -322,12 +346,13 @@ module Google
|
|
322
346
|
# Customize the options with defaults
|
323
347
|
call_metadata = @config.rpcs.list_queues.metadata.to_h
|
324
348
|
|
325
|
-
# Set x-goog-api-client
|
349
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
326
350
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
327
351
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
328
352
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
329
353
|
transports_version_send: [:rest]
|
330
354
|
|
355
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
331
356
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
332
357
|
|
333
358
|
options.apply_defaults timeout: @config.rpcs.list_queues.timeout,
|
@@ -341,7 +366,7 @@ module Google
|
|
341
366
|
@cloud_tasks_stub.list_queues request, options do |result, operation|
|
342
367
|
result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_queues, "queues", request, result, options
|
343
368
|
yield result, operation if block_given?
|
344
|
-
|
369
|
+
throw :response, result
|
345
370
|
end
|
346
371
|
rescue ::Gapic::Rest::Error => e
|
347
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -407,12 +432,13 @@ module Google
|
|
407
432
|
# Customize the options with defaults
|
408
433
|
call_metadata = @config.rpcs.get_queue.metadata.to_h
|
409
434
|
|
410
|
-
# Set x-goog-api-client
|
435
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
411
436
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
412
437
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
413
438
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
414
439
|
transports_version_send: [:rest]
|
415
440
|
|
441
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
416
442
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
417
443
|
|
418
444
|
options.apply_defaults timeout: @config.rpcs.get_queue.timeout,
|
@@ -425,7 +451,6 @@ module Google
|
|
425
451
|
|
426
452
|
@cloud_tasks_stub.get_queue request, options do |result, operation|
|
427
453
|
yield result, operation if block_given?
|
428
|
-
return result
|
429
454
|
end
|
430
455
|
rescue ::Gapic::Rest::Error => e
|
431
456
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -506,12 +531,13 @@ module Google
|
|
506
531
|
# Customize the options with defaults
|
507
532
|
call_metadata = @config.rpcs.create_queue.metadata.to_h
|
508
533
|
|
509
|
-
# Set x-goog-api-client
|
534
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
510
535
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
511
536
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
512
537
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
513
538
|
transports_version_send: [:rest]
|
514
539
|
|
540
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
515
541
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
516
542
|
|
517
543
|
options.apply_defaults timeout: @config.rpcs.create_queue.timeout,
|
@@ -524,7 +550,6 @@ module Google
|
|
524
550
|
|
525
551
|
@cloud_tasks_stub.create_queue request, options do |result, operation|
|
526
552
|
yield result, operation if block_given?
|
527
|
-
return result
|
528
553
|
end
|
529
554
|
rescue ::Gapic::Rest::Error => e
|
530
555
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -610,12 +635,13 @@ module Google
|
|
610
635
|
# Customize the options with defaults
|
611
636
|
call_metadata = @config.rpcs.update_queue.metadata.to_h
|
612
637
|
|
613
|
-
# Set x-goog-api-client
|
638
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
614
639
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
615
640
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
616
641
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
617
642
|
transports_version_send: [:rest]
|
618
643
|
|
644
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
619
645
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
620
646
|
|
621
647
|
options.apply_defaults timeout: @config.rpcs.update_queue.timeout,
|
@@ -628,7 +654,6 @@ module Google
|
|
628
654
|
|
629
655
|
@cloud_tasks_stub.update_queue request, options do |result, operation|
|
630
656
|
yield result, operation if block_given?
|
631
|
-
return result
|
632
657
|
end
|
633
658
|
rescue ::Gapic::Rest::Error => e
|
634
659
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -701,12 +726,13 @@ module Google
|
|
701
726
|
# Customize the options with defaults
|
702
727
|
call_metadata = @config.rpcs.delete_queue.metadata.to_h
|
703
728
|
|
704
|
-
# Set x-goog-api-client
|
729
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
705
730
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
706
731
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
707
732
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
708
733
|
transports_version_send: [:rest]
|
709
734
|
|
735
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
710
736
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
711
737
|
|
712
738
|
options.apply_defaults timeout: @config.rpcs.delete_queue.timeout,
|
@@ -719,7 +745,6 @@ module Google
|
|
719
745
|
|
720
746
|
@cloud_tasks_stub.delete_queue request, options do |result, operation|
|
721
747
|
yield result, operation if block_given?
|
722
|
-
return result
|
723
748
|
end
|
724
749
|
rescue ::Gapic::Rest::Error => e
|
725
750
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -785,12 +810,13 @@ module Google
|
|
785
810
|
# Customize the options with defaults
|
786
811
|
call_metadata = @config.rpcs.purge_queue.metadata.to_h
|
787
812
|
|
788
|
-
# Set x-goog-api-client
|
813
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
789
814
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
790
815
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
791
816
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
792
817
|
transports_version_send: [:rest]
|
793
818
|
|
819
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
794
820
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
795
821
|
|
796
822
|
options.apply_defaults timeout: @config.rpcs.purge_queue.timeout,
|
@@ -803,7 +829,6 @@ module Google
|
|
803
829
|
|
804
830
|
@cloud_tasks_stub.purge_queue request, options do |result, operation|
|
805
831
|
yield result, operation if block_given?
|
806
|
-
return result
|
807
832
|
end
|
808
833
|
rescue ::Gapic::Rest::Error => e
|
809
834
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -871,12 +896,13 @@ module Google
|
|
871
896
|
# Customize the options with defaults
|
872
897
|
call_metadata = @config.rpcs.pause_queue.metadata.to_h
|
873
898
|
|
874
|
-
# Set x-goog-api-client
|
899
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
875
900
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
876
901
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
877
902
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
878
903
|
transports_version_send: [:rest]
|
879
904
|
|
905
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
880
906
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
881
907
|
|
882
908
|
options.apply_defaults timeout: @config.rpcs.pause_queue.timeout,
|
@@ -889,7 +915,6 @@ module Google
|
|
889
915
|
|
890
916
|
@cloud_tasks_stub.pause_queue request, options do |result, operation|
|
891
917
|
yield result, operation if block_given?
|
892
|
-
return result
|
893
918
|
end
|
894
919
|
rescue ::Gapic::Rest::Error => e
|
895
920
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -964,12 +989,13 @@ module Google
|
|
964
989
|
# Customize the options with defaults
|
965
990
|
call_metadata = @config.rpcs.resume_queue.metadata.to_h
|
966
991
|
|
967
|
-
# Set x-goog-api-client
|
992
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
968
993
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
969
994
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
970
995
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
971
996
|
transports_version_send: [:rest]
|
972
997
|
|
998
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
973
999
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
974
1000
|
|
975
1001
|
options.apply_defaults timeout: @config.rpcs.resume_queue.timeout,
|
@@ -982,7 +1008,6 @@ module Google
|
|
982
1008
|
|
983
1009
|
@cloud_tasks_stub.resume_queue request, options do |result, operation|
|
984
1010
|
yield result, operation if block_given?
|
985
|
-
return result
|
986
1011
|
end
|
987
1012
|
rescue ::Gapic::Rest::Error => e
|
988
1013
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1054,12 +1079,13 @@ module Google
|
|
1054
1079
|
# Customize the options with defaults
|
1055
1080
|
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
1056
1081
|
|
1057
|
-
# Set x-goog-api-client
|
1082
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1058
1083
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1059
1084
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1060
1085
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
1061
1086
|
transports_version_send: [:rest]
|
1062
1087
|
|
1088
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1063
1089
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1064
1090
|
|
1065
1091
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
@@ -1072,7 +1098,6 @@ module Google
|
|
1072
1098
|
|
1073
1099
|
@cloud_tasks_stub.get_iam_policy request, options do |result, operation|
|
1074
1100
|
yield result, operation if block_given?
|
1075
|
-
return result
|
1076
1101
|
end
|
1077
1102
|
rescue ::Gapic::Rest::Error => e
|
1078
1103
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1154,12 +1179,13 @@ module Google
|
|
1154
1179
|
# Customize the options with defaults
|
1155
1180
|
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
1156
1181
|
|
1157
|
-
# Set x-goog-api-client
|
1182
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1158
1183
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1159
1184
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1160
1185
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
1161
1186
|
transports_version_send: [:rest]
|
1162
1187
|
|
1188
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1163
1189
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1164
1190
|
|
1165
1191
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
@@ -1172,7 +1198,6 @@ module Google
|
|
1172
1198
|
|
1173
1199
|
@cloud_tasks_stub.set_iam_policy request, options do |result, operation|
|
1174
1200
|
yield result, operation if block_given?
|
1175
|
-
return result
|
1176
1201
|
end
|
1177
1202
|
rescue ::Gapic::Rest::Error => e
|
1178
1203
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1245,12 +1270,13 @@ module Google
|
|
1245
1270
|
# Customize the options with defaults
|
1246
1271
|
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1247
1272
|
|
1248
|
-
# Set x-goog-api-client
|
1273
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1249
1274
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1250
1275
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1251
1276
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
1252
1277
|
transports_version_send: [:rest]
|
1253
1278
|
|
1279
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1254
1280
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1255
1281
|
|
1256
1282
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
@@ -1263,7 +1289,6 @@ module Google
|
|
1263
1289
|
|
1264
1290
|
@cloud_tasks_stub.test_iam_permissions request, options do |result, operation|
|
1265
1291
|
yield result, operation if block_given?
|
1266
|
-
return result
|
1267
1292
|
end
|
1268
1293
|
rescue ::Gapic::Rest::Error => e
|
1269
1294
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1369,12 +1394,13 @@ module Google
|
|
1369
1394
|
# Customize the options with defaults
|
1370
1395
|
call_metadata = @config.rpcs.list_tasks.metadata.to_h
|
1371
1396
|
|
1372
|
-
# Set x-goog-api-client
|
1397
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1373
1398
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1374
1399
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1375
1400
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
1376
1401
|
transports_version_send: [:rest]
|
1377
1402
|
|
1403
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1378
1404
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1379
1405
|
|
1380
1406
|
options.apply_defaults timeout: @config.rpcs.list_tasks.timeout,
|
@@ -1388,7 +1414,7 @@ module Google
|
|
1388
1414
|
@cloud_tasks_stub.list_tasks request, options do |result, operation|
|
1389
1415
|
result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, "tasks", request, result, options
|
1390
1416
|
yield result, operation if block_given?
|
1391
|
-
|
1417
|
+
throw :response, result
|
1392
1418
|
end
|
1393
1419
|
rescue ::Gapic::Rest::Error => e
|
1394
1420
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1463,12 +1489,13 @@ module Google
|
|
1463
1489
|
# Customize the options with defaults
|
1464
1490
|
call_metadata = @config.rpcs.get_task.metadata.to_h
|
1465
1491
|
|
1466
|
-
# Set x-goog-api-client
|
1492
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1467
1493
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1468
1494
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1469
1495
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
1470
1496
|
transports_version_send: [:rest]
|
1471
1497
|
|
1498
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1472
1499
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1473
1500
|
|
1474
1501
|
options.apply_defaults timeout: @config.rpcs.get_task.timeout,
|
@@ -1481,7 +1508,6 @@ module Google
|
|
1481
1508
|
|
1482
1509
|
@cloud_tasks_stub.get_task request, options do |result, operation|
|
1483
1510
|
yield result, operation if block_given?
|
1484
|
-
return result
|
1485
1511
|
end
|
1486
1512
|
rescue ::Gapic::Rest::Error => e
|
1487
1513
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1596,12 +1622,13 @@ module Google
|
|
1596
1622
|
# Customize the options with defaults
|
1597
1623
|
call_metadata = @config.rpcs.create_task.metadata.to_h
|
1598
1624
|
|
1599
|
-
# Set x-goog-api-client
|
1625
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1600
1626
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1601
1627
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1602
1628
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
1603
1629
|
transports_version_send: [:rest]
|
1604
1630
|
|
1631
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1605
1632
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1606
1633
|
|
1607
1634
|
options.apply_defaults timeout: @config.rpcs.create_task.timeout,
|
@@ -1614,7 +1641,6 @@ module Google
|
|
1614
1641
|
|
1615
1642
|
@cloud_tasks_stub.create_task request, options do |result, operation|
|
1616
1643
|
yield result, operation if block_given?
|
1617
|
-
return result
|
1618
1644
|
end
|
1619
1645
|
rescue ::Gapic::Rest::Error => e
|
1620
1646
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1679,12 +1705,13 @@ module Google
|
|
1679
1705
|
# Customize the options with defaults
|
1680
1706
|
call_metadata = @config.rpcs.delete_task.metadata.to_h
|
1681
1707
|
|
1682
|
-
# Set x-goog-api-client
|
1708
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1683
1709
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1684
1710
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1685
1711
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
1686
1712
|
transports_version_send: [:rest]
|
1687
1713
|
|
1714
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1688
1715
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1689
1716
|
|
1690
1717
|
options.apply_defaults timeout: @config.rpcs.delete_task.timeout,
|
@@ -1697,7 +1724,6 @@ module Google
|
|
1697
1724
|
|
1698
1725
|
@cloud_tasks_stub.delete_task request, options do |result, operation|
|
1699
1726
|
yield result, operation if block_given?
|
1700
|
-
return result
|
1701
1727
|
end
|
1702
1728
|
rescue ::Gapic::Rest::Error => e
|
1703
1729
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1798,12 +1824,13 @@ module Google
|
|
1798
1824
|
# Customize the options with defaults
|
1799
1825
|
call_metadata = @config.rpcs.run_task.metadata.to_h
|
1800
1826
|
|
1801
|
-
# Set x-goog-api-client
|
1827
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1802
1828
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1803
1829
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1804
1830
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION,
|
1805
1831
|
transports_version_send: [:rest]
|
1806
1832
|
|
1833
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1807
1834
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1808
1835
|
|
1809
1836
|
options.apply_defaults timeout: @config.rpcs.run_task.timeout,
|
@@ -1816,7 +1843,6 @@ module Google
|
|
1816
1843
|
|
1817
1844
|
@cloud_tasks_stub.run_task request, options do |result, operation|
|
1818
1845
|
yield result, operation if block_given?
|
1819
|
-
return result
|
1820
1846
|
end
|
1821
1847
|
rescue ::Gapic::Rest::Error => e
|
1822
1848
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1896,6 +1922,11 @@ module Google
|
|
1896
1922
|
# default endpoint URL. The default value of nil uses the environment
|
1897
1923
|
# universe (usually the default "googleapis.com" universe).
|
1898
1924
|
# @return [::String,nil]
|
1925
|
+
# @!attribute [rw] logger
|
1926
|
+
# A custom logger to use for request/response debug logging, or the value
|
1927
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1928
|
+
# explicitly disable logging.
|
1929
|
+
# @return [::Logger,:default,nil]
|
1899
1930
|
#
|
1900
1931
|
class Configuration
|
1901
1932
|
extend ::Gapic::Config
|
@@ -1924,6 +1955,7 @@ module Google
|
|
1924
1955
|
# by the host service.
|
1925
1956
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1926
1957
|
config_attr :bindings_override, {}, ::Hash, nil
|
1958
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1927
1959
|
|
1928
1960
|
# @private
|
1929
1961
|
def initialize parent_config = nil
|