Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 5b20ed8

Browse files
yoshi-automationtseaver
authored andcommitted
Copy lintified proto files (via synth). (#7471)
1 parent 675725e commit 5b20ed8

File tree

14 files changed

+1020
-740
lines changed

14 files changed

+1020
-740
lines changed

google/cloud/tasks_v2beta2/gapic/enums.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ class View(enum.IntEnum):
240240
BASIC (int): The basic view omits fields which can be large or can contain sensitive
241241
data.
242242
243-
This view does not include the (``payload in AppEngineHttpRequest`` and
244-
``payload in PullMessage``). These payloads are desirable to return only
245-
when needed, because they can be large and because of the sensitivity of
246-
the data that you choose to store in it.
243+
This view does not include the (``payload in AppEngineHttpRequest`` and
244+
``payload in PullMessage``). These payloads are desirable to return
245+
only when needed, because they can be large and because of the
246+
sensitivity of the data that you choose to store in it.
247247
FULL (int): All information is returned.
248248
249249
Authorization for ``FULL`` requires ``cloudtasks.tasks.fullView``

google/cloud/tasks_v2beta2/proto/cloudtasks.proto

Lines changed: 249 additions & 199 deletions
Large diffs are not rendered by default.

google/cloud/tasks_v2beta2/proto/cloudtasks_pb2_grpc.py

Lines changed: 79 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,15 @@ def CreateQueue(self, request, context):
153153
"""Creates a queue.
154154
155155
Queues created with this method allow tasks to live for a maximum of 31
156-
days. After a task is 31 days old, the task will be deleted regardless of whether
157-
it was dispatched or not.
156+
days. After a task is 31 days old, the task will be deleted regardless of
157+
whether it was dispatched or not.
158158
159159
WARNING: Using this method may have unintended side effects if you are
160160
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
161161
Read
162-
[Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml)
163-
before using this method.
162+
[Overview of Queue Management and
163+
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
164+
this method.
164165
"""
165166
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
166167
context.set_details("Method not implemented!")
@@ -173,14 +174,15 @@ def UpdateQueue(self, request, context):
173174
the queue if it does exist.
174175
175176
Queues created with this method allow tasks to live for a maximum of 31
176-
days. After a task is 31 days old, the task will be deleted regardless of whether
177-
it was dispatched or not.
177+
days. After a task is 31 days old, the task will be deleted regardless of
178+
whether it was dispatched or not.
178179
179180
WARNING: Using this method may have unintended side effects if you are
180181
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
181182
Read
182-
[Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml)
183-
before using this method.
183+
[Overview of Queue Management and
184+
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
185+
this method.
184186
"""
185187
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
186188
context.set_details("Method not implemented!")
@@ -197,8 +199,9 @@ def DeleteQueue(self, request, context):
197199
WARNING: Using this method may have unintended side effects if you are
198200
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
199201
Read
200-
[Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml)
201-
before using this method.
202+
[Overview of Queue Management and
203+
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
204+
this method.
202205
"""
203206
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
204207
context.set_details("Method not implemented!")
@@ -221,9 +224,10 @@ def PauseQueue(self, request, context):
221224
222225
If a queue is paused then the system will stop dispatching tasks
223226
until the queue is resumed via
224-
[ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
225-
when the queue is paused. A queue is paused if its
226-
[state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
227+
[ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can
228+
still be added when the queue is paused. A queue is paused if its
229+
[state][google.cloud.tasks.v2beta2.Queue.state] is
230+
[PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
227231
"""
228232
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
229233
context.set_details("Method not implemented!")
@@ -234,23 +238,26 @@ def ResumeQueue(self, request, context):
234238
235239
This method resumes a queue after it has been
236240
[PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or
237-
[DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored
238-
in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it
239-
will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
241+
[DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a
242+
queue is stored in the queue's
243+
[state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method
244+
it will be set to
245+
[RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
240246
241247
WARNING: Resuming many high-QPS queues at the same time can
242248
lead to target overloading. If you are resuming high-QPS
243249
queues, follow the 500/50/5 pattern described in
244-
[Managing Cloud Tasks Scaling Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
250+
[Managing Cloud Tasks Scaling
251+
Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
245252
"""
246253
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
247254
context.set_details("Method not implemented!")
248255
raise NotImplementedError("Method not implemented!")
249256

250257
def GetIamPolicy(self, request, context):
251-
"""Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
252-
Returns an empty policy if the resource exists and does not have a policy
253-
set.
258+
"""Gets the access control policy for a
259+
[Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the
260+
resource exists and does not have a policy set.
254261
255262
Authorization requires the following
256263
[Google IAM](https://cloud.google.com/iam) permission on the specified
@@ -263,8 +270,8 @@ def GetIamPolicy(self, request, context):
263270
raise NotImplementedError("Method not implemented!")
264271

265272
def SetIamPolicy(self, request, context):
266-
"""Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
267-
policy.
273+
"""Sets the access control policy for a
274+
[Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing policy.
268275
269276
Note: The Cloud Console does not check queue-level IAM permissions yet.
270277
Project-level permissions are required to use the Cloud Console.
@@ -280,9 +287,10 @@ def SetIamPolicy(self, request, context):
280287
raise NotImplementedError("Method not implemented!")
281288

282289
def TestIamPermissions(self, request, context):
283-
"""Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
284-
If the resource does not exist, this will return an empty set of
285-
permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
290+
"""Returns permissions that a caller has on a
291+
[Queue][google.cloud.tasks.v2beta2.Queue]. If the resource does not exist,
292+
this will return an empty set of permissions, not a
293+
[NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
286294
287295
Note: This operation is designed to be used for building permission-aware
288296
UIs and command-line tools, not for authorization checking. This operation
@@ -295,10 +303,10 @@ def TestIamPermissions(self, request, context):
295303
def ListTasks(self, request, context):
296304
"""Lists the tasks in a queue.
297305
298-
By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
299-
due to performance considerations;
300-
[response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the
301-
subset of information which is returned.
306+
By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]
307+
view is retrieved due to performance considerations;
308+
[response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view]
309+
controls the subset of information which is returned.
302310
303311
The tasks may be returned in any order. The ordering may change at any
304312
time.
@@ -319,9 +327,11 @@ def CreateTask(self, request, context):
319327
320328
Tasks cannot be updated after creation; there is no UpdateTask command.
321329
322-
* For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is
330+
* For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget],
331+
the maximum task size is
323332
100KB.
324-
* For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB.
333+
* For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum
334+
task size is 1MB.
325335
"""
326336
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
327337
context.set_details("Method not implemented!")
@@ -344,18 +354,19 @@ def LeaseTasks(self, request, context):
344354
345355
This method is invoked by the worker to obtain a lease. The
346356
worker must acknowledge the task via
347-
[AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have
348-
performed the work associated with the task.
349-
350-
The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that
351-
the worker needs to perform the work associated with the task. To
352-
return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
353-
[response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to
354-
[FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
355-
356-
A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
357-
requests are allowed per
358-
queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
357+
[AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]
358+
after they have performed the work associated with the task.
359+
360+
The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended
361+
to store data that the worker needs to perform the work associated with the
362+
task. To return the payloads in the
363+
[response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
364+
[response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view]
365+
to [FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
366+
367+
A maximum of 10 qps of
368+
[LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are
369+
allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
359370
is returned when this limit is
360371
exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
361372
is also returned when
@@ -370,12 +381,13 @@ def AcknowledgeTask(self, request, context):
370381
"""Acknowledges a pull task.
371382
372383
The worker, that is, the entity that
373-
[leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method
374-
to indicate that the work associated with the task has finished.
384+
[leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must
385+
call this method to indicate that the work associated with the task has
386+
finished.
375387
376388
The worker must acknowledge a task within the
377-
[lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease
378-
will expire and the task will become available to be leased
389+
[lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]
390+
or the lease will expire and the task will become available to be leased
379391
again. After the task is acknowledged, it will not be returned
380392
by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
381393
[GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
@@ -390,7 +402,8 @@ def RenewLease(self, request, context):
390402
391403
The worker can use this method to extend the lease by a new
392404
duration, starting from now. The new task lease will be
393-
returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
405+
returned in the task's
406+
[schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
394407
"""
395408
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
396409
context.set_details("Method not implemented!")
@@ -400,9 +413,9 @@ def CancelLease(self, request, context):
400413
"""Cancel a pull task's lease.
401414
402415
The worker can use this method to cancel a task's lease by
403-
setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
404-
make the task available to be leased to the next caller of
405-
[LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
416+
setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]
417+
to now. This will make the task available to be leased to the next caller
418+
of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
406419
"""
407420
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
408421
context.set_details("Method not implemented!")
@@ -412,30 +425,33 @@ def RunTask(self, request, context):
412425
"""Forces a task to run now.
413426
414427
When this method is called, Cloud Tasks will dispatch the task, even if
415-
the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or
416-
is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
428+
the task is already running, the queue has reached its
429+
[RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is
430+
[PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
417431
418432
This command is meant to be used for manual debugging. For
419-
example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed
420-
task after a fix has been made or to manually force a task to be
421-
dispatched now.
433+
example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be
434+
used to retry a failed task after a fix has been made or to manually force
435+
a task to be dispatched now.
422436
423437
The dispatched task is returned. That is, the task that is returned
424-
contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but
425-
before the task is received by its target.
438+
contains the [status][google.cloud.tasks.v2beta2.Task.status] after the
439+
task is dispatched but before the task is received by its target.
426440
427441
If Cloud Tasks receives a successful response from the task's
428442
target, then the task will be deleted; otherwise the task's
429-
[schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that
430-
[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified
431-
in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
443+
[schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be
444+
reset to the time that
445+
[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus
446+
the retry delay specified in the queue's
447+
[RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
432448
433449
[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns
434450
[NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
435451
task that has already succeeded or permanently failed.
436452
437-
[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
438-
[pull task][google.cloud.tasks.v2beta2.PullMessage].
453+
[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called
454+
on a [pull task][google.cloud.tasks.v2beta2.PullMessage].
439455
"""
440456
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
441457
context.set_details("Method not implemented!")

0 commit comments

Comments
 (0)