google-cloud-tasks-v2beta3 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2925024bb984638b4b28272fa9fc91f238fd19f483497d2ebfb6d33876c0535
|
4
|
+
data.tar.gz: b6461353ae0e011c7a20e376196487934be663e5ddf3bf66a43334e580c5a18e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cee037649f8489bec184b6f5d75ecead55bbee7b43c807f9e03acee77b690a962b93cf67370f2e33b7af9bf10c5fbf0d7a31696e97483b4f7a103f9970b34a6
|
7
|
+
data.tar.gz: 8ecf1acbc0cf27dbeb242a13fe4fa31092752f0983e476670faf88605e1a3f608b10c5689ed44e07de6cd1009216d932567583cf0605a46c0ffb522282fb3a0a
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/tasks)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/tasks/v2beta3"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# work in their applications.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
API_VERSION = ""
|
37
|
+
|
35
38
|
# @private
|
36
39
|
DEFAULT_ENDPOINT_TEMPLATE = "cloudtasks.$UNIVERSE_DOMAIN$"
|
37
40
|
|
@@ -212,14 +215,26 @@ module Google
|
|
212
215
|
universe_domain: @config.universe_domain,
|
213
216
|
channel_args: @config.channel_args,
|
214
217
|
interceptors: @config.interceptors,
|
215
|
-
channel_pool_config: @config.channel_pool
|
218
|
+
channel_pool_config: @config.channel_pool,
|
219
|
+
logger: @config.logger
|
216
220
|
)
|
217
221
|
|
222
|
+
@cloud_tasks_stub.stub_logger&.info do |entry|
|
223
|
+
entry.set_system_name
|
224
|
+
entry.set_service
|
225
|
+
entry.message = "Created client for #{entry.service}"
|
226
|
+
entry.set_credentials_fields credentials
|
227
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
228
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
229
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
230
|
+
end
|
231
|
+
|
218
232
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
219
233
|
config.credentials = credentials
|
220
234
|
config.quota_project = @quota_project_id
|
221
235
|
config.endpoint = @cloud_tasks_stub.endpoint
|
222
236
|
config.universe_domain = @cloud_tasks_stub.universe_domain
|
237
|
+
config.logger = @cloud_tasks_stub.logger if config.respond_to? :logger=
|
223
238
|
end
|
224
239
|
end
|
225
240
|
|
@@ -230,6 +245,15 @@ module Google
|
|
230
245
|
#
|
231
246
|
attr_reader :location_client
|
232
247
|
|
248
|
+
##
|
249
|
+
# The logger used for request/response debug logging.
|
250
|
+
#
|
251
|
+
# @return [Logger]
|
252
|
+
#
|
253
|
+
def logger
|
254
|
+
@cloud_tasks_stub.logger
|
255
|
+
end
|
256
|
+
|
233
257
|
# Service calls
|
234
258
|
|
235
259
|
##
|
@@ -329,10 +353,11 @@ module Google
|
|
329
353
|
# Customize the options with defaults
|
330
354
|
metadata = @config.rpcs.list_queues.metadata.to_h
|
331
355
|
|
332
|
-
# Set x-goog-api-client
|
356
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
333
357
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
334
358
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
335
359
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
360
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
336
361
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
337
362
|
|
338
363
|
header_params = {}
|
@@ -354,7 +379,7 @@ module Google
|
|
354
379
|
@cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation|
|
355
380
|
response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_queues, request, response, operation, options
|
356
381
|
yield response, operation if block_given?
|
357
|
-
|
382
|
+
throw :response, response
|
358
383
|
end
|
359
384
|
rescue ::GRPC::BadStatus => e
|
360
385
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,10 +446,11 @@ module Google
|
|
421
446
|
# Customize the options with defaults
|
422
447
|
metadata = @config.rpcs.get_queue.metadata.to_h
|
423
448
|
|
424
|
-
# Set x-goog-api-client
|
449
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
425
450
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
426
451
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
427
452
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
453
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
428
454
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
429
455
|
|
430
456
|
header_params = {}
|
@@ -445,7 +471,6 @@ module Google
|
|
445
471
|
|
446
472
|
@cloud_tasks_stub.call_rpc :get_queue, request, options: options do |response, operation|
|
447
473
|
yield response, operation if block_given?
|
448
|
-
return response
|
449
474
|
end
|
450
475
|
rescue ::GRPC::BadStatus => e
|
451
476
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -527,10 +552,11 @@ module Google
|
|
527
552
|
# Customize the options with defaults
|
528
553
|
metadata = @config.rpcs.create_queue.metadata.to_h
|
529
554
|
|
530
|
-
# Set x-goog-api-client
|
555
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
531
556
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
532
557
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
533
558
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
559
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
534
560
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
535
561
|
|
536
562
|
header_params = {}
|
@@ -551,7 +577,6 @@ module Google
|
|
551
577
|
|
552
578
|
@cloud_tasks_stub.call_rpc :create_queue, request, options: options do |response, operation|
|
553
579
|
yield response, operation if block_given?
|
554
|
-
return response
|
555
580
|
end
|
556
581
|
rescue ::GRPC::BadStatus => e
|
557
582
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -638,10 +663,11 @@ module Google
|
|
638
663
|
# Customize the options with defaults
|
639
664
|
metadata = @config.rpcs.update_queue.metadata.to_h
|
640
665
|
|
641
|
-
# Set x-goog-api-client
|
666
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
642
667
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
643
668
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
644
669
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
670
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
645
671
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
646
672
|
|
647
673
|
header_params = {}
|
@@ -662,7 +688,6 @@ module Google
|
|
662
688
|
|
663
689
|
@cloud_tasks_stub.call_rpc :update_queue, request, options: options do |response, operation|
|
664
690
|
yield response, operation if block_given?
|
665
|
-
return response
|
666
691
|
end
|
667
692
|
rescue ::GRPC::BadStatus => e
|
668
693
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -736,10 +761,11 @@ module Google
|
|
736
761
|
# Customize the options with defaults
|
737
762
|
metadata = @config.rpcs.delete_queue.metadata.to_h
|
738
763
|
|
739
|
-
# Set x-goog-api-client
|
764
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
740
765
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
741
766
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
742
767
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
768
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
743
769
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
744
770
|
|
745
771
|
header_params = {}
|
@@ -760,7 +786,6 @@ module Google
|
|
760
786
|
|
761
787
|
@cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation|
|
762
788
|
yield response, operation if block_given?
|
763
|
-
return response
|
764
789
|
end
|
765
790
|
rescue ::GRPC::BadStatus => e
|
766
791
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -827,10 +852,11 @@ module Google
|
|
827
852
|
# Customize the options with defaults
|
828
853
|
metadata = @config.rpcs.purge_queue.metadata.to_h
|
829
854
|
|
830
|
-
# Set x-goog-api-client
|
855
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
831
856
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
832
857
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
833
858
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
859
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
834
860
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
835
861
|
|
836
862
|
header_params = {}
|
@@ -851,7 +877,6 @@ module Google
|
|
851
877
|
|
852
878
|
@cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation|
|
853
879
|
yield response, operation if block_given?
|
854
|
-
return response
|
855
880
|
end
|
856
881
|
rescue ::GRPC::BadStatus => e
|
857
882
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -920,10 +945,11 @@ module Google
|
|
920
945
|
# Customize the options with defaults
|
921
946
|
metadata = @config.rpcs.pause_queue.metadata.to_h
|
922
947
|
|
923
|
-
# Set x-goog-api-client
|
948
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
924
949
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
925
950
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
926
951
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
952
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
927
953
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
928
954
|
|
929
955
|
header_params = {}
|
@@ -944,7 +970,6 @@ module Google
|
|
944
970
|
|
945
971
|
@cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation|
|
946
972
|
yield response, operation if block_given?
|
947
|
-
return response
|
948
973
|
end
|
949
974
|
rescue ::GRPC::BadStatus => e
|
950
975
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1020,10 +1045,11 @@ module Google
|
|
1020
1045
|
# Customize the options with defaults
|
1021
1046
|
metadata = @config.rpcs.resume_queue.metadata.to_h
|
1022
1047
|
|
1023
|
-
# Set x-goog-api-client
|
1048
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1024
1049
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1025
1050
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1026
1051
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1052
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1027
1053
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1028
1054
|
|
1029
1055
|
header_params = {}
|
@@ -1044,7 +1070,6 @@ module Google
|
|
1044
1070
|
|
1045
1071
|
@cloud_tasks_stub.call_rpc :resume_queue, request, options: options do |response, operation|
|
1046
1072
|
yield response, operation if block_given?
|
1047
|
-
return response
|
1048
1073
|
end
|
1049
1074
|
rescue ::GRPC::BadStatus => e
|
1050
1075
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1117,10 +1142,11 @@ module Google
|
|
1117
1142
|
# Customize the options with defaults
|
1118
1143
|
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
1119
1144
|
|
1120
|
-
# Set x-goog-api-client
|
1145
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1121
1146
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1122
1147
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1123
1148
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1149
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1124
1150
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1125
1151
|
|
1126
1152
|
header_params = {}
|
@@ -1141,7 +1167,6 @@ module Google
|
|
1141
1167
|
|
1142
1168
|
@cloud_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
1143
1169
|
yield response, operation if block_given?
|
1144
|
-
return response
|
1145
1170
|
end
|
1146
1171
|
rescue ::GRPC::BadStatus => e
|
1147
1172
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1224,10 +1249,11 @@ module Google
|
|
1224
1249
|
# Customize the options with defaults
|
1225
1250
|
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
1226
1251
|
|
1227
|
-
# Set x-goog-api-client
|
1252
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1228
1253
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1229
1254
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1230
1255
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1256
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1231
1257
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1232
1258
|
|
1233
1259
|
header_params = {}
|
@@ -1248,7 +1274,6 @@ module Google
|
|
1248
1274
|
|
1249
1275
|
@cloud_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
1250
1276
|
yield response, operation if block_given?
|
1251
|
-
return response
|
1252
1277
|
end
|
1253
1278
|
rescue ::GRPC::BadStatus => e
|
1254
1279
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1322,10 +1347,11 @@ module Google
|
|
1322
1347
|
# Customize the options with defaults
|
1323
1348
|
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1324
1349
|
|
1325
|
-
# Set x-goog-api-client
|
1350
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1326
1351
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1327
1352
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1328
1353
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1354
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1329
1355
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1330
1356
|
|
1331
1357
|
header_params = {}
|
@@ -1346,7 +1372,6 @@ module Google
|
|
1346
1372
|
|
1347
1373
|
@cloud_tasks_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
1348
1374
|
yield response, operation if block_given?
|
1349
|
-
return response
|
1350
1375
|
end
|
1351
1376
|
rescue ::GRPC::BadStatus => e
|
1352
1377
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1453,10 +1478,11 @@ module Google
|
|
1453
1478
|
# Customize the options with defaults
|
1454
1479
|
metadata = @config.rpcs.list_tasks.metadata.to_h
|
1455
1480
|
|
1456
|
-
# Set x-goog-api-client
|
1481
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1457
1482
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1458
1483
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1459
1484
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1485
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1460
1486
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1461
1487
|
|
1462
1488
|
header_params = {}
|
@@ -1478,7 +1504,7 @@ module Google
|
|
1478
1504
|
@cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation|
|
1479
1505
|
response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, request, response, operation, options
|
1480
1506
|
yield response, operation if block_given?
|
1481
|
-
|
1507
|
+
throw :response, response
|
1482
1508
|
end
|
1483
1509
|
rescue ::GRPC::BadStatus => e
|
1484
1510
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1554,10 +1580,11 @@ module Google
|
|
1554
1580
|
# Customize the options with defaults
|
1555
1581
|
metadata = @config.rpcs.get_task.metadata.to_h
|
1556
1582
|
|
1557
|
-
# Set x-goog-api-client
|
1583
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1558
1584
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1559
1585
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1560
1586
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1587
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1561
1588
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1562
1589
|
|
1563
1590
|
header_params = {}
|
@@ -1578,7 +1605,6 @@ module Google
|
|
1578
1605
|
|
1579
1606
|
@cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation|
|
1580
1607
|
yield response, operation if block_given?
|
1581
|
-
return response
|
1582
1608
|
end
|
1583
1609
|
rescue ::GRPC::BadStatus => e
|
1584
1610
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1694,10 +1720,11 @@ module Google
|
|
1694
1720
|
# Customize the options with defaults
|
1695
1721
|
metadata = @config.rpcs.create_task.metadata.to_h
|
1696
1722
|
|
1697
|
-
# Set x-goog-api-client
|
1723
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1698
1724
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1699
1725
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1700
1726
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1727
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1701
1728
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1702
1729
|
|
1703
1730
|
header_params = {}
|
@@ -1718,7 +1745,6 @@ module Google
|
|
1718
1745
|
|
1719
1746
|
@cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation|
|
1720
1747
|
yield response, operation if block_given?
|
1721
|
-
return response
|
1722
1748
|
end
|
1723
1749
|
rescue ::GRPC::BadStatus => e
|
1724
1750
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1784,10 +1810,11 @@ module Google
|
|
1784
1810
|
# Customize the options with defaults
|
1785
1811
|
metadata = @config.rpcs.delete_task.metadata.to_h
|
1786
1812
|
|
1787
|
-
# Set x-goog-api-client
|
1813
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1788
1814
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1789
1815
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1790
1816
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1817
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1791
1818
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1792
1819
|
|
1793
1820
|
header_params = {}
|
@@ -1808,7 +1835,6 @@ module Google
|
|
1808
1835
|
|
1809
1836
|
@cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation|
|
1810
1837
|
yield response, operation if block_given?
|
1811
|
-
return response
|
1812
1838
|
end
|
1813
1839
|
rescue ::GRPC::BadStatus => e
|
1814
1840
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1910,10 +1936,11 @@ module Google
|
|
1910
1936
|
# Customize the options with defaults
|
1911
1937
|
metadata = @config.rpcs.run_task.metadata.to_h
|
1912
1938
|
|
1913
|
-
# Set x-goog-api-client
|
1939
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1914
1940
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1915
1941
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1916
1942
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1943
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1917
1944
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1918
1945
|
|
1919
1946
|
header_params = {}
|
@@ -1934,7 +1961,6 @@ module Google
|
|
1934
1961
|
|
1935
1962
|
@cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation|
|
1936
1963
|
yield response, operation if block_given?
|
1937
|
-
return response
|
1938
1964
|
end
|
1939
1965
|
rescue ::GRPC::BadStatus => e
|
1940
1966
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2023,6 +2049,11 @@ module Google
|
|
2023
2049
|
# default endpoint URL. The default value of nil uses the environment
|
2024
2050
|
# universe (usually the default "googleapis.com" universe).
|
2025
2051
|
# @return [::String,nil]
|
2052
|
+
# @!attribute [rw] logger
|
2053
|
+
# A custom logger to use for request/response debug logging, or the value
|
2054
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2055
|
+
# explicitly disable logging.
|
2056
|
+
# @return [::Logger,:default,nil]
|
2026
2057
|
#
|
2027
2058
|
class Configuration
|
2028
2059
|
extend ::Gapic::Config
|
@@ -2047,6 +2078,7 @@ module Google
|
|
2047
2078
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2048
2079
|
config_attr :quota_project, nil, ::String, nil
|
2049
2080
|
config_attr :universe_domain, nil, ::String, nil
|
2081
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2050
2082
|
|
2051
2083
|
# @private
|
2052
2084
|
def initialize parent_config = nil
|