@maxim_mazurok/gapi.client.cloudtasks-v2beta2 0.0.20220813

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.
package/index.d.ts ADDED
@@ -0,0 +1,1819 @@
1
+ /* Type definitions for non-npm package Cloud Tasks API v2beta2 0.0 */
2
+ // Project: https://cloud.google.com/tasks/
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://cloudtasks.googleapis.com/$discovery/rest?version=v2beta2
13
+ // Revision: 20220813
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Cloud Tasks API v2beta2 */
19
+ function load(urlOrObject: "https://cloudtasks.googleapis.com/$discovery/rest?version=v2beta2"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "cloudtasks", version: "v2beta2"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "cloudtasks", version: "v2beta2", callback: () => any): void;
24
+
25
+ namespace cloudtasks {
26
+ interface AcknowledgeTaskRequest {
27
+ /**
28
+ * Required. The task's current schedule time, available in the schedule_time returned by LeaseTasks response or RenewLease response. This restriction is to ensure that your worker
29
+ * currently holds the lease.
30
+ */
31
+ scheduleTime?: string;
32
+ }
33
+ interface AppEngineHttpRequest {
34
+ /**
35
+ * Task-level setting for App Engine routing. If set, app_engine_routing_override is used for all tasks in the queue, no matter what the setting is for the task-level
36
+ * app_engine_routing.
37
+ */
38
+ appEngineRouting?: AppEngineRouting;
39
+ /**
40
+ * HTTP request headers. This map contains the header field names and values. Headers can be set when the task is created. Repeated headers are not supported but a header value can
41
+ * contain commas. Cloud Tasks sets some headers to default values: * `User-Agent`: By default, this header is `"AppEngine-Google; (+http://code.google.com/appengine)"`. This header
42
+ * can be modified, but Cloud Tasks will append `"AppEngine-Google; (+http://code.google.com/appengine)"` to the modified `User-Agent`. If the task has a payload, Cloud Tasks sets the
43
+ * following headers: * `Content-Type`: By default, the `Content-Type` header is set to `"application/octet-stream"`. The default can be overridden by explicitly setting `Content-Type`
44
+ * to a particular media type when the task is created. For example, `Content-Type` can be set to `"application/json"`. * `Content-Length`: This is computed by Cloud Tasks. This value
45
+ * is output only. It cannot be changed. The headers below cannot be set or overridden: * `Host` * `X-Google-*` * `X-AppEngine-*` In addition, Cloud Tasks sets some headers when the
46
+ * task is dispatched, such as headers containing information about the task; see [request
47
+ * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). These headers are set only when the task is dispatched, so they
48
+ * are not visible when the task is returned in a Cloud Tasks response. Although there is no specific limit for the maximum number of headers or the size, there is a limit on the
49
+ * maximum size of the Task. For more information, see the CreateTask documentation.
50
+ */
51
+ headers?: { [P in string]: string };
52
+ /**
53
+ * The HTTP method to use for the request. The default is POST. The app's request handler for the task's target URL must be able to handle HTTP requests with this http_method,
54
+ * otherwise the task attempt fails with error code 405 (Method Not Allowed). See [Writing a push task request
55
+ * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) and the App Engine documentation for your runtime on [How
56
+ * Requests are Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
57
+ */
58
+ httpMethod?: string;
59
+ /**
60
+ * Payload. The payload will be sent as the HTTP message body. A message body, and thus a payload, is allowed only if the HTTP method is POST or PUT. It is an error to set a data
61
+ * payload on a task with an incompatible HttpMethod.
62
+ */
63
+ payload?: string;
64
+ /**
65
+ * The relative URL. The relative URL must begin with "/" and must be a valid HTTP relative URL. It can contain a path and query string arguments. If the relative URL is empty, then
66
+ * the root path "/" will be used. No spaces are allowed, and the maximum length allowed is 2083 characters.
67
+ */
68
+ relativeUrl?: string;
69
+ }
70
+ interface AppEngineHttpTarget {
71
+ /**
72
+ * Overrides for the task-level app_engine_routing. If set, `app_engine_routing_override` is used for all tasks in the queue, no matter what the setting is for the task-level
73
+ * app_engine_routing.
74
+ */
75
+ appEngineRoutingOverride?: AppEngineRouting;
76
+ }
77
+ interface AppEngineRouting {
78
+ /**
79
+ * Output only. The host that the task is sent to. For more information, see [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
80
+ * The host is constructed as: * `host = [application_domain_name]` `| [service] + '.' + [application_domain_name]` `| [version] + '.' + [application_domain_name]` `|
81
+ * [version_dot_service]+ '.' + [application_domain_name]` `| [instance] + '.' + [application_domain_name]` `| [instance_dot_service] + '.' + [application_domain_name]` `|
82
+ * [instance_dot_version] + '.' + [application_domain_name]` `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` * `application_domain_name` = The domain name of
83
+ * the app, for example .appspot.com, which is associated with the queue's project ID. Some tasks which were created using the App Engine SDK use a custom domain name. * `service =`
84
+ * service * `version =` version * `version_dot_service =` version `+ '.' +` service * `instance =` instance * `instance_dot_service =` instance `+ '.' +` service *
85
+ * `instance_dot_version =` instance `+ '.' +` version * `instance_dot_version_dot_service =` instance `+ '.' +` version `+ '.' +` service If service is empty, then the task will be
86
+ * sent to the service which is the default service when the task is attempted. If version is empty, then the task will be sent to the version which is the default version when the
87
+ * task is attempted. If instance is empty, then the task will be sent to an instance which is available when the task is attempted. If service, version, or instance is invalid, then
88
+ * the task will be sent to the default version of the default service when the task is attempted.
89
+ */
90
+ host?: string;
91
+ /**
92
+ * App instance. By default, the task is sent to an instance which is available when the task is attempted. Requests can only be sent to a specific instance if [manual scaling is used
93
+ * in App Engine Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). App Engine Flex does not support
94
+ * instances. For more information, see [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) and [App Engine Flex
95
+ * request routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
96
+ */
97
+ instance?: string;
98
+ /**
99
+ * App service. By default, the task is sent to the service which is the default service when the task is attempted. For some queues or tasks which were created using the App Engine
100
+ * Task Queue API, host is not parsable into service, version, and instance. For example, some tasks which were created using the App Engine SDK use a custom domain name; custom
101
+ * domains are not parsed by Cloud Tasks. If host is not parsable, then service, version, and instance are the empty string.
102
+ */
103
+ service?: string;
104
+ /**
105
+ * App version. By default, the task is sent to the version which is the default version when the task is attempted. For some queues or tasks which were created using the App Engine
106
+ * Task Queue API, host is not parsable into service, version, and instance. For example, some tasks which were created using the App Engine SDK use a custom domain name; custom
107
+ * domains are not parsed by Cloud Tasks. If host is not parsable, then service, version, and instance are the empty string.
108
+ */
109
+ version?: string;
110
+ }
111
+ interface AttemptStatus {
112
+ /** Output only. The time that this attempt was dispatched. `dispatch_time` will be truncated to the nearest microsecond. */
113
+ dispatchTime?: string;
114
+ /** Output only. The response from the target for this attempt. If the task has not been attempted or the task is currently running then the response status is unset. */
115
+ responseStatus?: Status;
116
+ /** Output only. The time that this attempt response was received. `response_time` will be truncated to the nearest microsecond. */
117
+ responseTime?: string;
118
+ /** Output only. The time that this attempt was scheduled. `schedule_time` will be truncated to the nearest microsecond. */
119
+ scheduleTime?: string;
120
+ }
121
+ interface Binding {
122
+ /**
123
+ * The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`,
124
+ * then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which
125
+ * resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
126
+ */
127
+ condition?: Expr;
128
+ /**
129
+ * Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on
130
+ * the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service
131
+ * account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
132
+ * represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier
133
+ * for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example,
134
+ * `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. *
135
+ * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example,
136
+ * `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. *
137
+ * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example,
138
+ * `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service
139
+ * account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently
140
+ * deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in
141
+ * the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
142
+ */
143
+ members?: string[];
144
+ /** Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */
145
+ role?: string;
146
+ }
147
+ interface BufferQueueRequest {
148
+ /** Body of the HTTP request. The body can take any generic value. The value will be written to the HttpRequest of the [Task]. */
149
+ body?: HttpBody;
150
+ }
151
+ interface BufferQueueResponse {
152
+ /** The name of the created task. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. TASK_ID is randomly generated and is unique within the queue. */
153
+ task?: string;
154
+ }
155
+ interface CancelLeaseRequest {
156
+ /**
157
+ * The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as
158
+ * payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires
159
+ * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource.
160
+ */
161
+ responseView?: string;
162
+ /**
163
+ * Required. The task's current schedule time, available in the schedule_time returned by LeaseTasks response or RenewLease response. This restriction is to ensure that your worker
164
+ * currently holds the lease.
165
+ */
166
+ scheduleTime?: string;
167
+ }
168
+ interface CreateTaskRequest {
169
+ /**
170
+ * The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as
171
+ * payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires
172
+ * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource.
173
+ */
174
+ responseView?: string;
175
+ /**
176
+ * Required. The task to add. Task names have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. The user can optionally specify a task
177
+ * name. If a name is not specified then the system will generate a random unique task id, which will be set in the task returned in the response. If schedule_time is not set or is in
178
+ * the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of
179
+ * an existing task or a task that was deleted or completed recently then the call will fail with ALREADY_EXISTS. If the task's queue was created using Cloud Tasks, then another task
180
+ * with the same name can't be created for ~1hour after the original task was deleted or completed. If the task's queue was created using queue.yaml or queue.xml, then another task
181
+ * with the same name can't be created for ~9days after the original task was deleted or completed. Because there is an extra lookup cost to identify duplicate task names, these
182
+ * CreateTask calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or
183
+ * have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform
184
+ * distribution of task ids to store and serve tasks efficiently.
185
+ */
186
+ task?: Task;
187
+ }
188
+ // tslint:disable-next-line:no-empty-interface
189
+ interface Empty {
190
+ }
191
+ interface Expr {
192
+ /** Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */
193
+ description?: string;
194
+ /** Textual representation of an expression in Common Expression Language syntax. */
195
+ expression?: string;
196
+ /** Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */
197
+ location?: string;
198
+ /** Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. */
199
+ title?: string;
200
+ }
201
+ interface GetIamPolicyRequest {
202
+ /** OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`. */
203
+ options?: GetPolicyOptions;
204
+ }
205
+ interface GetPolicyOptions {
206
+ /**
207
+ * Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for
208
+ * policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in
209
+ * the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role
210
+ * bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM
211
+ * documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
212
+ */
213
+ requestedPolicyVersion?: number;
214
+ }
215
+ interface Header {
216
+ key?: string;
217
+ value?: string;
218
+ }
219
+ interface HeaderOverride {
220
+ /** header embodying a key and a value. */
221
+ header?: Header;
222
+ }
223
+ interface HttpBody {
224
+ /** The HTTP Content-Type header value specifying the content type of the body. */
225
+ contentType?: string;
226
+ /** The HTTP request/response body as raw binary. */
227
+ data?: string;
228
+ /** Application specific response metadata. Must be set in the first response for streaming APIs. */
229
+ extensions?: Array<{ [P in string]: any }>;
230
+ }
231
+ interface HttpRequest {
232
+ /** HTTP request body. A request body is allowed only if the HTTP method is POST, PUT, or PATCH. It is an error to set body on a task with an incompatible HttpMethod. */
233
+ body?: string;
234
+ /**
235
+ * HTTP request headers. This map contains the header field names and values. Headers can be set when running the task is created or task is created. These headers represent a subset
236
+ * of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: *
237
+ * Any header that is prefixed with "X-Google-Cloud-Tasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host:
238
+ * This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to
239
+ * `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a
240
+ * media type when the task is created. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values
241
+ * (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.
242
+ */
243
+ headers?: { [P in string]: string };
244
+ /** The HTTP method to use for the request. The default is POST. */
245
+ httpMethod?: string;
246
+ /**
247
+ * If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of
248
+ * authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
249
+ */
250
+ oauthToken?: OAuthToken;
251
+ /**
252
+ * If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This
253
+ * type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
254
+ */
255
+ oidcToken?: OidcToken;
256
+ /**
257
+ * Required. The full url path that the request will be sent to. This string must begin with either "http://" or "https://". Some examples are: `http://acme.com` and
258
+ * `https://acme.com/sales:8080`. Cloud Tasks will encode some characters for safety and compatibility. The maximum allowed URL length is 2083 characters after encoding. The `Location`
259
+ * header response from a redirect response [`300` - `399`] may be followed. The redirect is not counted as a separate attempt.
260
+ */
261
+ url?: string;
262
+ }
263
+ interface HttpTarget {
264
+ /**
265
+ * HTTP target headers. This map contains the header field names and values. Headers will be set when running the task is created and/or task is created. These headers represent a
266
+ * subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced
267
+ * is: * Any header that is prefixed with "X-Google-Cloud-Tasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. *
268
+ * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to
269
+ * `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a
270
+ * media type when the task is created. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values
271
+ * (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the
272
+ * queue.
273
+ */
274
+ headerOverrides?: HeaderOverride[];
275
+ /**
276
+ * The HTTP method to use for the request. When specified, it will override HttpRequest for the task. Note that if the value is set to HttpMethod the HttpRequest of the task will be
277
+ * ignored at execution time.
278
+ */
279
+ httpMethod?: string;
280
+ /**
281
+ * If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of
282
+ * authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.
283
+ */
284
+ oauthToken?: OAuthToken;
285
+ /**
286
+ * If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This
287
+ * type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.
288
+ */
289
+ oidcToken?: OidcToken;
290
+ /** Uri override. When specified modifies the execution Uri for all the tasks in the queue. */
291
+ uriOverride?: UriOverride;
292
+ }
293
+ interface LeaseTasksRequest {
294
+ /**
295
+ * `filter` can be used to specify a subset of tasks to lease. When `filter` is set to `tag=` then the response will contain only tasks whose tag is equal to ``. `` must be less than
296
+ * 500 characters. When `filter` is set to `tag_function=oldest_tag()`, only tasks which have the same tag as the task with the oldest schedule_time will be returned. Grammar Syntax: *
297
+ * `filter = "tag=" tag | "tag_function=" function` * `tag = string` * `function = "oldest_tag()"` The `oldest_tag()` function returns tasks which have the same tag as the oldest task
298
+ * (ordered by schedule time). SDK compatibility: Although the SDK allows tags to be either string or
299
+ * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), only UTF-8 encoded tags can be used in Cloud
300
+ * Tasks. Tag which aren't UTF-8 encoded can't be used in the filter and the task's tag will be displayed as empty in Cloud Tasks.
301
+ */
302
+ filter?: string;
303
+ /**
304
+ * Required. The duration of the lease. Each task returned in the response will have its schedule_time set to the current time plus the `lease_duration`. The task is leased until its
305
+ * schedule_time; thus, the task will not be returned to another LeaseTasks call before its schedule_time. After the worker has successfully finished the work associated with the task,
306
+ * the worker must call via AcknowledgeTask before the schedule_time. Otherwise the task will be returned to a later LeaseTasks call so that another worker can retry it. The maximum
307
+ * lease duration is 1 week. `lease_duration` will be truncated to the nearest second.
308
+ */
309
+ leaseDuration?: string;
310
+ /**
311
+ * The maximum number of tasks to lease. The system will make a best effort to return as close to as `max_tasks` as possible. The largest that `max_tasks` can be is 1000. The maximum
312
+ * total size of a lease tasks response is 32 MB. If the sum of all task sizes requested reaches this limit, fewer tasks than requested are returned.
313
+ */
314
+ maxTasks?: number;
315
+ /**
316
+ * The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as
317
+ * payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires
318
+ * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource.
319
+ */
320
+ responseView?: string;
321
+ }
322
+ interface LeaseTasksResponse {
323
+ /** The leased tasks. */
324
+ tasks?: Task[];
325
+ }
326
+ interface ListLocationsResponse {
327
+ /** A list of locations that matches the specified filter in the request. */
328
+ locations?: Location[];
329
+ /** The standard List next-page token. */
330
+ nextPageToken?: string;
331
+ }
332
+ interface ListQueuesResponse {
333
+ /**
334
+ * A token to retrieve next page of results. To return the next page of results, call ListQueues with this value as the page_token. If the next_page_token is empty, there are no more
335
+ * results. The page token is valid for only 2 hours.
336
+ */
337
+ nextPageToken?: string;
338
+ /** The list of queues. */
339
+ queues?: Queue[];
340
+ }
341
+ interface ListTasksResponse {
342
+ /**
343
+ * A token to retrieve next page of results. To return the next page of results, call ListTasks with this value as the page_token. If the next_page_token is empty, there are no more
344
+ * results.
345
+ */
346
+ nextPageToken?: string;
347
+ /** The list of tasks. */
348
+ tasks?: Task[];
349
+ }
350
+ interface Location {
351
+ /** The friendly name for this location, typically a nearby city name. For example, "Tokyo". */
352
+ displayName?: string;
353
+ /** Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} */
354
+ labels?: { [P in string]: string };
355
+ /** The canonical id for this location. For example: `"us-east1"`. */
356
+ locationId?: string;
357
+ /** Service-specific metadata. For example the available capacity at the given location. */
358
+ metadata?: { [P in string]: any };
359
+ /** Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` */
360
+ name?: string;
361
+ }
362
+ interface OAuthToken {
363
+ /** OAuth scope to be used for generating OAuth access token. If not specified, "https://www.googleapis.com/auth/cloud-platform" will be used. */
364
+ scope?: string;
365
+ /**
366
+ * [Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating OAuth token. The service account must be within the same project as the queue.
367
+ * The caller must have iam.serviceAccounts.actAs permission for the service account.
368
+ */
369
+ serviceAccountEmail?: string;
370
+ }
371
+ interface OidcToken {
372
+ /** Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used. */
373
+ audience?: string;
374
+ /**
375
+ * [Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating OIDC token. The service account must be within the same project as the queue.
376
+ * The caller must have iam.serviceAccounts.actAs permission for the service account.
377
+ */
378
+ serviceAccountEmail?: string;
379
+ }
380
+ // tslint:disable-next-line:no-empty-interface
381
+ interface PauseQueueRequest {
382
+ }
383
+ interface Policy {
384
+ /**
385
+ * Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings`
386
+ * must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a
387
+ * principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another
388
+ * 1,450 principals to the `bindings` in the `Policy`.
389
+ */
390
+ bindings?: Binding[];
391
+ /**
392
+ * `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make
393
+ * use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems
394
+ * are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM
395
+ * Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1`
396
+ * policy, and all of the conditions in the version `3` policy are lost.
397
+ */
398
+ etag?: string;
399
+ /**
400
+ * Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings
401
+ * must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a
402
+ * policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use
403
+ * IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1`
404
+ * policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave
405
+ * the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
406
+ */
407
+ version?: number;
408
+ }
409
+ interface PullMessage {
410
+ /** A data payload consumed by the worker to execute the task. */
411
+ payload?: string;
412
+ /**
413
+ * The task's tag. Tags allow similar tasks to be processed in a batch. If you label tasks with a tag, your worker can lease tasks with the same tag using filter. For example, if you
414
+ * want to aggregate the events associated with a specific user once a day, you could tag tasks with the user ID. The task's tag can only be set when the task is created. The tag must
415
+ * be less than 500 characters. SDK compatibility: Although the SDK allows tags to be either string or
416
+ * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), only UTF-8 encoded tags can be used in Cloud
417
+ * Tasks. If a tag isn't UTF-8 encoded, the tag will be empty when the task is returned by Cloud Tasks.
418
+ */
419
+ tag?: string;
420
+ }
421
+ // tslint:disable-next-line:no-empty-interface
422
+ interface PullTarget {
423
+ }
424
+ // tslint:disable-next-line:no-empty-interface
425
+ interface PurgeQueueRequest {
426
+ }
427
+ interface Queue {
428
+ /** App Engine HTTP target. An App Engine queue is a queue that has an AppEngineHttpTarget. */
429
+ appEngineHttpTarget?: AppEngineHttpTarget;
430
+ /** An http_target is used to override the target values for HTTP tasks. */
431
+ httpTarget?: HttpTarget;
432
+ /**
433
+ * Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format:
434
+ * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more
435
+ * information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID for the
436
+ * queue's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * `QUEUE_ID` can
437
+ * contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters.
438
+ */
439
+ name?: string;
440
+ /** Pull target. A pull queue is a queue that has a PullTarget. */
441
+ pullTarget?: any;
442
+ /**
443
+ * Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK,
444
+ * or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated
445
+ * to the nearest microsecond. Purge time will be unset if the queue has never been purged.
446
+ */
447
+ purgeTime?: string;
448
+ /**
449
+ * Rate limits for task dispatches. rate_limits and retry_config are related because they both control task attempts however they control how tasks are attempted in different ways: *
450
+ * rate_limits controls the total rate of dispatches from a queue (i.e. all traffic dispatched from the queue, regardless of whether the dispatch is from a first attempt or a retry). *
451
+ * retry_config controls what happens to particular a task after its first attempt fails. That is, retry_config controls task retries (the second attempt, third attempt, etc).
452
+ */
453
+ rateLimits?: RateLimits;
454
+ /**
455
+ * Settings that determine the retry behavior. * For tasks created using Cloud Tasks: the queue-level retry settings apply to all tasks in the queue that were created using Cloud
456
+ * Tasks. Retry settings cannot be set on individual tasks. * For tasks created using the App Engine SDK: the queue-level retry settings apply to all tasks in the queue which do not
457
+ * have retry settings explicitly set on the task and were created by the App Engine SDK. See [App Engine
458
+ * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
459
+ */
460
+ retryConfig?: RetryConfig;
461
+ /**
462
+ * Output only. The state of the queue. `state` can only be changed by called PauseQueue, ResumeQueue, or uploading
463
+ * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). UpdateQueue cannot be used to change `state`.
464
+ */
465
+ state?: string;
466
+ /** Output only. The realtime, informational statistics for a queue. In order to receive the statistics the caller should include this field in the FieldMask. */
467
+ stats?: QueueStats;
468
+ /**
469
+ * The maximum amount of time that a task will be retained in this queue. Queues created by Cloud Tasks have a default `task_ttl` of 31 days. After a task has lived for `task_ttl`, the
470
+ * task will be deleted regardless of whether it was dispatched or not. The `task_ttl` for queues created via queue.yaml/xml is equal to the maximum duration because there is a
471
+ * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for these queues. To view the maximum valid duration, see the documentation for Duration.
472
+ */
473
+ taskTtl?: string;
474
+ /**
475
+ * The task tombstone time to live (TTL). After a task is deleted or completed, the task's tombstone is retained for the length of time specified by `tombstone_ttl`. The tombstone is
476
+ * used by task de-duplication; another task with the same name can't be created until the tombstone has expired. For more information about task de-duplication, see the documentation
477
+ * for CreateTaskRequest. Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
478
+ */
479
+ tombstoneTtl?: string;
480
+ }
481
+ interface QueueStats {
482
+ /** Output only. The number of requests that the queue has dispatched but has not received a reply for yet. */
483
+ concurrentDispatchesCount?: string;
484
+ /**
485
+ * Output only. The current maximum number of tasks per second executed by the queue. The maximum value of this variable is controlled by the RateLimits of the Queue. However, this
486
+ * value could be less to avoid overloading the endpoints tasks in the queue are targeting.
487
+ */
488
+ effectiveExecutionRate?: number;
489
+ /** Output only. The number of tasks that the queue has dispatched and received a reply for during the last minute. This variable counts both successful and non-successful executions. */
490
+ executedLastMinuteCount?: string;
491
+ /** Output only. An estimation of the nearest time in the future where a task in the queue is scheduled to be executed. */
492
+ oldestEstimatedArrivalTime?: string;
493
+ /**
494
+ * Output only. An estimation of the number of tasks in the queue, that is, the tasks in the queue that haven't been executed, the tasks in the queue which the queue has dispatched but
495
+ * has not yet received a reply for, and the failed tasks that the queue is retrying.
496
+ */
497
+ tasksCount?: string;
498
+ }
499
+ interface RateLimits {
500
+ /**
501
+ * The max burst size. Max burst size limits how fast tasks in queue are processed when many tasks are in the queue and the rate is high. This field allows the queue to have a high
502
+ * rate so processing starts shortly after a task is enqueued, but still limits resource usage when many tasks are enqueued in a short period of time. The [token
503
+ * bucket](https://wikipedia.org/wiki/Token_Bucket) algorithm is used to control the rate of task dispatches. Each queue has a token bucket that holds tokens, up to the maximum
504
+ * specified by `max_burst_size`. Each time a task is dispatched, a token is removed from the bucket. Tasks will be dispatched until the queue's bucket runs out of tokens. The bucket
505
+ * will be continuously refilled with new tokens based on max_dispatches_per_second. The default value of `max_burst_size` is picked by Cloud Tasks based on the value of
506
+ * max_dispatches_per_second. The maximum value of `max_burst_size` is 500. For App Engine queues that were created or updated using `queue.yaml/xml`, `max_burst_size` is equal to
507
+ * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). If UpdateQueue is called on a queue without explicitly setting a value for
508
+ * `max_burst_size`, `max_burst_size` value will get updated if UpdateQueue is updating max_dispatches_per_second.
509
+ */
510
+ maxBurstSize?: number;
511
+ /**
512
+ * The maximum number of concurrent tasks that Cloud Tasks allows to be dispatched for this queue. After this threshold has been reached, Cloud Tasks stops dispatching tasks until the
513
+ * number of concurrent requests decreases. If unspecified when the queue is created, Cloud Tasks will pick the default. The maximum allowed value is 5,000. This field is output only
514
+ * for pull queues and always -1, which indicates no limit. No other queue types can have `max_concurrent_tasks` set to -1. This field has the same meaning as [max_concurrent_requests
515
+ * in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
516
+ */
517
+ maxConcurrentTasks?: number;
518
+ /**
519
+ * The maximum rate at which tasks are dispatched from this queue. If unspecified when the queue is created, Cloud Tasks will pick the default. * For App Engine queues, the maximum
520
+ * allowed value is 500. * This field is output only for pull queues. In addition to the `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of LeaseTasks requests are allowed
521
+ * per pull queue. This field has the same meaning as [rate in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
522
+ */
523
+ maxTasksDispatchedPerSecond?: number;
524
+ }
525
+ interface RenewLeaseRequest {
526
+ /** Required. The desired new lease duration, starting from now. The maximum lease duration is 1 week. `lease_duration` will be truncated to the nearest second. */
527
+ leaseDuration?: string;
528
+ /**
529
+ * The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as
530
+ * payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires
531
+ * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource.
532
+ */
533
+ responseView?: string;
534
+ /**
535
+ * Required. The task's current schedule time, available in the schedule_time returned by LeaseTasks response or RenewLease response. This restriction is to ensure that your worker
536
+ * currently holds the lease.
537
+ */
538
+ scheduleTime?: string;
539
+ }
540
+ // tslint:disable-next-line:no-empty-interface
541
+ interface ResumeQueueRequest {
542
+ }
543
+ interface RetryConfig {
544
+ /**
545
+ * The maximum number of attempts for a task. Cloud Tasks will attempt the task `max_attempts` times (that is, if the first attempt fails, then there will be `max_attempts - 1`
546
+ * retries). Must be > 0.
547
+ */
548
+ maxAttempts?: number;
549
+ /**
550
+ * A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified
551
+ * when the queue is created, Cloud Tasks will pick the default. This field is output only for pull queues. `max_backoff` will be truncated to the nearest second. This field has the
552
+ * same meaning as [max_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
553
+ */
554
+ maxBackoff?: string;
555
+ /**
556
+ * The time between retries will double `max_doublings` times. A task's retry interval starts at min_backoff, then doubles `max_doublings` times, then increases linearly, and finally
557
+ * retries at intervals of max_backoff up to max_attempts times. For example, if min_backoff is 10s, max_backoff is 300s, and `max_doublings` is 3, then the a task will first be
558
+ * retried in 10s. The retry interval will double three times, and then increase linearly by 2^3 * 10s. Finally, the task will retry at intervals of max_backoff until the task has been
559
+ * attempted max_attempts times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... If unspecified when the queue is created, Cloud Tasks will pick the
560
+ * default. This field is output only for pull queues. This field has the same meaning as [max_doublings in
561
+ * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
562
+ */
563
+ maxDoublings?: number;
564
+ /**
565
+ * If positive, `max_retry_duration` specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once `max_retry_duration` time has passed
566
+ * *and* the task has been attempted max_attempts times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. If unspecified when the
567
+ * queue is created, Cloud Tasks will pick the default. This field is output only for pull queues. `max_retry_duration` will be truncated to the nearest second. This field has the same
568
+ * meaning as [task_age_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
569
+ */
570
+ maxRetryDuration?: string;
571
+ /**
572
+ * A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified
573
+ * when the queue is created, Cloud Tasks will pick the default. This field is output only for pull queues. `min_backoff` will be truncated to the nearest second. This field has the
574
+ * same meaning as [min_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
575
+ */
576
+ minBackoff?: string;
577
+ /** If true, then the number of attempts is unlimited. */
578
+ unlimitedAttempts?: boolean;
579
+ }
580
+ interface RunTaskRequest {
581
+ /**
582
+ * The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as
583
+ * payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires
584
+ * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource.
585
+ */
586
+ responseView?: string;
587
+ }
588
+ interface SetIamPolicyRequest {
589
+ /**
590
+ * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud
591
+ * services (such as Projects) might reject them.
592
+ */
593
+ policy?: Policy;
594
+ }
595
+ interface Status {
596
+ /** The status code, which should be an enum value of google.rpc.Code. */
597
+ code?: number;
598
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
599
+ details?: Array<{ [P in string]: any }>;
600
+ /**
601
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the
602
+ * client.
603
+ */
604
+ message?: string;
605
+ }
606
+ interface Task {
607
+ /**
608
+ * App Engine HTTP request that is sent to the task's target. Can be set only if app_engine_http_target is set on the queue. An App Engine task is a task that has AppEngineHttpRequest
609
+ * set.
610
+ */
611
+ appEngineHttpRequest?: AppEngineHttpRequest;
612
+ /** Output only. The time that the task was created. `create_time` will be truncated to the nearest second. */
613
+ createTime?: string;
614
+ /** HTTP request that is sent to the task's target. An HTTP task is a task that has HttpRequest set. */
615
+ httpRequest?: HttpRequest;
616
+ /**
617
+ * Optionally caller-specified in CreateTask. The task name. The task name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` *
618
+ * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying
619
+ * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID for the task's location. The list of
620
+ * available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * `QUEUE_ID` can contain letters ([A-Za-z]),
621
+ * numbers ([0-9]), or hyphens (-). The maximum length is 100 characters. * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum
622
+ * length is 500 characters.
623
+ */
624
+ name?: string;
625
+ /** LeaseTasks to process the task. Can be set only if pull_target is set on the queue. A pull task is a task that has PullMessage set. */
626
+ pullMessage?: PullMessage;
627
+ /**
628
+ * The time when the task is scheduled to be attempted. For App Engine queues, this is when the task will be attempted or retried. For pull queues, this is the time when the task is
629
+ * available to be leased; if a task is currently leased, this is the time when the current lease expires, that is, the time that the task was leased plus the lease_duration.
630
+ * `schedule_time` will be truncated to the nearest microsecond.
631
+ */
632
+ scheduleTime?: string;
633
+ /** Output only. The task status. */
634
+ status?: TaskStatus;
635
+ /** Output only. The view specifies which subset of the Task has been returned. */
636
+ view?: string;
637
+ }
638
+ interface TaskStatus {
639
+ /** Output only. The number of attempts dispatched. This count includes attempts which have been dispatched but haven't received a response. */
640
+ attemptDispatchCount?: number;
641
+ /** Output only. The number of attempts which have received a response. This field is not calculated for pull tasks. */
642
+ attemptResponseCount?: number;
643
+ /**
644
+ * Output only. The status of the task's first attempt. Only dispatch_time will be set. The other AttemptStatus information is not retained by Cloud Tasks. This field is not calculated
645
+ * for pull tasks.
646
+ */
647
+ firstAttemptStatus?: AttemptStatus;
648
+ /** Output only. The status of the task's last attempt. This field is not calculated for pull tasks. */
649
+ lastAttemptStatus?: AttemptStatus;
650
+ }
651
+ interface TestIamPermissionsRequest {
652
+ /**
653
+ * The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM
654
+ * Overview](https://cloud.google.com/iam/docs/overview#permissions).
655
+ */
656
+ permissions?: string[];
657
+ }
658
+ interface TestIamPermissionsResponse {
659
+ /** A subset of `TestPermissionsRequest.permissions` that the caller is allowed. */
660
+ permissions?: string[];
661
+ }
662
+ interface UriOverride {
663
+ /**
664
+ * Host override. When specified, the host part of url will be overridden. For example, if the original Uri is "https://www.google.com", and host is set to "example.net", the
665
+ * overridden Uri will be "https://example.net".
666
+ */
667
+ host?: string;
668
+ /** Uri path. Will be used as the path for the current Uri (replaces any existing path of the task url). */
669
+ path?: string;
670
+ /**
671
+ * Port override. When specified, the port part of Uri will be replaced by the provided value. For instance, for a Uri http://www.google.com/foo and port=123 the overridden Uri becomes
672
+ * http://www.google.com:123/foo.
673
+ */
674
+ port?: string;
675
+ /** Uri Query. Will replace the query part of the task uri. */
676
+ query?: string;
677
+ /** Scheme override. When specified, the Uri scheme is replaced by the provided value. */
678
+ scheme?: string;
679
+ }
680
+ interface TasksResource {
681
+ /**
682
+ * Acknowledges a pull task. The worker, that is, the entity that leased this task must call this method to indicate that the work associated with the task has finished. The worker
683
+ * must acknowledge a task within the lease_duration or the lease will expire and the task will become available to be leased again. After the task is acknowledged, it will not be
684
+ * returned by a later LeaseTasks, GetTask, or ListTasks.
685
+ */
686
+ acknowledge(request: {
687
+ /** V1 error format. */
688
+ "$.xgafv"?: string;
689
+ /** OAuth access token. */
690
+ access_token?: string;
691
+ /** Data format for response. */
692
+ alt?: string;
693
+ /** JSONP */
694
+ callback?: string;
695
+ /** Selector specifying which fields to include in a partial response. */
696
+ fields?: string;
697
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
698
+ key?: string;
699
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
700
+ name: string;
701
+ /** OAuth 2.0 token for the current user. */
702
+ oauth_token?: string;
703
+ /** Returns response with indentations and line breaks. */
704
+ prettyPrint?: boolean;
705
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
706
+ quotaUser?: string;
707
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
708
+ upload_protocol?: string;
709
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
710
+ uploadType?: string;
711
+ /** Request body */
712
+ resource: AcknowledgeTaskRequest;
713
+ }): Request<{}>;
714
+ acknowledge(request: {
715
+ /** V1 error format. */
716
+ "$.xgafv"?: string;
717
+ /** OAuth access token. */
718
+ access_token?: string;
719
+ /** Data format for response. */
720
+ alt?: string;
721
+ /** JSONP */
722
+ callback?: string;
723
+ /** Selector specifying which fields to include in a partial response. */
724
+ fields?: string;
725
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
726
+ key?: string;
727
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
728
+ name: string;
729
+ /** OAuth 2.0 token for the current user. */
730
+ oauth_token?: string;
731
+ /** Returns response with indentations and line breaks. */
732
+ prettyPrint?: boolean;
733
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
734
+ quotaUser?: string;
735
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
736
+ upload_protocol?: string;
737
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
738
+ uploadType?: string;
739
+ },
740
+ body: AcknowledgeTaskRequest): Request<{}>;
741
+ /**
742
+ * Cancel a pull task's lease. The worker can use this method to cancel a task's lease by setting its schedule_time to now. This will make the task available to be leased to the next
743
+ * caller of LeaseTasks.
744
+ */
745
+ cancelLease(request: {
746
+ /** V1 error format. */
747
+ "$.xgafv"?: string;
748
+ /** OAuth access token. */
749
+ access_token?: string;
750
+ /** Data format for response. */
751
+ alt?: string;
752
+ /** JSONP */
753
+ callback?: string;
754
+ /** Selector specifying which fields to include in a partial response. */
755
+ fields?: string;
756
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
757
+ key?: string;
758
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
759
+ name: string;
760
+ /** OAuth 2.0 token for the current user. */
761
+ oauth_token?: string;
762
+ /** Returns response with indentations and line breaks. */
763
+ prettyPrint?: boolean;
764
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
765
+ quotaUser?: string;
766
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
767
+ upload_protocol?: string;
768
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
769
+ uploadType?: string;
770
+ /** Request body */
771
+ resource: CancelLeaseRequest;
772
+ }): Request<Task>;
773
+ cancelLease(request: {
774
+ /** V1 error format. */
775
+ "$.xgafv"?: string;
776
+ /** OAuth access token. */
777
+ access_token?: string;
778
+ /** Data format for response. */
779
+ alt?: string;
780
+ /** JSONP */
781
+ callback?: string;
782
+ /** Selector specifying which fields to include in a partial response. */
783
+ fields?: string;
784
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
785
+ key?: string;
786
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
787
+ name: string;
788
+ /** OAuth 2.0 token for the current user. */
789
+ oauth_token?: string;
790
+ /** Returns response with indentations and line breaks. */
791
+ prettyPrint?: boolean;
792
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
793
+ quotaUser?: string;
794
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
795
+ upload_protocol?: string;
796
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
797
+ uploadType?: string;
798
+ },
799
+ body: CancelLeaseRequest): Request<Task>;
800
+ /**
801
+ * Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. * For App Engine queues, the maximum task size is 100KB. * For pull
802
+ * queues, the maximum task size is 1MB.
803
+ */
804
+ create(request: {
805
+ /** V1 error format. */
806
+ "$.xgafv"?: string;
807
+ /** OAuth access token. */
808
+ access_token?: string;
809
+ /** Data format for response. */
810
+ alt?: string;
811
+ /** JSONP */
812
+ callback?: string;
813
+ /** Selector specifying which fields to include in a partial response. */
814
+ fields?: string;
815
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
816
+ key?: string;
817
+ /** OAuth 2.0 token for the current user. */
818
+ oauth_token?: string;
819
+ /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. */
820
+ parent: string;
821
+ /** Returns response with indentations and line breaks. */
822
+ prettyPrint?: boolean;
823
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
824
+ quotaUser?: string;
825
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
826
+ upload_protocol?: string;
827
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
828
+ uploadType?: string;
829
+ /** Request body */
830
+ resource: CreateTaskRequest;
831
+ }): Request<Task>;
832
+ create(request: {
833
+ /** V1 error format. */
834
+ "$.xgafv"?: string;
835
+ /** OAuth access token. */
836
+ access_token?: string;
837
+ /** Data format for response. */
838
+ alt?: string;
839
+ /** JSONP */
840
+ callback?: string;
841
+ /** Selector specifying which fields to include in a partial response. */
842
+ fields?: string;
843
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
844
+ key?: string;
845
+ /** OAuth 2.0 token for the current user. */
846
+ oauth_token?: string;
847
+ /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. */
848
+ parent: string;
849
+ /** Returns response with indentations and line breaks. */
850
+ prettyPrint?: boolean;
851
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
852
+ quotaUser?: string;
853
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
854
+ upload_protocol?: string;
855
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
856
+ uploadType?: string;
857
+ },
858
+ body: CreateTaskRequest): Request<Task>;
859
+ /** Deletes a task. A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has completed successfully or permanently failed. */
860
+ delete(request?: {
861
+ /** V1 error format. */
862
+ "$.xgafv"?: string;
863
+ /** OAuth access token. */
864
+ access_token?: string;
865
+ /** Data format for response. */
866
+ alt?: string;
867
+ /** JSONP */
868
+ callback?: string;
869
+ /** Selector specifying which fields to include in a partial response. */
870
+ fields?: string;
871
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
872
+ key?: string;
873
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
874
+ name: string;
875
+ /** OAuth 2.0 token for the current user. */
876
+ oauth_token?: string;
877
+ /** Returns response with indentations and line breaks. */
878
+ prettyPrint?: boolean;
879
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
880
+ quotaUser?: string;
881
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
882
+ upload_protocol?: string;
883
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
884
+ uploadType?: string;
885
+ }): Request<{}>;
886
+ /** Gets a task. */
887
+ get(request?: {
888
+ /** V1 error format. */
889
+ "$.xgafv"?: string;
890
+ /** OAuth access token. */
891
+ access_token?: string;
892
+ /** Data format for response. */
893
+ alt?: string;
894
+ /** JSONP */
895
+ callback?: string;
896
+ /** Selector specifying which fields to include in a partial response. */
897
+ fields?: string;
898
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
899
+ key?: string;
900
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
901
+ name: string;
902
+ /** OAuth 2.0 token for the current user. */
903
+ oauth_token?: string;
904
+ /** Returns response with indentations and line breaks. */
905
+ prettyPrint?: boolean;
906
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
907
+ quotaUser?: string;
908
+ /**
909
+ * The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as
910
+ * payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires
911
+ * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource.
912
+ */
913
+ responseView?: string;
914
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
915
+ upload_protocol?: string;
916
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
917
+ uploadType?: string;
918
+ }): Request<Task>;
919
+ /**
920
+ * Leases tasks from a pull queue for lease_duration. This method is invoked by the worker to obtain a lease. The worker must acknowledge the task via AcknowledgeTask after they have
921
+ * performed the work associated with the task. The payload is intended to store data that the worker needs to perform the work associated with the task. To return the payloads in the
922
+ * response, set response_view to FULL. A maximum of 10 qps of LeaseTasks requests are allowed per queue. RESOURCE_EXHAUSTED is returned when this limit is exceeded. RESOURCE_EXHAUSTED
923
+ * is also returned when max_tasks_dispatched_per_second is exceeded.
924
+ */
925
+ lease(request: {
926
+ /** V1 error format. */
927
+ "$.xgafv"?: string;
928
+ /** OAuth access token. */
929
+ access_token?: string;
930
+ /** Data format for response. */
931
+ alt?: string;
932
+ /** JSONP */
933
+ callback?: string;
934
+ /** Selector specifying which fields to include in a partial response. */
935
+ fields?: string;
936
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
937
+ key?: string;
938
+ /** OAuth 2.0 token for the current user. */
939
+ oauth_token?: string;
940
+ /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` */
941
+ parent: string;
942
+ /** Returns response with indentations and line breaks. */
943
+ prettyPrint?: boolean;
944
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
945
+ quotaUser?: string;
946
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
947
+ upload_protocol?: string;
948
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
949
+ uploadType?: string;
950
+ /** Request body */
951
+ resource: LeaseTasksRequest;
952
+ }): Request<LeaseTasksResponse>;
953
+ lease(request: {
954
+ /** V1 error format. */
955
+ "$.xgafv"?: string;
956
+ /** OAuth access token. */
957
+ access_token?: string;
958
+ /** Data format for response. */
959
+ alt?: string;
960
+ /** JSONP */
961
+ callback?: string;
962
+ /** Selector specifying which fields to include in a partial response. */
963
+ fields?: string;
964
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
965
+ key?: string;
966
+ /** OAuth 2.0 token for the current user. */
967
+ oauth_token?: string;
968
+ /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` */
969
+ parent: string;
970
+ /** Returns response with indentations and line breaks. */
971
+ prettyPrint?: boolean;
972
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
973
+ quotaUser?: string;
974
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
975
+ upload_protocol?: string;
976
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
977
+ uploadType?: string;
978
+ },
979
+ body: LeaseTasksRequest): Request<LeaseTasksResponse>;
980
+ /**
981
+ * Lists the tasks in a queue. By default, only the BASIC view is retrieved due to performance considerations; response_view controls the subset of information which is returned. The
982
+ * tasks may be returned in any order. The ordering may change at any time.
983
+ */
984
+ list(request?: {
985
+ /** V1 error format. */
986
+ "$.xgafv"?: string;
987
+ /** OAuth access token. */
988
+ access_token?: string;
989
+ /** Data format for response. */
990
+ alt?: string;
991
+ /** JSONP */
992
+ callback?: string;
993
+ /** Selector specifying which fields to include in a partial response. */
994
+ fields?: string;
995
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
996
+ key?: string;
997
+ /** OAuth 2.0 token for the current user. */
998
+ oauth_token?: string;
999
+ /**
1000
+ * Maximum page size. Fewer tasks than requested might be returned, even if more tasks exist; use next_page_token in the response to determine if more tasks exist. The maximum page
1001
+ * size is 1000. If unspecified, the page size will be the maximum.
1002
+ */
1003
+ pageSize?: number;
1004
+ /**
1005
+ * A token identifying the page of results to return. To request the first page results, page_token must be empty. To request the next page of results, page_token must be the value
1006
+ * of next_page_token returned from the previous call to ListTasks method. The page token is valid for only 2 hours.
1007
+ */
1008
+ pageToken?: string;
1009
+ /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` */
1010
+ parent: string;
1011
+ /** Returns response with indentations and line breaks. */
1012
+ prettyPrint?: boolean;
1013
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1014
+ quotaUser?: string;
1015
+ /**
1016
+ * The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as
1017
+ * payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires
1018
+ * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource.
1019
+ */
1020
+ responseView?: string;
1021
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1022
+ upload_protocol?: string;
1023
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1024
+ uploadType?: string;
1025
+ }): Request<ListTasksResponse>;
1026
+ /**
1027
+ * Renew the current lease of a pull task. The worker can use this method to extend the lease by a new duration, starting from now. The new task lease will be returned in the task's
1028
+ * schedule_time.
1029
+ */
1030
+ renewLease(request: {
1031
+ /** V1 error format. */
1032
+ "$.xgafv"?: string;
1033
+ /** OAuth access token. */
1034
+ access_token?: string;
1035
+ /** Data format for response. */
1036
+ alt?: string;
1037
+ /** JSONP */
1038
+ callback?: string;
1039
+ /** Selector specifying which fields to include in a partial response. */
1040
+ fields?: string;
1041
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1042
+ key?: string;
1043
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
1044
+ name: string;
1045
+ /** OAuth 2.0 token for the current user. */
1046
+ oauth_token?: string;
1047
+ /** Returns response with indentations and line breaks. */
1048
+ prettyPrint?: boolean;
1049
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1050
+ quotaUser?: string;
1051
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1052
+ upload_protocol?: string;
1053
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1054
+ uploadType?: string;
1055
+ /** Request body */
1056
+ resource: RenewLeaseRequest;
1057
+ }): Request<Task>;
1058
+ renewLease(request: {
1059
+ /** V1 error format. */
1060
+ "$.xgafv"?: string;
1061
+ /** OAuth access token. */
1062
+ access_token?: string;
1063
+ /** Data format for response. */
1064
+ alt?: string;
1065
+ /** JSONP */
1066
+ callback?: string;
1067
+ /** Selector specifying which fields to include in a partial response. */
1068
+ fields?: string;
1069
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1070
+ key?: string;
1071
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
1072
+ name: string;
1073
+ /** OAuth 2.0 token for the current user. */
1074
+ oauth_token?: string;
1075
+ /** Returns response with indentations and line breaks. */
1076
+ prettyPrint?: boolean;
1077
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1078
+ quotaUser?: string;
1079
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1080
+ upload_protocol?: string;
1081
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1082
+ uploadType?: string;
1083
+ },
1084
+ body: RenewLeaseRequest): Request<Task>;
1085
+ /**
1086
+ * Forces a task to run now. When this method is called, Cloud Tasks will dispatch the task, even if the task is already running, the queue has reached its RateLimits or is PAUSED.
1087
+ * This command is meant to be used for manual debugging. For example, RunTask can be used to retry a failed task after a fix has been made or to manually force a task to be dispatched
1088
+ * now. The dispatched task is returned. That is, the task that is returned contains the status after the task is dispatched but before the task is received by its target. If Cloud
1089
+ * Tasks receives a successful response from the task's target, then the task will be deleted; otherwise the task's schedule_time will be reset to the time that RunTask was called plus
1090
+ * the retry delay specified in the queue's RetryConfig. RunTask returns NOT_FOUND when it is called on a task that has already succeeded or permanently failed. RunTask cannot be
1091
+ * called on a pull task.
1092
+ */
1093
+ run(request: {
1094
+ /** V1 error format. */
1095
+ "$.xgafv"?: string;
1096
+ /** OAuth access token. */
1097
+ access_token?: string;
1098
+ /** Data format for response. */
1099
+ alt?: string;
1100
+ /** JSONP */
1101
+ callback?: string;
1102
+ /** Selector specifying which fields to include in a partial response. */
1103
+ fields?: string;
1104
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1105
+ key?: string;
1106
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
1107
+ name: string;
1108
+ /** OAuth 2.0 token for the current user. */
1109
+ oauth_token?: string;
1110
+ /** Returns response with indentations and line breaks. */
1111
+ prettyPrint?: boolean;
1112
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1113
+ quotaUser?: string;
1114
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1115
+ upload_protocol?: string;
1116
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1117
+ uploadType?: string;
1118
+ /** Request body */
1119
+ resource: RunTaskRequest;
1120
+ }): Request<Task>;
1121
+ run(request: {
1122
+ /** V1 error format. */
1123
+ "$.xgafv"?: string;
1124
+ /** OAuth access token. */
1125
+ access_token?: string;
1126
+ /** Data format for response. */
1127
+ alt?: string;
1128
+ /** JSONP */
1129
+ callback?: string;
1130
+ /** Selector specifying which fields to include in a partial response. */
1131
+ fields?: string;
1132
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1133
+ key?: string;
1134
+ /** Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` */
1135
+ name: string;
1136
+ /** OAuth 2.0 token for the current user. */
1137
+ oauth_token?: string;
1138
+ /** Returns response with indentations and line breaks. */
1139
+ prettyPrint?: boolean;
1140
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1141
+ quotaUser?: string;
1142
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1143
+ upload_protocol?: string;
1144
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1145
+ uploadType?: string;
1146
+ },
1147
+ body: RunTaskRequest): Request<Task>;
1148
+ }
1149
+ interface QueuesResource {
1150
+ /**
1151
+ * Note: This feature is in its experimental stage. You must request access to the API through the [Cloud Tasks BufferQueues Experiment Signup
1152
+ * form](https://forms.gle/X8Zr5hiXH5tTGFqh8). Creates and buffers a new task without the need to explicitly define a Task message. The queue must be an http queue (i.e., must have
1153
+ * HTTP target). This method is used for a simplified application of Cloud Tasks queues in buffer and rate limitting HTTP requests.
1154
+ */
1155
+ buffer(request: {
1156
+ /** V1 error format. */
1157
+ "$.xgafv"?: string;
1158
+ /** OAuth access token. */
1159
+ access_token?: string;
1160
+ /** Data format for response. */
1161
+ alt?: string;
1162
+ /** JSONP */
1163
+ callback?: string;
1164
+ /** Selector specifying which fields to include in a partial response. */
1165
+ fields?: string;
1166
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1167
+ key?: string;
1168
+ /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. */
1169
+ name: string;
1170
+ /** OAuth 2.0 token for the current user. */
1171
+ oauth_token?: string;
1172
+ /** Returns response with indentations and line breaks. */
1173
+ prettyPrint?: boolean;
1174
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1175
+ quotaUser?: string;
1176
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1177
+ upload_protocol?: string;
1178
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1179
+ uploadType?: string;
1180
+ /** Request body */
1181
+ resource: BufferQueueRequest;
1182
+ }): Request<BufferQueueResponse>;
1183
+ buffer(request: {
1184
+ /** V1 error format. */
1185
+ "$.xgafv"?: string;
1186
+ /** OAuth access token. */
1187
+ access_token?: string;
1188
+ /** Data format for response. */
1189
+ alt?: string;
1190
+ /** JSONP */
1191
+ callback?: string;
1192
+ /** Selector specifying which fields to include in a partial response. */
1193
+ fields?: string;
1194
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1195
+ key?: string;
1196
+ /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. */
1197
+ name: string;
1198
+ /** OAuth 2.0 token for the current user. */
1199
+ oauth_token?: string;
1200
+ /** Returns response with indentations and line breaks. */
1201
+ prettyPrint?: boolean;
1202
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1203
+ quotaUser?: string;
1204
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1205
+ upload_protocol?: string;
1206
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1207
+ uploadType?: string;
1208
+ },
1209
+ body: BufferQueueRequest): Request<BufferQueueResponse>;
1210
+ /**
1211
+ * Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was
1212
+ * dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview
1213
+ * of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
1214
+ */
1215
+ create(request: {
1216
+ /** V1 error format. */
1217
+ "$.xgafv"?: string;
1218
+ /** OAuth access token. */
1219
+ access_token?: string;
1220
+ /** Data format for response. */
1221
+ alt?: string;
1222
+ /** JSONP */
1223
+ callback?: string;
1224
+ /** Selector specifying which fields to include in a partial response. */
1225
+ fields?: string;
1226
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1227
+ key?: string;
1228
+ /** OAuth 2.0 token for the current user. */
1229
+ oauth_token?: string;
1230
+ /**
1231
+ * Required. The location name in which the queue will be created. For example: `projects/PROJECT_ID/locations/LOCATION_ID` The list of allowed locations can be obtained by calling
1232
+ * Cloud Tasks' implementation of ListLocations.
1233
+ */
1234
+ parent: string;
1235
+ /** Returns response with indentations and line breaks. */
1236
+ prettyPrint?: boolean;
1237
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1238
+ quotaUser?: string;
1239
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1240
+ upload_protocol?: string;
1241
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1242
+ uploadType?: string;
1243
+ /** Request body */
1244
+ resource: Queue;
1245
+ }): Request<Queue>;
1246
+ create(request: {
1247
+ /** V1 error format. */
1248
+ "$.xgafv"?: string;
1249
+ /** OAuth access token. */
1250
+ access_token?: string;
1251
+ /** Data format for response. */
1252
+ alt?: string;
1253
+ /** JSONP */
1254
+ callback?: string;
1255
+ /** Selector specifying which fields to include in a partial response. */
1256
+ fields?: string;
1257
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1258
+ key?: string;
1259
+ /** OAuth 2.0 token for the current user. */
1260
+ oauth_token?: string;
1261
+ /**
1262
+ * Required. The location name in which the queue will be created. For example: `projects/PROJECT_ID/locations/LOCATION_ID` The list of allowed locations can be obtained by calling
1263
+ * Cloud Tasks' implementation of ListLocations.
1264
+ */
1265
+ parent: string;
1266
+ /** Returns response with indentations and line breaks. */
1267
+ prettyPrint?: boolean;
1268
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1269
+ quotaUser?: string;
1270
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1271
+ upload_protocol?: string;
1272
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1273
+ uploadType?: string;
1274
+ },
1275
+ body: Queue): Request<Queue>;
1276
+ /**
1277
+ * Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, a queue with the same name can't be created for 7 days. WARNING: Using
1278
+ * this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and
1279
+ * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
1280
+ */
1281
+ delete(request?: {
1282
+ /** V1 error format. */
1283
+ "$.xgafv"?: string;
1284
+ /** OAuth access token. */
1285
+ access_token?: string;
1286
+ /** Data format for response. */
1287
+ alt?: string;
1288
+ /** JSONP */
1289
+ callback?: string;
1290
+ /** Selector specifying which fields to include in a partial response. */
1291
+ fields?: string;
1292
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1293
+ key?: string;
1294
+ /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` */
1295
+ name: string;
1296
+ /** OAuth 2.0 token for the current user. */
1297
+ oauth_token?: string;
1298
+ /** Returns response with indentations and line breaks. */
1299
+ prettyPrint?: boolean;
1300
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1301
+ quotaUser?: string;
1302
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1303
+ upload_protocol?: string;
1304
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1305
+ uploadType?: string;
1306
+ }): Request<{}>;
1307
+ /** Gets a queue. */
1308
+ get(request?: {
1309
+ /** V1 error format. */
1310
+ "$.xgafv"?: string;
1311
+ /** OAuth access token. */
1312
+ access_token?: string;
1313
+ /** Data format for response. */
1314
+ alt?: string;
1315
+ /** JSONP */
1316
+ callback?: string;
1317
+ /** Selector specifying which fields to include in a partial response. */
1318
+ fields?: string;
1319
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1320
+ key?: string;
1321
+ /** Required. The resource name of the queue. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` */
1322
+ name: string;
1323
+ /** OAuth 2.0 token for the current user. */
1324
+ oauth_token?: string;
1325
+ /** Returns response with indentations and line breaks. */
1326
+ prettyPrint?: boolean;
1327
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1328
+ quotaUser?: string;
1329
+ /**
1330
+ * Optional. Read mask is used for a more granular control over what the API returns. If the mask is not present all fields will be returned except [Queue.stats]. [Queue.stats]
1331
+ * will be returned only if it was explicitly specified in the mask.
1332
+ */
1333
+ readMask?: string;
1334
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1335
+ upload_protocol?: string;
1336
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1337
+ uploadType?: string;
1338
+ }): Request<Queue>;
1339
+ /**
1340
+ * Gets the access control policy for a Queue. Returns an empty policy if the resource exists and does not have a policy set. Authorization requires the following [Google
1341
+ * IAM](https://cloud.google.com/iam) permission on the specified resource parent: * `cloudtasks.queues.getIamPolicy`
1342
+ */
1343
+ getIamPolicy(request: {
1344
+ /** V1 error format. */
1345
+ "$.xgafv"?: string;
1346
+ /** OAuth access token. */
1347
+ access_token?: string;
1348
+ /** Data format for response. */
1349
+ alt?: string;
1350
+ /** JSONP */
1351
+ callback?: string;
1352
+ /** Selector specifying which fields to include in a partial response. */
1353
+ fields?: string;
1354
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1355
+ key?: string;
1356
+ /** OAuth 2.0 token for the current user. */
1357
+ oauth_token?: string;
1358
+ /** Returns response with indentations and line breaks. */
1359
+ prettyPrint?: boolean;
1360
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1361
+ quotaUser?: string;
1362
+ /**
1363
+ * REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
1364
+ * field.
1365
+ */
1366
+ resource: string;
1367
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1368
+ upload_protocol?: string;
1369
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1370
+ uploadType?: string;
1371
+ },
1372
+ body: GetIamPolicyRequest): Request<Policy>;
1373
+ /** Lists queues. Queues are returned in lexicographical order. */
1374
+ list(request?: {
1375
+ /** V1 error format. */
1376
+ "$.xgafv"?: string;
1377
+ /** OAuth access token. */
1378
+ access_token?: string;
1379
+ /** Data format for response. */
1380
+ alt?: string;
1381
+ /** JSONP */
1382
+ callback?: string;
1383
+ /** Selector specifying which fields to include in a partial response. */
1384
+ fields?: string;
1385
+ /**
1386
+ * `filter` can be used to specify a subset of queues. Any Queue field can be used as a filter and several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The filter
1387
+ * syntax is the same as described in [Stackdriver's Advanced Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Sample filter "app_engine_http_target: *".
1388
+ * Note that using filters might cause fewer queues than the requested_page size to be returned.
1389
+ */
1390
+ filter?: string;
1391
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1392
+ key?: string;
1393
+ /** OAuth 2.0 token for the current user. */
1394
+ oauth_token?: string;
1395
+ /**
1396
+ * Requested page size. The maximum page size is 9800. If unspecified, the page size will be the maximum. Fewer queues than requested might be returned, even if more queues exist;
1397
+ * use the next_page_token in the response to determine if more queues exist.
1398
+ */
1399
+ pageSize?: number;
1400
+ /**
1401
+ * A token identifying the page of results to return. To request the first page results, page_token must be empty. To request the next page of results, page_token must be the value
1402
+ * of next_page_token returned from the previous call to ListQueues method. It is an error to switch the value of the filter while iterating through pages.
1403
+ */
1404
+ pageToken?: string;
1405
+ /** Required. The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID` */
1406
+ parent: string;
1407
+ /** Returns response with indentations and line breaks. */
1408
+ prettyPrint?: boolean;
1409
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1410
+ quotaUser?: string;
1411
+ /**
1412
+ * Optional. Read mask is used for a more granular control over what the API returns. If the mask is not present all fields will be returned except [Queue.stats]. [Queue.stats]
1413
+ * will be returned only if it was explicitly specified in the mask.
1414
+ */
1415
+ readMask?: string;
1416
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1417
+ upload_protocol?: string;
1418
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1419
+ uploadType?: string;
1420
+ }): Request<ListQueuesResponse>;
1421
+ /**
1422
+ * Updates a queue. This method creates the queue if it does not exist and updates the queue if it does exist. Queues created with this method allow tasks to live for a maximum of 31
1423
+ * days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are
1424
+ * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before
1425
+ * using this method.
1426
+ */
1427
+ patch(request: {
1428
+ /** V1 error format. */
1429
+ "$.xgafv"?: string;
1430
+ /** OAuth access token. */
1431
+ access_token?: string;
1432
+ /** Data format for response. */
1433
+ alt?: string;
1434
+ /** JSONP */
1435
+ callback?: string;
1436
+ /** Selector specifying which fields to include in a partial response. */
1437
+ fields?: string;
1438
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1439
+ key?: string;
1440
+ /**
1441
+ * Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format:
1442
+ * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more
1443
+ * information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID for
1444
+ * the queue's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * `QUEUE_ID`
1445
+ * can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters.
1446
+ */
1447
+ name: string;
1448
+ /** OAuth 2.0 token for the current user. */
1449
+ oauth_token?: string;
1450
+ /** Returns response with indentations and line breaks. */
1451
+ prettyPrint?: boolean;
1452
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1453
+ quotaUser?: string;
1454
+ /** A mask used to specify which fields of the queue are being updated. If empty, then all fields will be updated. */
1455
+ updateMask?: string;
1456
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1457
+ upload_protocol?: string;
1458
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1459
+ uploadType?: string;
1460
+ /** Request body */
1461
+ resource: Queue;
1462
+ }): Request<Queue>;
1463
+ patch(request: {
1464
+ /** V1 error format. */
1465
+ "$.xgafv"?: string;
1466
+ /** OAuth access token. */
1467
+ access_token?: string;
1468
+ /** Data format for response. */
1469
+ alt?: string;
1470
+ /** JSONP */
1471
+ callback?: string;
1472
+ /** Selector specifying which fields to include in a partial response. */
1473
+ fields?: string;
1474
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1475
+ key?: string;
1476
+ /**
1477
+ * Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format:
1478
+ * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more
1479
+ * information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID for
1480
+ * the queue's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * `QUEUE_ID`
1481
+ * can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters.
1482
+ */
1483
+ name: string;
1484
+ /** OAuth 2.0 token for the current user. */
1485
+ oauth_token?: string;
1486
+ /** Returns response with indentations and line breaks. */
1487
+ prettyPrint?: boolean;
1488
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1489
+ quotaUser?: string;
1490
+ /** A mask used to specify which fields of the queue are being updated. If empty, then all fields will be updated. */
1491
+ updateMask?: string;
1492
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1493
+ upload_protocol?: string;
1494
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1495
+ uploadType?: string;
1496
+ },
1497
+ body: Queue): Request<Queue>;
1498
+ /**
1499
+ * Pauses the queue. If a queue is paused then the system will stop dispatching tasks until the queue is resumed via ResumeQueue. Tasks can still be added when the queue is paused. A
1500
+ * queue is paused if its state is PAUSED.
1501
+ */
1502
+ pause(request: {
1503
+ /** V1 error format. */
1504
+ "$.xgafv"?: string;
1505
+ /** OAuth access token. */
1506
+ access_token?: string;
1507
+ /** Data format for response. */
1508
+ alt?: string;
1509
+ /** JSONP */
1510
+ callback?: string;
1511
+ /** Selector specifying which fields to include in a partial response. */
1512
+ fields?: string;
1513
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1514
+ key?: string;
1515
+ /** Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` */
1516
+ name: string;
1517
+ /** OAuth 2.0 token for the current user. */
1518
+ oauth_token?: string;
1519
+ /** Returns response with indentations and line breaks. */
1520
+ prettyPrint?: boolean;
1521
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1522
+ quotaUser?: string;
1523
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1524
+ upload_protocol?: string;
1525
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1526
+ uploadType?: string;
1527
+ /** Request body */
1528
+ resource: PauseQueueRequest;
1529
+ }): Request<Queue>;
1530
+ pause(request: {
1531
+ /** V1 error format. */
1532
+ "$.xgafv"?: string;
1533
+ /** OAuth access token. */
1534
+ access_token?: string;
1535
+ /** Data format for response. */
1536
+ alt?: string;
1537
+ /** JSONP */
1538
+ callback?: string;
1539
+ /** Selector specifying which fields to include in a partial response. */
1540
+ fields?: string;
1541
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1542
+ key?: string;
1543
+ /** Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` */
1544
+ name: string;
1545
+ /** OAuth 2.0 token for the current user. */
1546
+ oauth_token?: string;
1547
+ /** Returns response with indentations and line breaks. */
1548
+ prettyPrint?: boolean;
1549
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1550
+ quotaUser?: string;
1551
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1552
+ upload_protocol?: string;
1553
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1554
+ uploadType?: string;
1555
+ },
1556
+ body: PauseQueueRequest): Request<Queue>;
1557
+ /**
1558
+ * Purges a queue by deleting all of its tasks. All tasks created before this method is called are permanently deleted. Purge operations can take up to one minute to take effect. Tasks
1559
+ * might be dispatched before the purge takes effect. A purge is irreversible.
1560
+ */
1561
+ purge(request: {
1562
+ /** V1 error format. */
1563
+ "$.xgafv"?: string;
1564
+ /** OAuth access token. */
1565
+ access_token?: string;
1566
+ /** Data format for response. */
1567
+ alt?: string;
1568
+ /** JSONP */
1569
+ callback?: string;
1570
+ /** Selector specifying which fields to include in a partial response. */
1571
+ fields?: string;
1572
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1573
+ key?: string;
1574
+ /** Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` */
1575
+ name: string;
1576
+ /** OAuth 2.0 token for the current user. */
1577
+ oauth_token?: string;
1578
+ /** Returns response with indentations and line breaks. */
1579
+ prettyPrint?: boolean;
1580
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1581
+ quotaUser?: string;
1582
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1583
+ upload_protocol?: string;
1584
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1585
+ uploadType?: string;
1586
+ /** Request body */
1587
+ resource: PurgeQueueRequest;
1588
+ }): Request<Queue>;
1589
+ purge(request: {
1590
+ /** V1 error format. */
1591
+ "$.xgafv"?: string;
1592
+ /** OAuth access token. */
1593
+ access_token?: string;
1594
+ /** Data format for response. */
1595
+ alt?: string;
1596
+ /** JSONP */
1597
+ callback?: string;
1598
+ /** Selector specifying which fields to include in a partial response. */
1599
+ fields?: string;
1600
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1601
+ key?: string;
1602
+ /** Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` */
1603
+ name: string;
1604
+ /** OAuth 2.0 token for the current user. */
1605
+ oauth_token?: string;
1606
+ /** Returns response with indentations and line breaks. */
1607
+ prettyPrint?: boolean;
1608
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1609
+ quotaUser?: string;
1610
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1611
+ upload_protocol?: string;
1612
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1613
+ uploadType?: string;
1614
+ },
1615
+ body: PurgeQueueRequest): Request<Queue>;
1616
+ /**
1617
+ * Resume a queue. This method resumes a queue after it has been PAUSED or DISABLED. The state of a queue is stored in the queue's state; after calling this method it will be set to
1618
+ * RUNNING. WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If you are resuming high-QPS queues, follow the 500/50/5 pattern described in
1619
+ * [Managing Cloud Tasks Scaling Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
1620
+ */
1621
+ resume(request: {
1622
+ /** V1 error format. */
1623
+ "$.xgafv"?: string;
1624
+ /** OAuth access token. */
1625
+ access_token?: string;
1626
+ /** Data format for response. */
1627
+ alt?: string;
1628
+ /** JSONP */
1629
+ callback?: string;
1630
+ /** Selector specifying which fields to include in a partial response. */
1631
+ fields?: string;
1632
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1633
+ key?: string;
1634
+ /** Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` */
1635
+ name: string;
1636
+ /** OAuth 2.0 token for the current user. */
1637
+ oauth_token?: string;
1638
+ /** Returns response with indentations and line breaks. */
1639
+ prettyPrint?: boolean;
1640
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1641
+ quotaUser?: string;
1642
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1643
+ upload_protocol?: string;
1644
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1645
+ uploadType?: string;
1646
+ /** Request body */
1647
+ resource: ResumeQueueRequest;
1648
+ }): Request<Queue>;
1649
+ resume(request: {
1650
+ /** V1 error format. */
1651
+ "$.xgafv"?: string;
1652
+ /** OAuth access token. */
1653
+ access_token?: string;
1654
+ /** Data format for response. */
1655
+ alt?: string;
1656
+ /** JSONP */
1657
+ callback?: string;
1658
+ /** Selector specifying which fields to include in a partial response. */
1659
+ fields?: string;
1660
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1661
+ key?: string;
1662
+ /** Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` */
1663
+ name: string;
1664
+ /** OAuth 2.0 token for the current user. */
1665
+ oauth_token?: string;
1666
+ /** Returns response with indentations and line breaks. */
1667
+ prettyPrint?: boolean;
1668
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1669
+ quotaUser?: string;
1670
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1671
+ upload_protocol?: string;
1672
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1673
+ uploadType?: string;
1674
+ },
1675
+ body: ResumeQueueRequest): Request<Queue>;
1676
+ /**
1677
+ * Sets the access control policy for a Queue. Replaces any existing policy. Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level permissions are
1678
+ * required to use the Cloud Console. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource parent: *
1679
+ * `cloudtasks.queues.setIamPolicy`
1680
+ */
1681
+ setIamPolicy(request: {
1682
+ /** V1 error format. */
1683
+ "$.xgafv"?: string;
1684
+ /** OAuth access token. */
1685
+ access_token?: string;
1686
+ /** Data format for response. */
1687
+ alt?: string;
1688
+ /** JSONP */
1689
+ callback?: string;
1690
+ /** Selector specifying which fields to include in a partial response. */
1691
+ fields?: string;
1692
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1693
+ key?: string;
1694
+ /** OAuth 2.0 token for the current user. */
1695
+ oauth_token?: string;
1696
+ /** Returns response with indentations and line breaks. */
1697
+ prettyPrint?: boolean;
1698
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1699
+ quotaUser?: string;
1700
+ /**
1701
+ * REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this
1702
+ * field.
1703
+ */
1704
+ resource: string;
1705
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1706
+ upload_protocol?: string;
1707
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1708
+ uploadType?: string;
1709
+ },
1710
+ body: SetIamPolicyRequest): Request<Policy>;
1711
+ /**
1712
+ * Returns permissions that a caller has on a Queue. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is
1713
+ * designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
1714
+ */
1715
+ testIamPermissions(request: {
1716
+ /** V1 error format. */
1717
+ "$.xgafv"?: string;
1718
+ /** OAuth access token. */
1719
+ access_token?: string;
1720
+ /** Data format for response. */
1721
+ alt?: string;
1722
+ /** JSONP */
1723
+ callback?: string;
1724
+ /** Selector specifying which fields to include in a partial response. */
1725
+ fields?: string;
1726
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1727
+ key?: string;
1728
+ /** OAuth 2.0 token for the current user. */
1729
+ oauth_token?: string;
1730
+ /** Returns response with indentations and line breaks. */
1731
+ prettyPrint?: boolean;
1732
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1733
+ quotaUser?: string;
1734
+ /**
1735
+ * REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for
1736
+ * this field.
1737
+ */
1738
+ resource: string;
1739
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1740
+ upload_protocol?: string;
1741
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1742
+ uploadType?: string;
1743
+ },
1744
+ body: TestIamPermissionsRequest): Request<TestIamPermissionsResponse>;
1745
+ tasks: TasksResource;
1746
+ }
1747
+ interface LocationsResource {
1748
+ /** Gets information about a location. */
1749
+ get(request?: {
1750
+ /** V1 error format. */
1751
+ "$.xgafv"?: string;
1752
+ /** OAuth access token. */
1753
+ access_token?: string;
1754
+ /** Data format for response. */
1755
+ alt?: string;
1756
+ /** JSONP */
1757
+ callback?: string;
1758
+ /** Selector specifying which fields to include in a partial response. */
1759
+ fields?: string;
1760
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1761
+ key?: string;
1762
+ /** Resource name for the location. */
1763
+ name: string;
1764
+ /** OAuth 2.0 token for the current user. */
1765
+ oauth_token?: string;
1766
+ /** Returns response with indentations and line breaks. */
1767
+ prettyPrint?: boolean;
1768
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1769
+ quotaUser?: string;
1770
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1771
+ upload_protocol?: string;
1772
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1773
+ uploadType?: string;
1774
+ }): Request<Location>;
1775
+ /** Lists information about the supported locations for this service. */
1776
+ list(request?: {
1777
+ /** V1 error format. */
1778
+ "$.xgafv"?: string;
1779
+ /** OAuth access token. */
1780
+ access_token?: string;
1781
+ /** Data format for response. */
1782
+ alt?: string;
1783
+ /** JSONP */
1784
+ callback?: string;
1785
+ /** Selector specifying which fields to include in a partial response. */
1786
+ fields?: string;
1787
+ /**
1788
+ * A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in
1789
+ * [AIP-160](https://google.aip.dev/160).
1790
+ */
1791
+ filter?: string;
1792
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1793
+ key?: string;
1794
+ /** The resource that owns the locations collection, if applicable. */
1795
+ name: string;
1796
+ /** OAuth 2.0 token for the current user. */
1797
+ oauth_token?: string;
1798
+ /** The maximum number of results to return. If not set, the service selects a default. */
1799
+ pageSize?: number;
1800
+ /** A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. */
1801
+ pageToken?: string;
1802
+ /** Returns response with indentations and line breaks. */
1803
+ prettyPrint?: boolean;
1804
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1805
+ quotaUser?: string;
1806
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1807
+ upload_protocol?: string;
1808
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1809
+ uploadType?: string;
1810
+ }): Request<ListLocationsResponse>;
1811
+ queues: QueuesResource;
1812
+ }
1813
+ interface ProjectsResource {
1814
+ locations: LocationsResource;
1815
+ }
1816
+
1817
+ const projects: ProjectsResource;
1818
+ }
1819
+ }