@google-cloud/tasks
Advanced tools
Comparing version 1.9.0 to 2.0.0
/// <reference types="node" /> | ||
import * as gax from 'google-gax'; | ||
import { Callback, ClientOptions } from 'google-gax'; | ||
import { Callback, Descriptors, ClientOptions, PaginationCallback } from 'google-gax'; | ||
import { Transform } from 'stream'; | ||
import * as protosTypes from '../../protos/protos'; | ||
import * as protos from '../../protos/protos'; | ||
/** | ||
@@ -13,5 +13,2 @@ * Cloud Tasks allows developers to manage the execution of background | ||
export declare class CloudTasksClient { | ||
private _descriptors; | ||
private _innerApiCalls; | ||
private _pathTemplates; | ||
private _terminated; | ||
@@ -24,2 +21,9 @@ private _opts; | ||
auth: gax.GoogleAuth; | ||
descriptors: Descriptors; | ||
innerApiCalls: { | ||
[name: string]: Function; | ||
}; | ||
pathTemplates: { | ||
[name: string]: gax.PathTemplate; | ||
}; | ||
cloudTasksStub?: Promise<{ | ||
@@ -88,32 +92,47 @@ [name: string]: Function; | ||
getProjectId(callback: Callback<string, undefined, undefined>): void; | ||
getQueue(request: protosTypes.google.cloud.tasks.v2.IGetQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IGetQueueRequest | undefined, {} | undefined]>; | ||
getQueue(request: protosTypes.google.cloud.tasks.v2.IGetQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IGetQueueRequest | undefined, {} | undefined>): void; | ||
createQueue(request: protosTypes.google.cloud.tasks.v2.ICreateQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.ICreateQueueRequest | undefined, {} | undefined]>; | ||
createQueue(request: protosTypes.google.cloud.tasks.v2.ICreateQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.ICreateQueueRequest | undefined, {} | undefined>): void; | ||
updateQueue(request: protosTypes.google.cloud.tasks.v2.IUpdateQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IUpdateQueueRequest | undefined, {} | undefined]>; | ||
updateQueue(request: protosTypes.google.cloud.tasks.v2.IUpdateQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IUpdateQueueRequest | undefined, {} | undefined>): void; | ||
deleteQueue(request: protosTypes.google.cloud.tasks.v2.IDeleteQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2.IDeleteQueueRequest | undefined, {} | undefined]>; | ||
deleteQueue(request: protosTypes.google.cloud.tasks.v2.IDeleteQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2.IDeleteQueueRequest | undefined, {} | undefined>): void; | ||
purgeQueue(request: protosTypes.google.cloud.tasks.v2.IPurgeQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IPurgeQueueRequest | undefined, {} | undefined]>; | ||
purgeQueue(request: protosTypes.google.cloud.tasks.v2.IPurgeQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IPurgeQueueRequest | undefined, {} | undefined>): void; | ||
pauseQueue(request: protosTypes.google.cloud.tasks.v2.IPauseQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IPauseQueueRequest | undefined, {} | undefined]>; | ||
pauseQueue(request: protosTypes.google.cloud.tasks.v2.IPauseQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IPauseQueueRequest | undefined, {} | undefined>): void; | ||
resumeQueue(request: protosTypes.google.cloud.tasks.v2.IResumeQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IResumeQueueRequest | undefined, {} | undefined]>; | ||
resumeQueue(request: protosTypes.google.cloud.tasks.v2.IResumeQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.IQueue, protosTypes.google.cloud.tasks.v2.IResumeQueueRequest | undefined, {} | undefined>): void; | ||
getIamPolicy(request: protosTypes.google.iam.v1.IGetIamPolicyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]>; | ||
getIamPolicy(request: protosTypes.google.iam.v1.IGetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined>): void; | ||
setIamPolicy(request: protosTypes.google.iam.v1.ISetIamPolicyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]>; | ||
setIamPolicy(request: protosTypes.google.iam.v1.ISetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined>): void; | ||
testIamPermissions(request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, options?: gax.CallOptions): Promise<[protosTypes.google.iam.v1.ITestIamPermissionsResponse, protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]>; | ||
testIamPermissions(request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.iam.v1.ITestIamPermissionsResponse, protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined>): void; | ||
getTask(request: protosTypes.google.cloud.tasks.v2.IGetTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.ITask, protosTypes.google.cloud.tasks.v2.IGetTaskRequest | undefined, {} | undefined]>; | ||
getTask(request: protosTypes.google.cloud.tasks.v2.IGetTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.ITask, protosTypes.google.cloud.tasks.v2.IGetTaskRequest | undefined, {} | undefined>): void; | ||
createTask(request: protosTypes.google.cloud.tasks.v2.ICreateTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.ITask, protosTypes.google.cloud.tasks.v2.ICreateTaskRequest | undefined, {} | undefined]>; | ||
createTask(request: protosTypes.google.cloud.tasks.v2.ICreateTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.ITask, protosTypes.google.cloud.tasks.v2.ICreateTaskRequest | undefined, {} | undefined>): void; | ||
deleteTask(request: protosTypes.google.cloud.tasks.v2.IDeleteTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2.IDeleteTaskRequest | undefined, {} | undefined]>; | ||
deleteTask(request: protosTypes.google.cloud.tasks.v2.IDeleteTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2.IDeleteTaskRequest | undefined, {} | undefined>): void; | ||
runTask(request: protosTypes.google.cloud.tasks.v2.IRunTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.ITask, protosTypes.google.cloud.tasks.v2.IRunTaskRequest | undefined, {} | undefined]>; | ||
runTask(request: protosTypes.google.cloud.tasks.v2.IRunTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.ITask, protosTypes.google.cloud.tasks.v2.IRunTaskRequest | undefined, {} | undefined>): void; | ||
listQueues(request: protosTypes.google.cloud.tasks.v2.IListQueuesRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.IQueue[], protosTypes.google.cloud.tasks.v2.IListQueuesRequest | null, protosTypes.google.cloud.tasks.v2.IListQueuesResponse]>; | ||
listQueues(request: protosTypes.google.cloud.tasks.v2.IListQueuesRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.IQueue[], protosTypes.google.cloud.tasks.v2.IListQueuesRequest | null, protosTypes.google.cloud.tasks.v2.IListQueuesResponse>): void; | ||
getQueue(request: protos.google.cloud.tasks.v2.IGetQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IGetQueueRequest | undefined, {} | undefined]>; | ||
getQueue(request: protos.google.cloud.tasks.v2.IGetQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IGetQueueRequest | null | undefined, {} | null | undefined>): void; | ||
getQueue(request: protos.google.cloud.tasks.v2.IGetQueueRequest, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IGetQueueRequest | null | undefined, {} | null | undefined>): void; | ||
createQueue(request: protos.google.cloud.tasks.v2.ICreateQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.ICreateQueueRequest | undefined, {} | undefined]>; | ||
createQueue(request: protos.google.cloud.tasks.v2.ICreateQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.ICreateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
createQueue(request: protos.google.cloud.tasks.v2.ICreateQueueRequest, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.ICreateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
updateQueue(request: protos.google.cloud.tasks.v2.IUpdateQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IUpdateQueueRequest | undefined, {} | undefined]>; | ||
updateQueue(request: protos.google.cloud.tasks.v2.IUpdateQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IUpdateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
updateQueue(request: protos.google.cloud.tasks.v2.IUpdateQueueRequest, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IUpdateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
deleteQueue(request: protos.google.cloud.tasks.v2.IDeleteQueueRequest, options?: gax.CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2.IDeleteQueueRequest | undefined, {} | undefined]>; | ||
deleteQueue(request: protos.google.cloud.tasks.v2.IDeleteQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2.IDeleteQueueRequest | null | undefined, {} | null | undefined>): void; | ||
deleteQueue(request: protos.google.cloud.tasks.v2.IDeleteQueueRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2.IDeleteQueueRequest | null | undefined, {} | null | undefined>): void; | ||
purgeQueue(request: protos.google.cloud.tasks.v2.IPurgeQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IPurgeQueueRequest | undefined, {} | undefined]>; | ||
purgeQueue(request: protos.google.cloud.tasks.v2.IPurgeQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IPurgeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
purgeQueue(request: protos.google.cloud.tasks.v2.IPurgeQueueRequest, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IPurgeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
pauseQueue(request: protos.google.cloud.tasks.v2.IPauseQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IPauseQueueRequest | undefined, {} | undefined]>; | ||
pauseQueue(request: protos.google.cloud.tasks.v2.IPauseQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IPauseQueueRequest | null | undefined, {} | null | undefined>): void; | ||
pauseQueue(request: protos.google.cloud.tasks.v2.IPauseQueueRequest, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IPauseQueueRequest | null | undefined, {} | null | undefined>): void; | ||
resumeQueue(request: protos.google.cloud.tasks.v2.IResumeQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IResumeQueueRequest | undefined, {} | undefined]>; | ||
resumeQueue(request: protos.google.cloud.tasks.v2.IResumeQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IResumeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
resumeQueue(request: protos.google.cloud.tasks.v2.IResumeQueueRequest, callback: Callback<protos.google.cloud.tasks.v2.IQueue, protos.google.cloud.tasks.v2.IResumeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options?: gax.CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]>; | ||
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options?: gax.CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]>; | ||
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options?: gax.CallOptions): Promise<[protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]>; | ||
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void; | ||
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void; | ||
getTask(request: protos.google.cloud.tasks.v2.IGetTaskRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.ITask, protos.google.cloud.tasks.v2.IGetTaskRequest | undefined, {} | undefined]>; | ||
getTask(request: protos.google.cloud.tasks.v2.IGetTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2.ITask, protos.google.cloud.tasks.v2.IGetTaskRequest | null | undefined, {} | null | undefined>): void; | ||
getTask(request: protos.google.cloud.tasks.v2.IGetTaskRequest, callback: Callback<protos.google.cloud.tasks.v2.ITask, protos.google.cloud.tasks.v2.IGetTaskRequest | null | undefined, {} | null | undefined>): void; | ||
createTask(request: protos.google.cloud.tasks.v2.ICreateTaskRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.ITask, protos.google.cloud.tasks.v2.ICreateTaskRequest | undefined, {} | undefined]>; | ||
createTask(request: protos.google.cloud.tasks.v2.ICreateTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2.ITask, protos.google.cloud.tasks.v2.ICreateTaskRequest | null | undefined, {} | null | undefined>): void; | ||
createTask(request: protos.google.cloud.tasks.v2.ICreateTaskRequest, callback: Callback<protos.google.cloud.tasks.v2.ITask, protos.google.cloud.tasks.v2.ICreateTaskRequest | null | undefined, {} | null | undefined>): void; | ||
deleteTask(request: protos.google.cloud.tasks.v2.IDeleteTaskRequest, options?: gax.CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2.IDeleteTaskRequest | undefined, {} | undefined]>; | ||
deleteTask(request: protos.google.cloud.tasks.v2.IDeleteTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2.IDeleteTaskRequest | null | undefined, {} | null | undefined>): void; | ||
deleteTask(request: protos.google.cloud.tasks.v2.IDeleteTaskRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2.IDeleteTaskRequest | null | undefined, {} | null | undefined>): void; | ||
runTask(request: protos.google.cloud.tasks.v2.IRunTaskRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.ITask, protos.google.cloud.tasks.v2.IRunTaskRequest | undefined, {} | undefined]>; | ||
runTask(request: protos.google.cloud.tasks.v2.IRunTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2.ITask, protos.google.cloud.tasks.v2.IRunTaskRequest | null | undefined, {} | null | undefined>): void; | ||
runTask(request: protos.google.cloud.tasks.v2.IRunTaskRequest, callback: Callback<protos.google.cloud.tasks.v2.ITask, protos.google.cloud.tasks.v2.IRunTaskRequest | null | undefined, {} | null | undefined>): void; | ||
listQueues(request: protos.google.cloud.tasks.v2.IListQueuesRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.IQueue[], protos.google.cloud.tasks.v2.IListQueuesRequest | null, protos.google.cloud.tasks.v2.IListQueuesResponse]>; | ||
listQueues(request: protos.google.cloud.tasks.v2.IListQueuesRequest, options: gax.CallOptions, callback: PaginationCallback<protos.google.cloud.tasks.v2.IListQueuesRequest, protos.google.cloud.tasks.v2.IListQueuesResponse | null | undefined, protos.google.cloud.tasks.v2.IQueue>): void; | ||
listQueues(request: protos.google.cloud.tasks.v2.IListQueuesRequest, callback: PaginationCallback<protos.google.cloud.tasks.v2.IListQueuesRequest, protos.google.cloud.tasks.v2.IListQueuesResponse | null | undefined, protos.google.cloud.tasks.v2.IQueue>): void; | ||
/** | ||
@@ -171,6 +190,52 @@ * Equivalent to {@link listQueues}, but returns a NodeJS Stream object. | ||
*/ | ||
listQueuesStream(request?: protosTypes.google.cloud.tasks.v2.IListQueuesRequest, options?: gax.CallOptions): Transform; | ||
listTasks(request: protosTypes.google.cloud.tasks.v2.IListTasksRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2.ITask[], protosTypes.google.cloud.tasks.v2.IListTasksRequest | null, protosTypes.google.cloud.tasks.v2.IListTasksResponse]>; | ||
listTasks(request: protosTypes.google.cloud.tasks.v2.IListTasksRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2.ITask[], protosTypes.google.cloud.tasks.v2.IListTasksRequest | null, protosTypes.google.cloud.tasks.v2.IListTasksResponse>): void; | ||
listQueuesStream(request?: protos.google.cloud.tasks.v2.IListQueuesRequest, options?: gax.CallOptions): Transform; | ||
/** | ||
* Equivalent to {@link listQueues}, but returns an iterable object. | ||
* | ||
* for-await-of syntax is used with the iterable to recursively get response element on-demand. | ||
* | ||
* @param {Object} request | ||
* The request object that will be sent. | ||
* @param {string} request.parent | ||
* Required. The location name. | ||
* For example: `projects/PROJECT_ID/locations/LOCATION_ID` | ||
* @param {string} request.filter | ||
* `filter` can be used to specify a subset of queues. Any {@link google.cloud.tasks.v2.Queue|Queue} | ||
* field can be used as a filter and several operators as supported. | ||
* For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as | ||
* described in | ||
* [Stackdriver's Advanced Logs | ||
* Filters](https://cloud.google.com/logging/docs/view/advanced_filters). | ||
* | ||
* Sample filter "state: PAUSED". | ||
* | ||
* Note that using filters might cause fewer queues than the | ||
* requested page_size to be returned. | ||
* @param {number} request.pageSize | ||
* 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; use the | ||
* {@link google.cloud.tasks.v2.ListQueuesResponse.next_page_token|next_page_token} in the | ||
* response to determine if more queues exist. | ||
* @param {string} request.pageToken | ||
* 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 of | ||
* {@link google.cloud.tasks.v2.ListQueuesResponse.next_page_token|next_page_token} returned | ||
* from the previous call to {@link google.cloud.tasks.v2.CloudTasks.ListQueues|ListQueues} | ||
* method. It is an error to switch the value of the | ||
* {@link google.cloud.tasks.v2.ListQueuesRequest.filter|filter} while iterating through pages. | ||
* @param {object} [options] | ||
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* @returns {Object} | ||
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. | ||
*/ | ||
listQueuesAsync(request?: protos.google.cloud.tasks.v2.IListQueuesRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.tasks.v2.IQueue>; | ||
listTasks(request: protos.google.cloud.tasks.v2.IListTasksRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2.ITask[], protos.google.cloud.tasks.v2.IListTasksRequest | null, protos.google.cloud.tasks.v2.IListTasksResponse]>; | ||
listTasks(request: protos.google.cloud.tasks.v2.IListTasksRequest, options: gax.CallOptions, callback: PaginationCallback<protos.google.cloud.tasks.v2.IListTasksRequest, protos.google.cloud.tasks.v2.IListTasksResponse | null | undefined, protos.google.cloud.tasks.v2.ITask>): void; | ||
listTasks(request: protos.google.cloud.tasks.v2.IListTasksRequest, callback: PaginationCallback<protos.google.cloud.tasks.v2.IListTasksRequest, protos.google.cloud.tasks.v2.IListTasksResponse | null | undefined, protos.google.cloud.tasks.v2.ITask>): void; | ||
/** | ||
* Equivalent to {@link listTasks}, but returns a NodeJS Stream object. | ||
@@ -230,4 +295,52 @@ * | ||
*/ | ||
listTasksStream(request?: protosTypes.google.cloud.tasks.v2.IListTasksRequest, options?: gax.CallOptions): Transform; | ||
listTasksStream(request?: protos.google.cloud.tasks.v2.IListTasksRequest, options?: gax.CallOptions): Transform; | ||
/** | ||
* Equivalent to {@link listTasks}, but returns an iterable object. | ||
* | ||
* for-await-of syntax is used with the iterable to recursively get response element on-demand. | ||
* | ||
* @param {Object} request | ||
* The request object that will be sent. | ||
* @param {string} request.parent | ||
* Required. The queue name. For example: | ||
* `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` | ||
* @param {google.cloud.tasks.v2.Task.View} request.responseView | ||
* The response_view specifies which subset of the {@link google.cloud.tasks.v2.Task|Task} will be | ||
* returned. | ||
* | ||
* By default response_view is {@link google.cloud.tasks.v2.Task.View.BASIC|BASIC}; not all | ||
* information is retrieved by default because some data, such as | ||
* 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 {@link google.cloud.tasks.v2.Task.View.FULL|FULL} requires | ||
* `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | ||
* permission on the {@link google.cloud.tasks.v2.Task|Task} resource. | ||
* @param {number} request.pageSize | ||
* Maximum page size. | ||
* | ||
* Fewer tasks than requested might be returned, even if more tasks exist; use | ||
* {@link google.cloud.tasks.v2.ListTasksResponse.next_page_token|next_page_token} in the response to | ||
* determine if more tasks exist. | ||
* | ||
* The maximum page size is 1000. If unspecified, the page size will be the | ||
* maximum. | ||
* @param {string} request.pageToken | ||
* 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 of | ||
* {@link google.cloud.tasks.v2.ListTasksResponse.next_page_token|next_page_token} returned | ||
* from the previous call to {@link google.cloud.tasks.v2.CloudTasks.ListTasks|ListTasks} | ||
* method. | ||
* | ||
* The page token is valid for only 2 hours. | ||
* @param {object} [options] | ||
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* @returns {Object} | ||
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. | ||
*/ | ||
listTasksAsync(request?: protos.google.cloud.tasks.v2.IListTasksRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.tasks.v2.ITask>; | ||
/** | ||
* Return a fully-qualified location resource name string. | ||
@@ -247,3 +360,3 @@ * | ||
*/ | ||
matchProjectFromLocationName(locationName: string): string; | ||
matchProjectFromLocationName(locationName: string): string | number; | ||
/** | ||
@@ -256,3 +369,3 @@ * Parse the location from Location resource. | ||
*/ | ||
matchLocationFromLocationName(locationName: string): string; | ||
matchLocationFromLocationName(locationName: string): string | number; | ||
/** | ||
@@ -272,3 +385,3 @@ * Return a fully-qualified project resource name string. | ||
*/ | ||
matchProjectFromProjectName(projectName: string): string; | ||
matchProjectFromProjectName(projectName: string): string | number; | ||
/** | ||
@@ -290,3 +403,3 @@ * Return a fully-qualified queue resource name string. | ||
*/ | ||
matchProjectFromQueueName(queueName: string): string; | ||
matchProjectFromQueueName(queueName: string): string | number; | ||
/** | ||
@@ -299,3 +412,3 @@ * Parse the location from Queue resource. | ||
*/ | ||
matchLocationFromQueueName(queueName: string): string; | ||
matchLocationFromQueueName(queueName: string): string | number; | ||
/** | ||
@@ -308,3 +421,3 @@ * Parse the queue from Queue resource. | ||
*/ | ||
matchQueueFromQueueName(queueName: string): string; | ||
matchQueueFromQueueName(queueName: string): string | number; | ||
/** | ||
@@ -327,3 +440,3 @@ * Return a fully-qualified task resource name string. | ||
*/ | ||
matchProjectFromTaskName(taskName: string): string; | ||
matchProjectFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -336,3 +449,3 @@ * Parse the location from Task resource. | ||
*/ | ||
matchLocationFromTaskName(taskName: string): string; | ||
matchLocationFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -345,3 +458,3 @@ * Parse the queue from Task resource. | ||
*/ | ||
matchQueueFromTaskName(taskName: string): string; | ||
matchQueueFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -354,3 +467,3 @@ * Parse the task from Task resource. | ||
*/ | ||
matchTaskFromTaskName(taskName: string): string; | ||
matchTaskFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -357,0 +470,0 @@ * Terminate the GRPC channel and close the client. |
"use strict"; | ||
// Copyright 2019 Google LLC | ||
// Copyright 2020 Google LLC | ||
// | ||
@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License"); |
/// <reference types="node" /> | ||
import * as gax from 'google-gax'; | ||
import { Callback, ClientOptions } from 'google-gax'; | ||
import { Callback, Descriptors, ClientOptions, PaginationCallback } from 'google-gax'; | ||
import { Transform } from 'stream'; | ||
import * as protosTypes from '../../protos/protos'; | ||
import * as protos from '../../protos/protos'; | ||
/** | ||
@@ -13,5 +13,2 @@ * Cloud Tasks allows developers to manage the execution of background | ||
export declare class CloudTasksClient { | ||
private _descriptors; | ||
private _innerApiCalls; | ||
private _pathTemplates; | ||
private _terminated; | ||
@@ -24,2 +21,9 @@ private _opts; | ||
auth: gax.GoogleAuth; | ||
descriptors: Descriptors; | ||
innerApiCalls: { | ||
[name: string]: Function; | ||
}; | ||
pathTemplates: { | ||
[name: string]: gax.PathTemplate; | ||
}; | ||
cloudTasksStub?: Promise<{ | ||
@@ -88,40 +92,59 @@ [name: string]: Function; | ||
getProjectId(callback: Callback<string, undefined, undefined>): void; | ||
getQueue(request: protosTypes.google.cloud.tasks.v2beta2.IGetQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IGetQueueRequest | undefined, {} | undefined]>; | ||
getQueue(request: protosTypes.google.cloud.tasks.v2beta2.IGetQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IGetQueueRequest | undefined, {} | undefined>): void; | ||
createQueue(request: protosTypes.google.cloud.tasks.v2beta2.ICreateQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.ICreateQueueRequest | undefined, {} | undefined]>; | ||
createQueue(request: protosTypes.google.cloud.tasks.v2beta2.ICreateQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.ICreateQueueRequest | undefined, {} | undefined>): void; | ||
updateQueue(request: protosTypes.google.cloud.tasks.v2beta2.IUpdateQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IUpdateQueueRequest | undefined, {} | undefined]>; | ||
updateQueue(request: protosTypes.google.cloud.tasks.v2beta2.IUpdateQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IUpdateQueueRequest | undefined, {} | undefined>): void; | ||
deleteQueue(request: protosTypes.google.cloud.tasks.v2beta2.IDeleteQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2beta2.IDeleteQueueRequest | undefined, {} | undefined]>; | ||
deleteQueue(request: protosTypes.google.cloud.tasks.v2beta2.IDeleteQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2beta2.IDeleteQueueRequest | undefined, {} | undefined>): void; | ||
purgeQueue(request: protosTypes.google.cloud.tasks.v2beta2.IPurgeQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IPurgeQueueRequest | undefined, {} | undefined]>; | ||
purgeQueue(request: protosTypes.google.cloud.tasks.v2beta2.IPurgeQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IPurgeQueueRequest | undefined, {} | undefined>): void; | ||
pauseQueue(request: protosTypes.google.cloud.tasks.v2beta2.IPauseQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IPauseQueueRequest | undefined, {} | undefined]>; | ||
pauseQueue(request: protosTypes.google.cloud.tasks.v2beta2.IPauseQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IPauseQueueRequest | undefined, {} | undefined>): void; | ||
resumeQueue(request: protosTypes.google.cloud.tasks.v2beta2.IResumeQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IResumeQueueRequest | undefined, {} | undefined]>; | ||
resumeQueue(request: protosTypes.google.cloud.tasks.v2beta2.IResumeQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.IQueue, protosTypes.google.cloud.tasks.v2beta2.IResumeQueueRequest | undefined, {} | undefined>): void; | ||
getIamPolicy(request: protosTypes.google.iam.v1.IGetIamPolicyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]>; | ||
getIamPolicy(request: protosTypes.google.iam.v1.IGetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined>): void; | ||
setIamPolicy(request: protosTypes.google.iam.v1.ISetIamPolicyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]>; | ||
setIamPolicy(request: protosTypes.google.iam.v1.ISetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined>): void; | ||
testIamPermissions(request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, options?: gax.CallOptions): Promise<[protosTypes.google.iam.v1.ITestIamPermissionsResponse, protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]>; | ||
testIamPermissions(request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.iam.v1.ITestIamPermissionsResponse, protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined>): void; | ||
getTask(request: protosTypes.google.cloud.tasks.v2beta2.IGetTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.IGetTaskRequest | undefined, {} | undefined]>; | ||
getTask(request: protosTypes.google.cloud.tasks.v2beta2.IGetTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.IGetTaskRequest | undefined, {} | undefined>): void; | ||
createTask(request: protosTypes.google.cloud.tasks.v2beta2.ICreateTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.ICreateTaskRequest | undefined, {} | undefined]>; | ||
createTask(request: protosTypes.google.cloud.tasks.v2beta2.ICreateTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.ICreateTaskRequest | undefined, {} | undefined>): void; | ||
deleteTask(request: protosTypes.google.cloud.tasks.v2beta2.IDeleteTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2beta2.IDeleteTaskRequest | undefined, {} | undefined]>; | ||
deleteTask(request: protosTypes.google.cloud.tasks.v2beta2.IDeleteTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2beta2.IDeleteTaskRequest | undefined, {} | undefined>): void; | ||
leaseTasks(request: protosTypes.google.cloud.tasks.v2beta2.ILeaseTasksRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.ILeaseTasksResponse, protosTypes.google.cloud.tasks.v2beta2.ILeaseTasksRequest | undefined, {} | undefined]>; | ||
leaseTasks(request: protosTypes.google.cloud.tasks.v2beta2.ILeaseTasksRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.ILeaseTasksResponse, protosTypes.google.cloud.tasks.v2beta2.ILeaseTasksRequest | undefined, {} | undefined>): void; | ||
acknowledgeTask(request: protosTypes.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.protobuf.IEmpty, (protosTypes.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest | undefined), {} | undefined]>; | ||
acknowledgeTask(request: protosTypes.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest | undefined, {} | undefined>): void; | ||
renewLease(request: protosTypes.google.cloud.tasks.v2beta2.IRenewLeaseRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.IRenewLeaseRequest | undefined, {} | undefined]>; | ||
renewLease(request: protosTypes.google.cloud.tasks.v2beta2.IRenewLeaseRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.IRenewLeaseRequest | undefined, {} | undefined>): void; | ||
cancelLease(request: protosTypes.google.cloud.tasks.v2beta2.ICancelLeaseRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.ICancelLeaseRequest | undefined, {} | undefined]>; | ||
cancelLease(request: protosTypes.google.cloud.tasks.v2beta2.ICancelLeaseRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.ICancelLeaseRequest | undefined, {} | undefined>): void; | ||
runTask(request: protosTypes.google.cloud.tasks.v2beta2.IRunTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.IRunTaskRequest | undefined, {} | undefined]>; | ||
runTask(request: protosTypes.google.cloud.tasks.v2beta2.IRunTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.ITask, protosTypes.google.cloud.tasks.v2beta2.IRunTaskRequest | undefined, {} | undefined>): void; | ||
listQueues(request: protosTypes.google.cloud.tasks.v2beta2.IListQueuesRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.IQueue[], protosTypes.google.cloud.tasks.v2beta2.IListQueuesRequest | null, protosTypes.google.cloud.tasks.v2beta2.IListQueuesResponse]>; | ||
listQueues(request: protosTypes.google.cloud.tasks.v2beta2.IListQueuesRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.IQueue[], protosTypes.google.cloud.tasks.v2beta2.IListQueuesRequest | null, protosTypes.google.cloud.tasks.v2beta2.IListQueuesResponse>): void; | ||
getQueue(request: protos.google.cloud.tasks.v2beta2.IGetQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IGetQueueRequest | undefined, {} | undefined]>; | ||
getQueue(request: protos.google.cloud.tasks.v2beta2.IGetQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IGetQueueRequest | null | undefined, {} | null | undefined>): void; | ||
getQueue(request: protos.google.cloud.tasks.v2beta2.IGetQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IGetQueueRequest | null | undefined, {} | null | undefined>): void; | ||
createQueue(request: protos.google.cloud.tasks.v2beta2.ICreateQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.ICreateQueueRequest | undefined, {} | undefined]>; | ||
createQueue(request: protos.google.cloud.tasks.v2beta2.ICreateQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.ICreateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
createQueue(request: protos.google.cloud.tasks.v2beta2.ICreateQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.ICreateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
updateQueue(request: protos.google.cloud.tasks.v2beta2.IUpdateQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IUpdateQueueRequest | undefined, {} | undefined]>; | ||
updateQueue(request: protos.google.cloud.tasks.v2beta2.IUpdateQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IUpdateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
updateQueue(request: protos.google.cloud.tasks.v2beta2.IUpdateQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IUpdateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
deleteQueue(request: protos.google.cloud.tasks.v2beta2.IDeleteQueueRequest, options?: gax.CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta2.IDeleteQueueRequest | undefined, {} | undefined]>; | ||
deleteQueue(request: protos.google.cloud.tasks.v2beta2.IDeleteQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta2.IDeleteQueueRequest | null | undefined, {} | null | undefined>): void; | ||
deleteQueue(request: protos.google.cloud.tasks.v2beta2.IDeleteQueueRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta2.IDeleteQueueRequest | null | undefined, {} | null | undefined>): void; | ||
purgeQueue(request: protos.google.cloud.tasks.v2beta2.IPurgeQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IPurgeQueueRequest | undefined, {} | undefined]>; | ||
purgeQueue(request: protos.google.cloud.tasks.v2beta2.IPurgeQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IPurgeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
purgeQueue(request: protos.google.cloud.tasks.v2beta2.IPurgeQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IPurgeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
pauseQueue(request: protos.google.cloud.tasks.v2beta2.IPauseQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IPauseQueueRequest | undefined, {} | undefined]>; | ||
pauseQueue(request: protos.google.cloud.tasks.v2beta2.IPauseQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IPauseQueueRequest | null | undefined, {} | null | undefined>): void; | ||
pauseQueue(request: protos.google.cloud.tasks.v2beta2.IPauseQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IPauseQueueRequest | null | undefined, {} | null | undefined>): void; | ||
resumeQueue(request: protos.google.cloud.tasks.v2beta2.IResumeQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IResumeQueueRequest | undefined, {} | undefined]>; | ||
resumeQueue(request: protos.google.cloud.tasks.v2beta2.IResumeQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IResumeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
resumeQueue(request: protos.google.cloud.tasks.v2beta2.IResumeQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.IQueue, protos.google.cloud.tasks.v2beta2.IResumeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options?: gax.CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]>; | ||
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options?: gax.CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]>; | ||
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options?: gax.CallOptions): Promise<[protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]>; | ||
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void; | ||
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void; | ||
getTask(request: protos.google.cloud.tasks.v2beta2.IGetTaskRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.IGetTaskRequest | undefined, {} | undefined]>; | ||
getTask(request: protos.google.cloud.tasks.v2beta2.IGetTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.IGetTaskRequest | null | undefined, {} | null | undefined>): void; | ||
getTask(request: protos.google.cloud.tasks.v2beta2.IGetTaskRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.IGetTaskRequest | null | undefined, {} | null | undefined>): void; | ||
createTask(request: protos.google.cloud.tasks.v2beta2.ICreateTaskRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.ICreateTaskRequest | undefined, {} | undefined]>; | ||
createTask(request: protos.google.cloud.tasks.v2beta2.ICreateTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.ICreateTaskRequest | null | undefined, {} | null | undefined>): void; | ||
createTask(request: protos.google.cloud.tasks.v2beta2.ICreateTaskRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.ICreateTaskRequest | null | undefined, {} | null | undefined>): void; | ||
deleteTask(request: protos.google.cloud.tasks.v2beta2.IDeleteTaskRequest, options?: gax.CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta2.IDeleteTaskRequest | undefined, {} | undefined]>; | ||
deleteTask(request: protos.google.cloud.tasks.v2beta2.IDeleteTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta2.IDeleteTaskRequest | null | undefined, {} | null | undefined>): void; | ||
deleteTask(request: protos.google.cloud.tasks.v2beta2.IDeleteTaskRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta2.IDeleteTaskRequest | null | undefined, {} | null | undefined>): void; | ||
leaseTasks(request: protos.google.cloud.tasks.v2beta2.ILeaseTasksRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.ILeaseTasksResponse, protos.google.cloud.tasks.v2beta2.ILeaseTasksRequest | undefined, {} | undefined]>; | ||
leaseTasks(request: protos.google.cloud.tasks.v2beta2.ILeaseTasksRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.ILeaseTasksResponse, protos.google.cloud.tasks.v2beta2.ILeaseTasksRequest | null | undefined, {} | null | undefined>): void; | ||
leaseTasks(request: protos.google.cloud.tasks.v2beta2.ILeaseTasksRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.ILeaseTasksResponse, protos.google.cloud.tasks.v2beta2.ILeaseTasksRequest | null | undefined, {} | null | undefined>): void; | ||
acknowledgeTask(request: protos.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest, options?: gax.CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest | undefined, {} | undefined]>; | ||
acknowledgeTask(request: protos.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest | null | undefined, {} | null | undefined>): void; | ||
acknowledgeTask(request: protos.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta2.IAcknowledgeTaskRequest | null | undefined, {} | null | undefined>): void; | ||
renewLease(request: protos.google.cloud.tasks.v2beta2.IRenewLeaseRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.IRenewLeaseRequest | undefined, {} | undefined]>; | ||
renewLease(request: protos.google.cloud.tasks.v2beta2.IRenewLeaseRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.IRenewLeaseRequest | null | undefined, {} | null | undefined>): void; | ||
renewLease(request: protos.google.cloud.tasks.v2beta2.IRenewLeaseRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.IRenewLeaseRequest | null | undefined, {} | null | undefined>): void; | ||
cancelLease(request: protos.google.cloud.tasks.v2beta2.ICancelLeaseRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.ICancelLeaseRequest | undefined, {} | undefined]>; | ||
cancelLease(request: protos.google.cloud.tasks.v2beta2.ICancelLeaseRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.ICancelLeaseRequest | null | undefined, {} | null | undefined>): void; | ||
cancelLease(request: protos.google.cloud.tasks.v2beta2.ICancelLeaseRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.ICancelLeaseRequest | null | undefined, {} | null | undefined>): void; | ||
runTask(request: protos.google.cloud.tasks.v2beta2.IRunTaskRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.IRunTaskRequest | undefined, {} | undefined]>; | ||
runTask(request: protos.google.cloud.tasks.v2beta2.IRunTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.IRunTaskRequest | null | undefined, {} | null | undefined>): void; | ||
runTask(request: protos.google.cloud.tasks.v2beta2.IRunTaskRequest, callback: Callback<protos.google.cloud.tasks.v2beta2.ITask, protos.google.cloud.tasks.v2beta2.IRunTaskRequest | null | undefined, {} | null | undefined>): void; | ||
listQueues(request: protos.google.cloud.tasks.v2beta2.IListQueuesRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.IQueue[], protos.google.cloud.tasks.v2beta2.IListQueuesRequest | null, protos.google.cloud.tasks.v2beta2.IListQueuesResponse]>; | ||
listQueues(request: protos.google.cloud.tasks.v2beta2.IListQueuesRequest, options: gax.CallOptions, callback: PaginationCallback<protos.google.cloud.tasks.v2beta2.IListQueuesRequest, protos.google.cloud.tasks.v2beta2.IListQueuesResponse | null | undefined, protos.google.cloud.tasks.v2beta2.IQueue>): void; | ||
listQueues(request: protos.google.cloud.tasks.v2beta2.IListQueuesRequest, callback: PaginationCallback<protos.google.cloud.tasks.v2beta2.IListQueuesRequest, protos.google.cloud.tasks.v2beta2.IListQueuesResponse | null | undefined, protos.google.cloud.tasks.v2beta2.IQueue>): void; | ||
/** | ||
@@ -179,6 +202,52 @@ * Equivalent to {@link listQueues}, but returns a NodeJS Stream object. | ||
*/ | ||
listQueuesStream(request?: protosTypes.google.cloud.tasks.v2beta2.IListQueuesRequest, options?: gax.CallOptions): Transform; | ||
listTasks(request: protosTypes.google.cloud.tasks.v2beta2.IListTasksRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta2.ITask[], protosTypes.google.cloud.tasks.v2beta2.IListTasksRequest | null, protosTypes.google.cloud.tasks.v2beta2.IListTasksResponse]>; | ||
listTasks(request: protosTypes.google.cloud.tasks.v2beta2.IListTasksRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta2.ITask[], protosTypes.google.cloud.tasks.v2beta2.IListTasksRequest | null, protosTypes.google.cloud.tasks.v2beta2.IListTasksResponse>): void; | ||
listQueuesStream(request?: protos.google.cloud.tasks.v2beta2.IListQueuesRequest, options?: gax.CallOptions): Transform; | ||
/** | ||
* Equivalent to {@link listQueues}, but returns an iterable object. | ||
* | ||
* for-await-of syntax is used with the iterable to recursively get response element on-demand. | ||
* | ||
* @param {Object} request | ||
* The request object that will be sent. | ||
* @param {string} request.parent | ||
* Required. The location name. | ||
* For example: `projects/PROJECT_ID/locations/LOCATION_ID` | ||
* @param {string} request.filter | ||
* `filter` can be used to specify a subset of queues. Any {@link google.cloud.tasks.v2beta2.Queue|Queue} | ||
* field can be used as a filter and several operators as supported. | ||
* For example: `<=, <, >=, >, !=, =, :`. The filter 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: *". | ||
* | ||
* Note that using filters might cause fewer queues than the | ||
* requested_page size to be returned. | ||
* @param {number} request.pageSize | ||
* 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; use the | ||
* {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} in the | ||
* response to determine if more queues exist. | ||
* @param {string} request.pageToken | ||
* 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 of | ||
* {@link google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token|next_page_token} returned | ||
* from the previous call to {@link google.cloud.tasks.v2beta2.CloudTasks.ListQueues|ListQueues} | ||
* method. It is an error to switch the value of the | ||
* {@link google.cloud.tasks.v2beta2.ListQueuesRequest.filter|filter} while iterating through pages. | ||
* @param {object} [options] | ||
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* @returns {Object} | ||
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. | ||
*/ | ||
listQueuesAsync(request?: protos.google.cloud.tasks.v2beta2.IListQueuesRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.tasks.v2beta2.IQueue>; | ||
listTasks(request: protos.google.cloud.tasks.v2beta2.IListTasksRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta2.ITask[], protos.google.cloud.tasks.v2beta2.IListTasksRequest | null, protos.google.cloud.tasks.v2beta2.IListTasksResponse]>; | ||
listTasks(request: protos.google.cloud.tasks.v2beta2.IListTasksRequest, options: gax.CallOptions, callback: PaginationCallback<protos.google.cloud.tasks.v2beta2.IListTasksRequest, protos.google.cloud.tasks.v2beta2.IListTasksResponse | null | undefined, protos.google.cloud.tasks.v2beta2.ITask>): void; | ||
listTasks(request: protos.google.cloud.tasks.v2beta2.IListTasksRequest, callback: PaginationCallback<protos.google.cloud.tasks.v2beta2.IListTasksRequest, protos.google.cloud.tasks.v2beta2.IListTasksResponse | null | undefined, protos.google.cloud.tasks.v2beta2.ITask>): void; | ||
/** | ||
* Equivalent to {@link listTasks}, but returns a NodeJS Stream object. | ||
@@ -238,4 +307,52 @@ * | ||
*/ | ||
listTasksStream(request?: protosTypes.google.cloud.tasks.v2beta2.IListTasksRequest, options?: gax.CallOptions): Transform; | ||
listTasksStream(request?: protos.google.cloud.tasks.v2beta2.IListTasksRequest, options?: gax.CallOptions): Transform; | ||
/** | ||
* Equivalent to {@link listTasks}, but returns an iterable object. | ||
* | ||
* for-await-of syntax is used with the iterable to recursively get response element on-demand. | ||
* | ||
* @param {Object} request | ||
* The request object that will be sent. | ||
* @param {string} request.parent | ||
* Required. The queue name. For example: | ||
* `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` | ||
* @param {google.cloud.tasks.v2beta2.Task.View} request.responseView | ||
* The response_view specifies which subset of the {@link google.cloud.tasks.v2beta2.Task|Task} will be | ||
* returned. | ||
* | ||
* By default response_view is {@link google.cloud.tasks.v2beta2.Task.View.BASIC|BASIC}; not all | ||
* information is retrieved by default because some data, such as | ||
* 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 {@link google.cloud.tasks.v2beta2.Task.View.FULL|FULL} requires | ||
* `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | ||
* permission on the {@link google.cloud.tasks.v2beta2.Task|Task} resource. | ||
* @param {number} request.pageSize | ||
* Maximum page size. | ||
* | ||
* Fewer tasks than requested might be returned, even if more tasks exist; use | ||
* {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} in the response to | ||
* determine if more tasks exist. | ||
* | ||
* The maximum page size is 1000. If unspecified, the page size will be the | ||
* maximum. | ||
* @param {string} request.pageToken | ||
* 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 of | ||
* {@link google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token|next_page_token} returned | ||
* from the previous call to {@link google.cloud.tasks.v2beta2.CloudTasks.ListTasks|ListTasks} | ||
* method. | ||
* | ||
* The page token is valid for only 2 hours. | ||
* @param {object} [options] | ||
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* @returns {Object} | ||
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. | ||
*/ | ||
listTasksAsync(request?: protos.google.cloud.tasks.v2beta2.IListTasksRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.tasks.v2beta2.ITask>; | ||
/** | ||
* Return a fully-qualified location resource name string. | ||
@@ -255,3 +372,3 @@ * | ||
*/ | ||
matchProjectFromLocationName(locationName: string): string; | ||
matchProjectFromLocationName(locationName: string): string | number; | ||
/** | ||
@@ -264,3 +381,3 @@ * Parse the location from Location resource. | ||
*/ | ||
matchLocationFromLocationName(locationName: string): string; | ||
matchLocationFromLocationName(locationName: string): string | number; | ||
/** | ||
@@ -280,3 +397,3 @@ * Return a fully-qualified project resource name string. | ||
*/ | ||
matchProjectFromProjectName(projectName: string): string; | ||
matchProjectFromProjectName(projectName: string): string | number; | ||
/** | ||
@@ -298,3 +415,3 @@ * Return a fully-qualified queue resource name string. | ||
*/ | ||
matchProjectFromQueueName(queueName: string): string; | ||
matchProjectFromQueueName(queueName: string): string | number; | ||
/** | ||
@@ -307,3 +424,3 @@ * Parse the location from Queue resource. | ||
*/ | ||
matchLocationFromQueueName(queueName: string): string; | ||
matchLocationFromQueueName(queueName: string): string | number; | ||
/** | ||
@@ -316,3 +433,3 @@ * Parse the queue from Queue resource. | ||
*/ | ||
matchQueueFromQueueName(queueName: string): string; | ||
matchQueueFromQueueName(queueName: string): string | number; | ||
/** | ||
@@ -335,3 +452,3 @@ * Return a fully-qualified task resource name string. | ||
*/ | ||
matchProjectFromTaskName(taskName: string): string; | ||
matchProjectFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -344,3 +461,3 @@ * Parse the location from Task resource. | ||
*/ | ||
matchLocationFromTaskName(taskName: string): string; | ||
matchLocationFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -353,3 +470,3 @@ * Parse the queue from Task resource. | ||
*/ | ||
matchQueueFromTaskName(taskName: string): string; | ||
matchQueueFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -362,3 +479,3 @@ * Parse the task from Task resource. | ||
*/ | ||
matchTaskFromTaskName(taskName: string): string; | ||
matchTaskFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -365,0 +482,0 @@ * Terminate the GRPC channel and close the client. |
"use strict"; | ||
// Copyright 2019 Google LLC | ||
// Copyright 2020 Google LLC | ||
// | ||
@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License"); |
/// <reference types="node" /> | ||
import * as gax from 'google-gax'; | ||
import { Callback, ClientOptions } from 'google-gax'; | ||
import { Callback, Descriptors, ClientOptions, PaginationCallback } from 'google-gax'; | ||
import { Transform } from 'stream'; | ||
import * as protosTypes from '../../protos/protos'; | ||
import * as protos from '../../protos/protos'; | ||
/** | ||
@@ -13,5 +13,2 @@ * Cloud Tasks allows developers to manage the execution of background | ||
export declare class CloudTasksClient { | ||
private _descriptors; | ||
private _innerApiCalls; | ||
private _pathTemplates; | ||
private _terminated; | ||
@@ -24,2 +21,9 @@ private _opts; | ||
auth: gax.GoogleAuth; | ||
descriptors: Descriptors; | ||
innerApiCalls: { | ||
[name: string]: Function; | ||
}; | ||
pathTemplates: { | ||
[name: string]: gax.PathTemplate; | ||
}; | ||
cloudTasksStub?: Promise<{ | ||
@@ -88,32 +92,47 @@ [name: string]: Function; | ||
getProjectId(callback: Callback<string, undefined, undefined>): void; | ||
getQueue(request: protosTypes.google.cloud.tasks.v2beta3.IGetQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IGetQueueRequest | undefined, {} | undefined]>; | ||
getQueue(request: protosTypes.google.cloud.tasks.v2beta3.IGetQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IGetQueueRequest | undefined, {} | undefined>): void; | ||
createQueue(request: protosTypes.google.cloud.tasks.v2beta3.ICreateQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.ICreateQueueRequest | undefined, {} | undefined]>; | ||
createQueue(request: protosTypes.google.cloud.tasks.v2beta3.ICreateQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.ICreateQueueRequest | undefined, {} | undefined>): void; | ||
updateQueue(request: protosTypes.google.cloud.tasks.v2beta3.IUpdateQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IUpdateQueueRequest | undefined, {} | undefined]>; | ||
updateQueue(request: protosTypes.google.cloud.tasks.v2beta3.IUpdateQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IUpdateQueueRequest | undefined, {} | undefined>): void; | ||
deleteQueue(request: protosTypes.google.cloud.tasks.v2beta3.IDeleteQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2beta3.IDeleteQueueRequest | undefined, {} | undefined]>; | ||
deleteQueue(request: protosTypes.google.cloud.tasks.v2beta3.IDeleteQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2beta3.IDeleteQueueRequest | undefined, {} | undefined>): void; | ||
purgeQueue(request: protosTypes.google.cloud.tasks.v2beta3.IPurgeQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IPurgeQueueRequest | undefined, {} | undefined]>; | ||
purgeQueue(request: protosTypes.google.cloud.tasks.v2beta3.IPurgeQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IPurgeQueueRequest | undefined, {} | undefined>): void; | ||
pauseQueue(request: protosTypes.google.cloud.tasks.v2beta3.IPauseQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IPauseQueueRequest | undefined, {} | undefined]>; | ||
pauseQueue(request: protosTypes.google.cloud.tasks.v2beta3.IPauseQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IPauseQueueRequest | undefined, {} | undefined>): void; | ||
resumeQueue(request: protosTypes.google.cloud.tasks.v2beta3.IResumeQueueRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IResumeQueueRequest | undefined, {} | undefined]>; | ||
resumeQueue(request: protosTypes.google.cloud.tasks.v2beta3.IResumeQueueRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.IQueue, protosTypes.google.cloud.tasks.v2beta3.IResumeQueueRequest | undefined, {} | undefined>): void; | ||
getIamPolicy(request: protosTypes.google.iam.v1.IGetIamPolicyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]>; | ||
getIamPolicy(request: protosTypes.google.iam.v1.IGetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined>): void; | ||
setIamPolicy(request: protosTypes.google.iam.v1.ISetIamPolicyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]>; | ||
setIamPolicy(request: protosTypes.google.iam.v1.ISetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.iam.v1.IPolicy, protosTypes.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined>): void; | ||
testIamPermissions(request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, options?: gax.CallOptions): Promise<[protosTypes.google.iam.v1.ITestIamPermissionsResponse, protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]>; | ||
testIamPermissions(request: protosTypes.google.iam.v1.ITestIamPermissionsRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.iam.v1.ITestIamPermissionsResponse, protosTypes.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined>): void; | ||
getTask(request: protosTypes.google.cloud.tasks.v2beta3.IGetTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.ITask, protosTypes.google.cloud.tasks.v2beta3.IGetTaskRequest | undefined, {} | undefined]>; | ||
getTask(request: protosTypes.google.cloud.tasks.v2beta3.IGetTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.ITask, protosTypes.google.cloud.tasks.v2beta3.IGetTaskRequest | undefined, {} | undefined>): void; | ||
createTask(request: protosTypes.google.cloud.tasks.v2beta3.ICreateTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.ITask, protosTypes.google.cloud.tasks.v2beta3.ICreateTaskRequest | undefined, {} | undefined]>; | ||
createTask(request: protosTypes.google.cloud.tasks.v2beta3.ICreateTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.ITask, protosTypes.google.cloud.tasks.v2beta3.ICreateTaskRequest | undefined, {} | undefined>): void; | ||
deleteTask(request: protosTypes.google.cloud.tasks.v2beta3.IDeleteTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2beta3.IDeleteTaskRequest | undefined, {} | undefined]>; | ||
deleteTask(request: protosTypes.google.cloud.tasks.v2beta3.IDeleteTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.tasks.v2beta3.IDeleteTaskRequest | undefined, {} | undefined>): void; | ||
runTask(request: protosTypes.google.cloud.tasks.v2beta3.IRunTaskRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.ITask, protosTypes.google.cloud.tasks.v2beta3.IRunTaskRequest | undefined, {} | undefined]>; | ||
runTask(request: protosTypes.google.cloud.tasks.v2beta3.IRunTaskRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.ITask, protosTypes.google.cloud.tasks.v2beta3.IRunTaskRequest | undefined, {} | undefined>): void; | ||
listQueues(request: protosTypes.google.cloud.tasks.v2beta3.IListQueuesRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.IQueue[], protosTypes.google.cloud.tasks.v2beta3.IListQueuesRequest | null, protosTypes.google.cloud.tasks.v2beta3.IListQueuesResponse]>; | ||
listQueues(request: protosTypes.google.cloud.tasks.v2beta3.IListQueuesRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.IQueue[], protosTypes.google.cloud.tasks.v2beta3.IListQueuesRequest | null, protosTypes.google.cloud.tasks.v2beta3.IListQueuesResponse>): void; | ||
getQueue(request: protos.google.cloud.tasks.v2beta3.IGetQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IGetQueueRequest | undefined, {} | undefined]>; | ||
getQueue(request: protos.google.cloud.tasks.v2beta3.IGetQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IGetQueueRequest | null | undefined, {} | null | undefined>): void; | ||
getQueue(request: protos.google.cloud.tasks.v2beta3.IGetQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IGetQueueRequest | null | undefined, {} | null | undefined>): void; | ||
createQueue(request: protos.google.cloud.tasks.v2beta3.ICreateQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.ICreateQueueRequest | undefined, {} | undefined]>; | ||
createQueue(request: protos.google.cloud.tasks.v2beta3.ICreateQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.ICreateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
createQueue(request: protos.google.cloud.tasks.v2beta3.ICreateQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.ICreateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
updateQueue(request: protos.google.cloud.tasks.v2beta3.IUpdateQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IUpdateQueueRequest | undefined, {} | undefined]>; | ||
updateQueue(request: protos.google.cloud.tasks.v2beta3.IUpdateQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IUpdateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
updateQueue(request: protos.google.cloud.tasks.v2beta3.IUpdateQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IUpdateQueueRequest | null | undefined, {} | null | undefined>): void; | ||
deleteQueue(request: protos.google.cloud.tasks.v2beta3.IDeleteQueueRequest, options?: gax.CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta3.IDeleteQueueRequest | undefined, {} | undefined]>; | ||
deleteQueue(request: protos.google.cloud.tasks.v2beta3.IDeleteQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta3.IDeleteQueueRequest | null | undefined, {} | null | undefined>): void; | ||
deleteQueue(request: protos.google.cloud.tasks.v2beta3.IDeleteQueueRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta3.IDeleteQueueRequest | null | undefined, {} | null | undefined>): void; | ||
purgeQueue(request: protos.google.cloud.tasks.v2beta3.IPurgeQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IPurgeQueueRequest | undefined, {} | undefined]>; | ||
purgeQueue(request: protos.google.cloud.tasks.v2beta3.IPurgeQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IPurgeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
purgeQueue(request: protos.google.cloud.tasks.v2beta3.IPurgeQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IPurgeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
pauseQueue(request: protos.google.cloud.tasks.v2beta3.IPauseQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IPauseQueueRequest | undefined, {} | undefined]>; | ||
pauseQueue(request: protos.google.cloud.tasks.v2beta3.IPauseQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IPauseQueueRequest | null | undefined, {} | null | undefined>): void; | ||
pauseQueue(request: protos.google.cloud.tasks.v2beta3.IPauseQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IPauseQueueRequest | null | undefined, {} | null | undefined>): void; | ||
resumeQueue(request: protos.google.cloud.tasks.v2beta3.IResumeQueueRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IResumeQueueRequest | undefined, {} | undefined]>; | ||
resumeQueue(request: protos.google.cloud.tasks.v2beta3.IResumeQueueRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IResumeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
resumeQueue(request: protos.google.cloud.tasks.v2beta3.IResumeQueueRequest, callback: Callback<protos.google.cloud.tasks.v2beta3.IQueue, protos.google.cloud.tasks.v2beta3.IResumeQueueRequest | null | undefined, {} | null | undefined>): void; | ||
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options?: gax.CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | undefined, {} | undefined]>; | ||
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options?: gax.CallOptions): Promise<[protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | undefined, {} | undefined]>; | ||
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void; | ||
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options?: gax.CallOptions): Promise<[protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined]>; | ||
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: gax.CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void; | ||
testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void; | ||
getTask(request: protos.google.cloud.tasks.v2beta3.IGetTaskRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.ITask, protos.google.cloud.tasks.v2beta3.IGetTaskRequest | undefined, {} | undefined]>; | ||
getTask(request: protos.google.cloud.tasks.v2beta3.IGetTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta3.ITask, protos.google.cloud.tasks.v2beta3.IGetTaskRequest | null | undefined, {} | null | undefined>): void; | ||
getTask(request: protos.google.cloud.tasks.v2beta3.IGetTaskRequest, callback: Callback<protos.google.cloud.tasks.v2beta3.ITask, protos.google.cloud.tasks.v2beta3.IGetTaskRequest | null | undefined, {} | null | undefined>): void; | ||
createTask(request: protos.google.cloud.tasks.v2beta3.ICreateTaskRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.ITask, protos.google.cloud.tasks.v2beta3.ICreateTaskRequest | undefined, {} | undefined]>; | ||
createTask(request: protos.google.cloud.tasks.v2beta3.ICreateTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta3.ITask, protos.google.cloud.tasks.v2beta3.ICreateTaskRequest | null | undefined, {} | null | undefined>): void; | ||
createTask(request: protos.google.cloud.tasks.v2beta3.ICreateTaskRequest, callback: Callback<protos.google.cloud.tasks.v2beta3.ITask, protos.google.cloud.tasks.v2beta3.ICreateTaskRequest | null | undefined, {} | null | undefined>): void; | ||
deleteTask(request: protos.google.cloud.tasks.v2beta3.IDeleteTaskRequest, options?: gax.CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta3.IDeleteTaskRequest | undefined, {} | undefined]>; | ||
deleteTask(request: protos.google.cloud.tasks.v2beta3.IDeleteTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta3.IDeleteTaskRequest | null | undefined, {} | null | undefined>): void; | ||
deleteTask(request: protos.google.cloud.tasks.v2beta3.IDeleteTaskRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.tasks.v2beta3.IDeleteTaskRequest | null | undefined, {} | null | undefined>): void; | ||
runTask(request: protos.google.cloud.tasks.v2beta3.IRunTaskRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.ITask, protos.google.cloud.tasks.v2beta3.IRunTaskRequest | undefined, {} | undefined]>; | ||
runTask(request: protos.google.cloud.tasks.v2beta3.IRunTaskRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.tasks.v2beta3.ITask, protos.google.cloud.tasks.v2beta3.IRunTaskRequest | null | undefined, {} | null | undefined>): void; | ||
runTask(request: protos.google.cloud.tasks.v2beta3.IRunTaskRequest, callback: Callback<protos.google.cloud.tasks.v2beta3.ITask, protos.google.cloud.tasks.v2beta3.IRunTaskRequest | null | undefined, {} | null | undefined>): void; | ||
listQueues(request: protos.google.cloud.tasks.v2beta3.IListQueuesRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.IQueue[], protos.google.cloud.tasks.v2beta3.IListQueuesRequest | null, protos.google.cloud.tasks.v2beta3.IListQueuesResponse]>; | ||
listQueues(request: protos.google.cloud.tasks.v2beta3.IListQueuesRequest, options: gax.CallOptions, callback: PaginationCallback<protos.google.cloud.tasks.v2beta3.IListQueuesRequest, protos.google.cloud.tasks.v2beta3.IListQueuesResponse | null | undefined, protos.google.cloud.tasks.v2beta3.IQueue>): void; | ||
listQueues(request: protos.google.cloud.tasks.v2beta3.IListQueuesRequest, callback: PaginationCallback<protos.google.cloud.tasks.v2beta3.IListQueuesRequest, protos.google.cloud.tasks.v2beta3.IListQueuesResponse | null | undefined, protos.google.cloud.tasks.v2beta3.IQueue>): void; | ||
/** | ||
@@ -171,6 +190,52 @@ * Equivalent to {@link listQueues}, but returns a NodeJS Stream object. | ||
*/ | ||
listQueuesStream(request?: protosTypes.google.cloud.tasks.v2beta3.IListQueuesRequest, options?: gax.CallOptions): Transform; | ||
listTasks(request: protosTypes.google.cloud.tasks.v2beta3.IListTasksRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.tasks.v2beta3.ITask[], protosTypes.google.cloud.tasks.v2beta3.IListTasksRequest | null, protosTypes.google.cloud.tasks.v2beta3.IListTasksResponse]>; | ||
listTasks(request: protosTypes.google.cloud.tasks.v2beta3.IListTasksRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.tasks.v2beta3.ITask[], protosTypes.google.cloud.tasks.v2beta3.IListTasksRequest | null, protosTypes.google.cloud.tasks.v2beta3.IListTasksResponse>): void; | ||
listQueuesStream(request?: protos.google.cloud.tasks.v2beta3.IListQueuesRequest, options?: gax.CallOptions): Transform; | ||
/** | ||
* Equivalent to {@link listQueues}, but returns an iterable object. | ||
* | ||
* for-await-of syntax is used with the iterable to recursively get response element on-demand. | ||
* | ||
* @param {Object} request | ||
* The request object that will be sent. | ||
* @param {string} request.parent | ||
* Required. The location name. | ||
* For example: `projects/PROJECT_ID/locations/LOCATION_ID` | ||
* @param {string} request.filter | ||
* `filter` can be used to specify a subset of queues. Any {@link google.cloud.tasks.v2beta3.Queue|Queue} | ||
* field can be used as a filter and several operators as supported. | ||
* For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as | ||
* described in | ||
* [Stackdriver's Advanced Logs | ||
* Filters](https://cloud.google.com/logging/docs/view/advanced_filters). | ||
* | ||
* Sample filter "state: PAUSED". | ||
* | ||
* Note that using filters might cause fewer queues than the | ||
* requested page_size to be returned. | ||
* @param {number} request.pageSize | ||
* 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; use the | ||
* {@link google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token|next_page_token} in the | ||
* response to determine if more queues exist. | ||
* @param {string} request.pageToken | ||
* 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 of | ||
* {@link google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token|next_page_token} returned | ||
* from the previous call to {@link google.cloud.tasks.v2beta3.CloudTasks.ListQueues|ListQueues} | ||
* method. It is an error to switch the value of the | ||
* {@link google.cloud.tasks.v2beta3.ListQueuesRequest.filter|filter} while iterating through pages. | ||
* @param {object} [options] | ||
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* @returns {Object} | ||
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. | ||
*/ | ||
listQueuesAsync(request?: protos.google.cloud.tasks.v2beta3.IListQueuesRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.tasks.v2beta3.IQueue>; | ||
listTasks(request: protos.google.cloud.tasks.v2beta3.IListTasksRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.tasks.v2beta3.ITask[], protos.google.cloud.tasks.v2beta3.IListTasksRequest | null, protos.google.cloud.tasks.v2beta3.IListTasksResponse]>; | ||
listTasks(request: protos.google.cloud.tasks.v2beta3.IListTasksRequest, options: gax.CallOptions, callback: PaginationCallback<protos.google.cloud.tasks.v2beta3.IListTasksRequest, protos.google.cloud.tasks.v2beta3.IListTasksResponse | null | undefined, protos.google.cloud.tasks.v2beta3.ITask>): void; | ||
listTasks(request: protos.google.cloud.tasks.v2beta3.IListTasksRequest, callback: PaginationCallback<protos.google.cloud.tasks.v2beta3.IListTasksRequest, protos.google.cloud.tasks.v2beta3.IListTasksResponse | null | undefined, protos.google.cloud.tasks.v2beta3.ITask>): void; | ||
/** | ||
* Equivalent to {@link listTasks}, but returns a NodeJS Stream object. | ||
@@ -230,4 +295,52 @@ * | ||
*/ | ||
listTasksStream(request?: protosTypes.google.cloud.tasks.v2beta3.IListTasksRequest, options?: gax.CallOptions): Transform; | ||
listTasksStream(request?: protos.google.cloud.tasks.v2beta3.IListTasksRequest, options?: gax.CallOptions): Transform; | ||
/** | ||
* Equivalent to {@link listTasks}, but returns an iterable object. | ||
* | ||
* for-await-of syntax is used with the iterable to recursively get response element on-demand. | ||
* | ||
* @param {Object} request | ||
* The request object that will be sent. | ||
* @param {string} request.parent | ||
* Required. The queue name. For example: | ||
* `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` | ||
* @param {google.cloud.tasks.v2beta3.Task.View} request.responseView | ||
* The response_view specifies which subset of the {@link google.cloud.tasks.v2beta3.Task|Task} will be | ||
* returned. | ||
* | ||
* By default response_view is {@link google.cloud.tasks.v2beta3.Task.View.BASIC|BASIC}; not all | ||
* information is retrieved by default because some data, such as | ||
* 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 {@link google.cloud.tasks.v2beta3.Task.View.FULL|FULL} requires | ||
* `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | ||
* permission on the {@link google.cloud.tasks.v2beta3.Task|Task} resource. | ||
* @param {number} request.pageSize | ||
* Maximum page size. | ||
* | ||
* Fewer tasks than requested might be returned, even if more tasks exist; use | ||
* {@link google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token|next_page_token} in the response to | ||
* determine if more tasks exist. | ||
* | ||
* The maximum page size is 1000. If unspecified, the page size will be the | ||
* maximum. | ||
* @param {string} request.pageToken | ||
* 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 of | ||
* {@link google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token|next_page_token} returned | ||
* from the previous call to {@link google.cloud.tasks.v2beta3.CloudTasks.ListTasks|ListTasks} | ||
* method. | ||
* | ||
* The page token is valid for only 2 hours. | ||
* @param {object} [options] | ||
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
* @returns {Object} | ||
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. | ||
*/ | ||
listTasksAsync(request?: protos.google.cloud.tasks.v2beta3.IListTasksRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.tasks.v2beta3.ITask>; | ||
/** | ||
* Return a fully-qualified location resource name string. | ||
@@ -247,3 +360,3 @@ * | ||
*/ | ||
matchProjectFromLocationName(locationName: string): string; | ||
matchProjectFromLocationName(locationName: string): string | number; | ||
/** | ||
@@ -256,3 +369,3 @@ * Parse the location from Location resource. | ||
*/ | ||
matchLocationFromLocationName(locationName: string): string; | ||
matchLocationFromLocationName(locationName: string): string | number; | ||
/** | ||
@@ -272,3 +385,3 @@ * Return a fully-qualified project resource name string. | ||
*/ | ||
matchProjectFromProjectName(projectName: string): string; | ||
matchProjectFromProjectName(projectName: string): string | number; | ||
/** | ||
@@ -290,3 +403,3 @@ * Return a fully-qualified queue resource name string. | ||
*/ | ||
matchProjectFromQueueName(queueName: string): string; | ||
matchProjectFromQueueName(queueName: string): string | number; | ||
/** | ||
@@ -299,3 +412,3 @@ * Parse the location from Queue resource. | ||
*/ | ||
matchLocationFromQueueName(queueName: string): string; | ||
matchLocationFromQueueName(queueName: string): string | number; | ||
/** | ||
@@ -308,3 +421,3 @@ * Parse the queue from Queue resource. | ||
*/ | ||
matchQueueFromQueueName(queueName: string): string; | ||
matchQueueFromQueueName(queueName: string): string | number; | ||
/** | ||
@@ -327,3 +440,3 @@ * Return a fully-qualified task resource name string. | ||
*/ | ||
matchProjectFromTaskName(taskName: string): string; | ||
matchProjectFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -336,3 +449,3 @@ * Parse the location from Task resource. | ||
*/ | ||
matchLocationFromTaskName(taskName: string): string; | ||
matchLocationFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -345,3 +458,3 @@ * Parse the queue from Task resource. | ||
*/ | ||
matchQueueFromTaskName(taskName: string): string; | ||
matchQueueFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -354,3 +467,3 @@ * Parse the task from Task resource. | ||
*/ | ||
matchTaskFromTaskName(taskName: string): string; | ||
matchTaskFromTaskName(taskName: string): string | number; | ||
/** | ||
@@ -357,0 +470,0 @@ * Terminate the GRPC channel and close the client. |
"use strict"; | ||
// Copyright 2019 Google LLC | ||
// Copyright 2020 Google LLC | ||
// | ||
@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License"); |
@@ -7,2 +7,20 @@ # Changelog | ||
## [2.0.0](https://www.github.com/googleapis/nodejs-tasks/compare/v1.9.0...v2.0.0) (2020-04-07) | ||
### ⚠ BREAKING CHANGES | ||
* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. | ||
New feature: methods with pagination now support async iteration. | ||
### Features | ||
* drop node8 support, support for async iterators ([#388](https://www.github.com/googleapis/nodejs-tasks/issues/388)) ([2b759e1](https://www.github.com/googleapis/nodejs-tasks/commit/2b759e17adf636464fa67fbd99fe87a65cac317f)) | ||
### Bug Fixes | ||
* export explicit version in protos.js ([#393](https://www.github.com/googleapis/nodejs-tasks/issues/393)) ([5b8c80d](https://www.github.com/googleapis/nodejs-tasks/commit/5b8c80d32f7c081887da203b833a2ee38ae69c38)) | ||
## [1.9.0](https://www.github.com/googleapis/nodejs-tasks/compare/v1.8.0...v1.9.0) (2020-03-06) | ||
@@ -9,0 +27,0 @@ |
{ | ||
"name": "@google-cloud/tasks", | ||
"description": "Cloud Tasks API client for Node.js", | ||
"version": "1.9.0", | ||
"version": "2.0.0", | ||
"license": "Apache-2.0", | ||
"author": "Google LLC", | ||
"engines": { | ||
"node": ">=8.10.0" | ||
"node": ">=10" | ||
}, | ||
@@ -47,3 +47,3 @@ "repository": "googleapis/nodejs-tasks", | ||
"dependencies": { | ||
"google-gax": "^1.9.0" | ||
"google-gax": "^2.0.1" | ||
}, | ||
@@ -53,2 +53,3 @@ "devDependencies": { | ||
"@types/node": "^12.0.0", | ||
"@types/sinon": "^9.0.0", | ||
"c8": "^6.0.0", | ||
@@ -60,3 +61,3 @@ "codecov": "^3.0.2", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"gts": "^1.0.0", | ||
"gts": "2.0.0-alpha.9", | ||
"jsdoc": "^3.6.2", | ||
@@ -70,4 +71,5 @@ "jsdoc-fresh": "^1.0.2", | ||
"prettier": "^1.11.1", | ||
"sinon": "^9.0.1", | ||
"ts-loader": "^6.2.1", | ||
"typescript": "^3.7.0", | ||
"typescript": "^3.8.3", | ||
"webpack": "^4.41.2", | ||
@@ -74,0 +76,0 @@ "webpack-cli": "^3.3.10" |
@@ -58,47 +58,47 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
```javascript | ||
// Imports the Google Cloud Tasks library. | ||
const {CloudTasksClient} = require('@google-cloud/tasks'); | ||
// Imports the Google Cloud Tasks library. | ||
const {CloudTasksClient} = require('@google-cloud/tasks'); | ||
// Instantiates a client. | ||
const client = new CloudTasksClient(); | ||
// Instantiates a client. | ||
const client = new CloudTasksClient(); | ||
// TODO(developer): Uncomment these lines and replace with your values. | ||
// const project = 'my-project-id'; | ||
// const queue = 'my-appengine-queue'; | ||
// const location = 'us-central1'; | ||
// const payload = 'hello'; | ||
// TODO(developer): Uncomment these lines and replace with your values. | ||
// const project = 'my-project-id'; | ||
// const queue = 'my-appengine-queue'; | ||
// const location = 'us-central1'; | ||
// const payload = 'hello'; | ||
// Construct the fully qualified queue name. | ||
const parent = client.queuePath(project, location, queue); | ||
// Construct the fully qualified queue name. | ||
const parent = client.queuePath(project, location, queue); | ||
const task = { | ||
appEngineHttpRequest: { | ||
httpMethod: 'POST', | ||
relativeUri: '/log_payload', | ||
}, | ||
}; | ||
const task = { | ||
appEngineHttpRequest: { | ||
httpMethod: 'POST', | ||
relativeUri: '/log_payload', | ||
}, | ||
}; | ||
if (payload) { | ||
task.appEngineHttpRequest.body = Buffer.from(payload).toString('base64'); | ||
} | ||
if (payload) { | ||
task.appEngineHttpRequest.body = Buffer.from(payload).toString('base64'); | ||
} | ||
if (inSeconds) { | ||
task.scheduleTime = { | ||
seconds: inSeconds + Date.now() / 1000, | ||
}; | ||
} | ||
const request = { | ||
parent: parent, | ||
task: task, | ||
if (inSeconds) { | ||
task.scheduleTime = { | ||
seconds: inSeconds + Date.now() / 1000, | ||
}; | ||
} | ||
console.log('Sending task:'); | ||
console.log(task); | ||
// Send create task request. | ||
const [response] = await client.createTask(request); | ||
const name = response.name; | ||
console.log(`Created task ${name}`); | ||
const request = { | ||
parent: parent, | ||
task: task, | ||
}; | ||
console.log('Sending task:'); | ||
console.log(task); | ||
// Send create task request. | ||
const [response] = await client.createTask(request); | ||
const name = response.name; | ||
console.log(`Created task ${name}`); | ||
``` | ||
@@ -129,2 +129,23 @@ | ||
## Supported Node.js Versions | ||
Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). | ||
Libraries are compatible with all current _active_ and _maintenance_ versions of | ||
Node.js. | ||
Client libraries targetting some end-of-life versions of Node.js are available, and | ||
can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). | ||
The dist-tags follow the naming convention `legacy-(version)`. | ||
_Legacy Node.js versions are supported as a best effort:_ | ||
* Legacy versions will not be tested in continuous integration. | ||
* Some security patches may not be able to be backported. | ||
* Dependencies will not be kept up-to-date, and features will not be backported. | ||
#### Legacy tags available | ||
* `legacy-8`: install client libraries from this dist-tag for versions | ||
compatible with Node.js 8. | ||
## Versioning | ||
@@ -153,2 +174,8 @@ | ||
Please note that this `README.md`, the `samples/README.md`, | ||
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) | ||
are generated from a central template. To edit one of these files, make an edit | ||
to its template in this | ||
[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). | ||
## License | ||
@@ -155,0 +182,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3746477
57729
191
23
+ Added@grpc/grpc-js@1.6.12(transitive)
+ Added@grpc/proto-loader@0.6.130.7.13(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedcliui@7.0.48.0.1(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedduplexify@4.1.3(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedgaxios@4.3.3(transitive)
+ Addedgcp-metadata@4.3.1(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedgoogle-auth-library@7.14.1(transitive)
+ Addedgoogle-gax@2.30.5(transitive)
+ Addedgoogle-p12-pem@3.1.4(transitive)
+ Addedgtoken@5.3.2(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedjson-bigint@1.0.0(transitive)
+ Addedlong@5.2.3(transitive)
+ Addedlru-cache@6.0.0(transitive)
+ Addednode-forge@1.3.1(transitive)
+ Addedobject-hash@3.0.0(transitive)
+ Addedproto3-json-serializer@0.1.9(transitive)
+ Addedprotobufjs@6.11.37.4.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedwrap-ansi@7.0.0(transitive)
+ Addedy18n@5.0.8(transitive)
+ Addedyallist@4.0.0(transitive)
+ Addedyargs@16.2.017.7.2(transitive)
+ Addedyargs-parser@20.2.921.1.1(transitive)
- Removed@grpc/grpc-js@1.3.8(transitive)
- Removed@grpc/proto-loader@0.5.6(transitive)
- Removed@types/fs-extra@8.1.5(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedduplexify@3.7.1(transitive)
- Removedgaxios@2.3.4(transitive)
- Removedgcp-metadata@3.5.0(transitive)
- Removedgoogle-auth-library@5.10.1(transitive)
- Removedgoogle-gax@1.15.4(transitive)
- Removedgoogle-p12-pem@2.0.5(transitive)
- Removedgtoken@4.1.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedjson-bigint@0.3.1(transitive)
- Removedlodash.at@4.6.0(transitive)
- Removedlodash.has@4.5.2(transitive)
- Removedlru-cache@5.1.1(transitive)
- Removedmime@2.6.0(transitive)
- Removednode-forge@0.10.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedprotobufjs@6.11.4(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsemver@6.3.1(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedwalkdir@0.4.1(transitive)
- Removedyallist@3.1.1(transitive)
Updatedgoogle-gax@^2.0.1