|
16 | 16 |
|
17 | 17 | package com.google.cloud.tasks.v2beta2;
|
18 | 18 |
|
19 |
| -import com.google.api.HttpBody; |
20 | 19 | import com.google.api.core.ApiFuture;
|
21 | 20 | import com.google.api.core.ApiFutures;
|
22 | 21 | import com.google.api.core.BetaApi;
|
|
518 | 517 | * </td>
|
519 | 518 | * </tr>
|
520 | 519 | * <tr>
|
521 |
| - * <td>BufferTask</td> |
522 |
| - * <td><p> Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the [Cloud Tasks BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8).</td> |
523 |
| - * <td> |
524 |
| - * <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p> |
525 |
| - * <ul> |
526 |
| - * <li>bufferTask(BufferTaskRequest request) |
527 |
| - * </ul> |
528 |
| - * <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p> |
529 |
| - * <ul> |
530 |
| - * <li>bufferTask(QueueName queue, String taskId, HttpBody body) |
531 |
| - * <li>bufferTask(String queue, String taskId, HttpBody body) |
532 |
| - * </ul> |
533 |
| - * <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p> |
534 |
| - * <ul> |
535 |
| - * <li>bufferTaskCallable() |
536 |
| - * </ul> |
537 |
| - * </td> |
538 |
| - * </tr> |
539 |
| - * <tr> |
540 | 520 | * <td>ListLocations</td>
|
541 | 521 | * <td><p> Lists information about the supported locations for this service.</td>
|
542 | 522 | * <td>
|
@@ -3881,170 +3861,6 @@ public final UnaryCallable<RunTaskRequest, Task> runTaskCallable() {
|
3881 | 3861 | return stub.runTaskCallable();
|
3882 | 3862 | }
|
3883 | 3863 |
|
3884 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD. |
3885 |
| - /** |
3886 |
| - * Creates and buffers a new task without the need to explicitly define a Task message. The queue |
3887 |
| - * must have [HTTP target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a |
3888 |
| - * custom ID, use the following format and set TASK_ID to your desired ID: |
3889 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the |
3890 |
| - * task with an automatically generated ID, use the following format: |
3891 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is |
3892 |
| - * in its experimental stage. You must request access to the API through the [Cloud Tasks |
3893 |
| - * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). |
3894 |
| - * |
3895 |
| - * <p>Sample code: |
3896 |
| - * |
3897 |
| - * <pre>{@code |
3898 |
| - * // This snippet has been automatically generated and should be regarded as a code template only. |
3899 |
| - * // It will require modifications to work: |
3900 |
| - * // - It may require correct/in-range values for request initialization. |
3901 |
| - * // - It may require specifying regional endpoints when creating the service client as shown in |
3902 |
| - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
3903 |
| - * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { |
3904 |
| - * QueueName queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); |
3905 |
| - * String taskId = "taskId-880873088"; |
3906 |
| - * HttpBody body = HttpBody.newBuilder().build(); |
3907 |
| - * BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body); |
3908 |
| - * } |
3909 |
| - * }</pre> |
3910 |
| - * |
3911 |
| - * @param queue Required. The parent queue name. For example: |
3912 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` |
3913 |
| - * <p>The queue must already exist. |
3914 |
| - * @param taskId Optional. Task ID for the task being created. If not provided, a random task ID |
3915 |
| - * is assigned to the task. |
3916 |
| - * @param body Optional. Body of the HTTP request. |
3917 |
| - * <p>The body can take any generic value. The value is written to the [HttpRequest][payload] |
3918 |
| - * of the [Task]. |
3919 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
3920 |
| - */ |
3921 |
| - public final BufferTaskResponse bufferTask(QueueName queue, String taskId, HttpBody body) { |
3922 |
| - BufferTaskRequest request = |
3923 |
| - BufferTaskRequest.newBuilder() |
3924 |
| - .setQueue(queue == null ? null : queue.toString()) |
3925 |
| - .setTaskId(taskId) |
3926 |
| - .setBody(body) |
3927 |
| - .build(); |
3928 |
| - return bufferTask(request); |
3929 |
| - } |
3930 |
| - |
3931 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD. |
3932 |
| - /** |
3933 |
| - * Creates and buffers a new task without the need to explicitly define a Task message. The queue |
3934 |
| - * must have [HTTP target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a |
3935 |
| - * custom ID, use the following format and set TASK_ID to your desired ID: |
3936 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the |
3937 |
| - * task with an automatically generated ID, use the following format: |
3938 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is |
3939 |
| - * in its experimental stage. You must request access to the API through the [Cloud Tasks |
3940 |
| - * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). |
3941 |
| - * |
3942 |
| - * <p>Sample code: |
3943 |
| - * |
3944 |
| - * <pre>{@code |
3945 |
| - * // This snippet has been automatically generated and should be regarded as a code template only. |
3946 |
| - * // It will require modifications to work: |
3947 |
| - * // - It may require correct/in-range values for request initialization. |
3948 |
| - * // - It may require specifying regional endpoints when creating the service client as shown in |
3949 |
| - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
3950 |
| - * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { |
3951 |
| - * String queue = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString(); |
3952 |
| - * String taskId = "taskId-880873088"; |
3953 |
| - * HttpBody body = HttpBody.newBuilder().build(); |
3954 |
| - * BufferTaskResponse response = cloudTasksClient.bufferTask(queue, taskId, body); |
3955 |
| - * } |
3956 |
| - * }</pre> |
3957 |
| - * |
3958 |
| - * @param queue Required. The parent queue name. For example: |
3959 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` |
3960 |
| - * <p>The queue must already exist. |
3961 |
| - * @param taskId Optional. Task ID for the task being created. If not provided, a random task ID |
3962 |
| - * is assigned to the task. |
3963 |
| - * @param body Optional. Body of the HTTP request. |
3964 |
| - * <p>The body can take any generic value. The value is written to the [HttpRequest][payload] |
3965 |
| - * of the [Task]. |
3966 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
3967 |
| - */ |
3968 |
| - public final BufferTaskResponse bufferTask(String queue, String taskId, HttpBody body) { |
3969 |
| - BufferTaskRequest request = |
3970 |
| - BufferTaskRequest.newBuilder().setQueue(queue).setTaskId(taskId).setBody(body).build(); |
3971 |
| - return bufferTask(request); |
3972 |
| - } |
3973 |
| - |
3974 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD. |
3975 |
| - /** |
3976 |
| - * Creates and buffers a new task without the need to explicitly define a Task message. The queue |
3977 |
| - * must have [HTTP target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a |
3978 |
| - * custom ID, use the following format and set TASK_ID to your desired ID: |
3979 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the |
3980 |
| - * task with an automatically generated ID, use the following format: |
3981 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is |
3982 |
| - * in its experimental stage. You must request access to the API through the [Cloud Tasks |
3983 |
| - * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). |
3984 |
| - * |
3985 |
| - * <p>Sample code: |
3986 |
| - * |
3987 |
| - * <pre>{@code |
3988 |
| - * // This snippet has been automatically generated and should be regarded as a code template only. |
3989 |
| - * // It will require modifications to work: |
3990 |
| - * // - It may require correct/in-range values for request initialization. |
3991 |
| - * // - It may require specifying regional endpoints when creating the service client as shown in |
3992 |
| - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
3993 |
| - * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { |
3994 |
| - * BufferTaskRequest request = |
3995 |
| - * BufferTaskRequest.newBuilder() |
3996 |
| - * .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) |
3997 |
| - * .setTaskId("taskId-880873088") |
3998 |
| - * .setBody(HttpBody.newBuilder().build()) |
3999 |
| - * .build(); |
4000 |
| - * BufferTaskResponse response = cloudTasksClient.bufferTask(request); |
4001 |
| - * } |
4002 |
| - * }</pre> |
4003 |
| - * |
4004 |
| - * @param request The request object containing all of the parameters for the API call. |
4005 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
4006 |
| - */ |
4007 |
| - public final BufferTaskResponse bufferTask(BufferTaskRequest request) { |
4008 |
| - return bufferTaskCallable().call(request); |
4009 |
| - } |
4010 |
| - |
4011 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD. |
4012 |
| - /** |
4013 |
| - * Creates and buffers a new task without the need to explicitly define a Task message. The queue |
4014 |
| - * must have [HTTP target][google.cloud.tasks.v2beta2.HttpTarget]. To create the task with a |
4015 |
| - * custom ID, use the following format and set TASK_ID to your desired ID: |
4016 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the |
4017 |
| - * task with an automatically generated ID, use the following format: |
4018 |
| - * projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is |
4019 |
| - * in its experimental stage. You must request access to the API through the [Cloud Tasks |
4020 |
| - * BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). |
4021 |
| - * |
4022 |
| - * <p>Sample code: |
4023 |
| - * |
4024 |
| - * <pre>{@code |
4025 |
| - * // This snippet has been automatically generated and should be regarded as a code template only. |
4026 |
| - * // It will require modifications to work: |
4027 |
| - * // - It may require correct/in-range values for request initialization. |
4028 |
| - * // - It may require specifying regional endpoints when creating the service client as shown in |
4029 |
| - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
4030 |
| - * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) { |
4031 |
| - * BufferTaskRequest request = |
4032 |
| - * BufferTaskRequest.newBuilder() |
4033 |
| - * .setQueue(QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]").toString()) |
4034 |
| - * .setTaskId("taskId-880873088") |
4035 |
| - * .setBody(HttpBody.newBuilder().build()) |
4036 |
| - * .build(); |
4037 |
| - * ApiFuture<BufferTaskResponse> future = |
4038 |
| - * cloudTasksClient.bufferTaskCallable().futureCall(request); |
4039 |
| - * // Do something. |
4040 |
| - * BufferTaskResponse response = future.get(); |
4041 |
| - * } |
4042 |
| - * }</pre> |
4043 |
| - */ |
4044 |
| - public final UnaryCallable<BufferTaskRequest, BufferTaskResponse> bufferTaskCallable() { |
4045 |
| - return stub.bufferTaskCallable(); |
4046 |
| - } |
4047 |
| - |
4048 | 3864 | // AUTO-GENERATED DOCUMENTATION AND METHOD.
|
4049 | 3865 | /**
|
4050 | 3866 | * Lists information about the supported locations for this service.
|
|
0 commit comments