|
1 | | -// Copyright 2023 Google LLC |
| 1 | +// Copyright 2024 Google LLC |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -317,7 +317,6 @@ export class CloudTasksClient { |
317 | 317 | 'renewLease', |
318 | 318 | 'cancelLease', |
319 | 319 | 'runTask', |
320 | | - 'bufferTask', |
321 | 320 | ]; |
322 | 321 | for (const methodName of cloudTasksStubMethods) { |
323 | 322 | const callPromise = this.cloudTasksStub.then( |
@@ -2448,112 +2447,6 @@ export class CloudTasksClient { |
2448 | 2447 | this.initialize(); |
2449 | 2448 | return this.innerApiCalls.runTask(request, options, callback); |
2450 | 2449 | } |
2451 | | - /** |
2452 | | - * Creates and buffers a new task without the need to explicitly define a Task |
2453 | | - * message. The queue must have [HTTP |
2454 | | - * target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a |
2455 | | - * custom ID, use the following format and set TASK_ID to your desired ID: |
2456 | | - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer |
2457 | | - * To create the task with an automatically generated ID, use the following |
2458 | | - * format: |
2459 | | - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. |
2460 | | - * Note: This feature is in its experimental stage. You must request access to |
2461 | | - * the API through the [Cloud Tasks BufferTask Experiment Signup |
2462 | | - * form](https://forms.gle/X8Zr5hiXH5tTGFqh8). |
2463 | | - * |
2464 | | - * @param {Object} request |
2465 | | - * The request object that will be sent. |
2466 | | - * @param {string} request.queue |
2467 | | - * Required. The parent queue name. For example: |
2468 | | - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` |
2469 | | - * |
2470 | | - * The queue must already exist. |
2471 | | - * @param {string} [request.taskId] |
2472 | | - * Optional. Task ID for the task being created. If not provided, a random |
2473 | | - * task ID is assigned to the task. |
2474 | | - * @param {google.api.HttpBody} [request.body] |
2475 | | - * Optional. Body of the HTTP request. |
2476 | | - * |
2477 | | - * The body can take any generic value. The value is written to the |
2478 | | - * {@link protos.payload|HttpRequest} of the [Task]. |
2479 | | - * @param {object} [options] |
2480 | | - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. |
2481 | | - * @returns {Promise} - The promise which resolves to an array. |
2482 | | - * The first element of the array is an object representing {@link protos.google.cloud.tasks.v2beta2.BufferTaskResponse|BufferTaskResponse}. |
2483 | | - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } |
2484 | | - * for more details and examples. |
2485 | | - * @example <caption>include:samples/generated/v2beta2/cloud_tasks.buffer_task.js</caption> |
2486 | | - * region_tag:cloudtasks_v2beta2_generated_CloudTasks_BufferTask_async |
2487 | | - */ |
2488 | | - bufferTask( |
2489 | | - request?: protos.google.cloud.tasks.v2beta2.IBufferTaskRequest, |
2490 | | - options?: CallOptions |
2491 | | - ): Promise< |
2492 | | - [ |
2493 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskResponse, |
2494 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskRequest | undefined, |
2495 | | - {} | undefined, |
2496 | | - ] |
2497 | | - >; |
2498 | | - bufferTask( |
2499 | | - request: protos.google.cloud.tasks.v2beta2.IBufferTaskRequest, |
2500 | | - options: CallOptions, |
2501 | | - callback: Callback< |
2502 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskResponse, |
2503 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskRequest | null | undefined, |
2504 | | - {} | null | undefined |
2505 | | - > |
2506 | | - ): void; |
2507 | | - bufferTask( |
2508 | | - request: protos.google.cloud.tasks.v2beta2.IBufferTaskRequest, |
2509 | | - callback: Callback< |
2510 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskResponse, |
2511 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskRequest | null | undefined, |
2512 | | - {} | null | undefined |
2513 | | - > |
2514 | | - ): void; |
2515 | | - bufferTask( |
2516 | | - request?: protos.google.cloud.tasks.v2beta2.IBufferTaskRequest, |
2517 | | - optionsOrCallback?: |
2518 | | - | CallOptions |
2519 | | - | Callback< |
2520 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskResponse, |
2521 | | - | protos.google.cloud.tasks.v2beta2.IBufferTaskRequest |
2522 | | - | null |
2523 | | - | undefined, |
2524 | | - {} | null | undefined |
2525 | | - >, |
2526 | | - callback?: Callback< |
2527 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskResponse, |
2528 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskRequest | null | undefined, |
2529 | | - {} | null | undefined |
2530 | | - > |
2531 | | - ): Promise< |
2532 | | - [ |
2533 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskResponse, |
2534 | | - protos.google.cloud.tasks.v2beta2.IBufferTaskRequest | undefined, |
2535 | | - {} | undefined, |
2536 | | - ] |
2537 | | - > | void { |
2538 | | - request = request || {}; |
2539 | | - let options: CallOptions; |
2540 | | - if (typeof optionsOrCallback === 'function' && callback === undefined) { |
2541 | | - callback = optionsOrCallback; |
2542 | | - options = {}; |
2543 | | - } else { |
2544 | | - options = optionsOrCallback as CallOptions; |
2545 | | - } |
2546 | | - options = options || {}; |
2547 | | - options.otherArgs = options.otherArgs || {}; |
2548 | | - options.otherArgs.headers = options.otherArgs.headers || {}; |
2549 | | - options.otherArgs.headers['x-goog-request-params'] = |
2550 | | - this._gaxModule.routingHeader.fromParams({ |
2551 | | - queue: request.queue ?? '', |
2552 | | - task_id: request.taskId ?? '', |
2553 | | - }); |
2554 | | - this.initialize(); |
2555 | | - return this.innerApiCalls.bufferTask(request, options, callback); |
2556 | | - } |
2557 | 2450 |
|
2558 | 2451 | /** |
2559 | 2452 | * Lists queues. |
|
0 commit comments