google-api-client 0.23.7 → 0.23.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  4. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  5. data/generated/google/apis/androidpublisher_v2/classes.rb +1 -0
  6. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  7. data/generated/google/apis/androidpublisher_v3/classes.rb +1 -0
  8. data/generated/google/apis/appengine_v1.rb +1 -1
  9. data/generated/google/apis/appengine_v1/classes.rb +5 -3
  10. data/generated/google/apis/appengine_v1beta.rb +1 -1
  11. data/generated/google/apis/appengine_v1beta/classes.rb +31 -3
  12. data/generated/google/apis/appengine_v1beta/representations.rb +15 -0
  13. data/generated/google/apis/appengine_v1beta4.rb +1 -1
  14. data/generated/google/apis/appengine_v1beta4/classes.rb +5 -3
  15. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  16. data/generated/google/apis/appengine_v1beta5/classes.rb +5 -3
  17. data/generated/google/apis/bigquery_v2.rb +1 -1
  18. data/generated/google/apis/bigquery_v2/classes.rb +27 -22
  19. data/generated/google/apis/bigquery_v2/representations.rb +1 -0
  20. data/generated/google/apis/cloudkms_v1.rb +1 -1
  21. data/generated/google/apis/{mybusiness_v3.rb → cloudtasks_v2beta3.rb} +12 -10
  22. data/generated/google/apis/cloudtasks_v2beta3/classes.rb +1405 -0
  23. data/generated/google/apis/cloudtasks_v2beta3/representations.rb +421 -0
  24. data/generated/google/apis/cloudtasks_v2beta3/service.rb +855 -0
  25. data/generated/google/apis/compute_alpha/classes.rb +178 -135
  26. data/generated/google/apis/compute_alpha/representations.rb +82 -52
  27. data/generated/google/apis/compute_alpha/service.rb +57 -4
  28. data/generated/google/apis/compute_beta/classes.rb +125 -125
  29. data/generated/google/apis/compute_beta/representations.rb +51 -51
  30. data/generated/google/apis/compute_beta/service.rb +4 -4
  31. data/generated/google/apis/content_v2.rb +1 -1
  32. data/generated/google/apis/content_v2/classes.rb +152 -0
  33. data/generated/google/apis/content_v2/representations.rb +77 -0
  34. data/generated/google/apis/content_v2/service.rb +40 -0
  35. data/generated/google/apis/content_v2sandbox.rb +1 -1
  36. data/generated/google/apis/content_v2sandbox/classes.rb +39 -0
  37. data/generated/google/apis/content_v2sandbox/representations.rb +26 -0
  38. data/generated/google/apis/content_v2sandbox/service.rb +40 -0
  39. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  40. data/generated/google/apis/dataproc_v1.rb +1 -1
  41. data/generated/google/apis/dataproc_v1/classes.rb +299 -0
  42. data/generated/google/apis/dataproc_v1/representations.rb +115 -0
  43. data/generated/google/apis/dataproc_v1/service.rb +540 -0
  44. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  45. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  46. data/generated/google/apis/dialogflow_v2beta1/classes.rb +0 -3
  47. data/generated/google/apis/dialogflow_v2beta1/service.rb +226 -0
  48. data/generated/google/apis/dlp_v2.rb +1 -1
  49. data/generated/google/apis/dlp_v2/service.rb +54 -6
  50. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  51. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +85 -0
  52. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +32 -0
  53. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +30 -0
  54. data/generated/google/apis/iamcredentials_v1.rb +1 -1
  55. data/generated/google/apis/iamcredentials_v1/classes.rb +97 -0
  56. data/generated/google/apis/iamcredentials_v1/representations.rb +28 -0
  57. data/generated/google/apis/iamcredentials_v1/service.rb +37 -0
  58. data/generated/google/apis/language_v1beta2.rb +1 -1
  59. data/generated/google/apis/language_v1beta2/classes.rb +8 -0
  60. data/generated/google/apis/redis_v1beta1.rb +1 -1
  61. data/generated/google/apis/redis_v1beta1/classes.rb +9 -0
  62. data/generated/google/apis/redis_v1beta1/representations.rb +1 -0
  63. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  64. data/generated/google/apis/servicecontrol_v1/classes.rb +12 -0
  65. data/generated/google/apis/servicecontrol_v1/representations.rb +1 -0
  66. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  67. data/generated/google/apis/servicemanagement_v1/classes.rb +1 -1
  68. data/generated/google/apis/servicemanagement_v1/service.rb +4 -0
  69. data/generated/google/apis/serviceuser_v1.rb +1 -1
  70. data/generated/google/apis/serviceuser_v1/classes.rb +1 -1
  71. data/generated/google/apis/spanner_v1.rb +1 -1
  72. data/generated/google/apis/spanner_v1/classes.rb +56 -1
  73. data/generated/google/apis/spanner_v1/representations.rb +18 -0
  74. data/generated/google/apis/spanner_v1/service.rb +9 -3
  75. data/generated/google/apis/speech_v1.rb +1 -1
  76. data/generated/google/apis/speech_v1/classes.rb +11 -8
  77. data/generated/google/apis/storage_v1.rb +1 -1
  78. data/generated/google/apis/storage_v1/classes.rb +11 -1
  79. data/generated/google/apis/storage_v1/representations.rb +1 -0
  80. data/generated/google/apis/storage_v1/service.rb +1 -2
  81. data/generated/google/apis/testing_v1.rb +1 -1
  82. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  83. data/generated/google/apis/toolresults_v1beta3/classes.rb +14 -14
  84. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  85. data/lib/google/apis/version.rb +1 -1
  86. metadata +6 -6
  87. data/generated/google/apis/mybusiness_v3/classes.rb +0 -1864
  88. data/generated/google/apis/mybusiness_v3/representations.rb +0 -741
  89. data/generated/google/apis/mybusiness_v3/service.rb +0 -961
@@ -0,0 +1,421 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module CloudtasksV2beta3
24
+
25
+ class AppEngineHttpQueue
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class AppEngineHttpRequest
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class AppEngineRouting
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Attempt
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class Binding
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class CreateTaskRequest
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class Empty
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class Expr
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class GetIamPolicyRequest
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class ListLocationsResponse
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class ListQueuesResponse
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class ListTasksResponse
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class Location
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class PauseQueueRequest
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class Policy
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class PurgeQueueRequest
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class Queue
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class RateLimits
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class ResumeQueueRequest
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class RetryConfig
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class RunTaskRequest
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
151
+ class SetIamPolicyRequest
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
157
+ class Status
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class Task
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
169
+ class TestIamPermissionsRequest
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
175
+ class TestIamPermissionsResponse
176
+ class Representation < Google::Apis::Core::JsonRepresentation; end
177
+
178
+ include Google::Apis::Core::JsonObjectSupport
179
+ end
180
+
181
+ class AppEngineHttpQueue
182
+ # @private
183
+ class Representation < Google::Apis::Core::JsonRepresentation
184
+ property :app_engine_routing_override, as: 'appEngineRoutingOverride', class: Google::Apis::CloudtasksV2beta3::AppEngineRouting, decorator: Google::Apis::CloudtasksV2beta3::AppEngineRouting::Representation
185
+
186
+ end
187
+ end
188
+
189
+ class AppEngineHttpRequest
190
+ # @private
191
+ class Representation < Google::Apis::Core::JsonRepresentation
192
+ property :app_engine_routing, as: 'appEngineRouting', class: Google::Apis::CloudtasksV2beta3::AppEngineRouting, decorator: Google::Apis::CloudtasksV2beta3::AppEngineRouting::Representation
193
+
194
+ property :body, :base64 => true, as: 'body'
195
+ hash :headers, as: 'headers'
196
+ property :http_method, as: 'httpMethod'
197
+ property :relative_uri, as: 'relativeUri'
198
+ end
199
+ end
200
+
201
+ class AppEngineRouting
202
+ # @private
203
+ class Representation < Google::Apis::Core::JsonRepresentation
204
+ property :host, as: 'host'
205
+ property :instance, as: 'instance'
206
+ property :service, as: 'service'
207
+ property :version, as: 'version'
208
+ end
209
+ end
210
+
211
+ class Attempt
212
+ # @private
213
+ class Representation < Google::Apis::Core::JsonRepresentation
214
+ property :dispatch_time, as: 'dispatchTime'
215
+ property :response_status, as: 'responseStatus', class: Google::Apis::CloudtasksV2beta3::Status, decorator: Google::Apis::CloudtasksV2beta3::Status::Representation
216
+
217
+ property :response_time, as: 'responseTime'
218
+ property :schedule_time, as: 'scheduleTime'
219
+ end
220
+ end
221
+
222
+ class Binding
223
+ # @private
224
+ class Representation < Google::Apis::Core::JsonRepresentation
225
+ property :condition, as: 'condition', class: Google::Apis::CloudtasksV2beta3::Expr, decorator: Google::Apis::CloudtasksV2beta3::Expr::Representation
226
+
227
+ collection :members, as: 'members'
228
+ property :role, as: 'role'
229
+ end
230
+ end
231
+
232
+ class CreateTaskRequest
233
+ # @private
234
+ class Representation < Google::Apis::Core::JsonRepresentation
235
+ property :response_view, as: 'responseView'
236
+ property :task, as: 'task', class: Google::Apis::CloudtasksV2beta3::Task, decorator: Google::Apis::CloudtasksV2beta3::Task::Representation
237
+
238
+ end
239
+ end
240
+
241
+ class Empty
242
+ # @private
243
+ class Representation < Google::Apis::Core::JsonRepresentation
244
+ end
245
+ end
246
+
247
+ class Expr
248
+ # @private
249
+ class Representation < Google::Apis::Core::JsonRepresentation
250
+ property :description, as: 'description'
251
+ property :expression, as: 'expression'
252
+ property :location, as: 'location'
253
+ property :title, as: 'title'
254
+ end
255
+ end
256
+
257
+ class GetIamPolicyRequest
258
+ # @private
259
+ class Representation < Google::Apis::Core::JsonRepresentation
260
+ end
261
+ end
262
+
263
+ class ListLocationsResponse
264
+ # @private
265
+ class Representation < Google::Apis::Core::JsonRepresentation
266
+ collection :locations, as: 'locations', class: Google::Apis::CloudtasksV2beta3::Location, decorator: Google::Apis::CloudtasksV2beta3::Location::Representation
267
+
268
+ property :next_page_token, as: 'nextPageToken'
269
+ end
270
+ end
271
+
272
+ class ListQueuesResponse
273
+ # @private
274
+ class Representation < Google::Apis::Core::JsonRepresentation
275
+ property :next_page_token, as: 'nextPageToken'
276
+ collection :queues, as: 'queues', class: Google::Apis::CloudtasksV2beta3::Queue, decorator: Google::Apis::CloudtasksV2beta3::Queue::Representation
277
+
278
+ end
279
+ end
280
+
281
+ class ListTasksResponse
282
+ # @private
283
+ class Representation < Google::Apis::Core::JsonRepresentation
284
+ property :next_page_token, as: 'nextPageToken'
285
+ collection :tasks, as: 'tasks', class: Google::Apis::CloudtasksV2beta3::Task, decorator: Google::Apis::CloudtasksV2beta3::Task::Representation
286
+
287
+ end
288
+ end
289
+
290
+ class Location
291
+ # @private
292
+ class Representation < Google::Apis::Core::JsonRepresentation
293
+ property :display_name, as: 'displayName'
294
+ hash :labels, as: 'labels'
295
+ property :location_id, as: 'locationId'
296
+ hash :metadata, as: 'metadata'
297
+ property :name, as: 'name'
298
+ end
299
+ end
300
+
301
+ class PauseQueueRequest
302
+ # @private
303
+ class Representation < Google::Apis::Core::JsonRepresentation
304
+ end
305
+ end
306
+
307
+ class Policy
308
+ # @private
309
+ class Representation < Google::Apis::Core::JsonRepresentation
310
+ collection :bindings, as: 'bindings', class: Google::Apis::CloudtasksV2beta3::Binding, decorator: Google::Apis::CloudtasksV2beta3::Binding::Representation
311
+
312
+ property :etag, :base64 => true, as: 'etag'
313
+ property :version, as: 'version'
314
+ end
315
+ end
316
+
317
+ class PurgeQueueRequest
318
+ # @private
319
+ class Representation < Google::Apis::Core::JsonRepresentation
320
+ end
321
+ end
322
+
323
+ class Queue
324
+ # @private
325
+ class Representation < Google::Apis::Core::JsonRepresentation
326
+ property :app_engine_http_queue, as: 'appEngineHttpQueue', class: Google::Apis::CloudtasksV2beta3::AppEngineHttpQueue, decorator: Google::Apis::CloudtasksV2beta3::AppEngineHttpQueue::Representation
327
+
328
+ property :name, as: 'name'
329
+ property :purge_time, as: 'purgeTime'
330
+ property :rate_limits, as: 'rateLimits', class: Google::Apis::CloudtasksV2beta3::RateLimits, decorator: Google::Apis::CloudtasksV2beta3::RateLimits::Representation
331
+
332
+ property :retry_config, as: 'retryConfig', class: Google::Apis::CloudtasksV2beta3::RetryConfig, decorator: Google::Apis::CloudtasksV2beta3::RetryConfig::Representation
333
+
334
+ property :state, as: 'state'
335
+ end
336
+ end
337
+
338
+ class RateLimits
339
+ # @private
340
+ class Representation < Google::Apis::Core::JsonRepresentation
341
+ property :max_burst_size, as: 'maxBurstSize'
342
+ property :max_concurrent_dispatches, as: 'maxConcurrentDispatches'
343
+ property :max_dispatches_per_second, as: 'maxDispatchesPerSecond'
344
+ end
345
+ end
346
+
347
+ class ResumeQueueRequest
348
+ # @private
349
+ class Representation < Google::Apis::Core::JsonRepresentation
350
+ end
351
+ end
352
+
353
+ class RetryConfig
354
+ # @private
355
+ class Representation < Google::Apis::Core::JsonRepresentation
356
+ property :max_attempts, as: 'maxAttempts'
357
+ property :max_backoff, as: 'maxBackoff'
358
+ property :max_doublings, as: 'maxDoublings'
359
+ property :max_retry_duration, as: 'maxRetryDuration'
360
+ property :min_backoff, as: 'minBackoff'
361
+ end
362
+ end
363
+
364
+ class RunTaskRequest
365
+ # @private
366
+ class Representation < Google::Apis::Core::JsonRepresentation
367
+ property :response_view, as: 'responseView'
368
+ end
369
+ end
370
+
371
+ class SetIamPolicyRequest
372
+ # @private
373
+ class Representation < Google::Apis::Core::JsonRepresentation
374
+ property :policy, as: 'policy', class: Google::Apis::CloudtasksV2beta3::Policy, decorator: Google::Apis::CloudtasksV2beta3::Policy::Representation
375
+
376
+ end
377
+ end
378
+
379
+ class Status
380
+ # @private
381
+ class Representation < Google::Apis::Core::JsonRepresentation
382
+ property :code, as: 'code'
383
+ collection :details, as: 'details'
384
+ property :message, as: 'message'
385
+ end
386
+ end
387
+
388
+ class Task
389
+ # @private
390
+ class Representation < Google::Apis::Core::JsonRepresentation
391
+ property :app_engine_http_request, as: 'appEngineHttpRequest', class: Google::Apis::CloudtasksV2beta3::AppEngineHttpRequest, decorator: Google::Apis::CloudtasksV2beta3::AppEngineHttpRequest::Representation
392
+
393
+ property :create_time, as: 'createTime'
394
+ property :dispatch_count, as: 'dispatchCount'
395
+ property :first_attempt, as: 'firstAttempt', class: Google::Apis::CloudtasksV2beta3::Attempt, decorator: Google::Apis::CloudtasksV2beta3::Attempt::Representation
396
+
397
+ property :last_attempt, as: 'lastAttempt', class: Google::Apis::CloudtasksV2beta3::Attempt, decorator: Google::Apis::CloudtasksV2beta3::Attempt::Representation
398
+
399
+ property :name, as: 'name'
400
+ property :response_count, as: 'responseCount'
401
+ property :schedule_time, as: 'scheduleTime'
402
+ property :view, as: 'view'
403
+ end
404
+ end
405
+
406
+ class TestIamPermissionsRequest
407
+ # @private
408
+ class Representation < Google::Apis::Core::JsonRepresentation
409
+ collection :permissions, as: 'permissions'
410
+ end
411
+ end
412
+
413
+ class TestIamPermissionsResponse
414
+ # @private
415
+ class Representation < Google::Apis::Core::JsonRepresentation
416
+ collection :permissions, as: 'permissions'
417
+ end
418
+ end
419
+ end
420
+ end
421
+ end
@@ -0,0 +1,855 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module CloudtasksV2beta3
23
+ # Cloud Tasks API
24
+ #
25
+ # Manages the execution of large numbers of distributed requests.
26
+ #
27
+ # @example
28
+ # require 'google/apis/cloudtasks_v2beta3'
29
+ #
30
+ # Cloudtasks = Google::Apis::CloudtasksV2beta3 # Alias the module
31
+ # service = Cloudtasks::CloudTasksService.new
32
+ #
33
+ # @see https://cloud.google.com/tasks/
34
+ class CloudTasksService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://cloudtasks.googleapis.com/', '')
47
+ @batch_path = 'batch'
48
+ end
49
+
50
+ # Gets information about a location.
51
+ # @param [String] name
52
+ # Resource name for the location.
53
+ # @param [String] fields
54
+ # Selector specifying which fields to include in a partial response.
55
+ # @param [String] quota_user
56
+ # Available to use for quota purposes for server-side applications. Can be any
57
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
58
+ # @param [Google::Apis::RequestOptions] options
59
+ # Request-specific options
60
+ #
61
+ # @yield [result, err] Result & error if block supplied
62
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Location] parsed result object
63
+ # @yieldparam err [StandardError] error object if request failed
64
+ #
65
+ # @return [Google::Apis::CloudtasksV2beta3::Location]
66
+ #
67
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
68
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
69
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
70
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
71
+ command = make_simple_command(:get, 'v2beta3/{+name}', options)
72
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Location::Representation
73
+ command.response_class = Google::Apis::CloudtasksV2beta3::Location
74
+ command.params['name'] = name unless name.nil?
75
+ command.query['fields'] = fields unless fields.nil?
76
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
77
+ execute_or_queue_command(command, &block)
78
+ end
79
+
80
+ # Lists information about the supported locations for this service.
81
+ # @param [String] name
82
+ # The resource that owns the locations collection, if applicable.
83
+ # @param [String] filter
84
+ # The standard list filter.
85
+ # @param [Fixnum] page_size
86
+ # The standard list page size.
87
+ # @param [String] page_token
88
+ # The standard list page token.
89
+ # @param [String] fields
90
+ # Selector specifying which fields to include in a partial response.
91
+ # @param [String] quota_user
92
+ # Available to use for quota purposes for server-side applications. Can be any
93
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
94
+ # @param [Google::Apis::RequestOptions] options
95
+ # Request-specific options
96
+ #
97
+ # @yield [result, err] Result & error if block supplied
98
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::ListLocationsResponse] parsed result object
99
+ # @yieldparam err [StandardError] error object if request failed
100
+ #
101
+ # @return [Google::Apis::CloudtasksV2beta3::ListLocationsResponse]
102
+ #
103
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
104
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
105
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
106
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
107
+ command = make_simple_command(:get, 'v2beta3/{+name}/locations', options)
108
+ command.response_representation = Google::Apis::CloudtasksV2beta3::ListLocationsResponse::Representation
109
+ command.response_class = Google::Apis::CloudtasksV2beta3::ListLocationsResponse
110
+ command.params['name'] = name unless name.nil?
111
+ command.query['filter'] = filter unless filter.nil?
112
+ command.query['pageSize'] = page_size unless page_size.nil?
113
+ command.query['pageToken'] = page_token unless page_token.nil?
114
+ command.query['fields'] = fields unless fields.nil?
115
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
+ execute_or_queue_command(command, &block)
117
+ end
118
+
119
+ # Creates a queue.
120
+ # Queues created with this method allow tasks to live for a maximum of 31
121
+ # days. After a task is 31 days old, the task will be deleted regardless of
122
+ # whether
123
+ # it was dispatched or not.
124
+ # WARNING: Using this method may have unintended side effects if you are
125
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
126
+ # Read
127
+ # [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/
128
+ # docs/queue-yaml)
129
+ # before using this method.
130
+ # @param [String] parent
131
+ # Required.
132
+ # The location name in which the queue will be created.
133
+ # For example: `projects/PROJECT_ID/locations/LOCATION_ID`
134
+ # The list of allowed locations can be obtained by calling Cloud
135
+ # Tasks' implementation of
136
+ # ListLocations.
137
+ # @param [Google::Apis::CloudtasksV2beta3::Queue] queue_object
138
+ # @param [String] fields
139
+ # Selector specifying which fields to include in a partial response.
140
+ # @param [String] quota_user
141
+ # Available to use for quota purposes for server-side applications. Can be any
142
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
143
+ # @param [Google::Apis::RequestOptions] options
144
+ # Request-specific options
145
+ #
146
+ # @yield [result, err] Result & error if block supplied
147
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Queue] parsed result object
148
+ # @yieldparam err [StandardError] error object if request failed
149
+ #
150
+ # @return [Google::Apis::CloudtasksV2beta3::Queue]
151
+ #
152
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
153
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
154
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
155
+ def create_project_location_queue(parent, queue_object = nil, fields: nil, quota_user: nil, options: nil, &block)
156
+ command = make_simple_command(:post, 'v2beta3/{+parent}/queues', options)
157
+ command.request_representation = Google::Apis::CloudtasksV2beta3::Queue::Representation
158
+ command.request_object = queue_object
159
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Queue::Representation
160
+ command.response_class = Google::Apis::CloudtasksV2beta3::Queue
161
+ command.params['parent'] = parent unless parent.nil?
162
+ command.query['fields'] = fields unless fields.nil?
163
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
164
+ execute_or_queue_command(command, &block)
165
+ end
166
+
167
+ # Deletes a queue.
168
+ # This command will delete the queue even if it has tasks in it.
169
+ # Note: If you delete a queue, a queue with the same name can't be created
170
+ # for 7 days.
171
+ # WARNING: Using this method may have unintended side effects if you are
172
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
173
+ # Read
174
+ # [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/
175
+ # docs/queue-yaml)
176
+ # before using this method.
177
+ # @param [String] name
178
+ # Required.
179
+ # The queue name. For example:
180
+ # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
181
+ # @param [String] fields
182
+ # Selector specifying which fields to include in a partial response.
183
+ # @param [String] quota_user
184
+ # Available to use for quota purposes for server-side applications. Can be any
185
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
186
+ # @param [Google::Apis::RequestOptions] options
187
+ # Request-specific options
188
+ #
189
+ # @yield [result, err] Result & error if block supplied
190
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Empty] parsed result object
191
+ # @yieldparam err [StandardError] error object if request failed
192
+ #
193
+ # @return [Google::Apis::CloudtasksV2beta3::Empty]
194
+ #
195
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
196
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
197
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
198
+ def delete_project_location_queue(name, fields: nil, quota_user: nil, options: nil, &block)
199
+ command = make_simple_command(:delete, 'v2beta3/{+name}', options)
200
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Empty::Representation
201
+ command.response_class = Google::Apis::CloudtasksV2beta3::Empty
202
+ command.params['name'] = name unless name.nil?
203
+ command.query['fields'] = fields unless fields.nil?
204
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
205
+ execute_or_queue_command(command, &block)
206
+ end
207
+
208
+ # Gets a queue.
209
+ # @param [String] name
210
+ # Required.
211
+ # The resource name of the queue. For example:
212
+ # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
213
+ # @param [String] fields
214
+ # Selector specifying which fields to include in a partial response.
215
+ # @param [String] quota_user
216
+ # Available to use for quota purposes for server-side applications. Can be any
217
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
218
+ # @param [Google::Apis::RequestOptions] options
219
+ # Request-specific options
220
+ #
221
+ # @yield [result, err] Result & error if block supplied
222
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Queue] parsed result object
223
+ # @yieldparam err [StandardError] error object if request failed
224
+ #
225
+ # @return [Google::Apis::CloudtasksV2beta3::Queue]
226
+ #
227
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
228
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
229
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
230
+ def get_project_location_queue(name, fields: nil, quota_user: nil, options: nil, &block)
231
+ command = make_simple_command(:get, 'v2beta3/{+name}', options)
232
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Queue::Representation
233
+ command.response_class = Google::Apis::CloudtasksV2beta3::Queue
234
+ command.params['name'] = name unless name.nil?
235
+ command.query['fields'] = fields unless fields.nil?
236
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
237
+ execute_or_queue_command(command, &block)
238
+ end
239
+
240
+ # Gets the access control policy for a Queue.
241
+ # Returns an empty policy if the resource exists and does not have a policy
242
+ # set.
243
+ # Authorization requires the following
244
+ # [Google IAM](https://cloud.google.com/iam) permission on the specified
245
+ # resource parent:
246
+ # * `cloudtasks.queues.getIamPolicy`
247
+ # @param [String] resource
248
+ # REQUIRED: The resource for which the policy is being requested.
249
+ # See the operation documentation for the appropriate value for this field.
250
+ # @param [Google::Apis::CloudtasksV2beta3::GetIamPolicyRequest] get_iam_policy_request_object
251
+ # @param [String] fields
252
+ # Selector specifying which fields to include in a partial response.
253
+ # @param [String] quota_user
254
+ # Available to use for quota purposes for server-side applications. Can be any
255
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
256
+ # @param [Google::Apis::RequestOptions] options
257
+ # Request-specific options
258
+ #
259
+ # @yield [result, err] Result & error if block supplied
260
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Policy] parsed result object
261
+ # @yieldparam err [StandardError] error object if request failed
262
+ #
263
+ # @return [Google::Apis::CloudtasksV2beta3::Policy]
264
+ #
265
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
266
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
267
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
268
+ def get_queue_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
269
+ command = make_simple_command(:post, 'v2beta3/{+resource}:getIamPolicy', options)
270
+ command.request_representation = Google::Apis::CloudtasksV2beta3::GetIamPolicyRequest::Representation
271
+ command.request_object = get_iam_policy_request_object
272
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Policy::Representation
273
+ command.response_class = Google::Apis::CloudtasksV2beta3::Policy
274
+ command.params['resource'] = resource unless resource.nil?
275
+ command.query['fields'] = fields unless fields.nil?
276
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
277
+ execute_or_queue_command(command, &block)
278
+ end
279
+
280
+ # Lists queues.
281
+ # Queues are returned in lexicographical order.
282
+ # @param [String] parent
283
+ # Required.
284
+ # The location name.
285
+ # For example: `projects/PROJECT_ID/locations/LOCATION_ID`
286
+ # @param [String] filter
287
+ # `filter` can be used to specify a subset of queues. Any Queue
288
+ # field can be used as a filter and several operators as supported.
289
+ # For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
290
+ # described in
291
+ # [Stackdriver's Advanced Logs Filters](https://cloud.google.com/logging/docs/
292
+ # view/advanced_filters).
293
+ # Sample filter "state: PAUSED".
294
+ # Note that using filters might cause fewer queues than the
295
+ # requested page_size to be returned.
296
+ # @param [Fixnum] page_size
297
+ # Requested page size.
298
+ # The maximum page size is 9800. If unspecified, the page size will
299
+ # be the maximum. Fewer queues than requested might be returned,
300
+ # even if more queues exist; use the
301
+ # next_page_token in the
302
+ # response to determine if more queues exist.
303
+ # @param [String] page_token
304
+ # A token identifying the page of results to return.
305
+ # To request the first page results, page_token must be empty. To
306
+ # request the next page of results, page_token must be the value of
307
+ # next_page_token returned
308
+ # from the previous call to ListQueues
309
+ # method. It is an error to switch the value of the
310
+ # filter while iterating through pages.
311
+ # @param [String] fields
312
+ # Selector specifying which fields to include in a partial response.
313
+ # @param [String] quota_user
314
+ # Available to use for quota purposes for server-side applications. Can be any
315
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
316
+ # @param [Google::Apis::RequestOptions] options
317
+ # Request-specific options
318
+ #
319
+ # @yield [result, err] Result & error if block supplied
320
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::ListQueuesResponse] parsed result object
321
+ # @yieldparam err [StandardError] error object if request failed
322
+ #
323
+ # @return [Google::Apis::CloudtasksV2beta3::ListQueuesResponse]
324
+ #
325
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
326
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
327
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
328
+ def list_project_location_queues(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
329
+ command = make_simple_command(:get, 'v2beta3/{+parent}/queues', options)
330
+ command.response_representation = Google::Apis::CloudtasksV2beta3::ListQueuesResponse::Representation
331
+ command.response_class = Google::Apis::CloudtasksV2beta3::ListQueuesResponse
332
+ command.params['parent'] = parent unless parent.nil?
333
+ command.query['filter'] = filter unless filter.nil?
334
+ command.query['pageSize'] = page_size unless page_size.nil?
335
+ command.query['pageToken'] = page_token unless page_token.nil?
336
+ command.query['fields'] = fields unless fields.nil?
337
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
338
+ execute_or_queue_command(command, &block)
339
+ end
340
+
341
+ # Updates a queue.
342
+ # This method creates the queue if it does not exist and updates
343
+ # the queue if it does exist.
344
+ # Queues created with this method allow tasks to live for a maximum of 31
345
+ # days. After a task is 31 days old, the task will be deleted regardless of
346
+ # whether
347
+ # it was dispatched or not.
348
+ # WARNING: Using this method may have unintended side effects if you are
349
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
350
+ # Read
351
+ # [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/
352
+ # docs/queue-yaml)
353
+ # before using this method.
354
+ # @param [String] name
355
+ # Caller-specified and required in CreateQueue,
356
+ # after which it becomes output only.
357
+ # The queue name.
358
+ # The queue name must have the following format:
359
+ # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
360
+ # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
361
+ # hyphens (-), colons (:), or periods (.).
362
+ # For more information, see
363
+ # [Identifying projects](https://cloud.google.com/resource-manager/docs/
364
+ # creating-managing-projects#identifying_projects)
365
+ # * `LOCATION_ID` is the canonical ID for the queue's location.
366
+ # The list of available locations can be obtained by calling
367
+ # ListLocations.
368
+ # For more information, see https://cloud.google.com/about/locations/.
369
+ # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
370
+ # hyphens (-). The maximum length is 100 characters.
371
+ # @param [Google::Apis::CloudtasksV2beta3::Queue] queue_object
372
+ # @param [String] update_mask
373
+ # A mask used to specify which fields of the queue are being updated.
374
+ # If empty, then all fields will be updated.
375
+ # @param [String] fields
376
+ # Selector specifying which fields to include in a partial response.
377
+ # @param [String] quota_user
378
+ # Available to use for quota purposes for server-side applications. Can be any
379
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
380
+ # @param [Google::Apis::RequestOptions] options
381
+ # Request-specific options
382
+ #
383
+ # @yield [result, err] Result & error if block supplied
384
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Queue] parsed result object
385
+ # @yieldparam err [StandardError] error object if request failed
386
+ #
387
+ # @return [Google::Apis::CloudtasksV2beta3::Queue]
388
+ #
389
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
390
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
391
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
392
+ def patch_project_location_queue(name, queue_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
393
+ command = make_simple_command(:patch, 'v2beta3/{+name}', options)
394
+ command.request_representation = Google::Apis::CloudtasksV2beta3::Queue::Representation
395
+ command.request_object = queue_object
396
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Queue::Representation
397
+ command.response_class = Google::Apis::CloudtasksV2beta3::Queue
398
+ command.params['name'] = name unless name.nil?
399
+ command.query['updateMask'] = update_mask unless update_mask.nil?
400
+ command.query['fields'] = fields unless fields.nil?
401
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
402
+ execute_or_queue_command(command, &block)
403
+ end
404
+
405
+ # Pauses the queue.
406
+ # If a queue is paused then the system will stop dispatching tasks
407
+ # until the queue is resumed via
408
+ # ResumeQueue. Tasks can still be added
409
+ # when the queue is paused. A queue is paused if its
410
+ # state is PAUSED.
411
+ # @param [String] name
412
+ # Required.
413
+ # The queue name. For example:
414
+ # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
415
+ # @param [Google::Apis::CloudtasksV2beta3::PauseQueueRequest] pause_queue_request_object
416
+ # @param [String] fields
417
+ # Selector specifying which fields to include in a partial response.
418
+ # @param [String] quota_user
419
+ # Available to use for quota purposes for server-side applications. Can be any
420
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
421
+ # @param [Google::Apis::RequestOptions] options
422
+ # Request-specific options
423
+ #
424
+ # @yield [result, err] Result & error if block supplied
425
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Queue] parsed result object
426
+ # @yieldparam err [StandardError] error object if request failed
427
+ #
428
+ # @return [Google::Apis::CloudtasksV2beta3::Queue]
429
+ #
430
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
431
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
432
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
433
+ def pause_queue(name, pause_queue_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
434
+ command = make_simple_command(:post, 'v2beta3/{+name}:pause', options)
435
+ command.request_representation = Google::Apis::CloudtasksV2beta3::PauseQueueRequest::Representation
436
+ command.request_object = pause_queue_request_object
437
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Queue::Representation
438
+ command.response_class = Google::Apis::CloudtasksV2beta3::Queue
439
+ command.params['name'] = name unless name.nil?
440
+ command.query['fields'] = fields unless fields.nil?
441
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
442
+ execute_or_queue_command(command, &block)
443
+ end
444
+
445
+ # Purges a queue by deleting all of its tasks.
446
+ # All tasks created before this method is called are permanently deleted.
447
+ # Purge operations can take up to one minute to take effect. Tasks
448
+ # might be dispatched before the purge takes effect. A purge is irreversible.
449
+ # @param [String] name
450
+ # Required.
451
+ # The queue name. For example:
452
+ # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
453
+ # @param [Google::Apis::CloudtasksV2beta3::PurgeQueueRequest] purge_queue_request_object
454
+ # @param [String] fields
455
+ # Selector specifying which fields to include in a partial response.
456
+ # @param [String] quota_user
457
+ # Available to use for quota purposes for server-side applications. Can be any
458
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
459
+ # @param [Google::Apis::RequestOptions] options
460
+ # Request-specific options
461
+ #
462
+ # @yield [result, err] Result & error if block supplied
463
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Queue] parsed result object
464
+ # @yieldparam err [StandardError] error object if request failed
465
+ #
466
+ # @return [Google::Apis::CloudtasksV2beta3::Queue]
467
+ #
468
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
469
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
470
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
471
+ def purge_queue(name, purge_queue_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
472
+ command = make_simple_command(:post, 'v2beta3/{+name}:purge', options)
473
+ command.request_representation = Google::Apis::CloudtasksV2beta3::PurgeQueueRequest::Representation
474
+ command.request_object = purge_queue_request_object
475
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Queue::Representation
476
+ command.response_class = Google::Apis::CloudtasksV2beta3::Queue
477
+ command.params['name'] = name unless name.nil?
478
+ command.query['fields'] = fields unless fields.nil?
479
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
480
+ execute_or_queue_command(command, &block)
481
+ end
482
+
483
+ # Resume a queue.
484
+ # This method resumes a queue after it has been
485
+ # PAUSED or
486
+ # DISABLED. The state of a queue is stored
487
+ # in the queue's state; after calling this method it
488
+ # will be set to RUNNING.
489
+ # WARNING: Resuming many high-QPS queues at the same time can
490
+ # lead to target overloading. If you are resuming high-QPS
491
+ # queues, follow the 500/50/5 pattern described in
492
+ # [Managing Cloud Tasks Scaling Risks](https://cloud.google.com/tasks/docs/
493
+ # manage-cloud-task-scaling).
494
+ # @param [String] name
495
+ # Required.
496
+ # The queue name. For example:
497
+ # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
498
+ # @param [Google::Apis::CloudtasksV2beta3::ResumeQueueRequest] resume_queue_request_object
499
+ # @param [String] fields
500
+ # Selector specifying which fields to include in a partial response.
501
+ # @param [String] quota_user
502
+ # Available to use for quota purposes for server-side applications. Can be any
503
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
504
+ # @param [Google::Apis::RequestOptions] options
505
+ # Request-specific options
506
+ #
507
+ # @yield [result, err] Result & error if block supplied
508
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Queue] parsed result object
509
+ # @yieldparam err [StandardError] error object if request failed
510
+ #
511
+ # @return [Google::Apis::CloudtasksV2beta3::Queue]
512
+ #
513
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
514
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
515
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
516
+ def resume_queue(name, resume_queue_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
517
+ command = make_simple_command(:post, 'v2beta3/{+name}:resume', options)
518
+ command.request_representation = Google::Apis::CloudtasksV2beta3::ResumeQueueRequest::Representation
519
+ command.request_object = resume_queue_request_object
520
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Queue::Representation
521
+ command.response_class = Google::Apis::CloudtasksV2beta3::Queue
522
+ command.params['name'] = name unless name.nil?
523
+ command.query['fields'] = fields unless fields.nil?
524
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
525
+ execute_or_queue_command(command, &block)
526
+ end
527
+
528
+ # Sets the access control policy for a Queue. Replaces any existing
529
+ # policy.
530
+ # Note: The Cloud Console does not check queue-level IAM permissions yet.
531
+ # Project-level permissions are required to use the Cloud Console.
532
+ # Authorization requires the following
533
+ # [Google IAM](https://cloud.google.com/iam) permission on the specified
534
+ # resource parent:
535
+ # * `cloudtasks.queues.setIamPolicy`
536
+ # @param [String] resource
537
+ # REQUIRED: The resource for which the policy is being specified.
538
+ # See the operation documentation for the appropriate value for this field.
539
+ # @param [Google::Apis::CloudtasksV2beta3::SetIamPolicyRequest] set_iam_policy_request_object
540
+ # @param [String] fields
541
+ # Selector specifying which fields to include in a partial response.
542
+ # @param [String] quota_user
543
+ # Available to use for quota purposes for server-side applications. Can be any
544
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
545
+ # @param [Google::Apis::RequestOptions] options
546
+ # Request-specific options
547
+ #
548
+ # @yield [result, err] Result & error if block supplied
549
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Policy] parsed result object
550
+ # @yieldparam err [StandardError] error object if request failed
551
+ #
552
+ # @return [Google::Apis::CloudtasksV2beta3::Policy]
553
+ #
554
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
555
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
556
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
557
+ def set_queue_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
558
+ command = make_simple_command(:post, 'v2beta3/{+resource}:setIamPolicy', options)
559
+ command.request_representation = Google::Apis::CloudtasksV2beta3::SetIamPolicyRequest::Representation
560
+ command.request_object = set_iam_policy_request_object
561
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Policy::Representation
562
+ command.response_class = Google::Apis::CloudtasksV2beta3::Policy
563
+ command.params['resource'] = resource unless resource.nil?
564
+ command.query['fields'] = fields unless fields.nil?
565
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
566
+ execute_or_queue_command(command, &block)
567
+ end
568
+
569
+ # Returns permissions that a caller has on a Queue.
570
+ # If the resource does not exist, this will return an empty set of
571
+ # permissions, not a NOT_FOUND error.
572
+ # Note: This operation is designed to be used for building permission-aware
573
+ # UIs and command-line tools, not for authorization checking. This operation
574
+ # may "fail open" without warning.
575
+ # @param [String] resource
576
+ # REQUIRED: The resource for which the policy detail is being requested.
577
+ # See the operation documentation for the appropriate value for this field.
578
+ # @param [Google::Apis::CloudtasksV2beta3::TestIamPermissionsRequest] test_iam_permissions_request_object
579
+ # @param [String] fields
580
+ # Selector specifying which fields to include in a partial response.
581
+ # @param [String] quota_user
582
+ # Available to use for quota purposes for server-side applications. Can be any
583
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
584
+ # @param [Google::Apis::RequestOptions] options
585
+ # Request-specific options
586
+ #
587
+ # @yield [result, err] Result & error if block supplied
588
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::TestIamPermissionsResponse] parsed result object
589
+ # @yieldparam err [StandardError] error object if request failed
590
+ #
591
+ # @return [Google::Apis::CloudtasksV2beta3::TestIamPermissionsResponse]
592
+ #
593
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
594
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
595
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
596
+ def test_queue_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
597
+ command = make_simple_command(:post, 'v2beta3/{+resource}:testIamPermissions', options)
598
+ command.request_representation = Google::Apis::CloudtasksV2beta3::TestIamPermissionsRequest::Representation
599
+ command.request_object = test_iam_permissions_request_object
600
+ command.response_representation = Google::Apis::CloudtasksV2beta3::TestIamPermissionsResponse::Representation
601
+ command.response_class = Google::Apis::CloudtasksV2beta3::TestIamPermissionsResponse
602
+ command.params['resource'] = resource unless resource.nil?
603
+ command.query['fields'] = fields unless fields.nil?
604
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
605
+ execute_or_queue_command(command, &block)
606
+ end
607
+
608
+ # Creates a task and adds it to a queue.
609
+ # Tasks cannot be updated after creation; there is no UpdateTask command.
610
+ # * For App Engine queues, the maximum task size is
611
+ # 100KB.
612
+ # @param [String] parent
613
+ # Required.
614
+ # The queue name. For example:
615
+ # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
616
+ # The queue must already exist.
617
+ # @param [Google::Apis::CloudtasksV2beta3::CreateTaskRequest] create_task_request_object
618
+ # @param [String] fields
619
+ # Selector specifying which fields to include in a partial response.
620
+ # @param [String] quota_user
621
+ # Available to use for quota purposes for server-side applications. Can be any
622
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
623
+ # @param [Google::Apis::RequestOptions] options
624
+ # Request-specific options
625
+ #
626
+ # @yield [result, err] Result & error if block supplied
627
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Task] parsed result object
628
+ # @yieldparam err [StandardError] error object if request failed
629
+ #
630
+ # @return [Google::Apis::CloudtasksV2beta3::Task]
631
+ #
632
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
633
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
634
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
635
+ def create_task(parent, create_task_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
636
+ command = make_simple_command(:post, 'v2beta3/{+parent}/tasks', options)
637
+ command.request_representation = Google::Apis::CloudtasksV2beta3::CreateTaskRequest::Representation
638
+ command.request_object = create_task_request_object
639
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Task::Representation
640
+ command.response_class = Google::Apis::CloudtasksV2beta3::Task
641
+ command.params['parent'] = parent unless parent.nil?
642
+ command.query['fields'] = fields unless fields.nil?
643
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
644
+ execute_or_queue_command(command, &block)
645
+ end
646
+
647
+ # Deletes a task.
648
+ # A task can be deleted if it is scheduled or dispatched. A task
649
+ # cannot be deleted if it has executed successfully or permanently
650
+ # failed.
651
+ # @param [String] name
652
+ # Required.
653
+ # The task name. For example:
654
+ # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
655
+ # @param [String] fields
656
+ # Selector specifying which fields to include in a partial response.
657
+ # @param [String] quota_user
658
+ # Available to use for quota purposes for server-side applications. Can be any
659
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
660
+ # @param [Google::Apis::RequestOptions] options
661
+ # Request-specific options
662
+ #
663
+ # @yield [result, err] Result & error if block supplied
664
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Empty] parsed result object
665
+ # @yieldparam err [StandardError] error object if request failed
666
+ #
667
+ # @return [Google::Apis::CloudtasksV2beta3::Empty]
668
+ #
669
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
670
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
671
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
672
+ def delete_project_location_queue_task(name, fields: nil, quota_user: nil, options: nil, &block)
673
+ command = make_simple_command(:delete, 'v2beta3/{+name}', options)
674
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Empty::Representation
675
+ command.response_class = Google::Apis::CloudtasksV2beta3::Empty
676
+ command.params['name'] = name unless name.nil?
677
+ command.query['fields'] = fields unless fields.nil?
678
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
679
+ execute_or_queue_command(command, &block)
680
+ end
681
+
682
+ # Gets a task.
683
+ # @param [String] name
684
+ # Required.
685
+ # The task name. For example:
686
+ # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
687
+ # @param [String] response_view
688
+ # The response_view specifies which subset of the Task will be
689
+ # returned.
690
+ # By default response_view is BASIC; not all
691
+ # information is retrieved by default because some data, such as
692
+ # payloads, might be desirable to return only when needed because
693
+ # of its large size or because of the sensitivity of data that it
694
+ # contains.
695
+ # Authorization for FULL requires
696
+ # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
697
+ # permission on the Task resource.
698
+ # @param [String] fields
699
+ # Selector specifying which fields to include in a partial response.
700
+ # @param [String] quota_user
701
+ # Available to use for quota purposes for server-side applications. Can be any
702
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
703
+ # @param [Google::Apis::RequestOptions] options
704
+ # Request-specific options
705
+ #
706
+ # @yield [result, err] Result & error if block supplied
707
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Task] parsed result object
708
+ # @yieldparam err [StandardError] error object if request failed
709
+ #
710
+ # @return [Google::Apis::CloudtasksV2beta3::Task]
711
+ #
712
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
713
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
714
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
715
+ def get_project_location_queue_task(name, response_view: nil, fields: nil, quota_user: nil, options: nil, &block)
716
+ command = make_simple_command(:get, 'v2beta3/{+name}', options)
717
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Task::Representation
718
+ command.response_class = Google::Apis::CloudtasksV2beta3::Task
719
+ command.params['name'] = name unless name.nil?
720
+ command.query['responseView'] = response_view unless response_view.nil?
721
+ command.query['fields'] = fields unless fields.nil?
722
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
723
+ execute_or_queue_command(command, &block)
724
+ end
725
+
726
+ # Lists the tasks in a queue.
727
+ # By default, only the BASIC view is retrieved
728
+ # due to performance considerations;
729
+ # response_view controls the
730
+ # subset of information which is returned.
731
+ # The tasks may be returned in any order. The ordering may change at any
732
+ # time.
733
+ # @param [String] parent
734
+ # Required.
735
+ # The queue name. For example:
736
+ # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
737
+ # @param [Fixnum] page_size
738
+ # Requested page size. Fewer tasks than requested might be returned.
739
+ # The maximum page size is 1000. If unspecified, the page size will
740
+ # be the maximum. Fewer tasks than requested might be returned,
741
+ # even if more tasks exist; use
742
+ # next_page_token in the
743
+ # response to determine if more tasks exist.
744
+ # @param [String] page_token
745
+ # A token identifying the page of results to return.
746
+ # To request the first page results, page_token must be empty. To
747
+ # request the next page of results, page_token must be the value of
748
+ # next_page_token returned
749
+ # from the previous call to ListTasks
750
+ # method.
751
+ # The page token is valid for only 2 hours.
752
+ # @param [String] response_view
753
+ # The response_view specifies which subset of the Task will be
754
+ # returned.
755
+ # By default response_view is BASIC; not all
756
+ # information is retrieved by default because some data, such as
757
+ # payloads, might be desirable to return only when needed because
758
+ # of its large size or because of the sensitivity of data that it
759
+ # contains.
760
+ # Authorization for FULL requires
761
+ # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
762
+ # permission on the Task resource.
763
+ # @param [String] fields
764
+ # Selector specifying which fields to include in a partial response.
765
+ # @param [String] quota_user
766
+ # Available to use for quota purposes for server-side applications. Can be any
767
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
768
+ # @param [Google::Apis::RequestOptions] options
769
+ # Request-specific options
770
+ #
771
+ # @yield [result, err] Result & error if block supplied
772
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::ListTasksResponse] parsed result object
773
+ # @yieldparam err [StandardError] error object if request failed
774
+ #
775
+ # @return [Google::Apis::CloudtasksV2beta3::ListTasksResponse]
776
+ #
777
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
778
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
779
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
780
+ def list_project_location_queue_tasks(parent, page_size: nil, page_token: nil, response_view: nil, fields: nil, quota_user: nil, options: nil, &block)
781
+ command = make_simple_command(:get, 'v2beta3/{+parent}/tasks', options)
782
+ command.response_representation = Google::Apis::CloudtasksV2beta3::ListTasksResponse::Representation
783
+ command.response_class = Google::Apis::CloudtasksV2beta3::ListTasksResponse
784
+ command.params['parent'] = parent unless parent.nil?
785
+ command.query['pageSize'] = page_size unless page_size.nil?
786
+ command.query['pageToken'] = page_token unless page_token.nil?
787
+ command.query['responseView'] = response_view unless response_view.nil?
788
+ command.query['fields'] = fields unless fields.nil?
789
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
790
+ execute_or_queue_command(command, &block)
791
+ end
792
+
793
+ # Forces a task to run now.
794
+ # When this method is called, Cloud Tasks will dispatch the task, even if
795
+ # the task is already running, the queue has reached its RateLimits or
796
+ # is PAUSED.
797
+ # This command is meant to be used for manual debugging. For
798
+ # example, RunTask can be used to retry a failed
799
+ # task after a fix has been made or to manually force a task to be
800
+ # dispatched now.
801
+ # The dispatched task is returned. That is, the task that is returned
802
+ # contains the status after the task is dispatched but
803
+ # before the task is received by its target.
804
+ # If Cloud Tasks receives a successful response from the task's
805
+ # target, then the task will be deleted; otherwise the task's
806
+ # schedule_time will be reset to the time that
807
+ # RunTask was called plus the retry delay specified
808
+ # in the queue's RetryConfig.
809
+ # RunTask returns
810
+ # NOT_FOUND when it is called on a
811
+ # task that has already succeeded or permanently failed.
812
+ # @param [String] name
813
+ # Required.
814
+ # The task name. For example:
815
+ # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
816
+ # @param [Google::Apis::CloudtasksV2beta3::RunTaskRequest] run_task_request_object
817
+ # @param [String] fields
818
+ # Selector specifying which fields to include in a partial response.
819
+ # @param [String] quota_user
820
+ # Available to use for quota purposes for server-side applications. Can be any
821
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
822
+ # @param [Google::Apis::RequestOptions] options
823
+ # Request-specific options
824
+ #
825
+ # @yield [result, err] Result & error if block supplied
826
+ # @yieldparam result [Google::Apis::CloudtasksV2beta3::Task] parsed result object
827
+ # @yieldparam err [StandardError] error object if request failed
828
+ #
829
+ # @return [Google::Apis::CloudtasksV2beta3::Task]
830
+ #
831
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
832
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
833
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
834
+ def run_task(name, run_task_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
835
+ command = make_simple_command(:post, 'v2beta3/{+name}:run', options)
836
+ command.request_representation = Google::Apis::CloudtasksV2beta3::RunTaskRequest::Representation
837
+ command.request_object = run_task_request_object
838
+ command.response_representation = Google::Apis::CloudtasksV2beta3::Task::Representation
839
+ command.response_class = Google::Apis::CloudtasksV2beta3::Task
840
+ command.params['name'] = name unless name.nil?
841
+ command.query['fields'] = fields unless fields.nil?
842
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
843
+ execute_or_queue_command(command, &block)
844
+ end
845
+
846
+ protected
847
+
848
+ def apply_command_defaults(command)
849
+ command.query['key'] = key unless key.nil?
850
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
851
+ end
852
+ end
853
+ end
854
+ end
855
+ end