google-cloud-tasks-v2beta3 0.6.1 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb +418 -133
- data/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb +2 -2
- data/lib/google/cloud/tasks/v2beta3/queue_pb.rb +2 -2
- data/lib/google/cloud/tasks/v2beta3/target_pb.rb +1 -1
- data/lib/google/cloud/tasks/v2beta3/task_pb.rb +2 -2
- data/lib/google/cloud/tasks/v2beta3/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/tasks/v2beta3/target.rb +2 -2
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c10a8b5602dfc6bd5e33e4196b5ef086a1498f866b0a1d1a8eac4770045d337
|
4
|
+
data.tar.gz: 66ad8edaebb655d0af13f2644aaf76277f776bf42fef7af7894ea6da7657e450
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d70a02e4585310d7a832c6557cd829c8cc9c3ab137bb88a0a5092fa062da5d539bfd36a1235f08272df645920a922988e48ae2d160761090df8211a8f688ab2
|
7
|
+
data.tar.gz: 0cc4dab85db7d3d077f1e998e2f5c2f88d56215436a475a6364e17ac72a0016a0d41b77c3251cd368e55f81f97a6f4c6ebe76480942ed5ba09e2b714a99cc56e
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-tasks-v2beta3
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Tasks::V2beta3::CloudTasks::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `TASKS_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `TASKS_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/tasks/v2beta3"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/tasks/v2beta3"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/tasks/v2beta3"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/tasks/v2beta3"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.list_queues request
|
38
38
|
```
|
39
39
|
|
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all CloudTasks clients
|
48
|
+
# ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
52
51
|
#
|
53
52
|
# @yield [config] Configure the Client client.
|
54
53
|
# @yieldparam config [Client::Configuration]
|
@@ -68,18 +67,12 @@ module Google
|
|
68
67
|
|
69
68
|
default_config.rpcs.list_queues.timeout = 20.0
|
70
69
|
default_config.rpcs.list_queues.retry_policy = {
|
71
|
-
initial_delay: 0.1,
|
72
|
-
max_delay: 10.0,
|
73
|
-
multiplier: 1.3,
|
74
|
-
retry_codes: [4, 14]
|
70
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
75
71
|
}
|
76
72
|
|
77
73
|
default_config.rpcs.get_queue.timeout = 20.0
|
78
74
|
default_config.rpcs.get_queue.retry_policy = {
|
79
|
-
initial_delay: 0.1,
|
80
|
-
max_delay: 10.0,
|
81
|
-
multiplier: 1.3,
|
82
|
-
retry_codes: [4, 14]
|
75
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
83
76
|
}
|
84
77
|
|
85
78
|
default_config.rpcs.create_queue.timeout = 20.0
|
@@ -88,10 +81,7 @@ module Google
|
|
88
81
|
|
89
82
|
default_config.rpcs.delete_queue.timeout = 20.0
|
90
83
|
default_config.rpcs.delete_queue.retry_policy = {
|
91
|
-
initial_delay: 0.1,
|
92
|
-
max_delay: 10.0,
|
93
|
-
multiplier: 1.3,
|
94
|
-
retry_codes: [4, 14]
|
84
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
95
85
|
}
|
96
86
|
|
97
87
|
default_config.rpcs.purge_queue.timeout = 20.0
|
@@ -102,46 +92,31 @@ module Google
|
|
102
92
|
|
103
93
|
default_config.rpcs.get_iam_policy.timeout = 20.0
|
104
94
|
default_config.rpcs.get_iam_policy.retry_policy = {
|
105
|
-
initial_delay: 0.1,
|
106
|
-
max_delay: 10.0,
|
107
|
-
multiplier: 1.3,
|
108
|
-
retry_codes: [4, 14]
|
95
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
109
96
|
}
|
110
97
|
|
111
98
|
default_config.rpcs.set_iam_policy.timeout = 20.0
|
112
99
|
|
113
100
|
default_config.rpcs.test_iam_permissions.timeout = 20.0
|
114
101
|
default_config.rpcs.test_iam_permissions.retry_policy = {
|
115
|
-
initial_delay: 0.1,
|
116
|
-
max_delay: 10.0,
|
117
|
-
multiplier: 1.3,
|
118
|
-
retry_codes: [4, 14]
|
102
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
119
103
|
}
|
120
104
|
|
121
105
|
default_config.rpcs.list_tasks.timeout = 20.0
|
122
106
|
default_config.rpcs.list_tasks.retry_policy = {
|
123
|
-
initial_delay: 0.1,
|
124
|
-
max_delay: 10.0,
|
125
|
-
multiplier: 1.3,
|
126
|
-
retry_codes: [4, 14]
|
107
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
127
108
|
}
|
128
109
|
|
129
110
|
default_config.rpcs.get_task.timeout = 20.0
|
130
111
|
default_config.rpcs.get_task.retry_policy = {
|
131
|
-
initial_delay: 0.1,
|
132
|
-
max_delay: 10.0,
|
133
|
-
multiplier: 1.3,
|
134
|
-
retry_codes: [4, 14]
|
112
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
135
113
|
}
|
136
114
|
|
137
115
|
default_config.rpcs.create_task.timeout = 20.0
|
138
116
|
|
139
117
|
default_config.rpcs.delete_task.timeout = 20.0
|
140
118
|
default_config.rpcs.delete_task.retry_policy = {
|
141
|
-
initial_delay: 0.1,
|
142
|
-
max_delay: 10.0,
|
143
|
-
multiplier: 1.3,
|
144
|
-
retry_codes: [4, 14]
|
119
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [4, 14]
|
145
120
|
}
|
146
121
|
|
147
122
|
default_config.rpcs.run_task.timeout = 20.0
|
@@ -175,19 +150,15 @@ module Google
|
|
175
150
|
##
|
176
151
|
# Create a new CloudTasks client object.
|
177
152
|
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
# To create a new CloudTasks client with the default
|
181
|
-
# configuration:
|
182
|
-
#
|
183
|
-
# client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
153
|
+
# @example
|
184
154
|
#
|
185
|
-
#
|
186
|
-
#
|
155
|
+
# # Create a client using the default configuration
|
156
|
+
# client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
187
157
|
#
|
188
|
-
#
|
189
|
-
#
|
190
|
-
#
|
158
|
+
# # Create a client using a custom configuration
|
159
|
+
# client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config|
|
160
|
+
# config.timeout = 10.0
|
161
|
+
# end
|
191
162
|
#
|
192
163
|
# @yield [config] Configure the CloudTasks client.
|
193
164
|
# @yieldparam config [Client::Configuration]
|
@@ -207,14 +178,13 @@ module Google
|
|
207
178
|
|
208
179
|
# Create credentials
|
209
180
|
credentials = @config.credentials
|
210
|
-
# Use self-signed JWT if the
|
181
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
211
182
|
# but only if the default endpoint does not have a region prefix.
|
212
|
-
enable_self_signed_jwt = @config.
|
213
|
-
@config.endpoint == Client.configure.endpoint &&
|
183
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
214
184
|
!@config.endpoint.split(".").first.include?("-")
|
215
185
|
credentials ||= Credentials.default scope: @config.scope,
|
216
186
|
enable_self_signed_jwt: enable_self_signed_jwt
|
217
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
187
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
218
188
|
credentials = Credentials.new credentials, scope: @config.scope
|
219
189
|
end
|
220
190
|
@quota_project_id = @config.quota_project
|
@@ -297,6 +267,27 @@ module Google
|
|
297
267
|
#
|
298
268
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
299
269
|
#
|
270
|
+
# @example Basic example
|
271
|
+
# require "google/cloud/tasks/v2beta3"
|
272
|
+
#
|
273
|
+
# # Create a client object. The client can be reused for multiple calls.
|
274
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
275
|
+
#
|
276
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
277
|
+
# request = Google::Cloud::Tasks::V2beta3::ListQueuesRequest.new
|
278
|
+
#
|
279
|
+
# # Call the list_queues method.
|
280
|
+
# result = client.list_queues request
|
281
|
+
#
|
282
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
283
|
+
# # iterate over all elements by calling #each, and the enumerable
|
284
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
285
|
+
# # methods are also available for managing paging directly.
|
286
|
+
# result.each do |response|
|
287
|
+
# # Each element is of type ::Google::Cloud::Tasks::V2beta3::Queue.
|
288
|
+
# p response
|
289
|
+
# end
|
290
|
+
#
|
300
291
|
def list_queues request, options = nil
|
301
292
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
302
293
|
|
@@ -314,16 +305,20 @@ module Google
|
|
314
305
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
315
306
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
316
307
|
|
317
|
-
header_params = {
|
318
|
-
|
319
|
-
|
308
|
+
header_params = {}
|
309
|
+
if request.parent
|
310
|
+
header_params["parent"] = request.parent
|
311
|
+
end
|
312
|
+
|
320
313
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
321
314
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
322
315
|
|
323
316
|
options.apply_defaults timeout: @config.rpcs.list_queues.timeout,
|
324
317
|
metadata: metadata,
|
325
318
|
retry_policy: @config.rpcs.list_queues.retry_policy
|
326
|
-
|
319
|
+
|
320
|
+
options.apply_defaults timeout: @config.timeout,
|
321
|
+
metadata: @config.metadata,
|
327
322
|
retry_policy: @config.retry_policy
|
328
323
|
|
329
324
|
@cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation|
|
@@ -370,6 +365,21 @@ module Google
|
|
370
365
|
#
|
371
366
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
372
367
|
#
|
368
|
+
# @example Basic example
|
369
|
+
# require "google/cloud/tasks/v2beta3"
|
370
|
+
#
|
371
|
+
# # Create a client object. The client can be reused for multiple calls.
|
372
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
373
|
+
#
|
374
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
375
|
+
# request = Google::Cloud::Tasks::V2beta3::GetQueueRequest.new
|
376
|
+
#
|
377
|
+
# # Call the get_queue method.
|
378
|
+
# result = client.get_queue request
|
379
|
+
#
|
380
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue.
|
381
|
+
# p result
|
382
|
+
#
|
373
383
|
def get_queue request, options = nil
|
374
384
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
375
385
|
|
@@ -387,16 +397,20 @@ module Google
|
|
387
397
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
388
398
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
389
399
|
|
390
|
-
header_params = {
|
391
|
-
|
392
|
-
|
400
|
+
header_params = {}
|
401
|
+
if request.name
|
402
|
+
header_params["name"] = request.name
|
403
|
+
end
|
404
|
+
|
393
405
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
394
406
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
395
407
|
|
396
408
|
options.apply_defaults timeout: @config.rpcs.get_queue.timeout,
|
397
409
|
metadata: metadata,
|
398
410
|
retry_policy: @config.rpcs.get_queue.retry_policy
|
399
|
-
|
411
|
+
|
412
|
+
options.apply_defaults timeout: @config.timeout,
|
413
|
+
metadata: @config.metadata,
|
400
414
|
retry_policy: @config.retry_policy
|
401
415
|
|
402
416
|
@cloud_tasks_stub.call_rpc :get_queue, request, options: options do |response, operation|
|
@@ -456,6 +470,21 @@ module Google
|
|
456
470
|
#
|
457
471
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
458
472
|
#
|
473
|
+
# @example Basic example
|
474
|
+
# require "google/cloud/tasks/v2beta3"
|
475
|
+
#
|
476
|
+
# # Create a client object. The client can be reused for multiple calls.
|
477
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
478
|
+
#
|
479
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
480
|
+
# request = Google::Cloud::Tasks::V2beta3::CreateQueueRequest.new
|
481
|
+
#
|
482
|
+
# # Call the create_queue method.
|
483
|
+
# result = client.create_queue request
|
484
|
+
#
|
485
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue.
|
486
|
+
# p result
|
487
|
+
#
|
459
488
|
def create_queue request, options = nil
|
460
489
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
461
490
|
|
@@ -473,16 +502,20 @@ module Google
|
|
473
502
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
474
503
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
475
504
|
|
476
|
-
header_params = {
|
477
|
-
|
478
|
-
|
505
|
+
header_params = {}
|
506
|
+
if request.parent
|
507
|
+
header_params["parent"] = request.parent
|
508
|
+
end
|
509
|
+
|
479
510
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
480
511
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
481
512
|
|
482
513
|
options.apply_defaults timeout: @config.rpcs.create_queue.timeout,
|
483
514
|
metadata: metadata,
|
484
515
|
retry_policy: @config.rpcs.create_queue.retry_policy
|
485
|
-
|
516
|
+
|
517
|
+
options.apply_defaults timeout: @config.timeout,
|
518
|
+
metadata: @config.metadata,
|
486
519
|
retry_policy: @config.retry_policy
|
487
520
|
|
488
521
|
@cloud_tasks_stub.call_rpc :create_queue, request, options: options do |response, operation|
|
@@ -546,6 +579,21 @@ module Google
|
|
546
579
|
#
|
547
580
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
548
581
|
#
|
582
|
+
# @example Basic example
|
583
|
+
# require "google/cloud/tasks/v2beta3"
|
584
|
+
#
|
585
|
+
# # Create a client object. The client can be reused for multiple calls.
|
586
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
587
|
+
#
|
588
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
589
|
+
# request = Google::Cloud::Tasks::V2beta3::UpdateQueueRequest.new
|
590
|
+
#
|
591
|
+
# # Call the update_queue method.
|
592
|
+
# result = client.update_queue request
|
593
|
+
#
|
594
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue.
|
595
|
+
# p result
|
596
|
+
#
|
549
597
|
def update_queue request, options = nil
|
550
598
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
551
599
|
|
@@ -563,16 +611,20 @@ module Google
|
|
563
611
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
564
612
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
565
613
|
|
566
|
-
header_params = {
|
567
|
-
|
568
|
-
|
614
|
+
header_params = {}
|
615
|
+
if request.queue&.name
|
616
|
+
header_params["queue.name"] = request.queue.name
|
617
|
+
end
|
618
|
+
|
569
619
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
570
620
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
571
621
|
|
572
622
|
options.apply_defaults timeout: @config.rpcs.update_queue.timeout,
|
573
623
|
metadata: metadata,
|
574
624
|
retry_policy: @config.rpcs.update_queue.retry_policy
|
575
|
-
|
625
|
+
|
626
|
+
options.apply_defaults timeout: @config.timeout,
|
627
|
+
metadata: @config.metadata,
|
576
628
|
retry_policy: @config.retry_policy
|
577
629
|
|
578
630
|
@cloud_tasks_stub.call_rpc :update_queue, request, options: options do |response, operation|
|
@@ -625,6 +677,21 @@ module Google
|
|
625
677
|
#
|
626
678
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
627
679
|
#
|
680
|
+
# @example Basic example
|
681
|
+
# require "google/cloud/tasks/v2beta3"
|
682
|
+
#
|
683
|
+
# # Create a client object. The client can be reused for multiple calls.
|
684
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
685
|
+
#
|
686
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
687
|
+
# request = Google::Cloud::Tasks::V2beta3::DeleteQueueRequest.new
|
688
|
+
#
|
689
|
+
# # Call the delete_queue method.
|
690
|
+
# result = client.delete_queue request
|
691
|
+
#
|
692
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
693
|
+
# p result
|
694
|
+
#
|
628
695
|
def delete_queue request, options = nil
|
629
696
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
630
697
|
|
@@ -642,16 +709,20 @@ module Google
|
|
642
709
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
643
710
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
644
711
|
|
645
|
-
header_params = {
|
646
|
-
|
647
|
-
|
712
|
+
header_params = {}
|
713
|
+
if request.name
|
714
|
+
header_params["name"] = request.name
|
715
|
+
end
|
716
|
+
|
648
717
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
649
718
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
650
719
|
|
651
720
|
options.apply_defaults timeout: @config.rpcs.delete_queue.timeout,
|
652
721
|
metadata: metadata,
|
653
722
|
retry_policy: @config.rpcs.delete_queue.retry_policy
|
654
|
-
|
723
|
+
|
724
|
+
options.apply_defaults timeout: @config.timeout,
|
725
|
+
metadata: @config.metadata,
|
655
726
|
retry_policy: @config.retry_policy
|
656
727
|
|
657
728
|
@cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation|
|
@@ -697,6 +768,21 @@ module Google
|
|
697
768
|
#
|
698
769
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
699
770
|
#
|
771
|
+
# @example Basic example
|
772
|
+
# require "google/cloud/tasks/v2beta3"
|
773
|
+
#
|
774
|
+
# # Create a client object. The client can be reused for multiple calls.
|
775
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
776
|
+
#
|
777
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
778
|
+
# request = Google::Cloud::Tasks::V2beta3::PurgeQueueRequest.new
|
779
|
+
#
|
780
|
+
# # Call the purge_queue method.
|
781
|
+
# result = client.purge_queue request
|
782
|
+
#
|
783
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue.
|
784
|
+
# p result
|
785
|
+
#
|
700
786
|
def purge_queue request, options = nil
|
701
787
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
702
788
|
|
@@ -714,16 +800,20 @@ module Google
|
|
714
800
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
715
801
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
716
802
|
|
717
|
-
header_params = {
|
718
|
-
|
719
|
-
|
803
|
+
header_params = {}
|
804
|
+
if request.name
|
805
|
+
header_params["name"] = request.name
|
806
|
+
end
|
807
|
+
|
720
808
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
721
809
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
722
810
|
|
723
811
|
options.apply_defaults timeout: @config.rpcs.purge_queue.timeout,
|
724
812
|
metadata: metadata,
|
725
813
|
retry_policy: @config.rpcs.purge_queue.retry_policy
|
726
|
-
|
814
|
+
|
815
|
+
options.apply_defaults timeout: @config.timeout,
|
816
|
+
metadata: @config.metadata,
|
727
817
|
retry_policy: @config.retry_policy
|
728
818
|
|
729
819
|
@cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation|
|
@@ -770,6 +860,21 @@ module Google
|
|
770
860
|
#
|
771
861
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
772
862
|
#
|
863
|
+
# @example Basic example
|
864
|
+
# require "google/cloud/tasks/v2beta3"
|
865
|
+
#
|
866
|
+
# # Create a client object. The client can be reused for multiple calls.
|
867
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
868
|
+
#
|
869
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
870
|
+
# request = Google::Cloud::Tasks::V2beta3::PauseQueueRequest.new
|
871
|
+
#
|
872
|
+
# # Call the pause_queue method.
|
873
|
+
# result = client.pause_queue request
|
874
|
+
#
|
875
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue.
|
876
|
+
# p result
|
877
|
+
#
|
773
878
|
def pause_queue request, options = nil
|
774
879
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
775
880
|
|
@@ -787,16 +892,20 @@ module Google
|
|
787
892
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
788
893
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
789
894
|
|
790
|
-
header_params = {
|
791
|
-
|
792
|
-
|
895
|
+
header_params = {}
|
896
|
+
if request.name
|
897
|
+
header_params["name"] = request.name
|
898
|
+
end
|
899
|
+
|
793
900
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
794
901
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
795
902
|
|
796
903
|
options.apply_defaults timeout: @config.rpcs.pause_queue.timeout,
|
797
904
|
metadata: metadata,
|
798
905
|
retry_policy: @config.rpcs.pause_queue.retry_policy
|
799
|
-
|
906
|
+
|
907
|
+
options.apply_defaults timeout: @config.timeout,
|
908
|
+
metadata: @config.metadata,
|
800
909
|
retry_policy: @config.retry_policy
|
801
910
|
|
802
911
|
@cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation|
|
@@ -849,6 +958,21 @@ module Google
|
|
849
958
|
#
|
850
959
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
851
960
|
#
|
961
|
+
# @example Basic example
|
962
|
+
# require "google/cloud/tasks/v2beta3"
|
963
|
+
#
|
964
|
+
# # Create a client object. The client can be reused for multiple calls.
|
965
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
966
|
+
#
|
967
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
968
|
+
# request = Google::Cloud::Tasks::V2beta3::ResumeQueueRequest.new
|
969
|
+
#
|
970
|
+
# # Call the resume_queue method.
|
971
|
+
# result = client.resume_queue request
|
972
|
+
#
|
973
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta3::Queue.
|
974
|
+
# p result
|
975
|
+
#
|
852
976
|
def resume_queue request, options = nil
|
853
977
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
854
978
|
|
@@ -866,16 +990,20 @@ module Google
|
|
866
990
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
867
991
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
868
992
|
|
869
|
-
header_params = {
|
870
|
-
|
871
|
-
|
993
|
+
header_params = {}
|
994
|
+
if request.name
|
995
|
+
header_params["name"] = request.name
|
996
|
+
end
|
997
|
+
|
872
998
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
873
999
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
874
1000
|
|
875
1001
|
options.apply_defaults timeout: @config.rpcs.resume_queue.timeout,
|
876
1002
|
metadata: metadata,
|
877
1003
|
retry_policy: @config.rpcs.resume_queue.retry_policy
|
878
|
-
|
1004
|
+
|
1005
|
+
options.apply_defaults timeout: @config.timeout,
|
1006
|
+
metadata: @config.metadata,
|
879
1007
|
retry_policy: @config.retry_policy
|
880
1008
|
|
881
1009
|
@cloud_tasks_stub.call_rpc :resume_queue, request, options: options do |response, operation|
|
@@ -927,6 +1055,21 @@ module Google
|
|
927
1055
|
#
|
928
1056
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
929
1057
|
#
|
1058
|
+
# @example Basic example
|
1059
|
+
# require "google/cloud/tasks/v2beta3"
|
1060
|
+
#
|
1061
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1062
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
1063
|
+
#
|
1064
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1065
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
1066
|
+
#
|
1067
|
+
# # Call the get_iam_policy method.
|
1068
|
+
# result = client.get_iam_policy request
|
1069
|
+
#
|
1070
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1071
|
+
# p result
|
1072
|
+
#
|
930
1073
|
def get_iam_policy request, options = nil
|
931
1074
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
932
1075
|
|
@@ -944,16 +1087,20 @@ module Google
|
|
944
1087
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
945
1088
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
946
1089
|
|
947
|
-
header_params = {
|
948
|
-
|
949
|
-
|
1090
|
+
header_params = {}
|
1091
|
+
if request.resource
|
1092
|
+
header_params["resource"] = request.resource
|
1093
|
+
end
|
1094
|
+
|
950
1095
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
951
1096
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
952
1097
|
|
953
1098
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
954
1099
|
metadata: metadata,
|
955
1100
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
956
|
-
|
1101
|
+
|
1102
|
+
options.apply_defaults timeout: @config.timeout,
|
1103
|
+
metadata: @config.metadata,
|
957
1104
|
retry_policy: @config.retry_policy
|
958
1105
|
|
959
1106
|
@cloud_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -1009,6 +1156,21 @@ module Google
|
|
1009
1156
|
#
|
1010
1157
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1011
1158
|
#
|
1159
|
+
# @example Basic example
|
1160
|
+
# require "google/cloud/tasks/v2beta3"
|
1161
|
+
#
|
1162
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1163
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
1164
|
+
#
|
1165
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1166
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
1167
|
+
#
|
1168
|
+
# # Call the set_iam_policy method.
|
1169
|
+
# result = client.set_iam_policy request
|
1170
|
+
#
|
1171
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1172
|
+
# p result
|
1173
|
+
#
|
1012
1174
|
def set_iam_policy request, options = nil
|
1013
1175
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1014
1176
|
|
@@ -1026,16 +1188,20 @@ module Google
|
|
1026
1188
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1027
1189
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1028
1190
|
|
1029
|
-
header_params = {
|
1030
|
-
|
1031
|
-
|
1191
|
+
header_params = {}
|
1192
|
+
if request.resource
|
1193
|
+
header_params["resource"] = request.resource
|
1194
|
+
end
|
1195
|
+
|
1032
1196
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1033
1197
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1034
1198
|
|
1035
1199
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1036
1200
|
metadata: metadata,
|
1037
1201
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1038
|
-
|
1202
|
+
|
1203
|
+
options.apply_defaults timeout: @config.timeout,
|
1204
|
+
metadata: @config.metadata,
|
1039
1205
|
retry_policy: @config.retry_policy
|
1040
1206
|
|
1041
1207
|
@cloud_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -1087,6 +1253,21 @@ module Google
|
|
1087
1253
|
#
|
1088
1254
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1089
1255
|
#
|
1256
|
+
# @example Basic example
|
1257
|
+
# require "google/cloud/tasks/v2beta3"
|
1258
|
+
#
|
1259
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1260
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
1261
|
+
#
|
1262
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1263
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
1264
|
+
#
|
1265
|
+
# # Call the test_iam_permissions method.
|
1266
|
+
# result = client.test_iam_permissions request
|
1267
|
+
#
|
1268
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
1269
|
+
# p result
|
1270
|
+
#
|
1090
1271
|
def test_iam_permissions request, options = nil
|
1091
1272
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1092
1273
|
|
@@ -1104,16 +1285,20 @@ module Google
|
|
1104
1285
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1105
1286
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1106
1287
|
|
1107
|
-
header_params = {
|
1108
|
-
|
1109
|
-
|
1288
|
+
header_params = {}
|
1289
|
+
if request.resource
|
1290
|
+
header_params["resource"] = request.resource
|
1291
|
+
end
|
1292
|
+
|
1110
1293
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1111
1294
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1112
1295
|
|
1113
1296
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1114
1297
|
metadata: metadata,
|
1115
1298
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1116
|
-
|
1299
|
+
|
1300
|
+
options.apply_defaults timeout: @config.timeout,
|
1301
|
+
metadata: @config.metadata,
|
1117
1302
|
retry_policy: @config.retry_policy
|
1118
1303
|
|
1119
1304
|
@cloud_tasks_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -1194,6 +1379,27 @@ module Google
|
|
1194
1379
|
#
|
1195
1380
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1196
1381
|
#
|
1382
|
+
# @example Basic example
|
1383
|
+
# require "google/cloud/tasks/v2beta3"
|
1384
|
+
#
|
1385
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1386
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
1387
|
+
#
|
1388
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1389
|
+
# request = Google::Cloud::Tasks::V2beta3::ListTasksRequest.new
|
1390
|
+
#
|
1391
|
+
# # Call the list_tasks method.
|
1392
|
+
# result = client.list_tasks request
|
1393
|
+
#
|
1394
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1395
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1396
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1397
|
+
# # methods are also available for managing paging directly.
|
1398
|
+
# result.each do |response|
|
1399
|
+
# # Each element is of type ::Google::Cloud::Tasks::V2beta3::Task.
|
1400
|
+
# p response
|
1401
|
+
# end
|
1402
|
+
#
|
1197
1403
|
def list_tasks request, options = nil
|
1198
1404
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1199
1405
|
|
@@ -1211,16 +1417,20 @@ module Google
|
|
1211
1417
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1212
1418
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1213
1419
|
|
1214
|
-
header_params = {
|
1215
|
-
|
1216
|
-
|
1420
|
+
header_params = {}
|
1421
|
+
if request.parent
|
1422
|
+
header_params["parent"] = request.parent
|
1423
|
+
end
|
1424
|
+
|
1217
1425
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1218
1426
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1219
1427
|
|
1220
1428
|
options.apply_defaults timeout: @config.rpcs.list_tasks.timeout,
|
1221
1429
|
metadata: metadata,
|
1222
1430
|
retry_policy: @config.rpcs.list_tasks.retry_policy
|
1223
|
-
|
1431
|
+
|
1432
|
+
options.apply_defaults timeout: @config.timeout,
|
1433
|
+
metadata: @config.metadata,
|
1224
1434
|
retry_policy: @config.retry_policy
|
1225
1435
|
|
1226
1436
|
@cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation|
|
@@ -1275,6 +1485,21 @@ module Google
|
|
1275
1485
|
#
|
1276
1486
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1277
1487
|
#
|
1488
|
+
# @example Basic example
|
1489
|
+
# require "google/cloud/tasks/v2beta3"
|
1490
|
+
#
|
1491
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1492
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
1493
|
+
#
|
1494
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1495
|
+
# request = Google::Cloud::Tasks::V2beta3::GetTaskRequest.new
|
1496
|
+
#
|
1497
|
+
# # Call the get_task method.
|
1498
|
+
# result = client.get_task request
|
1499
|
+
#
|
1500
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta3::Task.
|
1501
|
+
# p result
|
1502
|
+
#
|
1278
1503
|
def get_task request, options = nil
|
1279
1504
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1280
1505
|
|
@@ -1292,16 +1517,20 @@ module Google
|
|
1292
1517
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1293
1518
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1294
1519
|
|
1295
|
-
header_params = {
|
1296
|
-
|
1297
|
-
|
1520
|
+
header_params = {}
|
1521
|
+
if request.name
|
1522
|
+
header_params["name"] = request.name
|
1523
|
+
end
|
1524
|
+
|
1298
1525
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1299
1526
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1300
1527
|
|
1301
1528
|
options.apply_defaults timeout: @config.rpcs.get_task.timeout,
|
1302
1529
|
metadata: metadata,
|
1303
1530
|
retry_policy: @config.rpcs.get_task.retry_policy
|
1304
|
-
|
1531
|
+
|
1532
|
+
options.apply_defaults timeout: @config.timeout,
|
1533
|
+
metadata: @config.metadata,
|
1305
1534
|
retry_policy: @config.retry_policy
|
1306
1535
|
|
1307
1536
|
@cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation|
|
@@ -1395,6 +1624,21 @@ module Google
|
|
1395
1624
|
#
|
1396
1625
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1397
1626
|
#
|
1627
|
+
# @example Basic example
|
1628
|
+
# require "google/cloud/tasks/v2beta3"
|
1629
|
+
#
|
1630
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1631
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
1632
|
+
#
|
1633
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1634
|
+
# request = Google::Cloud::Tasks::V2beta3::CreateTaskRequest.new
|
1635
|
+
#
|
1636
|
+
# # Call the create_task method.
|
1637
|
+
# result = client.create_task request
|
1638
|
+
#
|
1639
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta3::Task.
|
1640
|
+
# p result
|
1641
|
+
#
|
1398
1642
|
def create_task request, options = nil
|
1399
1643
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1400
1644
|
|
@@ -1412,16 +1656,20 @@ module Google
|
|
1412
1656
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1413
1657
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1414
1658
|
|
1415
|
-
header_params = {
|
1416
|
-
|
1417
|
-
|
1659
|
+
header_params = {}
|
1660
|
+
if request.parent
|
1661
|
+
header_params["parent"] = request.parent
|
1662
|
+
end
|
1663
|
+
|
1418
1664
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1419
1665
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1420
1666
|
|
1421
1667
|
options.apply_defaults timeout: @config.rpcs.create_task.timeout,
|
1422
1668
|
metadata: metadata,
|
1423
1669
|
retry_policy: @config.rpcs.create_task.retry_policy
|
1424
|
-
|
1670
|
+
|
1671
|
+
options.apply_defaults timeout: @config.timeout,
|
1672
|
+
metadata: @config.metadata,
|
1425
1673
|
retry_policy: @config.retry_policy
|
1426
1674
|
|
1427
1675
|
@cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation|
|
@@ -1466,6 +1714,21 @@ module Google
|
|
1466
1714
|
#
|
1467
1715
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1468
1716
|
#
|
1717
|
+
# @example Basic example
|
1718
|
+
# require "google/cloud/tasks/v2beta3"
|
1719
|
+
#
|
1720
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1721
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
1722
|
+
#
|
1723
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1724
|
+
# request = Google::Cloud::Tasks::V2beta3::DeleteTaskRequest.new
|
1725
|
+
#
|
1726
|
+
# # Call the delete_task method.
|
1727
|
+
# result = client.delete_task request
|
1728
|
+
#
|
1729
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1730
|
+
# p result
|
1731
|
+
#
|
1469
1732
|
def delete_task request, options = nil
|
1470
1733
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1471
1734
|
|
@@ -1483,16 +1746,20 @@ module Google
|
|
1483
1746
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1484
1747
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1485
1748
|
|
1486
|
-
header_params = {
|
1487
|
-
|
1488
|
-
|
1749
|
+
header_params = {}
|
1750
|
+
if request.name
|
1751
|
+
header_params["name"] = request.name
|
1752
|
+
end
|
1753
|
+
|
1489
1754
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1490
1755
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1491
1756
|
|
1492
1757
|
options.apply_defaults timeout: @config.rpcs.delete_task.timeout,
|
1493
1758
|
metadata: metadata,
|
1494
1759
|
retry_policy: @config.rpcs.delete_task.retry_policy
|
1495
|
-
|
1760
|
+
|
1761
|
+
options.apply_defaults timeout: @config.timeout,
|
1762
|
+
metadata: @config.metadata,
|
1496
1763
|
retry_policy: @config.retry_policy
|
1497
1764
|
|
1498
1765
|
@cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation|
|
@@ -1569,6 +1836,21 @@ module Google
|
|
1569
1836
|
#
|
1570
1837
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1571
1838
|
#
|
1839
|
+
# @example Basic example
|
1840
|
+
# require "google/cloud/tasks/v2beta3"
|
1841
|
+
#
|
1842
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1843
|
+
# client = Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new
|
1844
|
+
#
|
1845
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1846
|
+
# request = Google::Cloud::Tasks::V2beta3::RunTaskRequest.new
|
1847
|
+
#
|
1848
|
+
# # Call the run_task method.
|
1849
|
+
# result = client.run_task request
|
1850
|
+
#
|
1851
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta3::Task.
|
1852
|
+
# p result
|
1853
|
+
#
|
1572
1854
|
def run_task request, options = nil
|
1573
1855
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1574
1856
|
|
@@ -1586,16 +1868,20 @@ module Google
|
|
1586
1868
|
gapic_version: ::Google::Cloud::Tasks::V2beta3::VERSION
|
1587
1869
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1588
1870
|
|
1589
|
-
header_params = {
|
1590
|
-
|
1591
|
-
|
1871
|
+
header_params = {}
|
1872
|
+
if request.name
|
1873
|
+
header_params["name"] = request.name
|
1874
|
+
end
|
1875
|
+
|
1592
1876
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1593
1877
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1594
1878
|
|
1595
1879
|
options.apply_defaults timeout: @config.rpcs.run_task.timeout,
|
1596
1880
|
metadata: metadata,
|
1597
1881
|
retry_policy: @config.rpcs.run_task.retry_policy
|
1598
|
-
|
1882
|
+
|
1883
|
+
options.apply_defaults timeout: @config.timeout,
|
1884
|
+
metadata: @config.metadata,
|
1599
1885
|
retry_policy: @config.retry_policy
|
1600
1886
|
|
1601
1887
|
@cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation|
|
@@ -1619,22 +1905,21 @@ module Google
|
|
1619
1905
|
# Configuration can be applied globally to all clients, or to a single client
|
1620
1906
|
# on construction.
|
1621
1907
|
#
|
1622
|
-
#
|
1623
|
-
#
|
1624
|
-
#
|
1625
|
-
# to 20 seconds,
|
1626
|
-
#
|
1627
|
-
#
|
1628
|
-
#
|
1629
|
-
#
|
1630
|
-
#
|
1631
|
-
#
|
1632
|
-
#
|
1633
|
-
#
|
1634
|
-
#
|
1635
|
-
#
|
1636
|
-
#
|
1637
|
-
# end
|
1908
|
+
# @example
|
1909
|
+
#
|
1910
|
+
# # Modify the global config, setting the timeout for
|
1911
|
+
# # list_queues to 20 seconds,
|
1912
|
+
# # and all remaining timeouts to 10 seconds.
|
1913
|
+
# ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.configure do |config|
|
1914
|
+
# config.timeout = 10.0
|
1915
|
+
# config.rpcs.list_queues.timeout = 20.0
|
1916
|
+
# end
|
1917
|
+
#
|
1918
|
+
# # Apply the above configuration only to a new client.
|
1919
|
+
# client = ::Google::Cloud::Tasks::V2beta3::CloudTasks::Client.new do |config|
|
1920
|
+
# config.timeout = 10.0
|
1921
|
+
# config.rpcs.list_queues.timeout = 20.0
|
1922
|
+
# end
|
1638
1923
|
#
|
1639
1924
|
# @!attribute [rw] endpoint
|
1640
1925
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/tasks/v2beta3/cloudtasks.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -13,6 +11,8 @@ require 'google/iam/v1/iam_policy_pb'
|
|
13
11
|
require 'google/iam/v1/policy_pb'
|
14
12
|
require 'google/protobuf/empty_pb'
|
15
13
|
require 'google/protobuf/field_mask_pb'
|
14
|
+
require 'google/protobuf'
|
15
|
+
|
16
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
17
|
add_file("google/cloud/tasks/v2beta3/cloudtasks.proto", :syntax => :proto3) do
|
18
18
|
add_message "google.cloud.tasks.v2beta3.ListQueuesRequest" do
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/tasks/v2beta3/queue.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/field_behavior_pb'
|
7
5
|
require 'google/api/resource_pb'
|
8
6
|
require 'google/cloud/tasks/v2beta3/target_pb'
|
9
7
|
require 'google/protobuf/duration_pb'
|
10
8
|
require 'google/protobuf/timestamp_pb'
|
11
9
|
require 'google/api/annotations_pb'
|
10
|
+
require 'google/protobuf'
|
11
|
+
|
12
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
13
|
add_file("google/cloud/tasks/v2beta3/queue.proto", :syntax => :proto3) do
|
14
14
|
add_message "google.cloud.tasks.v2beta3.Queue" do
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/tasks/v2beta3/target.proto
|
3
3
|
|
4
|
+
require 'google/api/annotations_pb'
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
require 'google/api/annotations_pb'
|
7
7
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
8
|
add_file("google/cloud/tasks/v2beta3/target.proto", :syntax => :proto3) do
|
9
9
|
add_message "google.cloud.tasks.v2beta3.PullMessage" do
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/tasks/v2beta3/task.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/resource_pb'
|
7
5
|
require 'google/cloud/tasks/v2beta3/target_pb'
|
8
6
|
require 'google/protobuf/duration_pb'
|
9
7
|
require 'google/protobuf/timestamp_pb'
|
10
8
|
require 'google/rpc/status_pb'
|
11
9
|
require 'google/api/annotations_pb'
|
10
|
+
require 'google/protobuf'
|
11
|
+
|
12
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
13
|
add_file("google/cloud/tasks/v2beta3/task.proto", :syntax => :proto3) do
|
14
14
|
add_message "google.cloud.tasks.v2beta3.Task" do
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -107,8 +107,8 @@ module Google
|
|
107
107
|
# {::Google::Cloud::Tasks::V2beta3::HttpRequest#url HttpRequest.url}.
|
108
108
|
# * Content-Length: This will be computed by Cloud Tasks.
|
109
109
|
# * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
|
110
|
-
# * X-Google
|
111
|
-
# * X-AppEngine
|
110
|
+
# * `X-Google-*`: Google use only.
|
111
|
+
# * `X-AppEngine-*`: Google use only.
|
112
112
|
#
|
113
113
|
# `Content-Type` won't be set by Cloud Tasks. You can explicitly set
|
114
114
|
# `Content-Type` to a media type when the
|
@@ -19,30 +19,53 @@
|
|
19
19
|
|
20
20
|
module Google
|
21
21
|
module Type
|
22
|
-
# Represents
|
22
|
+
# Represents a textual expression in the Common Expression Language (CEL)
|
23
|
+
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
|
24
|
+
# are documented at https://github.com/google/cel-spec.
|
23
25
|
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
26
|
+
# Example (Comparison):
|
27
|
+
#
|
28
|
+
# title: "Summary size limit"
|
29
|
+
# description: "Determines if a summary is less than 100 chars"
|
30
|
+
# expression: "document.summary.size() < 100"
|
31
|
+
#
|
32
|
+
# Example (Equality):
|
33
|
+
#
|
34
|
+
# title: "Requestor is owner"
|
35
|
+
# description: "Determines if requestor is the document owner"
|
36
|
+
# expression: "document.owner == request.auth.claims.email"
|
37
|
+
#
|
38
|
+
# Example (Logic):
|
39
|
+
#
|
40
|
+
# title: "Public documents"
|
41
|
+
# description: "Determine whether the document should be publicly visible"
|
42
|
+
# expression: "document.type != 'private' && document.type != 'internal'"
|
43
|
+
#
|
44
|
+
# Example (Data Manipulation):
|
45
|
+
#
|
46
|
+
# title: "Notification string"
|
47
|
+
# description: "Create a notification string with a timestamp."
|
48
|
+
# expression: "'New message received at ' + string(document.create_time)"
|
49
|
+
#
|
50
|
+
# The exact variables and functions that may be referenced within an expression
|
51
|
+
# are determined by the service that evaluates it. See the service
|
52
|
+
# documentation for additional information.
|
27
53
|
# @!attribute [rw] expression
|
28
54
|
# @return [::String]
|
29
|
-
# Textual representation of an expression in
|
30
|
-
#
|
31
|
-
#
|
32
|
-
# The application context of the containing message determines which
|
33
|
-
# well-known feature set of CEL is supported.
|
55
|
+
# Textual representation of an expression in Common Expression Language
|
56
|
+
# syntax.
|
34
57
|
# @!attribute [rw] title
|
35
58
|
# @return [::String]
|
36
|
-
#
|
59
|
+
# Optional. Title for the expression, i.e. a short string describing
|
37
60
|
# its purpose. This can be used e.g. in UIs which allow to enter the
|
38
61
|
# expression.
|
39
62
|
# @!attribute [rw] description
|
40
63
|
# @return [::String]
|
41
|
-
#
|
64
|
+
# Optional. Description of the expression. This is a longer text which
|
42
65
|
# describes the expression, e.g. when hovered over it in a UI.
|
43
66
|
# @!attribute [rw] location
|
44
67
|
# @return [::String]
|
45
|
-
#
|
68
|
+
# Optional. String indicating the location of the expression for error
|
46
69
|
# reporting, e.g. a file name and a position in the file.
|
47
70
|
class Expr
|
48
71
|
include ::Google::Protobuf::MessageExts
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-tasks-v2beta3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|