From 6b701d8b92e6c34ff69d7814b35e86cdc652452a Mon Sep 17 00:00:00 2001
From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com>
Date: Wed, 22 Jul 2026 18:13:52 -0700
Subject: [PATCH] chore: regenerate cloudtasks client
---
.../v2beta2/2.0.0/README.md | 4 +-
.../cloudtasks/v2beta2/CloudTasks.java | 450 ++++++++++++++++++
.../model/BatchCreateTasksRequest.java | 102 ++++
.../model/BatchDeleteTasksRequest.java | 96 ++++
.../v2beta2/model/CreateTaskRequest.java | 27 ++
.../cloudtasks/v2beta2/model/Operation.java | 195 ++++++++
.../cloudtasks/v2beta2/model/Task.java | 27 ++
.../v2beta2/2.0.0/pom.xml | 4 +-
.../v2beta2/README.md | 4 +-
.../v2beta3/2.0.0/README.md | 4 +-
.../cloudtasks/v2beta3/CloudTasks.java | 450 ++++++++++++++++++
.../model/BatchCreateTasksRequest.java | 102 ++++
.../model/BatchDeleteTasksRequest.java | 96 ++++
.../v2beta3/model/CreateTaskRequest.java | 27 ++
.../cloudtasks/v2beta3/model/Operation.java | 195 ++++++++
.../cloudtasks/v2beta3/model/Task.java | 27 ++
.../v2beta3/2.0.0/pom.xml | 4 +-
.../v2beta3/README.md | 4 +-
18 files changed, 1806 insertions(+), 12 deletions(-)
create mode 100644 clients/google-api-services-cloudtasks/v2beta2/2.0.0/com/google/api/services/cloudtasks/v2beta2/model/BatchCreateTasksRequest.java
create mode 100644 clients/google-api-services-cloudtasks/v2beta2/2.0.0/com/google/api/services/cloudtasks/v2beta2/model/BatchDeleteTasksRequest.java
create mode 100644 clients/google-api-services-cloudtasks/v2beta2/2.0.0/com/google/api/services/cloudtasks/v2beta2/model/Operation.java
create mode 100644 clients/google-api-services-cloudtasks/v2beta3/2.0.0/com/google/api/services/cloudtasks/v2beta3/model/BatchCreateTasksRequest.java
create mode 100644 clients/google-api-services-cloudtasks/v2beta3/2.0.0/com/google/api/services/cloudtasks/v2beta3/model/BatchDeleteTasksRequest.java
create mode 100644 clients/google-api-services-cloudtasks/v2beta3/2.0.0/com/google/api/services/cloudtasks/v2beta3/model/Operation.java
diff --git a/clients/google-api-services-cloudtasks/v2beta2/2.0.0/README.md b/clients/google-api-services-cloudtasks/v2beta2/2.0.0/README.md
index 7643a51e6a0..de9d64da862 100644
--- a/clients/google-api-services-cloudtasks/v2beta2/2.0.0/README.md
+++ b/clients/google-api-services-cloudtasks/v2beta2/2.0.0/README.md
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
The typical use is:
+ *
+ * {@code CloudTasks cloudtasks = new CloudTasks(...);}
+ * {@code CloudTasks.Operations.List request = cloudtasks.operations().list(parameters ...)}
+ *
+ *
+ * @return the resource collection
+ */
+ public Operations operations() {
+ return new Operations();
+ }
+
+ /**
+ * The "operations" collection of methods.
+ */
+ public class Operations {
+
+ /**
+ * Gets the latest state of a long-running operation. Clients can use this method to poll the
+ * operation result at intervals as recommended by the API service.
+ *
+ * Create a request for the method "operations.get".
+ *
+ * This request holds the parameters needed by the cloudtasks server. After setting any optional
+ * parameters, call the {@link Get#execute()} method to invoke the remote operation.
+ *
+ * @param name The name of the operation resource.
+ * @return the request
+ */
+ public Get get(java.lang.String name) throws java.io.IOException {
+ Get result = new Get(name);
+ initialize(result);
+ return result;
+ }
+
+ public class Get extends CloudTasksRequest+ * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.
+ * + * @param name The name of the operation resource. + * @since 1.13 + */ + protected Get(java.lang.String name) { + super(CloudTasks.this, "GET", REST_PATH, null, com.google.api.services.cloudtasks.v2beta2.model.Operation.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public Get set$Xgafv(java.lang.String $Xgafv) { + return (Get) super.set$Xgafv($Xgafv); + } + + @Override + public Get setAccessToken(java.lang.String accessToken) { + return (Get) super.setAccessToken(accessToken); + } + + @Override + public Get setAlt(java.lang.String alt) { + return (Get) super.setAlt(alt); + } + + @Override + public Get setCallback(java.lang.String callback) { + return (Get) super.setCallback(callback); + } + + @Override + public Get setFields(java.lang.String fields) { + return (Get) super.setFields(fields); + } + + @Override + public Get setKey(java.lang.String key) { + return (Get) super.setKey(key); + } + + @Override + public Get setOauthToken(java.lang.String oauthToken) { + return (Get) super.setOauthToken(oauthToken); + } + + @Override + public Get setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Get) super.setPrettyPrint(prettyPrint); + } + + @Override + public Get setQuotaUser(java.lang.String quotaUser) { + return (Get) super.setQuotaUser(quotaUser); + } + + @Override + public Get setUploadType(java.lang.String uploadType) { + return (Get) super.setUploadType(uploadType); + } + + @Override + public Get setUploadProtocol(java.lang.String uploadProtocol) { + return (Get) super.setUploadProtocol(uploadProtocol); + } + + /** The name of the operation resource. */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** The name of the operation resource. + */ + public java.lang.String getName() { + return name; + } + + /** The name of the operation resource. */ + public Get setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Get set(String parameterName, Object value) { + return (Get) super.set(parameterName, value); + } + } + + } /** * An accessor for creating requests from the Queues collection. * @@ -3053,6 +3215,294 @@ public Acknowledge set(String parameterName, Object value) { return (Acknowledge) super.set(parameterName, value); } } + /** + * Creates a batch of tasks and adds them to a queue. This call is not atomic. All tasks must be for + * the same queue. A maximum of 100 tasks can be created in a single batch. + * + * Create a request for the method "tasks.batchCreate". + * + * This request holds the parameters needed by the cloudtasks server. After setting any optional + * parameters, call the {@link BatchCreate#execute()} method to invoke the remote operation. + * + * @param parent Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * @param content the {@link com.google.api.services.cloudtasks.v2beta2.model.BatchCreateTasksRequest} + * @return the request + */ + public BatchCreate batchCreate(java.lang.String parent, com.google.api.services.cloudtasks.v2beta2.model.BatchCreateTasksRequest content) throws java.io.IOException { + BatchCreate result = new BatchCreate(parent, content); + initialize(result); + return result; + } + + public class BatchCreate extends CloudTasksRequest{@link + * BatchCreate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.
+ * + * @param parent Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * @param content the {@link com.google.api.services.cloudtasks.v2beta2.model.BatchCreateTasksRequest} + * @since 1.13 + */ + protected BatchCreate(java.lang.String parent, com.google.api.services.cloudtasks.v2beta2.model.BatchCreateTasksRequest content) { + super(CloudTasks.this, "POST", REST_PATH, content, com.google.api.services.cloudtasks.v2beta2.model.Operation.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/queues/[^/]+$"); + } + } + + @Override + public BatchCreate set$Xgafv(java.lang.String $Xgafv) { + return (BatchCreate) super.set$Xgafv($Xgafv); + } + + @Override + public BatchCreate setAccessToken(java.lang.String accessToken) { + return (BatchCreate) super.setAccessToken(accessToken); + } + + @Override + public BatchCreate setAlt(java.lang.String alt) { + return (BatchCreate) super.setAlt(alt); + } + + @Override + public BatchCreate setCallback(java.lang.String callback) { + return (BatchCreate) super.setCallback(callback); + } + + @Override + public BatchCreate setFields(java.lang.String fields) { + return (BatchCreate) super.setFields(fields); + } + + @Override + public BatchCreate setKey(java.lang.String key) { + return (BatchCreate) super.setKey(key); + } + + @Override + public BatchCreate setOauthToken(java.lang.String oauthToken) { + return (BatchCreate) super.setOauthToken(oauthToken); + } + + @Override + public BatchCreate setPrettyPrint(java.lang.Boolean prettyPrint) { + return (BatchCreate) super.setPrettyPrint(prettyPrint); + } + + @Override + public BatchCreate setQuotaUser(java.lang.String quotaUser) { + return (BatchCreate) super.setQuotaUser(quotaUser); + } + + @Override + public BatchCreate setUploadType(java.lang.String uploadType) { + return (BatchCreate) super.setUploadType(uploadType); + } + + @Override + public BatchCreate setUploadProtocol(java.lang.String uploadProtocol) { + return (BatchCreate) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already + * exist. + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + The queue must already exist. + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already + * exist. + */ + public BatchCreate setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/queues/[^/]+$"); + } + this.parent = parent; + return this; + } + + @Override + public BatchCreate set(String parameterName, Object value) { + return (BatchCreate) super.set(parameterName, value); + } + } + /** + * Deletes a batch of tasks. This is a non-atomic operation: if deletion fails for some tasks, it + * can still succeed for others. The metadata field of google.longrunning.Operation contains details + * of failed deletions. A maximum of 1000 tasks can be deleted in a batch. + * + * Create a request for the method "tasks.batchDelete". + * + * This request holds the parameters needed by the cloudtasks server. After setting any optional + * parameters, call the {@link BatchDelete#execute()} method to invoke the remote operation. + * + * @param parent Required. The queue name. For example: Format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param content the {@link com.google.api.services.cloudtasks.v2beta2.model.BatchDeleteTasksRequest} + * @return the request + */ + public BatchDelete batchDelete(java.lang.String parent, com.google.api.services.cloudtasks.v2beta2.model.BatchDeleteTasksRequest content) throws java.io.IOException { + BatchDelete result = new BatchDelete(parent, content); + initialize(result); + return result; + } + + public class BatchDelete extends CloudTasksRequest{@link + * BatchDelete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.
+ * + * @param parent Required. The queue name. For example: Format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param content the {@link com.google.api.services.cloudtasks.v2beta2.model.BatchDeleteTasksRequest} + * @since 1.13 + */ + protected BatchDelete(java.lang.String parent, com.google.api.services.cloudtasks.v2beta2.model.BatchDeleteTasksRequest content) { + super(CloudTasks.this, "POST", REST_PATH, content, com.google.api.services.cloudtasks.v2beta2.model.Operation.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/queues/[^/]+$"); + } + } + + @Override + public BatchDelete set$Xgafv(java.lang.String $Xgafv) { + return (BatchDelete) super.set$Xgafv($Xgafv); + } + + @Override + public BatchDelete setAccessToken(java.lang.String accessToken) { + return (BatchDelete) super.setAccessToken(accessToken); + } + + @Override + public BatchDelete setAlt(java.lang.String alt) { + return (BatchDelete) super.setAlt(alt); + } + + @Override + public BatchDelete setCallback(java.lang.String callback) { + return (BatchDelete) super.setCallback(callback); + } + + @Override + public BatchDelete setFields(java.lang.String fields) { + return (BatchDelete) super.setFields(fields); + } + + @Override + public BatchDelete setKey(java.lang.String key) { + return (BatchDelete) super.setKey(key); + } + + @Override + public BatchDelete setOauthToken(java.lang.String oauthToken) { + return (BatchDelete) super.setOauthToken(oauthToken); + } + + @Override + public BatchDelete setPrettyPrint(java.lang.Boolean prettyPrint) { + return (BatchDelete) super.setPrettyPrint(prettyPrint); + } + + @Override + public BatchDelete setQuotaUser(java.lang.String quotaUser) { + return (BatchDelete) super.setQuotaUser(quotaUser); + } + + @Override + public BatchDelete setUploadType(java.lang.String uploadType) { + return (BatchDelete) super.setUploadType(uploadType); + } + + @Override + public BatchDelete setUploadProtocol(java.lang.String uploadProtocol) { + return (BatchDelete) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The queue name. For example: Format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The queue name. For example: Format: + `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The queue name. For example: Format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + public BatchDelete setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/queues/[^/]+$"); + } + this.parent = parent; + return this; + } + + @Override + public BatchDelete set(String parameterName, Object value) { + return (BatchDelete) super.set(parameterName, value); + } + } /** * Creates and buffers a new task without the need to explicitly define a Task message. The queue * must have HTTP target. To create the task with a custom ID, use the following format and set diff --git a/clients/google-api-services-cloudtasks/v2beta2/2.0.0/com/google/api/services/cloudtasks/v2beta2/model/BatchCreateTasksRequest.java b/clients/google-api-services-cloudtasks/v2beta2/2.0.0/com/google/api/services/cloudtasks/v2beta2/model/BatchCreateTasksRequest.java new file mode 100644 index 00000000000..4359f8d1635 --- /dev/null +++ b/clients/google-api-services-cloudtasks/v2beta2/2.0.0/com/google/api/services/cloudtasks/v2beta2/model/BatchCreateTasksRequest.java @@ -0,0 +1,102 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.cloudtasks.v2beta2.model; + +/** + * Request message for [BatchCreateTasks]. + * + *This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Tasks API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class BatchCreateTasksRequest extends com.google.api.client.json.GenericJson { + + /** + * Optional. This field will be used to identify the long running operation, avoiding duplication + * when user retries. If not provided, then a UUID will be generated at server side. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String requestId; + + /** + * Required. The list of requests to create tasks. The queue specified in parent field of each + * CreateTaskRequest will be the same. This validation happens on the client side as well as in + * the handler. BatchCreateTasksRequest.parent will also be the same value as the individual + * CreateTaskRequest.parent . The maximum number of requests is 100. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.ListThis is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Tasks API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class BatchDeleteTasksRequest extends com.google.api.client.json.GenericJson { + + /** + * Required. The names of the tasks to delete. A maximum of 1000 tasks can be deleted in a batch. + * For example: Format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.ListThis is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Tasks API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class Operation extends com.google.api.client.json.GenericJson { + + /** + * If the value is `false`, it means the operation is still in progress. If `true`, the operation + * is completed, and either `error` or `response` is available. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Boolean done; + + /** + * The error result of the operation in case of failure or cancellation. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private Status error; + + /** + * Service-specific metadata associated with the operation. It typically contains progress + * information and common metadata such as create time. Some services might not provide such + * metadata. Any method that returns a long-running operation should document the metadata type, + * if any. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.MapThe typical use is:
+ *
+ * {@code CloudTasks cloudtasks = new CloudTasks(...);}
+ * {@code CloudTasks.Operations.List request = cloudtasks.operations().list(parameters ...)}
+ *
+ *
+ * @return the resource collection
+ */
+ public Operations operations() {
+ return new Operations();
+ }
+
+ /**
+ * The "operations" collection of methods.
+ */
+ public class Operations {
+
+ /**
+ * Gets the latest state of a long-running operation. Clients can use this method to poll the
+ * operation result at intervals as recommended by the API service.
+ *
+ * Create a request for the method "operations.get".
+ *
+ * This request holds the parameters needed by the cloudtasks server. After setting any optional
+ * parameters, call the {@link Get#execute()} method to invoke the remote operation.
+ *
+ * @param name The name of the operation resource.
+ * @return the request
+ */
+ public Get get(java.lang.String name) throws java.io.IOException {
+ Get result = new Get(name);
+ initialize(result);
+ return result;
+ }
+
+ public class Get extends CloudTasksRequest+ * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.
+ * + * @param name The name of the operation resource. + * @since 1.13 + */ + protected Get(java.lang.String name) { + super(CloudTasks.this, "GET", REST_PATH, null, com.google.api.services.cloudtasks.v2beta3.model.Operation.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public Get set$Xgafv(java.lang.String $Xgafv) { + return (Get) super.set$Xgafv($Xgafv); + } + + @Override + public Get setAccessToken(java.lang.String accessToken) { + return (Get) super.setAccessToken(accessToken); + } + + @Override + public Get setAlt(java.lang.String alt) { + return (Get) super.setAlt(alt); + } + + @Override + public Get setCallback(java.lang.String callback) { + return (Get) super.setCallback(callback); + } + + @Override + public Get setFields(java.lang.String fields) { + return (Get) super.setFields(fields); + } + + @Override + public Get setKey(java.lang.String key) { + return (Get) super.setKey(key); + } + + @Override + public Get setOauthToken(java.lang.String oauthToken) { + return (Get) super.setOauthToken(oauthToken); + } + + @Override + public Get setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Get) super.setPrettyPrint(prettyPrint); + } + + @Override + public Get setQuotaUser(java.lang.String quotaUser) { + return (Get) super.setQuotaUser(quotaUser); + } + + @Override + public Get setUploadType(java.lang.String uploadType) { + return (Get) super.setUploadType(uploadType); + } + + @Override + public Get setUploadProtocol(java.lang.String uploadProtocol) { + return (Get) super.setUploadProtocol(uploadProtocol); + } + + /** The name of the operation resource. */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** The name of the operation resource. + */ + public java.lang.String getName() { + return name; + } + + /** The name of the operation resource. */ + public Get setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/operations/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Get set(String parameterName, Object value) { + return (Get) super.set(parameterName, value); + } + } + + } /** * An accessor for creating requests from the Queues collection. * @@ -2737,6 +2899,294 @@ public Tasks tasks() { */ public class Tasks { + /** + * Creates a batch of tasks and adds them to a queue. This call is not atomic. All tasks must be for + * the same queue. A maximum of 100 tasks can be created in a single batch. + * + * Create a request for the method "tasks.batchCreate". + * + * This request holds the parameters needed by the cloudtasks server. After setting any optional + * parameters, call the {@link BatchCreate#execute()} method to invoke the remote operation. + * + * @param parent Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * @param content the {@link com.google.api.services.cloudtasks.v2beta3.model.BatchCreateTasksRequest} + * @return the request + */ + public BatchCreate batchCreate(java.lang.String parent, com.google.api.services.cloudtasks.v2beta3.model.BatchCreateTasksRequest content) throws java.io.IOException { + BatchCreate result = new BatchCreate(parent, content); + initialize(result); + return result; + } + + public class BatchCreate extends CloudTasksRequest{@link + * BatchCreate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.
+ * + * @param parent Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * @param content the {@link com.google.api.services.cloudtasks.v2beta3.model.BatchCreateTasksRequest} + * @since 1.13 + */ + protected BatchCreate(java.lang.String parent, com.google.api.services.cloudtasks.v2beta3.model.BatchCreateTasksRequest content) { + super(CloudTasks.this, "POST", REST_PATH, content, com.google.api.services.cloudtasks.v2beta3.model.Operation.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/queues/[^/]+$"); + } + } + + @Override + public BatchCreate set$Xgafv(java.lang.String $Xgafv) { + return (BatchCreate) super.set$Xgafv($Xgafv); + } + + @Override + public BatchCreate setAccessToken(java.lang.String accessToken) { + return (BatchCreate) super.setAccessToken(accessToken); + } + + @Override + public BatchCreate setAlt(java.lang.String alt) { + return (BatchCreate) super.setAlt(alt); + } + + @Override + public BatchCreate setCallback(java.lang.String callback) { + return (BatchCreate) super.setCallback(callback); + } + + @Override + public BatchCreate setFields(java.lang.String fields) { + return (BatchCreate) super.setFields(fields); + } + + @Override + public BatchCreate setKey(java.lang.String key) { + return (BatchCreate) super.setKey(key); + } + + @Override + public BatchCreate setOauthToken(java.lang.String oauthToken) { + return (BatchCreate) super.setOauthToken(oauthToken); + } + + @Override + public BatchCreate setPrettyPrint(java.lang.Boolean prettyPrint) { + return (BatchCreate) super.setPrettyPrint(prettyPrint); + } + + @Override + public BatchCreate setQuotaUser(java.lang.String quotaUser) { + return (BatchCreate) super.setQuotaUser(quotaUser); + } + + @Override + public BatchCreate setUploadType(java.lang.String uploadType) { + return (BatchCreate) super.setUploadType(uploadType); + } + + @Override + public BatchCreate setUploadProtocol(java.lang.String uploadProtocol) { + return (BatchCreate) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already + * exist. + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + The queue must already exist. + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already + * exist. + */ + public BatchCreate setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/queues/[^/]+$"); + } + this.parent = parent; + return this; + } + + @Override + public BatchCreate set(String parameterName, Object value) { + return (BatchCreate) super.set(parameterName, value); + } + } + /** + * Deletes a batch of tasks. This is a non-atomic operation: if deletion fails for some tasks, it + * can still succeed for others. The metadata field of google.longrunning.Operation contains details + * of failed deletions. A maximum of 1000 tasks can be deleted in a batch. + * + * Create a request for the method "tasks.batchDelete". + * + * This request holds the parameters needed by the cloudtasks server. After setting any optional + * parameters, call the {@link BatchDelete#execute()} method to invoke the remote operation. + * + * @param parent Required. The queue name. For example: Format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param content the {@link com.google.api.services.cloudtasks.v2beta3.model.BatchDeleteTasksRequest} + * @return the request + */ + public BatchDelete batchDelete(java.lang.String parent, com.google.api.services.cloudtasks.v2beta3.model.BatchDeleteTasksRequest content) throws java.io.IOException { + BatchDelete result = new BatchDelete(parent, content); + initialize(result); + return result; + } + + public class BatchDelete extends CloudTasksRequest{@link + * BatchDelete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.
+ * + * @param parent Required. The queue name. For example: Format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param content the {@link com.google.api.services.cloudtasks.v2beta3.model.BatchDeleteTasksRequest} + * @since 1.13 + */ + protected BatchDelete(java.lang.String parent, com.google.api.services.cloudtasks.v2beta3.model.BatchDeleteTasksRequest content) { + super(CloudTasks.this, "POST", REST_PATH, content, com.google.api.services.cloudtasks.v2beta3.model.Operation.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/queues/[^/]+$"); + } + } + + @Override + public BatchDelete set$Xgafv(java.lang.String $Xgafv) { + return (BatchDelete) super.set$Xgafv($Xgafv); + } + + @Override + public BatchDelete setAccessToken(java.lang.String accessToken) { + return (BatchDelete) super.setAccessToken(accessToken); + } + + @Override + public BatchDelete setAlt(java.lang.String alt) { + return (BatchDelete) super.setAlt(alt); + } + + @Override + public BatchDelete setCallback(java.lang.String callback) { + return (BatchDelete) super.setCallback(callback); + } + + @Override + public BatchDelete setFields(java.lang.String fields) { + return (BatchDelete) super.setFields(fields); + } + + @Override + public BatchDelete setKey(java.lang.String key) { + return (BatchDelete) super.setKey(key); + } + + @Override + public BatchDelete setOauthToken(java.lang.String oauthToken) { + return (BatchDelete) super.setOauthToken(oauthToken); + } + + @Override + public BatchDelete setPrettyPrint(java.lang.Boolean prettyPrint) { + return (BatchDelete) super.setPrettyPrint(prettyPrint); + } + + @Override + public BatchDelete setQuotaUser(java.lang.String quotaUser) { + return (BatchDelete) super.setQuotaUser(quotaUser); + } + + @Override + public BatchDelete setUploadType(java.lang.String uploadType) { + return (BatchDelete) super.setUploadType(uploadType); + } + + @Override + public BatchDelete setUploadProtocol(java.lang.String uploadProtocol) { + return (BatchDelete) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The queue name. For example: Format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The queue name. For example: Format: + `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The queue name. For example: Format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + */ + public BatchDelete setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/queues/[^/]+$"); + } + this.parent = parent; + return this; + } + + @Override + public BatchDelete set(String parameterName, Object value) { + return (BatchDelete) super.set(parameterName, value); + } + } /** * Creates and buffers a new task without the need to explicitly define a Task message. The queue * must have HTTP target. To create the task with a custom ID, use the following format and set diff --git a/clients/google-api-services-cloudtasks/v2beta3/2.0.0/com/google/api/services/cloudtasks/v2beta3/model/BatchCreateTasksRequest.java b/clients/google-api-services-cloudtasks/v2beta3/2.0.0/com/google/api/services/cloudtasks/v2beta3/model/BatchCreateTasksRequest.java new file mode 100644 index 00000000000..a77fe870970 --- /dev/null +++ b/clients/google-api-services-cloudtasks/v2beta3/2.0.0/com/google/api/services/cloudtasks/v2beta3/model/BatchCreateTasksRequest.java @@ -0,0 +1,102 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.cloudtasks.v2beta3.model; + +/** + * Request message for [BatchCreateTasks]. + * + *This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Tasks API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class BatchCreateTasksRequest extends com.google.api.client.json.GenericJson { + + /** + * Optional. This field will be used to identify the long running operation, avoiding duplication + * when user retries. If not provided, then a UUID will be generated at server side. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String requestId; + + /** + * Required. The list of requests to create tasks. The queue specified in parent field of each + * CreateTaskRequest will be the same. This validation happens on the client side as well as in + * the handler. BatchCreateTasksRequest.parent will also be the same value as the individual + * CreateTaskRequest.parent . The maximum number of requests is 100. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.ListThis is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Tasks API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class BatchDeleteTasksRequest extends com.google.api.client.json.GenericJson { + + /** + * Required. The names of the tasks to delete. A maximum of 1000 tasks can be deleted in a batch. + * For example: Format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.ListThis is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Tasks API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class Operation extends com.google.api.client.json.GenericJson { + + /** + * If the value is `false`, it means the operation is still in progress. If `true`, the operation + * is completed, and either `error` or `response` is available. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Boolean done; + + /** + * The error result of the operation in case of failure or cancellation. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private Status error; + + /** + * Service-specific metadata associated with the operation. It typically contains progress + * information and common metadata such as create time. Some services might not provide such + * metadata. Any method that returns a long-running operation should document the metadata type, + * if any. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.Map