google-cloud-tasks-v2beta2 0.5.1 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +15 -33
- data/README.md +1 -1
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb +510 -149
- data/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb +2 -2
- data/lib/google/cloud/tasks/v2beta2/queue_pb.rb +2 -2
- data/lib/google/cloud/tasks/v2beta2/target_pb.rb +1 -1
- data/lib/google/cloud/tasks/v2beta2/task_pb.rb +2 -2
- data/lib/google/cloud/tasks/v2beta2/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +5 -6
- data/lib/google/cloud/tasks/v2beta2/old_target_pb.rb +0 -20
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Tasks::V2beta2::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::V2beta2::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: [14, 4]
|
70
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
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: [14, 4]
|
75
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
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: [14, 4]
|
84
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
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: [14, 4]
|
95
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
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: [14, 4]
|
102
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
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: [14, 4]
|
107
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
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: [14, 4]
|
112
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
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: [14, 4]
|
119
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14, 4]
|
145
120
|
}
|
146
121
|
|
147
122
|
default_config.rpcs.lease_tasks.timeout = 20.0
|
@@ -183,19 +158,15 @@ module Google
|
|
183
158
|
##
|
184
159
|
# Create a new CloudTasks client object.
|
185
160
|
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
# To create a new CloudTasks client with the default
|
189
|
-
# configuration:
|
190
|
-
#
|
191
|
-
# client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
161
|
+
# @example
|
192
162
|
#
|
193
|
-
#
|
194
|
-
#
|
163
|
+
# # Create a client using the default configuration
|
164
|
+
# client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
195
165
|
#
|
196
|
-
#
|
197
|
-
#
|
198
|
-
#
|
166
|
+
# # Create a client using a custom configuration
|
167
|
+
# client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config|
|
168
|
+
# config.timeout = 10.0
|
169
|
+
# end
|
199
170
|
#
|
200
171
|
# @yield [config] Configure the CloudTasks client.
|
201
172
|
# @yieldparam config [Client::Configuration]
|
@@ -215,14 +186,13 @@ module Google
|
|
215
186
|
|
216
187
|
# Create credentials
|
217
188
|
credentials = @config.credentials
|
218
|
-
# Use self-signed JWT if the
|
189
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
219
190
|
# but only if the default endpoint does not have a region prefix.
|
220
|
-
enable_self_signed_jwt = @config.
|
221
|
-
@config.endpoint == Client.configure.endpoint &&
|
191
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
222
192
|
!@config.endpoint.split(".").first.include?("-")
|
223
193
|
credentials ||= Credentials.default scope: @config.scope,
|
224
194
|
enable_self_signed_jwt: enable_self_signed_jwt
|
225
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
195
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
226
196
|
credentials = Credentials.new credentials, scope: @config.scope
|
227
197
|
end
|
228
198
|
@quota_project_id = @config.quota_project
|
@@ -305,6 +275,27 @@ module Google
|
|
305
275
|
#
|
306
276
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
307
277
|
#
|
278
|
+
# @example Basic example
|
279
|
+
# require "google/cloud/tasks/v2beta2"
|
280
|
+
#
|
281
|
+
# # Create a client object. The client can be reused for multiple calls.
|
282
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
283
|
+
#
|
284
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
285
|
+
# request = Google::Cloud::Tasks::V2beta2::ListQueuesRequest.new
|
286
|
+
#
|
287
|
+
# # Call the list_queues method.
|
288
|
+
# result = client.list_queues request
|
289
|
+
#
|
290
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
291
|
+
# # iterate over all elements by calling #each, and the enumerable
|
292
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
293
|
+
# # methods are also available for managing paging directly.
|
294
|
+
# result.each do |response|
|
295
|
+
# # Each element is of type ::Google::Cloud::Tasks::V2beta2::Queue.
|
296
|
+
# p response
|
297
|
+
# end
|
298
|
+
#
|
308
299
|
def list_queues request, options = nil
|
309
300
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
310
301
|
|
@@ -322,16 +313,20 @@ module Google
|
|
322
313
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
323
314
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
324
315
|
|
325
|
-
header_params = {
|
326
|
-
|
327
|
-
|
316
|
+
header_params = {}
|
317
|
+
if request.parent
|
318
|
+
header_params["parent"] = request.parent
|
319
|
+
end
|
320
|
+
|
328
321
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
329
322
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
330
323
|
|
331
324
|
options.apply_defaults timeout: @config.rpcs.list_queues.timeout,
|
332
325
|
metadata: metadata,
|
333
326
|
retry_policy: @config.rpcs.list_queues.retry_policy
|
334
|
-
|
327
|
+
|
328
|
+
options.apply_defaults timeout: @config.timeout,
|
329
|
+
metadata: @config.metadata,
|
335
330
|
retry_policy: @config.retry_policy
|
336
331
|
|
337
332
|
@cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation|
|
@@ -378,6 +373,21 @@ module Google
|
|
378
373
|
#
|
379
374
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
380
375
|
#
|
376
|
+
# @example Basic example
|
377
|
+
# require "google/cloud/tasks/v2beta2"
|
378
|
+
#
|
379
|
+
# # Create a client object. The client can be reused for multiple calls.
|
380
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
381
|
+
#
|
382
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
383
|
+
# request = Google::Cloud::Tasks::V2beta2::GetQueueRequest.new
|
384
|
+
#
|
385
|
+
# # Call the get_queue method.
|
386
|
+
# result = client.get_queue request
|
387
|
+
#
|
388
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue.
|
389
|
+
# p result
|
390
|
+
#
|
381
391
|
def get_queue request, options = nil
|
382
392
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
383
393
|
|
@@ -395,16 +405,20 @@ module Google
|
|
395
405
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
396
406
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
397
407
|
|
398
|
-
header_params = {
|
399
|
-
|
400
|
-
|
408
|
+
header_params = {}
|
409
|
+
if request.name
|
410
|
+
header_params["name"] = request.name
|
411
|
+
end
|
412
|
+
|
401
413
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
402
414
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
403
415
|
|
404
416
|
options.apply_defaults timeout: @config.rpcs.get_queue.timeout,
|
405
417
|
metadata: metadata,
|
406
418
|
retry_policy: @config.rpcs.get_queue.retry_policy
|
407
|
-
|
419
|
+
|
420
|
+
options.apply_defaults timeout: @config.timeout,
|
421
|
+
metadata: @config.metadata,
|
408
422
|
retry_policy: @config.retry_policy
|
409
423
|
|
410
424
|
@cloud_tasks_stub.call_rpc :get_queue, request, options: options do |response, operation|
|
@@ -464,6 +478,21 @@ module Google
|
|
464
478
|
#
|
465
479
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
466
480
|
#
|
481
|
+
# @example Basic example
|
482
|
+
# require "google/cloud/tasks/v2beta2"
|
483
|
+
#
|
484
|
+
# # Create a client object. The client can be reused for multiple calls.
|
485
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
486
|
+
#
|
487
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
488
|
+
# request = Google::Cloud::Tasks::V2beta2::CreateQueueRequest.new
|
489
|
+
#
|
490
|
+
# # Call the create_queue method.
|
491
|
+
# result = client.create_queue request
|
492
|
+
#
|
493
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue.
|
494
|
+
# p result
|
495
|
+
#
|
467
496
|
def create_queue request, options = nil
|
468
497
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
469
498
|
|
@@ -481,16 +510,20 @@ module Google
|
|
481
510
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
482
511
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
483
512
|
|
484
|
-
header_params = {
|
485
|
-
|
486
|
-
|
513
|
+
header_params = {}
|
514
|
+
if request.parent
|
515
|
+
header_params["parent"] = request.parent
|
516
|
+
end
|
517
|
+
|
487
518
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
488
519
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
489
520
|
|
490
521
|
options.apply_defaults timeout: @config.rpcs.create_queue.timeout,
|
491
522
|
metadata: metadata,
|
492
523
|
retry_policy: @config.rpcs.create_queue.retry_policy
|
493
|
-
|
524
|
+
|
525
|
+
options.apply_defaults timeout: @config.timeout,
|
526
|
+
metadata: @config.metadata,
|
494
527
|
retry_policy: @config.retry_policy
|
495
528
|
|
496
529
|
@cloud_tasks_stub.call_rpc :create_queue, request, options: options do |response, operation|
|
@@ -554,6 +587,21 @@ module Google
|
|
554
587
|
#
|
555
588
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
556
589
|
#
|
590
|
+
# @example Basic example
|
591
|
+
# require "google/cloud/tasks/v2beta2"
|
592
|
+
#
|
593
|
+
# # Create a client object. The client can be reused for multiple calls.
|
594
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
595
|
+
#
|
596
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
597
|
+
# request = Google::Cloud::Tasks::V2beta2::UpdateQueueRequest.new
|
598
|
+
#
|
599
|
+
# # Call the update_queue method.
|
600
|
+
# result = client.update_queue request
|
601
|
+
#
|
602
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue.
|
603
|
+
# p result
|
604
|
+
#
|
557
605
|
def update_queue request, options = nil
|
558
606
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
559
607
|
|
@@ -571,16 +619,20 @@ module Google
|
|
571
619
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
572
620
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
573
621
|
|
574
|
-
header_params = {
|
575
|
-
|
576
|
-
|
622
|
+
header_params = {}
|
623
|
+
if request.queue&.name
|
624
|
+
header_params["queue.name"] = request.queue.name
|
625
|
+
end
|
626
|
+
|
577
627
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
578
628
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
579
629
|
|
580
630
|
options.apply_defaults timeout: @config.rpcs.update_queue.timeout,
|
581
631
|
metadata: metadata,
|
582
632
|
retry_policy: @config.rpcs.update_queue.retry_policy
|
583
|
-
|
633
|
+
|
634
|
+
options.apply_defaults timeout: @config.timeout,
|
635
|
+
metadata: @config.metadata,
|
584
636
|
retry_policy: @config.retry_policy
|
585
637
|
|
586
638
|
@cloud_tasks_stub.call_rpc :update_queue, request, options: options do |response, operation|
|
@@ -633,6 +685,21 @@ module Google
|
|
633
685
|
#
|
634
686
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
635
687
|
#
|
688
|
+
# @example Basic example
|
689
|
+
# require "google/cloud/tasks/v2beta2"
|
690
|
+
#
|
691
|
+
# # Create a client object. The client can be reused for multiple calls.
|
692
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
693
|
+
#
|
694
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
695
|
+
# request = Google::Cloud::Tasks::V2beta2::DeleteQueueRequest.new
|
696
|
+
#
|
697
|
+
# # Call the delete_queue method.
|
698
|
+
# result = client.delete_queue request
|
699
|
+
#
|
700
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
701
|
+
# p result
|
702
|
+
#
|
636
703
|
def delete_queue request, options = nil
|
637
704
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
638
705
|
|
@@ -650,16 +717,20 @@ module Google
|
|
650
717
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
651
718
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
652
719
|
|
653
|
-
header_params = {
|
654
|
-
|
655
|
-
|
720
|
+
header_params = {}
|
721
|
+
if request.name
|
722
|
+
header_params["name"] = request.name
|
723
|
+
end
|
724
|
+
|
656
725
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
657
726
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
658
727
|
|
659
728
|
options.apply_defaults timeout: @config.rpcs.delete_queue.timeout,
|
660
729
|
metadata: metadata,
|
661
730
|
retry_policy: @config.rpcs.delete_queue.retry_policy
|
662
|
-
|
731
|
+
|
732
|
+
options.apply_defaults timeout: @config.timeout,
|
733
|
+
metadata: @config.metadata,
|
663
734
|
retry_policy: @config.retry_policy
|
664
735
|
|
665
736
|
@cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation|
|
@@ -705,6 +776,21 @@ module Google
|
|
705
776
|
#
|
706
777
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
707
778
|
#
|
779
|
+
# @example Basic example
|
780
|
+
# require "google/cloud/tasks/v2beta2"
|
781
|
+
#
|
782
|
+
# # Create a client object. The client can be reused for multiple calls.
|
783
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
784
|
+
#
|
785
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
786
|
+
# request = Google::Cloud::Tasks::V2beta2::PurgeQueueRequest.new
|
787
|
+
#
|
788
|
+
# # Call the purge_queue method.
|
789
|
+
# result = client.purge_queue request
|
790
|
+
#
|
791
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue.
|
792
|
+
# p result
|
793
|
+
#
|
708
794
|
def purge_queue request, options = nil
|
709
795
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
710
796
|
|
@@ -722,16 +808,20 @@ module Google
|
|
722
808
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
723
809
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
724
810
|
|
725
|
-
header_params = {
|
726
|
-
|
727
|
-
|
811
|
+
header_params = {}
|
812
|
+
if request.name
|
813
|
+
header_params["name"] = request.name
|
814
|
+
end
|
815
|
+
|
728
816
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
729
817
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
730
818
|
|
731
819
|
options.apply_defaults timeout: @config.rpcs.purge_queue.timeout,
|
732
820
|
metadata: metadata,
|
733
821
|
retry_policy: @config.rpcs.purge_queue.retry_policy
|
734
|
-
|
822
|
+
|
823
|
+
options.apply_defaults timeout: @config.timeout,
|
824
|
+
metadata: @config.metadata,
|
735
825
|
retry_policy: @config.retry_policy
|
736
826
|
|
737
827
|
@cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation|
|
@@ -778,6 +868,21 @@ module Google
|
|
778
868
|
#
|
779
869
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
780
870
|
#
|
871
|
+
# @example Basic example
|
872
|
+
# require "google/cloud/tasks/v2beta2"
|
873
|
+
#
|
874
|
+
# # Create a client object. The client can be reused for multiple calls.
|
875
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
876
|
+
#
|
877
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
878
|
+
# request = Google::Cloud::Tasks::V2beta2::PauseQueueRequest.new
|
879
|
+
#
|
880
|
+
# # Call the pause_queue method.
|
881
|
+
# result = client.pause_queue request
|
882
|
+
#
|
883
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue.
|
884
|
+
# p result
|
885
|
+
#
|
781
886
|
def pause_queue request, options = nil
|
782
887
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
783
888
|
|
@@ -795,16 +900,20 @@ module Google
|
|
795
900
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
796
901
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
797
902
|
|
798
|
-
header_params = {
|
799
|
-
|
800
|
-
|
903
|
+
header_params = {}
|
904
|
+
if request.name
|
905
|
+
header_params["name"] = request.name
|
906
|
+
end
|
907
|
+
|
801
908
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
802
909
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
803
910
|
|
804
911
|
options.apply_defaults timeout: @config.rpcs.pause_queue.timeout,
|
805
912
|
metadata: metadata,
|
806
913
|
retry_policy: @config.rpcs.pause_queue.retry_policy
|
807
|
-
|
914
|
+
|
915
|
+
options.apply_defaults timeout: @config.timeout,
|
916
|
+
metadata: @config.metadata,
|
808
917
|
retry_policy: @config.retry_policy
|
809
918
|
|
810
919
|
@cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation|
|
@@ -857,6 +966,21 @@ module Google
|
|
857
966
|
#
|
858
967
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
859
968
|
#
|
969
|
+
# @example Basic example
|
970
|
+
# require "google/cloud/tasks/v2beta2"
|
971
|
+
#
|
972
|
+
# # Create a client object. The client can be reused for multiple calls.
|
973
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
974
|
+
#
|
975
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
976
|
+
# request = Google::Cloud::Tasks::V2beta2::ResumeQueueRequest.new
|
977
|
+
#
|
978
|
+
# # Call the resume_queue method.
|
979
|
+
# result = client.resume_queue request
|
980
|
+
#
|
981
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Queue.
|
982
|
+
# p result
|
983
|
+
#
|
860
984
|
def resume_queue request, options = nil
|
861
985
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
862
986
|
|
@@ -874,16 +998,20 @@ module Google
|
|
874
998
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
875
999
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
876
1000
|
|
877
|
-
header_params = {
|
878
|
-
|
879
|
-
|
1001
|
+
header_params = {}
|
1002
|
+
if request.name
|
1003
|
+
header_params["name"] = request.name
|
1004
|
+
end
|
1005
|
+
|
880
1006
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
881
1007
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
882
1008
|
|
883
1009
|
options.apply_defaults timeout: @config.rpcs.resume_queue.timeout,
|
884
1010
|
metadata: metadata,
|
885
1011
|
retry_policy: @config.rpcs.resume_queue.retry_policy
|
886
|
-
|
1012
|
+
|
1013
|
+
options.apply_defaults timeout: @config.timeout,
|
1014
|
+
metadata: @config.metadata,
|
887
1015
|
retry_policy: @config.retry_policy
|
888
1016
|
|
889
1017
|
@cloud_tasks_stub.call_rpc :resume_queue, request, options: options do |response, operation|
|
@@ -935,6 +1063,21 @@ module Google
|
|
935
1063
|
#
|
936
1064
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
937
1065
|
#
|
1066
|
+
# @example Basic example
|
1067
|
+
# require "google/cloud/tasks/v2beta2"
|
1068
|
+
#
|
1069
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1070
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
1071
|
+
#
|
1072
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1073
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
1074
|
+
#
|
1075
|
+
# # Call the get_iam_policy method.
|
1076
|
+
# result = client.get_iam_policy request
|
1077
|
+
#
|
1078
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1079
|
+
# p result
|
1080
|
+
#
|
938
1081
|
def get_iam_policy request, options = nil
|
939
1082
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
940
1083
|
|
@@ -952,16 +1095,20 @@ module Google
|
|
952
1095
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
953
1096
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
954
1097
|
|
955
|
-
header_params = {
|
956
|
-
|
957
|
-
|
1098
|
+
header_params = {}
|
1099
|
+
if request.resource
|
1100
|
+
header_params["resource"] = request.resource
|
1101
|
+
end
|
1102
|
+
|
958
1103
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
959
1104
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
960
1105
|
|
961
1106
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
962
1107
|
metadata: metadata,
|
963
1108
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
964
|
-
|
1109
|
+
|
1110
|
+
options.apply_defaults timeout: @config.timeout,
|
1111
|
+
metadata: @config.metadata,
|
965
1112
|
retry_policy: @config.retry_policy
|
966
1113
|
|
967
1114
|
@cloud_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -1017,6 +1164,21 @@ module Google
|
|
1017
1164
|
#
|
1018
1165
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1019
1166
|
#
|
1167
|
+
# @example Basic example
|
1168
|
+
# require "google/cloud/tasks/v2beta2"
|
1169
|
+
#
|
1170
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1171
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
1172
|
+
#
|
1173
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1174
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
1175
|
+
#
|
1176
|
+
# # Call the set_iam_policy method.
|
1177
|
+
# result = client.set_iam_policy request
|
1178
|
+
#
|
1179
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1180
|
+
# p result
|
1181
|
+
#
|
1020
1182
|
def set_iam_policy request, options = nil
|
1021
1183
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1022
1184
|
|
@@ -1034,16 +1196,20 @@ module Google
|
|
1034
1196
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1035
1197
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1036
1198
|
|
1037
|
-
header_params = {
|
1038
|
-
|
1039
|
-
|
1199
|
+
header_params = {}
|
1200
|
+
if request.resource
|
1201
|
+
header_params["resource"] = request.resource
|
1202
|
+
end
|
1203
|
+
|
1040
1204
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1041
1205
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1042
1206
|
|
1043
1207
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
1044
1208
|
metadata: metadata,
|
1045
1209
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
1046
|
-
|
1210
|
+
|
1211
|
+
options.apply_defaults timeout: @config.timeout,
|
1212
|
+
metadata: @config.metadata,
|
1047
1213
|
retry_policy: @config.retry_policy
|
1048
1214
|
|
1049
1215
|
@cloud_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -1095,6 +1261,21 @@ module Google
|
|
1095
1261
|
#
|
1096
1262
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1097
1263
|
#
|
1264
|
+
# @example Basic example
|
1265
|
+
# require "google/cloud/tasks/v2beta2"
|
1266
|
+
#
|
1267
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1268
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
1269
|
+
#
|
1270
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1271
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
1272
|
+
#
|
1273
|
+
# # Call the test_iam_permissions method.
|
1274
|
+
# result = client.test_iam_permissions request
|
1275
|
+
#
|
1276
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
1277
|
+
# p result
|
1278
|
+
#
|
1098
1279
|
def test_iam_permissions request, options = nil
|
1099
1280
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1100
1281
|
|
@@ -1112,16 +1293,20 @@ module Google
|
|
1112
1293
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1113
1294
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1114
1295
|
|
1115
|
-
header_params = {
|
1116
|
-
|
1117
|
-
|
1296
|
+
header_params = {}
|
1297
|
+
if request.resource
|
1298
|
+
header_params["resource"] = request.resource
|
1299
|
+
end
|
1300
|
+
|
1118
1301
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1119
1302
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1120
1303
|
|
1121
1304
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1122
1305
|
metadata: metadata,
|
1123
1306
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1124
|
-
|
1307
|
+
|
1308
|
+
options.apply_defaults timeout: @config.timeout,
|
1309
|
+
metadata: @config.metadata,
|
1125
1310
|
retry_policy: @config.retry_policy
|
1126
1311
|
|
1127
1312
|
@cloud_tasks_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -1202,6 +1387,27 @@ module Google
|
|
1202
1387
|
#
|
1203
1388
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1204
1389
|
#
|
1390
|
+
# @example Basic example
|
1391
|
+
# require "google/cloud/tasks/v2beta2"
|
1392
|
+
#
|
1393
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1394
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
1395
|
+
#
|
1396
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1397
|
+
# request = Google::Cloud::Tasks::V2beta2::ListTasksRequest.new
|
1398
|
+
#
|
1399
|
+
# # Call the list_tasks method.
|
1400
|
+
# result = client.list_tasks request
|
1401
|
+
#
|
1402
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1403
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1404
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1405
|
+
# # methods are also available for managing paging directly.
|
1406
|
+
# result.each do |response|
|
1407
|
+
# # Each element is of type ::Google::Cloud::Tasks::V2beta2::Task.
|
1408
|
+
# p response
|
1409
|
+
# end
|
1410
|
+
#
|
1205
1411
|
def list_tasks request, options = nil
|
1206
1412
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1207
1413
|
|
@@ -1219,16 +1425,20 @@ module Google
|
|
1219
1425
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1220
1426
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1221
1427
|
|
1222
|
-
header_params = {
|
1223
|
-
|
1224
|
-
|
1428
|
+
header_params = {}
|
1429
|
+
if request.parent
|
1430
|
+
header_params["parent"] = request.parent
|
1431
|
+
end
|
1432
|
+
|
1225
1433
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1226
1434
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1227
1435
|
|
1228
1436
|
options.apply_defaults timeout: @config.rpcs.list_tasks.timeout,
|
1229
1437
|
metadata: metadata,
|
1230
1438
|
retry_policy: @config.rpcs.list_tasks.retry_policy
|
1231
|
-
|
1439
|
+
|
1440
|
+
options.apply_defaults timeout: @config.timeout,
|
1441
|
+
metadata: @config.metadata,
|
1232
1442
|
retry_policy: @config.retry_policy
|
1233
1443
|
|
1234
1444
|
@cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation|
|
@@ -1283,6 +1493,21 @@ module Google
|
|
1283
1493
|
#
|
1284
1494
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1285
1495
|
#
|
1496
|
+
# @example Basic example
|
1497
|
+
# require "google/cloud/tasks/v2beta2"
|
1498
|
+
#
|
1499
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1500
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
1501
|
+
#
|
1502
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1503
|
+
# request = Google::Cloud::Tasks::V2beta2::GetTaskRequest.new
|
1504
|
+
#
|
1505
|
+
# # Call the get_task method.
|
1506
|
+
# result = client.get_task request
|
1507
|
+
#
|
1508
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Task.
|
1509
|
+
# p result
|
1510
|
+
#
|
1286
1511
|
def get_task request, options = nil
|
1287
1512
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1288
1513
|
|
@@ -1300,16 +1525,20 @@ module Google
|
|
1300
1525
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1301
1526
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1302
1527
|
|
1303
|
-
header_params = {
|
1304
|
-
|
1305
|
-
|
1528
|
+
header_params = {}
|
1529
|
+
if request.name
|
1530
|
+
header_params["name"] = request.name
|
1531
|
+
end
|
1532
|
+
|
1306
1533
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1307
1534
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1308
1535
|
|
1309
1536
|
options.apply_defaults timeout: @config.rpcs.get_task.timeout,
|
1310
1537
|
metadata: metadata,
|
1311
1538
|
retry_policy: @config.rpcs.get_task.retry_policy
|
1312
|
-
|
1539
|
+
|
1540
|
+
options.apply_defaults timeout: @config.timeout,
|
1541
|
+
metadata: @config.metadata,
|
1313
1542
|
retry_policy: @config.retry_policy
|
1314
1543
|
|
1315
1544
|
@cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation|
|
@@ -1405,6 +1634,21 @@ module Google
|
|
1405
1634
|
#
|
1406
1635
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1407
1636
|
#
|
1637
|
+
# @example Basic example
|
1638
|
+
# require "google/cloud/tasks/v2beta2"
|
1639
|
+
#
|
1640
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1641
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
1642
|
+
#
|
1643
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1644
|
+
# request = Google::Cloud::Tasks::V2beta2::CreateTaskRequest.new
|
1645
|
+
#
|
1646
|
+
# # Call the create_task method.
|
1647
|
+
# result = client.create_task request
|
1648
|
+
#
|
1649
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Task.
|
1650
|
+
# p result
|
1651
|
+
#
|
1408
1652
|
def create_task request, options = nil
|
1409
1653
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1410
1654
|
|
@@ -1422,16 +1666,20 @@ module Google
|
|
1422
1666
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1423
1667
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1424
1668
|
|
1425
|
-
header_params = {
|
1426
|
-
|
1427
|
-
|
1669
|
+
header_params = {}
|
1670
|
+
if request.parent
|
1671
|
+
header_params["parent"] = request.parent
|
1672
|
+
end
|
1673
|
+
|
1428
1674
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1429
1675
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1430
1676
|
|
1431
1677
|
options.apply_defaults timeout: @config.rpcs.create_task.timeout,
|
1432
1678
|
metadata: metadata,
|
1433
1679
|
retry_policy: @config.rpcs.create_task.retry_policy
|
1434
|
-
|
1680
|
+
|
1681
|
+
options.apply_defaults timeout: @config.timeout,
|
1682
|
+
metadata: @config.metadata,
|
1435
1683
|
retry_policy: @config.retry_policy
|
1436
1684
|
|
1437
1685
|
@cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation|
|
@@ -1476,6 +1724,21 @@ module Google
|
|
1476
1724
|
#
|
1477
1725
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1478
1726
|
#
|
1727
|
+
# @example Basic example
|
1728
|
+
# require "google/cloud/tasks/v2beta2"
|
1729
|
+
#
|
1730
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1731
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
1732
|
+
#
|
1733
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1734
|
+
# request = Google::Cloud::Tasks::V2beta2::DeleteTaskRequest.new
|
1735
|
+
#
|
1736
|
+
# # Call the delete_task method.
|
1737
|
+
# result = client.delete_task request
|
1738
|
+
#
|
1739
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1740
|
+
# p result
|
1741
|
+
#
|
1479
1742
|
def delete_task request, options = nil
|
1480
1743
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1481
1744
|
|
@@ -1493,16 +1756,20 @@ module Google
|
|
1493
1756
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1494
1757
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1495
1758
|
|
1496
|
-
header_params = {
|
1497
|
-
|
1498
|
-
|
1759
|
+
header_params = {}
|
1760
|
+
if request.name
|
1761
|
+
header_params["name"] = request.name
|
1762
|
+
end
|
1763
|
+
|
1499
1764
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1500
1765
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1501
1766
|
|
1502
1767
|
options.apply_defaults timeout: @config.rpcs.delete_task.timeout,
|
1503
1768
|
metadata: metadata,
|
1504
1769
|
retry_policy: @config.rpcs.delete_task.retry_policy
|
1505
|
-
|
1770
|
+
|
1771
|
+
options.apply_defaults timeout: @config.timeout,
|
1772
|
+
metadata: @config.metadata,
|
1506
1773
|
retry_policy: @config.retry_policy
|
1507
1774
|
|
1508
1775
|
@cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation|
|
@@ -1638,6 +1905,21 @@ module Google
|
|
1638
1905
|
#
|
1639
1906
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1640
1907
|
#
|
1908
|
+
# @example Basic example
|
1909
|
+
# require "google/cloud/tasks/v2beta2"
|
1910
|
+
#
|
1911
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1912
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
1913
|
+
#
|
1914
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1915
|
+
# request = Google::Cloud::Tasks::V2beta2::LeaseTasksRequest.new
|
1916
|
+
#
|
1917
|
+
# # Call the lease_tasks method.
|
1918
|
+
# result = client.lease_tasks request
|
1919
|
+
#
|
1920
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::LeaseTasksResponse.
|
1921
|
+
# p result
|
1922
|
+
#
|
1641
1923
|
def lease_tasks request, options = nil
|
1642
1924
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1643
1925
|
|
@@ -1655,16 +1937,20 @@ module Google
|
|
1655
1937
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1656
1938
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1657
1939
|
|
1658
|
-
header_params = {
|
1659
|
-
|
1660
|
-
|
1940
|
+
header_params = {}
|
1941
|
+
if request.parent
|
1942
|
+
header_params["parent"] = request.parent
|
1943
|
+
end
|
1944
|
+
|
1661
1945
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1662
1946
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1663
1947
|
|
1664
1948
|
options.apply_defaults timeout: @config.rpcs.lease_tasks.timeout,
|
1665
1949
|
metadata: metadata,
|
1666
1950
|
retry_policy: @config.rpcs.lease_tasks.retry_policy
|
1667
|
-
|
1951
|
+
|
1952
|
+
options.apply_defaults timeout: @config.timeout,
|
1953
|
+
metadata: @config.metadata,
|
1668
1954
|
retry_policy: @config.retry_policy
|
1669
1955
|
|
1670
1956
|
@cloud_tasks_stub.call_rpc :lease_tasks, request, options: options do |response, operation|
|
@@ -1723,6 +2009,21 @@ module Google
|
|
1723
2009
|
#
|
1724
2010
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1725
2011
|
#
|
2012
|
+
# @example Basic example
|
2013
|
+
# require "google/cloud/tasks/v2beta2"
|
2014
|
+
#
|
2015
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2016
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
2017
|
+
#
|
2018
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2019
|
+
# request = Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest.new
|
2020
|
+
#
|
2021
|
+
# # Call the acknowledge_task method.
|
2022
|
+
# result = client.acknowledge_task request
|
2023
|
+
#
|
2024
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
2025
|
+
# p result
|
2026
|
+
#
|
1726
2027
|
def acknowledge_task request, options = nil
|
1727
2028
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1728
2029
|
|
@@ -1740,16 +2041,20 @@ module Google
|
|
1740
2041
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1741
2042
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1742
2043
|
|
1743
|
-
header_params = {
|
1744
|
-
|
1745
|
-
|
2044
|
+
header_params = {}
|
2045
|
+
if request.name
|
2046
|
+
header_params["name"] = request.name
|
2047
|
+
end
|
2048
|
+
|
1746
2049
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1747
2050
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1748
2051
|
|
1749
2052
|
options.apply_defaults timeout: @config.rpcs.acknowledge_task.timeout,
|
1750
2053
|
metadata: metadata,
|
1751
2054
|
retry_policy: @config.rpcs.acknowledge_task.retry_policy
|
1752
|
-
|
2055
|
+
|
2056
|
+
options.apply_defaults timeout: @config.timeout,
|
2057
|
+
metadata: @config.metadata,
|
1753
2058
|
retry_policy: @config.retry_policy
|
1754
2059
|
|
1755
2060
|
@cloud_tasks_stub.call_rpc :acknowledge_task, request, options: options do |response, operation|
|
@@ -1819,6 +2124,21 @@ module Google
|
|
1819
2124
|
#
|
1820
2125
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1821
2126
|
#
|
2127
|
+
# @example Basic example
|
2128
|
+
# require "google/cloud/tasks/v2beta2"
|
2129
|
+
#
|
2130
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2131
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
2132
|
+
#
|
2133
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2134
|
+
# request = Google::Cloud::Tasks::V2beta2::RenewLeaseRequest.new
|
2135
|
+
#
|
2136
|
+
# # Call the renew_lease method.
|
2137
|
+
# result = client.renew_lease request
|
2138
|
+
#
|
2139
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Task.
|
2140
|
+
# p result
|
2141
|
+
#
|
1822
2142
|
def renew_lease request, options = nil
|
1823
2143
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1824
2144
|
|
@@ -1836,16 +2156,20 @@ module Google
|
|
1836
2156
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1837
2157
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1838
2158
|
|
1839
|
-
header_params = {
|
1840
|
-
|
1841
|
-
|
2159
|
+
header_params = {}
|
2160
|
+
if request.name
|
2161
|
+
header_params["name"] = request.name
|
2162
|
+
end
|
2163
|
+
|
1842
2164
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1843
2165
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1844
2166
|
|
1845
2167
|
options.apply_defaults timeout: @config.rpcs.renew_lease.timeout,
|
1846
2168
|
metadata: metadata,
|
1847
2169
|
retry_policy: @config.rpcs.renew_lease.retry_policy
|
1848
|
-
|
2170
|
+
|
2171
|
+
options.apply_defaults timeout: @config.timeout,
|
2172
|
+
metadata: @config.metadata,
|
1849
2173
|
retry_policy: @config.retry_policy
|
1850
2174
|
|
1851
2175
|
@cloud_tasks_stub.call_rpc :renew_lease, request, options: options do |response, operation|
|
@@ -1910,6 +2234,21 @@ module Google
|
|
1910
2234
|
#
|
1911
2235
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1912
2236
|
#
|
2237
|
+
# @example Basic example
|
2238
|
+
# require "google/cloud/tasks/v2beta2"
|
2239
|
+
#
|
2240
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2241
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
2242
|
+
#
|
2243
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2244
|
+
# request = Google::Cloud::Tasks::V2beta2::CancelLeaseRequest.new
|
2245
|
+
#
|
2246
|
+
# # Call the cancel_lease method.
|
2247
|
+
# result = client.cancel_lease request
|
2248
|
+
#
|
2249
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Task.
|
2250
|
+
# p result
|
2251
|
+
#
|
1913
2252
|
def cancel_lease request, options = nil
|
1914
2253
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1915
2254
|
|
@@ -1927,16 +2266,20 @@ module Google
|
|
1927
2266
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
1928
2267
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1929
2268
|
|
1930
|
-
header_params = {
|
1931
|
-
|
1932
|
-
|
2269
|
+
header_params = {}
|
2270
|
+
if request.name
|
2271
|
+
header_params["name"] = request.name
|
2272
|
+
end
|
2273
|
+
|
1933
2274
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1934
2275
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1935
2276
|
|
1936
2277
|
options.apply_defaults timeout: @config.rpcs.cancel_lease.timeout,
|
1937
2278
|
metadata: metadata,
|
1938
2279
|
retry_policy: @config.rpcs.cancel_lease.retry_policy
|
1939
|
-
|
2280
|
+
|
2281
|
+
options.apply_defaults timeout: @config.timeout,
|
2282
|
+
metadata: @config.metadata,
|
1940
2283
|
retry_policy: @config.retry_policy
|
1941
2284
|
|
1942
2285
|
@cloud_tasks_stub.call_rpc :cancel_lease, request, options: options do |response, operation|
|
@@ -2016,6 +2359,21 @@ module Google
|
|
2016
2359
|
#
|
2017
2360
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2018
2361
|
#
|
2362
|
+
# @example Basic example
|
2363
|
+
# require "google/cloud/tasks/v2beta2"
|
2364
|
+
#
|
2365
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2366
|
+
# client = Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new
|
2367
|
+
#
|
2368
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2369
|
+
# request = Google::Cloud::Tasks::V2beta2::RunTaskRequest.new
|
2370
|
+
#
|
2371
|
+
# # Call the run_task method.
|
2372
|
+
# result = client.run_task request
|
2373
|
+
#
|
2374
|
+
# # The returned object is of type Google::Cloud::Tasks::V2beta2::Task.
|
2375
|
+
# p result
|
2376
|
+
#
|
2019
2377
|
def run_task request, options = nil
|
2020
2378
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
2021
2379
|
|
@@ -2033,16 +2391,20 @@ module Google
|
|
2033
2391
|
gapic_version: ::Google::Cloud::Tasks::V2beta2::VERSION
|
2034
2392
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2035
2393
|
|
2036
|
-
header_params = {
|
2037
|
-
|
2038
|
-
|
2394
|
+
header_params = {}
|
2395
|
+
if request.name
|
2396
|
+
header_params["name"] = request.name
|
2397
|
+
end
|
2398
|
+
|
2039
2399
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2040
2400
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
2041
2401
|
|
2042
2402
|
options.apply_defaults timeout: @config.rpcs.run_task.timeout,
|
2043
2403
|
metadata: metadata,
|
2044
2404
|
retry_policy: @config.rpcs.run_task.retry_policy
|
2045
|
-
|
2405
|
+
|
2406
|
+
options.apply_defaults timeout: @config.timeout,
|
2407
|
+
metadata: @config.metadata,
|
2046
2408
|
retry_policy: @config.retry_policy
|
2047
2409
|
|
2048
2410
|
@cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation|
|
@@ -2066,22 +2428,21 @@ module Google
|
|
2066
2428
|
# Configuration can be applied globally to all clients, or to a single client
|
2067
2429
|
# on construction.
|
2068
2430
|
#
|
2069
|
-
#
|
2070
|
-
#
|
2071
|
-
#
|
2072
|
-
# to 20 seconds,
|
2073
|
-
#
|
2074
|
-
#
|
2075
|
-
#
|
2076
|
-
#
|
2077
|
-
#
|
2078
|
-
#
|
2079
|
-
#
|
2080
|
-
#
|
2081
|
-
#
|
2082
|
-
#
|
2083
|
-
#
|
2084
|
-
# end
|
2431
|
+
# @example
|
2432
|
+
#
|
2433
|
+
# # Modify the global config, setting the timeout for
|
2434
|
+
# # list_queues to 20 seconds,
|
2435
|
+
# # and all remaining timeouts to 10 seconds.
|
2436
|
+
# ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.configure do |config|
|
2437
|
+
# config.timeout = 10.0
|
2438
|
+
# config.rpcs.list_queues.timeout = 20.0
|
2439
|
+
# end
|
2440
|
+
#
|
2441
|
+
# # Apply the above configuration only to a new client.
|
2442
|
+
# client = ::Google::Cloud::Tasks::V2beta2::CloudTasks::Client.new do |config|
|
2443
|
+
# config.timeout = 10.0
|
2444
|
+
# config.rpcs.list_queues.timeout = 20.0
|
2445
|
+
# end
|
2085
2446
|
#
|
2086
2447
|
# @!attribute [rw] endpoint
|
2087
2448
|
# The hostname or hostname:port of the service endpoint.
|