Skip to content

Commit b5a90c4

Browse files
fix!: [cloudtasks] remove BufferTask method which cannot be called from client libraries (#10232)
* fix!: remove BufferTask method which cannot be called from client libraries PiperOrigin-RevId: 599211253 Source-Link: googleapis/googleapis@1654062 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2055a533af154dcc263d5c0bcd78af84b44ef332 Copy-Tag: eyJwIjoiamF2YS10YXNrcy8uT3dsQm90LnlhbWwiLCJoIjoiMjA1NWE1MzNhZjE1NGRjYzI2M2Q1YzBiY2Q3OGFmODRiNDRlZjMzMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent c029f0d commit b5a90c4

File tree

45 files changed

+157
-6231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+157
-6231
lines changed

java-tasks/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>26.29.0</version>
23+
<version>26.30.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
195195
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
196196
[stability-image]: https://img.shields.io/badge/stability-stable-green
197197
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-tasks.svg
198-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-tasks/2.32.0
198+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-tasks/2.33.0
199199
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
200200
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
201201
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java

-184
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.tasks.v2beta2;
1818

19-
import com.google.api.HttpBody;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -518,25 +517,6 @@
518517
* </td>
519518
* </tr>
520519
* <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>
540520
* <td>ListLocations</td>
541521
* <td><p> Lists information about the supported locations for this service.</td>
542522
* <td>
@@ -3881,170 +3861,6 @@ public final UnaryCallable<RunTaskRequest, Task> runTaskCallable() {
38813861
return stub.runTaskCallable();
38823862
}
38833863

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-
40483864
// AUTO-GENERATED DOCUMENTATION AND METHOD.
40493865
/**
40503866
* Lists information about the supported locations for this service.

java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksSettings.java

-10
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,6 @@ public UnaryCallSettings<RunTaskRequest, Task> runTaskSettings() {
195195
return ((CloudTasksStubSettings) getStubSettings()).runTaskSettings();
196196
}
197197

198-
/** Returns the object with the settings used for calls to bufferTask. */
199-
public UnaryCallSettings<BufferTaskRequest, BufferTaskResponse> bufferTaskSettings() {
200-
return ((CloudTasksStubSettings) getStubSettings()).bufferTaskSettings();
201-
}
202-
203198
/** Returns the object with the settings used for calls to listLocations. */
204199
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
205200
listLocationsSettings() {
@@ -433,11 +428,6 @@ public UnaryCallSettings.Builder<RunTaskRequest, Task> runTaskSettings() {
433428
return getStubSettingsBuilder().runTaskSettings();
434429
}
435430

436-
/** Returns the builder for the settings used for calls to bufferTask. */
437-
public UnaryCallSettings.Builder<BufferTaskRequest, BufferTaskResponse> bufferTaskSettings() {
438-
return getStubSettingsBuilder().bufferTaskSettings();
439-
}
440-
441431
/** Returns the builder for the settings used for calls to listLocations. */
442432
public PagedCallSettings.Builder<
443433
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>

java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/gapic_metadata.json

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
"AcknowledgeTask": {
1414
"methods": ["acknowledgeTask", "acknowledgeTask", "acknowledgeTask", "acknowledgeTaskCallable"]
1515
},
16-
"BufferTask": {
17-
"methods": ["bufferTask", "bufferTask", "bufferTask", "bufferTaskCallable"]
18-
},
1916
"CancelLease": {
2017
"methods": ["cancelLease", "cancelLease", "cancelLease", "cancelLeaseCallable"]
2118
},

java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStub.java

-6
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
import com.google.cloud.location.ListLocationsResponse;
2929
import com.google.cloud.location.Location;
3030
import com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest;
31-
import com.google.cloud.tasks.v2beta2.BufferTaskRequest;
32-
import com.google.cloud.tasks.v2beta2.BufferTaskResponse;
3331
import com.google.cloud.tasks.v2beta2.CancelLeaseRequest;
3432
import com.google.cloud.tasks.v2beta2.CreateQueueRequest;
3533
import com.google.cloud.tasks.v2beta2.CreateTaskRequest;
@@ -163,10 +161,6 @@ public UnaryCallable<RunTaskRequest, Task> runTaskCallable() {
163161
throw new UnsupportedOperationException("Not implemented: runTaskCallable()");
164162
}
165163

166-
public UnaryCallable<BufferTaskRequest, BufferTaskResponse> bufferTaskCallable() {
167-
throw new UnsupportedOperationException("Not implemented: bufferTaskCallable()");
168-
}
169-
170164
public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
171165
listLocationsPagedCallable() {
172166
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");

0 commit comments

Comments
 (0)