google-cloud-tasks-v2beta2 0.2.5 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,3 +33,6 @@ module Google
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ helper_path = ::File.join __dir__, "v2beta2", "_helpers.rb"
38
+ require "google/cloud/tasks/v2beta2/_helpers" if ::File.file? helper_path
@@ -61,98 +61,98 @@ module Google
61
61
  parent_config = while namespace.any?
62
62
  parent_name = namespace.join "::"
63
63
  parent_const = const_get parent_name
64
- break parent_const.configure if parent_const&.respond_to? :configure
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
65
  namespace.pop
66
66
  end
67
67
  default_config = Client::Configuration.new parent_config
68
68
 
69
- default_config.rpcs.list_queues.timeout = 10.0
69
+ default_config.rpcs.list_queues.timeout = 20.0
70
70
  default_config.rpcs.list_queues.retry_policy = {
71
71
  initial_delay: 0.1,
72
- max_delay: 10.0,
73
- multiplier: 1.3,
74
- retry_codes: [14, 4]
72
+ max_delay: 10.0,
73
+ multiplier: 1.3,
74
+ retry_codes: [14, 4]
75
75
  }
76
76
 
77
- default_config.rpcs.get_queue.timeout = 10.0
77
+ default_config.rpcs.get_queue.timeout = 20.0
78
78
  default_config.rpcs.get_queue.retry_policy = {
79
79
  initial_delay: 0.1,
80
- max_delay: 10.0,
81
- multiplier: 1.3,
82
- retry_codes: [14, 4]
80
+ max_delay: 10.0,
81
+ multiplier: 1.3,
82
+ retry_codes: [14, 4]
83
83
  }
84
84
 
85
- default_config.rpcs.create_queue.timeout = 10.0
85
+ default_config.rpcs.create_queue.timeout = 20.0
86
86
 
87
- default_config.rpcs.update_queue.timeout = 10.0
87
+ default_config.rpcs.update_queue.timeout = 20.0
88
88
 
89
- default_config.rpcs.delete_queue.timeout = 10.0
89
+ default_config.rpcs.delete_queue.timeout = 20.0
90
90
  default_config.rpcs.delete_queue.retry_policy = {
91
91
  initial_delay: 0.1,
92
- max_delay: 10.0,
93
- multiplier: 1.3,
94
- retry_codes: [14, 4]
92
+ max_delay: 10.0,
93
+ multiplier: 1.3,
94
+ retry_codes: [14, 4]
95
95
  }
96
96
 
97
- default_config.rpcs.purge_queue.timeout = 10.0
97
+ default_config.rpcs.purge_queue.timeout = 20.0
98
98
 
99
- default_config.rpcs.pause_queue.timeout = 10.0
99
+ default_config.rpcs.pause_queue.timeout = 20.0
100
100
 
101
- default_config.rpcs.resume_queue.timeout = 10.0
101
+ default_config.rpcs.resume_queue.timeout = 20.0
102
102
 
103
- default_config.rpcs.get_iam_policy.timeout = 10.0
103
+ default_config.rpcs.get_iam_policy.timeout = 20.0
104
104
  default_config.rpcs.get_iam_policy.retry_policy = {
105
105
  initial_delay: 0.1,
106
- max_delay: 10.0,
107
- multiplier: 1.3,
108
- retry_codes: [14, 4]
106
+ max_delay: 10.0,
107
+ multiplier: 1.3,
108
+ retry_codes: [14, 4]
109
109
  }
110
110
 
111
- default_config.rpcs.set_iam_policy.timeout = 10.0
111
+ default_config.rpcs.set_iam_policy.timeout = 20.0
112
112
 
113
- default_config.rpcs.test_iam_permissions.timeout = 10.0
113
+ default_config.rpcs.test_iam_permissions.timeout = 20.0
114
114
  default_config.rpcs.test_iam_permissions.retry_policy = {
115
115
  initial_delay: 0.1,
116
- max_delay: 10.0,
117
- multiplier: 1.3,
118
- retry_codes: [14, 4]
116
+ max_delay: 10.0,
117
+ multiplier: 1.3,
118
+ retry_codes: [14, 4]
119
119
  }
120
120
 
121
- default_config.rpcs.list_tasks.timeout = 10.0
121
+ default_config.rpcs.list_tasks.timeout = 20.0
122
122
  default_config.rpcs.list_tasks.retry_policy = {
123
123
  initial_delay: 0.1,
124
- max_delay: 10.0,
125
- multiplier: 1.3,
126
- retry_codes: [14, 4]
124
+ max_delay: 10.0,
125
+ multiplier: 1.3,
126
+ retry_codes: [14, 4]
127
127
  }
128
128
 
129
- default_config.rpcs.get_task.timeout = 10.0
129
+ default_config.rpcs.get_task.timeout = 20.0
130
130
  default_config.rpcs.get_task.retry_policy = {
131
131
  initial_delay: 0.1,
132
- max_delay: 10.0,
133
- multiplier: 1.3,
134
- retry_codes: [14, 4]
132
+ max_delay: 10.0,
133
+ multiplier: 1.3,
134
+ retry_codes: [14, 4]
135
135
  }
136
136
 
137
- default_config.rpcs.create_task.timeout = 10.0
137
+ default_config.rpcs.create_task.timeout = 20.0
138
138
 
139
- default_config.rpcs.delete_task.timeout = 10.0
139
+ default_config.rpcs.delete_task.timeout = 20.0
140
140
  default_config.rpcs.delete_task.retry_policy = {
141
141
  initial_delay: 0.1,
142
- max_delay: 10.0,
143
- multiplier: 1.3,
144
- retry_codes: [14, 4]
142
+ max_delay: 10.0,
143
+ multiplier: 1.3,
144
+ retry_codes: [14, 4]
145
145
  }
146
146
 
147
- default_config.rpcs.lease_tasks.timeout = 10.0
147
+ default_config.rpcs.lease_tasks.timeout = 20.0
148
148
 
149
- default_config.rpcs.acknowledge_task.timeout = 10.0
149
+ default_config.rpcs.acknowledge_task.timeout = 20.0
150
150
 
151
- default_config.rpcs.renew_lease.timeout = 10.0
151
+ default_config.rpcs.renew_lease.timeout = 20.0
152
152
 
153
- default_config.rpcs.cancel_lease.timeout = 10.0
153
+ default_config.rpcs.cancel_lease.timeout = 20.0
154
154
 
155
- default_config.rpcs.run_task.timeout = 10.0
155
+ default_config.rpcs.run_task.timeout = 20.0
156
156
 
157
157
  default_config
158
158
  end
@@ -215,7 +215,13 @@ module Google
215
215
 
216
216
  # Create credentials
217
217
  credentials = @config.credentials
218
- credentials ||= Credentials.default scope: @config.scope
218
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
219
+ # but only if the default endpoint does not have a region prefix.
220
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
221
+ @config.endpoint == Client.configure.endpoint &&
222
+ !@config.endpoint.split(".").first.include?("-")
223
+ credentials ||= Credentials.default scope: @config.scope,
224
+ enable_self_signed_jwt: enable_self_signed_jwt
219
225
  if credentials.is_a?(String) || credentials.is_a?(Hash)
220
226
  credentials = Credentials.new credentials, scope: @config.scope
221
227
  end
@@ -248,7 +254,7 @@ module Google
248
254
  # @param options [::Gapic::CallOptions, ::Hash]
249
255
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
250
256
  #
251
- # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil)
257
+ # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil)
252
258
  # Pass arguments to `list_queues` via keyword arguments. Note that at
253
259
  # least one keyword argument is required. To specify no parameters, or to keep all
254
260
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -285,6 +291,11 @@ module Google
285
291
  # from the previous call to {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues}
286
292
  # method. It is an error to switch the value of the
287
293
  # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while iterating through pages.
294
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
295
+ # Optional. Read mask is used for a more granular control over what the API returns.
296
+ # If the mask is not present all fields will be returned except
297
+ # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly
298
+ # specified in the mask.
288
299
  #
289
300
  # @yield [response, operation] Access the result along with the RPC operation
290
301
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>]
@@ -345,7 +356,7 @@ module Google
345
356
  # @param options [::Gapic::CallOptions, ::Hash]
346
357
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
347
358
  #
348
- # @overload get_queue(name: nil)
359
+ # @overload get_queue(name: nil, read_mask: nil)
349
360
  # Pass arguments to `get_queue` via keyword arguments. Note that at
350
361
  # least one keyword argument is required. To specify no parameters, or to keep all
351
362
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -353,6 +364,11 @@ module Google
353
364
  # @param name [::String]
354
365
  # Required. The resource name of the queue. For example:
355
366
  # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
367
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
368
+ # Optional. Read mask is used for a more granular control over what the API returns.
369
+ # If the mask is not present all fields will be returned except
370
+ # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly
371
+ # specified in the mask.
356
372
  #
357
373
  # @yield [response, operation] Access the result along with the RPC operation
358
374
  # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue]
@@ -2129,7 +2145,7 @@ module Google
2129
2145
  config_attr :scope, nil, ::String, ::Array, nil
2130
2146
  config_attr :lib_name, nil, ::String, nil
2131
2147
  config_attr :lib_version, nil, ::String, nil
2132
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
2148
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2133
2149
  config_attr :interceptors, nil, ::Array, nil
2134
2150
  config_attr :timeout, nil, ::Numeric, nil
2135
2151
  config_attr :metadata, nil, ::Hash, nil
@@ -2150,7 +2166,7 @@ module Google
2150
2166
  def rpcs
2151
2167
  @rpcs ||= begin
2152
2168
  parent_rpcs = nil
2153
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
2169
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2154
2170
  Rpcs.new parent_rpcs
2155
2171
  end
2156
2172
  end
@@ -2162,7 +2178,7 @@ module Google
2162
2178
  # Each configuration object is of type `Gapic::Config::Method` and includes
2163
2179
  # the following configuration fields:
2164
2180
  #
2165
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
2181
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2166
2182
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2167
2183
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2168
2184
  # include the following keys:
@@ -2276,45 +2292,45 @@ module Google
2276
2292
 
2277
2293
  # @private
2278
2294
  def initialize parent_rpcs = nil
2279
- list_queues_config = parent_rpcs&.list_queues if parent_rpcs&.respond_to? :list_queues
2295
+ list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues
2280
2296
  @list_queues = ::Gapic::Config::Method.new list_queues_config
2281
- get_queue_config = parent_rpcs&.get_queue if parent_rpcs&.respond_to? :get_queue
2297
+ get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue
2282
2298
  @get_queue = ::Gapic::Config::Method.new get_queue_config
2283
- create_queue_config = parent_rpcs&.create_queue if parent_rpcs&.respond_to? :create_queue
2299
+ create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue
2284
2300
  @create_queue = ::Gapic::Config::Method.new create_queue_config
2285
- update_queue_config = parent_rpcs&.update_queue if parent_rpcs&.respond_to? :update_queue
2301
+ update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue
2286
2302
  @update_queue = ::Gapic::Config::Method.new update_queue_config
2287
- delete_queue_config = parent_rpcs&.delete_queue if parent_rpcs&.respond_to? :delete_queue
2303
+ delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue
2288
2304
  @delete_queue = ::Gapic::Config::Method.new delete_queue_config
2289
- purge_queue_config = parent_rpcs&.purge_queue if parent_rpcs&.respond_to? :purge_queue
2305
+ purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue
2290
2306
  @purge_queue = ::Gapic::Config::Method.new purge_queue_config
2291
- pause_queue_config = parent_rpcs&.pause_queue if parent_rpcs&.respond_to? :pause_queue
2307
+ pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue
2292
2308
  @pause_queue = ::Gapic::Config::Method.new pause_queue_config
2293
- resume_queue_config = parent_rpcs&.resume_queue if parent_rpcs&.respond_to? :resume_queue
2309
+ resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue
2294
2310
  @resume_queue = ::Gapic::Config::Method.new resume_queue_config
2295
- get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy
2311
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
2296
2312
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
2297
- set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy
2313
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
2298
2314
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
2299
- test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions
2315
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
2300
2316
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
2301
- list_tasks_config = parent_rpcs&.list_tasks if parent_rpcs&.respond_to? :list_tasks
2317
+ list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks
2302
2318
  @list_tasks = ::Gapic::Config::Method.new list_tasks_config
2303
- get_task_config = parent_rpcs&.get_task if parent_rpcs&.respond_to? :get_task
2319
+ get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task
2304
2320
  @get_task = ::Gapic::Config::Method.new get_task_config
2305
- create_task_config = parent_rpcs&.create_task if parent_rpcs&.respond_to? :create_task
2321
+ create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task
2306
2322
  @create_task = ::Gapic::Config::Method.new create_task_config
2307
- delete_task_config = parent_rpcs&.delete_task if parent_rpcs&.respond_to? :delete_task
2323
+ delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task
2308
2324
  @delete_task = ::Gapic::Config::Method.new delete_task_config
2309
- lease_tasks_config = parent_rpcs&.lease_tasks if parent_rpcs&.respond_to? :lease_tasks
2325
+ lease_tasks_config = parent_rpcs.lease_tasks if parent_rpcs.respond_to? :lease_tasks
2310
2326
  @lease_tasks = ::Gapic::Config::Method.new lease_tasks_config
2311
- acknowledge_task_config = parent_rpcs&.acknowledge_task if parent_rpcs&.respond_to? :acknowledge_task
2327
+ acknowledge_task_config = parent_rpcs.acknowledge_task if parent_rpcs.respond_to? :acknowledge_task
2312
2328
  @acknowledge_task = ::Gapic::Config::Method.new acknowledge_task_config
2313
- renew_lease_config = parent_rpcs&.renew_lease if parent_rpcs&.respond_to? :renew_lease
2329
+ renew_lease_config = parent_rpcs.renew_lease if parent_rpcs.respond_to? :renew_lease
2314
2330
  @renew_lease = ::Gapic::Config::Method.new renew_lease_config
2315
- cancel_lease_config = parent_rpcs&.cancel_lease if parent_rpcs&.respond_to? :cancel_lease
2331
+ cancel_lease_config = parent_rpcs.cancel_lease if parent_rpcs.respond_to? :cancel_lease
2316
2332
  @cancel_lease = ::Gapic::Config::Method.new cancel_lease_config
2317
- run_task_config = parent_rpcs&.run_task if parent_rpcs&.respond_to? :run_task
2333
+ run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task
2318
2334
  @run_task = ::Gapic::Config::Method.new run_task_config
2319
2335
 
2320
2336
  yield self if block_given?
@@ -22,6 +22,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
22
22
  optional :filter, :string, 2
23
23
  optional :page_size, :int32, 3
24
24
  optional :page_token, :string, 4
25
+ optional :read_mask, :message, 5, "google.protobuf.FieldMask"
25
26
  end
26
27
  add_message "google.cloud.tasks.v2beta2.ListQueuesResponse" do
27
28
  repeated :queues, :message, 1, "google.cloud.tasks.v2beta2.Queue"
@@ -29,6 +30,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
30
  end
30
31
  add_message "google.cloud.tasks.v2beta2.GetQueueRequest" do
31
32
  optional :name, :string, 1
33
+ optional :read_mask, :message, 2, "google.protobuf.FieldMask"
32
34
  end
33
35
  add_message "google.cloud.tasks.v2beta2.CreateQueueRequest" do
34
36
  optional :parent, :string, 1
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/tasks/v2beta2/cloudtasks.proto for package 'google.cloud.tasks.v2beta2'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2020 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- #
19
18
 
20
19
  require 'grpc'
21
20
  require 'google/cloud/tasks/v2beta2/cloudtasks_pb'
@@ -29,7 +28,7 @@ module Google
29
28
  # work in their applications.
30
29
  class Service
31
30
 
32
- include GRPC::GenericService
31
+ include ::GRPC::GenericService
33
32
 
34
33
  self.marshal_class_method = :encode
35
34
  self.unmarshal_class_method = :decode
@@ -38,9 +37,9 @@ module Google
38
37
  # Lists queues.
39
38
  #
40
39
  # Queues are returned in lexicographical order.
41
- rpc :ListQueues, Google::Cloud::Tasks::V2beta2::ListQueuesRequest, Google::Cloud::Tasks::V2beta2::ListQueuesResponse
40
+ rpc :ListQueues, ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse
42
41
  # Gets a queue.
43
- rpc :GetQueue, Google::Cloud::Tasks::V2beta2::GetQueueRequest, Google::Cloud::Tasks::V2beta2::Queue
42
+ rpc :GetQueue, ::Google::Cloud::Tasks::V2beta2::GetQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
44
43
  # Creates a queue.
45
44
  #
46
45
  # Queues created with this method allow tasks to live for a maximum of 31
@@ -53,7 +52,7 @@ module Google
53
52
  # [Overview of Queue Management and
54
53
  # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
55
54
  # this method.
56
- rpc :CreateQueue, Google::Cloud::Tasks::V2beta2::CreateQueueRequest, Google::Cloud::Tasks::V2beta2::Queue
55
+ rpc :CreateQueue, ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
57
56
  # Updates a queue.
58
57
  #
59
58
  # This method creates the queue if it does not exist and updates
@@ -69,7 +68,7 @@ module Google
69
68
  # [Overview of Queue Management and
70
69
  # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
71
70
  # this method.
72
- rpc :UpdateQueue, Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, Google::Cloud::Tasks::V2beta2::Queue
71
+ rpc :UpdateQueue, ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
73
72
  # Deletes a queue.
74
73
  #
75
74
  # This command will delete the queue even if it has tasks in it.
@@ -83,14 +82,14 @@ module Google
83
82
  # [Overview of Queue Management and
84
83
  # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
85
84
  # this method.
86
- rpc :DeleteQueue, Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, Google::Protobuf::Empty
85
+ rpc :DeleteQueue, ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, ::Google::Protobuf::Empty
87
86
  # Purges a queue by deleting all of its tasks.
88
87
  #
89
88
  # All tasks created before this method is called are permanently deleted.
90
89
  #
91
90
  # Purge operations can take up to one minute to take effect. Tasks
92
91
  # might be dispatched before the purge takes effect. A purge is irreversible.
93
- rpc :PurgeQueue, Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, Google::Cloud::Tasks::V2beta2::Queue
92
+ rpc :PurgeQueue, ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
94
93
  # Pauses the queue.
95
94
  #
96
95
  # If a queue is paused then the system will stop dispatching tasks
@@ -98,7 +97,7 @@ module Google
98
97
  # [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
99
98
  # when the queue is paused. A queue is paused if its
100
99
  # [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
101
- rpc :PauseQueue, Google::Cloud::Tasks::V2beta2::PauseQueueRequest, Google::Cloud::Tasks::V2beta2::Queue
100
+ rpc :PauseQueue, ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
102
101
  # Resume a queue.
103
102
  #
104
103
  # This method resumes a queue after it has been
@@ -112,7 +111,7 @@ module Google
112
111
  # queues, follow the 500/50/5 pattern described in
113
112
  # [Managing Cloud Tasks Scaling
114
113
  # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
115
- rpc :ResumeQueue, Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, Google::Cloud::Tasks::V2beta2::Queue
114
+ rpc :ResumeQueue, ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
116
115
  # Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
117
116
  # Returns an empty policy if the resource exists and does not have a policy
118
117
  # set.
@@ -122,7 +121,7 @@ module Google
122
121
  # resource parent:
123
122
  #
124
123
  # * `cloudtasks.queues.getIamPolicy`
125
- rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
124
+ rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
126
125
  # Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
127
126
  # policy.
128
127
  #
@@ -134,7 +133,7 @@ module Google
134
133
  # resource parent:
135
134
  #
136
135
  # * `cloudtasks.queues.setIamPolicy`
137
- rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
136
+ rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
138
137
  # Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
139
138
  # If the resource does not exist, this will return an empty set of
140
139
  # permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
@@ -142,7 +141,7 @@ module Google
142
141
  # Note: This operation is designed to be used for building permission-aware
143
142
  # UIs and command-line tools, not for authorization checking. This operation
144
143
  # may "fail open" without warning.
145
- rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
144
+ rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
146
145
  # Lists the tasks in a queue.
147
146
  #
148
147
  # By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
@@ -152,9 +151,9 @@ module Google
152
151
  #
153
152
  # The tasks may be returned in any order. The ordering may change at any
154
153
  # time.
155
- rpc :ListTasks, Google::Cloud::Tasks::V2beta2::ListTasksRequest, Google::Cloud::Tasks::V2beta2::ListTasksResponse
154
+ rpc :ListTasks, ::Google::Cloud::Tasks::V2beta2::ListTasksRequest, ::Google::Cloud::Tasks::V2beta2::ListTasksResponse
156
155
  # Gets a task.
157
- rpc :GetTask, Google::Cloud::Tasks::V2beta2::GetTaskRequest, Google::Cloud::Tasks::V2beta2::Task
156
+ rpc :GetTask, ::Google::Cloud::Tasks::V2beta2::GetTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task
158
157
  # Creates a task and adds it to a queue.
159
158
  #
160
159
  # Tasks cannot be updated after creation; there is no UpdateTask command.
@@ -162,13 +161,13 @@ module Google
162
161
  # * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is
163
162
  # 100KB.
164
163
  # * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB.
165
- rpc :CreateTask, Google::Cloud::Tasks::V2beta2::CreateTaskRequest, Google::Cloud::Tasks::V2beta2::Task
164
+ rpc :CreateTask, ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task
166
165
  # Deletes a task.
167
166
  #
168
167
  # A task can be deleted if it is scheduled or dispatched. A task
169
168
  # cannot be deleted if it has completed successfully or permanently
170
169
  # failed.
171
- rpc :DeleteTask, Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, Google::Protobuf::Empty
170
+ rpc :DeleteTask, ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, ::Google::Protobuf::Empty
172
171
  # Leases tasks from a pull queue for
173
172
  # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
174
173
  #
@@ -191,7 +190,7 @@ module Google
191
190
  # is also returned when
192
191
  # [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
193
192
  # is exceeded.
194
- rpc :LeaseTasks, Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, Google::Cloud::Tasks::V2beta2::LeaseTasksResponse
193
+ rpc :LeaseTasks, ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse
195
194
  # Acknowledges a pull task.
196
195
  #
197
196
  # The worker, that is, the entity that
@@ -205,20 +204,20 @@ module Google
205
204
  # by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
206
205
  # [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
207
206
  # [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
208
- rpc :AcknowledgeTask, Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, Google::Protobuf::Empty
207
+ rpc :AcknowledgeTask, ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, ::Google::Protobuf::Empty
209
208
  # Renew the current lease of a pull task.
210
209
  #
211
210
  # The worker can use this method to extend the lease by a new
212
211
  # duration, starting from now. The new task lease will be
213
212
  # returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
214
- rpc :RenewLease, Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, Google::Cloud::Tasks::V2beta2::Task
213
+ rpc :RenewLease, ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, ::Google::Cloud::Tasks::V2beta2::Task
215
214
  # Cancel a pull task's lease.
216
215
  #
217
216
  # The worker can use this method to cancel a task's lease by
218
217
  # setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
219
218
  # make the task available to be leased to the next caller of
220
219
  # [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
221
- rpc :CancelLease, Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, Google::Cloud::Tasks::V2beta2::Task
220
+ rpc :CancelLease, ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, ::Google::Cloud::Tasks::V2beta2::Task
222
221
  # Forces a task to run now.
223
222
  #
224
223
  # When this method is called, Cloud Tasks will dispatch the task, even if
@@ -246,7 +245,7 @@ module Google
246
245
  #
247
246
  # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
248
247
  # [pull task][google.cloud.tasks.v2beta2.PullMessage].
249
- rpc :RunTask, Google::Cloud::Tasks::V2beta2::RunTaskRequest, Google::Cloud::Tasks::V2beta2::Task
248
+ rpc :RunTask, ::Google::Cloud::Tasks::V2beta2::RunTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task
250
249
  end
251
250
 
252
251
  Stub = Service.rpc_stub_class