From a550c17d540018916da9c698316bd3683059a130 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Thu, 21 Jan 2021 14:58:45 -0800 Subject: [PATCH 1/2] feat: introducing fields: ListQueuesRequest.read_mask, GetQueueRequest.read_mask, Queue.task_ttl, Queue.tombstone_ttl, Queue.stats and introducing messages: QueueStats docs: updates to AppEngineHttpRequest description PiperOrigin-RevId: 353031255 Source-Author: Google APIs Source-Date: Thu Jan 21 09:03:41 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: d7b8108668f224c8dc3b87c7f7a9afe78d3cafaf Source-Link: https://github.com/googleapis/googleapis/commit/d7b8108668f224c8dc3b87c7f7a9afe78d3cafaf --- .../v2beta2/stub/CloudTasksStubSettings.java | 12 +- .../tasks/v2beta2/CloudTasksClientTest.java | 33 + .../tasks/v2beta2/AppEngineHttpRequest.java | 93 +- .../AppEngineHttpRequestOrBuilder.java | 22 +- .../cloud/tasks/v2beta2/CloudTasksProto.java | 321 ++--- .../cloud/tasks/v2beta2/GetQueueRequest.java | 316 +++++ .../v2beta2/GetQueueRequestOrBuilder.java | 47 + .../tasks/v2beta2/ListQueuesRequest.java | 316 +++++ .../v2beta2/ListQueuesRequestOrBuilder.java | 47 + .../com/google/cloud/tasks/v2beta2/Queue.java | 1059 +++++++++++++++ .../cloud/tasks/v2beta2/QueueOrBuilder.java | 165 +++ .../cloud/tasks/v2beta2/QueueProto.java | 97 +- .../cloud/tasks/v2beta2/QueueStats.java | 1180 +++++++++++++++++ .../tasks/v2beta2/QueueStatsOrBuilder.java | 131 ++ .../cloud/tasks/v2beta2/RateLimits.java | 100 +- .../tasks/v2beta2/RateLimitsOrBuilder.java | 25 +- .../cloud/tasks/v2beta2/RetryConfig.java | 8 +- .../tasks/v2beta2/RetryConfigOrBuilder.java | 2 +- .../cloud/tasks/v2beta2/cloudtasks.proto | 15 +- .../google/cloud/tasks/v2beta2/queue.proto | 91 +- .../google/cloud/tasks/v2beta2/target.proto | 22 +- .../google/cloud/tasks/v2beta2/task.proto | 3 +- synth.metadata | 8 +- 23 files changed, 3739 insertions(+), 374 deletions(-) create mode 100644 proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStats.java create mode 100644 proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStatsOrBuilder.java diff --git a/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java b/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java index 015b4823..5dfc3c4b 100644 --- a/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java +++ b/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java @@ -495,18 +495,18 @@ public static class Builder extends StubSettings.Builder * The HTTP method to use for the request. The default is POST. * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt will fail - * with error code 405 (Method Not Allowed). See - * [Writing a push task request + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the documentation for the request handlers in the language your app is - * written in e.g. - * [Python Request - * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). * * * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; @@ -250,14 +247,11 @@ public int getHttpMethodValue() { *
    * The HTTP method to use for the request. The default is POST.
    * The app's request handler for the task's target URL must be able to handle
-   * HTTP requests with this http_method, otherwise the task attempt will fail
-   * with error code 405 (Method Not Allowed). See
-   * [Writing a push task request
+   * HTTP requests with this http_method, otherwise the task attempt fails with
+   * error code 405 (Method Not Allowed). See [Writing a push task request
    * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
-   * and the documentation for the request handlers in the language your app is
-   * written in e.g.
-   * [Python Request
-   * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+   * and the App Engine documentation for your runtime on [How Requests are
+   * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
    * 
* * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; @@ -876,10 +870,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is * delivered to can be set at the queue-level or task-level: * * If set, - * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] - * is used for all tasks in the queue, no matter what the setting - * is for the - * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] + * is used for all tasks in the queue, no matter what the setting + * is for the + * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. * The `url` that the task will be sent to is: * * `url =` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] `+` * [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url] @@ -1117,14 +1111,11 @@ public Builder mergeFrom( *
      * The HTTP method to use for the request. The default is POST.
      * The app's request handler for the task's target URL must be able to handle
-     * HTTP requests with this http_method, otherwise the task attempt will fail
-     * with error code 405 (Method Not Allowed). See
-     * [Writing a push task request
+     * HTTP requests with this http_method, otherwise the task attempt fails with
+     * error code 405 (Method Not Allowed). See [Writing a push task request
      * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
-     * and the documentation for the request handlers in the language your app is
-     * written in e.g.
-     * [Python Request
-     * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * and the App Engine documentation for your runtime on [How Requests are
+     * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
      * 
* * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; @@ -1141,14 +1132,11 @@ public int getHttpMethodValue() { *
      * The HTTP method to use for the request. The default is POST.
      * The app's request handler for the task's target URL must be able to handle
-     * HTTP requests with this http_method, otherwise the task attempt will fail
-     * with error code 405 (Method Not Allowed). See
-     * [Writing a push task request
+     * HTTP requests with this http_method, otherwise the task attempt fails with
+     * error code 405 (Method Not Allowed). See [Writing a push task request
      * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
-     * and the documentation for the request handlers in the language your app is
-     * written in e.g.
-     * [Python Request
-     * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * and the App Engine documentation for your runtime on [How Requests are
+     * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
      * 
* * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; @@ -1168,14 +1156,11 @@ public Builder setHttpMethodValue(int value) { *
      * The HTTP method to use for the request. The default is POST.
      * The app's request handler for the task's target URL must be able to handle
-     * HTTP requests with this http_method, otherwise the task attempt will fail
-     * with error code 405 (Method Not Allowed). See
-     * [Writing a push task request
+     * HTTP requests with this http_method, otherwise the task attempt fails with
+     * error code 405 (Method Not Allowed). See [Writing a push task request
      * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
-     * and the documentation for the request handlers in the language your app is
-     * written in e.g.
-     * [Python Request
-     * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * and the App Engine documentation for your runtime on [How Requests are
+     * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
      * 
* * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; @@ -1195,14 +1180,11 @@ public com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod() { *
      * The HTTP method to use for the request. The default is POST.
      * The app's request handler for the task's target URL must be able to handle
-     * HTTP requests with this http_method, otherwise the task attempt will fail
-     * with error code 405 (Method Not Allowed). See
-     * [Writing a push task request
+     * HTTP requests with this http_method, otherwise the task attempt fails with
+     * error code 405 (Method Not Allowed). See [Writing a push task request
      * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
-     * and the documentation for the request handlers in the language your app is
-     * written in e.g.
-     * [Python Request
-     * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * and the App Engine documentation for your runtime on [How Requests are
+     * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
      * 
* * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; @@ -1225,14 +1207,11 @@ public Builder setHttpMethod(com.google.cloud.tasks.v2beta2.HttpMethod value) { *
      * The HTTP method to use for the request. The default is POST.
      * The app's request handler for the task's target URL must be able to handle
-     * HTTP requests with this http_method, otherwise the task attempt will fail
-     * with error code 405 (Method Not Allowed). See
-     * [Writing a push task request
+     * HTTP requests with this http_method, otherwise the task attempt fails with
+     * error code 405 (Method Not Allowed). See [Writing a push task request
      * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
-     * and the documentation for the request handlers in the language your app is
-     * written in e.g.
-     * [Python Request
-     * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * and the App Engine documentation for your runtime on [How Requests are
+     * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
      * 
* * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequestOrBuilder.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequestOrBuilder.java index 121fecd2..deb18f99 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequestOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequestOrBuilder.java @@ -29,14 +29,11 @@ public interface AppEngineHttpRequestOrBuilder *
    * The HTTP method to use for the request. The default is POST.
    * The app's request handler for the task's target URL must be able to handle
-   * HTTP requests with this http_method, otherwise the task attempt will fail
-   * with error code 405 (Method Not Allowed). See
-   * [Writing a push task request
+   * HTTP requests with this http_method, otherwise the task attempt fails with
+   * error code 405 (Method Not Allowed). See [Writing a push task request
    * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
-   * and the documentation for the request handlers in the language your app is
-   * written in e.g.
-   * [Python Request
-   * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+   * and the App Engine documentation for your runtime on [How Requests are
+   * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
    * 
* * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; @@ -50,14 +47,11 @@ public interface AppEngineHttpRequestOrBuilder *
    * The HTTP method to use for the request. The default is POST.
    * The app's request handler for the task's target URL must be able to handle
-   * HTTP requests with this http_method, otherwise the task attempt will fail
-   * with error code 405 (Method Not Allowed). See
-   * [Writing a push task request
+   * HTTP requests with this http_method, otherwise the task attempt fails with
+   * error code 405 (Method Not Allowed). See [Writing a push task request
    * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
-   * and the documentation for the request handlers in the language your app is
-   * written in e.g.
-   * [Python Request
-   * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
+   * and the App Engine documentation for your runtime on [How Requests are
+   * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
    * 
* * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java index 660e7c88..e0f1f9cc 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java @@ -127,166 +127,169 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "y.proto\032\036google/protobuf/duration.proto\032" + "\033google/protobuf/empty.proto\032 google/pro" + "tobuf/field_mask.proto\032\037google/protobuf/" - + "timestamp.proto\"\203\001\n\021ListQueuesRequest\0227\n" + + "timestamp.proto\"\267\001\n\021ListQueuesRequest\0227\n" + "\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudtasks.google" + "apis.com/Queue\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_s" - + "ize\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"`\n\022ListQue" - + "uesResponse\0221\n\006queues\030\001 \003(\0132!.google.clo" - + "ud.tasks.v2beta2.Queue\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\"H\n\017GetQueueRequest\0225\n\004name\030\001 \001(\t" - + "B\'\340A\002\372A!\n\037cloudtasks.googleapis.com/Queu" - + "e\"\204\001\n\022CreateQueueRequest\0227\n\006parent\030\001 \001(\t" - + "B\'\340A\002\372A!\022\037cloudtasks.googleapis.com/Queu" - + "e\0225\n\005queue\030\002 \001(\0132!.google.cloud.tasks.v2" - + "beta2.QueueB\003\340A\002\"|\n\022UpdateQueueRequest\0225" - + "\n\005queue\030\001 \001(\0132!.google.cloud.tasks.v2bet" - + "a2.QueueB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.goo" - + "gle.protobuf.FieldMask\"K\n\022DeleteQueueReq" - + "uest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037cloudtasks.g" - + "oogleapis.com/Queue\"J\n\021PurgeQueueRequest" - + "\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037cloudtasks.googl" - + "eapis.com/Queue\"J\n\021PauseQueueRequest\0225\n\004" - + "name\030\001 \001(\tB\'\340A\002\372A!\n\037cloudtasks.googleapi" - + "s.com/Queue\"K\n\022ResumeQueueRequest\0225\n\004nam" - + "e\030\001 \001(\tB\'\340A\002\372A!\n\037cloudtasks.googleapis.c" - + "om/Queue\"\257\001\n\020ListTasksRequest\0226\n\006parent\030" - + "\001 \001(\tB&\340A\002\372A \022\036cloudtasks.googleapis.com" - + "/Task\022<\n\rresponse_view\030\002 \001(\0162%.google.cl" - + "oud.tasks.v2beta2.Task.View\022\021\n\tpage_size" - + "\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"]\n\021ListTasksR" - + "esponse\022/\n\005tasks\030\001 \003(\0132 .google.cloud.ta" - + "sks.v2beta2.Task\022\027\n\017next_page_token\030\002 \001(" - + "\t\"\204\001\n\016GetTaskRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372" - + "A \n\036cloudtasks.googleapis.com/Task\022<\n\rre" - + "sponse_view\030\002 \001(\0162%.google.cloud.tasks.v" - + "2beta2.Task.View\"\276\001\n\021CreateTaskRequest\0226" - + "\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036cloudtasks.googl" - + "eapis.com/Task\0223\n\004task\030\002 \001(\0132 .google.cl" - + "oud.tasks.v2beta2.TaskB\003\340A\002\022<\n\rresponse_" - + "view\030\003 \001(\0162%.google.cloud.tasks.v2beta2." - + "Task.View\"I\n\021DeleteTaskRequest\0224\n\004name\030\001" - + " \001(\tB&\340A\002\372A \n\036cloudtasks.googleapis.com/" - + "Task\"\344\001\n\021LeaseTasksRequest\0226\n\006parent\030\001 \001" - + "(\tB&\340A\002\372A \022\036cloudtasks.googleapis.com/Ta" - + "sk\022\021\n\tmax_tasks\030\002 \001(\005\0226\n\016lease_duration\030" - + "\003 \001(\0132\031.google.protobuf.DurationB\003\340A\002\022<\n" - + "\rresponse_view\030\004 \001(\0162%.google.cloud.task" - + "s.v2beta2.Task.View\022\016\n\006filter\030\005 \001(\t\"E\n\022L" - + "easeTasksResponse\022/\n\005tasks\030\001 \003(\0132 .googl" - + "e.cloud.tasks.v2beta2.Task\"\206\001\n\026Acknowled" - + "geTaskRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036clo" - + "udtasks.googleapis.com/Task\0226\n\rschedule_" - + "time\030\002 \001(\0132\032.google.protobuf.TimestampB\003" - + "\340A\002\"\367\001\n\021RenewLeaseRequest\0224\n\004name\030\001 \001(\tB" - + "&\340A\002\372A \n\036cloudtasks.googleapis.com/Task\022" - + "6\n\rschedule_time\030\002 \001(\0132\032.google.protobuf" - + ".TimestampB\003\340A\002\0226\n\016lease_duration\030\003 \001(\0132" - + "\031.google.protobuf.DurationB\003\340A\002\022<\n\rrespo" - + "nse_view\030\004 \001(\0162%.google.cloud.tasks.v2be" - + "ta2.Task.View\"\300\001\n\022CancelLeaseRequest\0224\n\004" - + "name\030\001 \001(\tB&\340A\002\372A \n\036cloudtasks.googleapi" - + "s.com/Task\0226\n\rschedule_time\030\002 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\002\022<\n\rresponse_v" - + "iew\030\003 \001(\0162%.google.cloud.tasks.v2beta2.T" - + "ask.View\"\204\001\n\016RunTaskRequest\0224\n\004name\030\001 \001(" - + "\tB&\340A\002\372A \n\036cloudtasks.googleapis.com/Tas" - + "k\022<\n\rresponse_view\030\002 \001(\0162%.google.cloud." - + "tasks.v2beta2.Task.View2\324\034\n\nCloudTasks\022\255" - + "\001\n\nListQueues\022-.google.cloud.tasks.v2bet" - + "a2.ListQueuesRequest\032..google.cloud.task" - + "s.v2beta2.ListQueuesResponse\"@\202\323\344\223\0021\022//v" - + "2beta2/{parent=projects/*/locations/*}/q" - + "ueues\332A\006parent\022\232\001\n\010GetQueue\022+.google.clo" - + "ud.tasks.v2beta2.GetQueueRequest\032!.googl" - + "e.cloud.tasks.v2beta2.Queue\">\202\323\344\223\0021\022//v2" - + "beta2/{name=projects/*/locations/*/queue" - + "s/*}\332A\004name\022\257\001\n\013CreateQueue\022..google.clo" - + "ud.tasks.v2beta2.CreateQueueRequest\032!.go" - + "ogle.cloud.tasks.v2beta2.Queue\"M\202\323\344\223\0028\"/" - + "/v2beta2/{parent=projects/*/locations/*}" - + "/queues:\005queue\332A\014parent,queue\022\272\001\n\013Update" - + "Queue\022..google.cloud.tasks.v2beta2.Updat" - + "eQueueRequest\032!.google.cloud.tasks.v2bet" - + "a2.Queue\"X\202\323\344\223\002>25/v2beta2/{queue.name=p" - + "rojects/*/locations/*/queues/*}:\005queue\332A" - + "\021queue,update_mask\022\225\001\n\013DeleteQueue\022..goo" - + "gle.cloud.tasks.v2beta2.DeleteQueueReque" - + "st\032\026.google.protobuf.Empty\">\202\323\344\223\0021*//v2b" - + "eta2/{name=projects/*/locations/*/queues" - + "/*}\332A\004name\022\247\001\n\nPurgeQueue\022-.google.cloud" - + ".tasks.v2beta2.PurgeQueueRequest\032!.googl" - + "e.cloud.tasks.v2beta2.Queue\"G\202\323\344\223\002:\"5/v2" - + "beta2/{name=projects/*/locations/*/queue" - + "s/*}:purge:\001*\332A\004name\022\247\001\n\nPauseQueue\022-.go" - + "ogle.cloud.tasks.v2beta2.PauseQueueReque" - + "st\032!.google.cloud.tasks.v2beta2.Queue\"G\202" - + "\323\344\223\002:\"5/v2beta2/{name=projects/*/locatio" - + "ns/*/queues/*}:pause:\001*\332A\004name\022\252\001\n\013Resum" - + "eQueue\022..google.cloud.tasks.v2beta2.Resu" - + "meQueueRequest\032!.google.cloud.tasks.v2be" - + "ta2.Queue\"H\202\323\344\223\002;\"6/v2beta2/{name=projec" - + "ts/*/locations/*/queues/*}:resume:\001*\332A\004n" - + "ame\022\241\001\n\014GetIamPolicy\022\".google.iam.v1.Get" - + "IamPolicyRequest\032\025.google.iam.v1.Policy\"" - + "V\202\323\344\223\002E\"@/v2beta2/{resource=projects/*/l" - + "ocations/*/queues/*}:getIamPolicy:\001*\332A\010r" - + "esource\022\250\001\n\014SetIamPolicy\022\".google.iam.v1" - + ".SetIamPolicyRequest\032\025.google.iam.v1.Pol" - + "icy\"]\202\323\344\223\002E\"@/v2beta2/{resource=projects" - + "/*/locations/*/queues/*}:setIamPolicy:\001*" - + "\332A\017resource,policy\022\323\001\n\022TestIamPermission" - + "s\022(.google.iam.v1.TestIamPermissionsRequ" - + "est\032).google.iam.v1.TestIamPermissionsRe" - + "sponse\"h\202\323\344\223\002K\"F/v2beta2/{resource=proje" - + "cts/*/locations/*/queues/*}:testIamPermi" - + "ssions:\001*\332A\024resource,permissions\022\262\001\n\tLis" - + "tTasks\022,.google.cloud.tasks.v2beta2.List" - + "TasksRequest\032-.google.cloud.tasks.v2beta" - + "2.ListTasksResponse\"H\202\323\344\223\0029\0227/v2beta2/{p" - + "arent=projects/*/locations/*/queues/*}/t" - + "asks\332A\006parent\022\237\001\n\007GetTask\022*.google.cloud" - + ".tasks.v2beta2.GetTaskRequest\032 .google.c" - + "loud.tasks.v2beta2.Task\"F\202\323\344\223\0029\0227/v2beta" + + "ize\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\0222\n\tread_ma" + + "sk\030\005 \001(\0132\032.google.protobuf.FieldMaskB\003\340A" + + "\001\"`\n\022ListQueuesResponse\0221\n\006queues\030\001 \003(\0132" + + "!.google.cloud.tasks.v2beta2.Queue\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\"|\n\017GetQueueRequest\0225" + + "\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037cloudtasks.googlea" + + "pis.com/Queue\0222\n\tread_mask\030\002 \001(\0132\032.googl" + + "e.protobuf.FieldMaskB\003\340A\001\"\204\001\n\022CreateQueu" + + "eRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudt" + + "asks.googleapis.com/Queue\0225\n\005queue\030\002 \001(\013" + + "2!.google.cloud.tasks.v2beta2.QueueB\003\340A\002" + + "\"|\n\022UpdateQueueRequest\0225\n\005queue\030\001 \001(\0132!." + + "google.cloud.tasks.v2beta2.QueueB\003\340A\002\022/\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.Fie" + + "ldMask\"K\n\022DeleteQueueRequest\0225\n\004name\030\001 \001" + + "(\tB\'\340A\002\372A!\n\037cloudtasks.googleapis.com/Qu" + + "eue\"J\n\021PurgeQueueRequest\0225\n\004name\030\001 \001(\tB\'" + + "\340A\002\372A!\n\037cloudtasks.googleapis.com/Queue\"" + + "J\n\021PauseQueueRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372" + + "A!\n\037cloudtasks.googleapis.com/Queue\"K\n\022R" + + "esumeQueueRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n" + + "\037cloudtasks.googleapis.com/Queue\"\257\001\n\020Lis" + + "tTasksRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036c" + + "loudtasks.googleapis.com/Task\022<\n\rrespons" + + "e_view\030\002 \001(\0162%.google.cloud.tasks.v2beta" + + "2.Task.View\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_t" + + "oken\030\005 \001(\t\"]\n\021ListTasksResponse\022/\n\005tasks" + + "\030\001 \003(\0132 .google.cloud.tasks.v2beta2.Task" + + "\022\027\n\017next_page_token\030\002 \001(\t\"\204\001\n\016GetTaskReq" + + "uest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudtasks.g" + + "oogleapis.com/Task\022<\n\rresponse_view\030\002 \001(" + + "\0162%.google.cloud.tasks.v2beta2.Task.View" + + "\"\276\001\n\021CreateTaskRequest\0226\n\006parent\030\001 \001(\tB&" + + "\340A\002\372A \022\036cloudtasks.googleapis.com/Task\0223" + + "\n\004task\030\002 \001(\0132 .google.cloud.tasks.v2beta" + + "2.TaskB\003\340A\002\022<\n\rresponse_view\030\003 \001(\0162%.goo" + + "gle.cloud.tasks.v2beta2.Task.View\"I\n\021Del" + + "eteTaskRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cl" + + "oudtasks.googleapis.com/Task\"\344\001\n\021LeaseTa" + + "sksRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036clou" + + "dtasks.googleapis.com/Task\022\021\n\tmax_tasks\030" + + "\002 \001(\005\0226\n\016lease_duration\030\003 \001(\0132\031.google.p" + + "rotobuf.DurationB\003\340A\002\022<\n\rresponse_view\030\004" + + " \001(\0162%.google.cloud.tasks.v2beta2.Task.V" + + "iew\022\016\n\006filter\030\005 \001(\t\"E\n\022LeaseTasksRespons" + + "e\022/\n\005tasks\030\001 \003(\0132 .google.cloud.tasks.v2" + + "beta2.Task\"\206\001\n\026AcknowledgeTaskRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudtasks.googleap" + + "is.com/Task\0226\n\rschedule_time\030\002 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\002\"\367\001\n\021RenewLea" + + "seRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudta" + + "sks.googleapis.com/Task\0226\n\rschedule_time" + + "\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\022" + + "6\n\016lease_duration\030\003 \001(\0132\031.google.protobu" + + "f.DurationB\003\340A\002\022<\n\rresponse_view\030\004 \001(\0162%" + + ".google.cloud.tasks.v2beta2.Task.View\"\300\001" + + "\n\022CancelLeaseRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372" + + "A \n\036cloudtasks.googleapis.com/Task\0226\n\rsc" + + "hedule_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\002\022<\n\rresponse_view\030\003 \001(\0162%.goog" + + "le.cloud.tasks.v2beta2.Task.View\"\204\001\n\016Run" + + "TaskRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloud" + + "tasks.googleapis.com/Task\022<\n\rresponse_vi" + + "ew\030\002 \001(\0162%.google.cloud.tasks.v2beta2.Ta" + + "sk.View2\324\034\n\nCloudTasks\022\255\001\n\nListQueues\022-." + + "google.cloud.tasks.v2beta2.ListQueuesReq" + + "uest\032..google.cloud.tasks.v2beta2.ListQu" + + "euesResponse\"@\202\323\344\223\0021\022//v2beta2/{parent=p" + + "rojects/*/locations/*}/queues\332A\006parent\022\232" + + "\001\n\010GetQueue\022+.google.cloud.tasks.v2beta2" + + ".GetQueueRequest\032!.google.cloud.tasks.v2" + + "beta2.Queue\">\202\323\344\223\0021\022//v2beta2/{name=proj" + + "ects/*/locations/*/queues/*}\332A\004name\022\257\001\n\013" + + "CreateQueue\022..google.cloud.tasks.v2beta2" + + ".CreateQueueRequest\032!.google.cloud.tasks" + + ".v2beta2.Queue\"M\202\323\344\223\0028\"//v2beta2/{parent" + + "=projects/*/locations/*}/queues:\005queue\332A" + + "\014parent,queue\022\272\001\n\013UpdateQueue\022..google.c" + + "loud.tasks.v2beta2.UpdateQueueRequest\032!." + + "google.cloud.tasks.v2beta2.Queue\"X\202\323\344\223\002>" + + "25/v2beta2/{queue.name=projects/*/locati" + + "ons/*/queues/*}:\005queue\332A\021queue,update_ma" + + "sk\022\225\001\n\013DeleteQueue\022..google.cloud.tasks." + + "v2beta2.DeleteQueueRequest\032\026.google.prot" + + "obuf.Empty\">\202\323\344\223\0021*//v2beta2/{name=proje" + + "cts/*/locations/*/queues/*}\332A\004name\022\247\001\n\nP" + + "urgeQueue\022-.google.cloud.tasks.v2beta2.P" + + "urgeQueueRequest\032!.google.cloud.tasks.v2" + + "beta2.Queue\"G\202\323\344\223\002:\"5/v2beta2/{name=proj" + + "ects/*/locations/*/queues/*}:purge:\001*\332A\004" + + "name\022\247\001\n\nPauseQueue\022-.google.cloud.tasks" + + ".v2beta2.PauseQueueRequest\032!.google.clou" + + "d.tasks.v2beta2.Queue\"G\202\323\344\223\002:\"5/v2beta2/" + + "{name=projects/*/locations/*/queues/*}:p" + + "ause:\001*\332A\004name\022\252\001\n\013ResumeQueue\022..google." + + "cloud.tasks.v2beta2.ResumeQueueRequest\032!" + + ".google.cloud.tasks.v2beta2.Queue\"H\202\323\344\223\002" + + ";\"6/v2beta2/{name=projects/*/locations/*" + + "/queues/*}:resume:\001*\332A\004name\022\241\001\n\014GetIamPo" + + "licy\022\".google.iam.v1.GetIamPolicyRequest" + + "\032\025.google.iam.v1.Policy\"V\202\323\344\223\002E\"@/v2beta" + + "2/{resource=projects/*/locations/*/queue" + + "s/*}:getIamPolicy:\001*\332A\010resource\022\250\001\n\014SetI" + + "amPolicy\022\".google.iam.v1.SetIamPolicyReq" + + "uest\032\025.google.iam.v1.Policy\"]\202\323\344\223\002E\"@/v2" + + "beta2/{resource=projects/*/locations/*/q" + + "ueues/*}:setIamPolicy:\001*\332A\017resource,poli" + + "cy\022\323\001\n\022TestIamPermissions\022(.google.iam.v" + + "1.TestIamPermissionsRequest\032).google.iam" + + ".v1.TestIamPermissionsResponse\"h\202\323\344\223\002K\"F" + + "/v2beta2/{resource=projects/*/locations/" + + "*/queues/*}:testIamPermissions:\001*\332A\024reso" + + "urce,permissions\022\262\001\n\tListTasks\022,.google." + + "cloud.tasks.v2beta2.ListTasksRequest\032-.g" + + "oogle.cloud.tasks.v2beta2.ListTasksRespo" + + "nse\"H\202\323\344\223\0029\0227/v2beta2/{parent=projects/*" + + "/locations/*/queues/*}/tasks\332A\006parent\022\237\001" + + "\n\007GetTask\022*.google.cloud.tasks.v2beta2.G" + + "etTaskRequest\032 .google.cloud.tasks.v2bet" + + "a2.Task\"F\202\323\344\223\0029\0227/v2beta2/{name=projects" + + "/*/locations/*/queues/*/tasks/*}\332A\004name\022" + + "\257\001\n\nCreateTask\022-.google.cloud.tasks.v2be" + + "ta2.CreateTaskRequest\032 .google.cloud.tas" + + "ks.v2beta2.Task\"P\202\323\344\223\002<\"7/v2beta2/{paren" + + "t=projects/*/locations/*/queues/*}/tasks" + + ":\001*\332A\013parent,task\022\233\001\n\nDeleteTask\022-.googl" + + "e.cloud.tasks.v2beta2.DeleteTaskRequest\032" + + "\026.google.protobuf.Empty\"F\202\323\344\223\0029*7/v2beta" + "2/{name=projects/*/locations/*/queues/*/" - + "tasks/*}\332A\004name\022\257\001\n\nCreateTask\022-.google." - + "cloud.tasks.v2beta2.CreateTaskRequest\032 ." - + "google.cloud.tasks.v2beta2.Task\"P\202\323\344\223\002<\"" - + "7/v2beta2/{parent=projects/*/locations/*" - + "/queues/*}/tasks:\001*\332A\013parent,task\022\233\001\n\nDe" - + "leteTask\022-.google.cloud.tasks.v2beta2.De" - + "leteTaskRequest\032\026.google.protobuf.Empty\"" - + "F\202\323\344\223\0029*7/v2beta2/{name=projects/*/locat" - + "ions/*/queues/*/tasks/*}\332A\004name\022\315\001\n\nLeas" - + "eTasks\022-.google.cloud.tasks.v2beta2.Leas" - + "eTasksRequest\032..google.cloud.tasks.v2bet" - + "a2.LeaseTasksResponse\"`\202\323\344\223\002B\"=/v2beta2/" - + "{parent=projects/*/locations/*/queues/*}" - + "/tasks:lease:\001*\332A\025parent,lease_duration\022" - + "\302\001\n\017AcknowledgeTask\0222.google.cloud.tasks" - + ".v2beta2.AcknowledgeTaskRequest\032\026.google" - + ".protobuf.Empty\"c\202\323\344\223\002H\"C/v2beta2/{name=" - + "projects/*/locations/*/queues/*/tasks/*}" - + ":acknowledge:\001*\332A\022name,schedule_time\022\320\001\n" - + "\nRenewLease\022-.google.cloud.tasks.v2beta2" - + ".RenewLeaseRequest\032 .google.cloud.tasks." - + "v2beta2.Task\"q\202\323\344\223\002G\"B/v2beta2/{name=pro" - + "jects/*/locations/*/queues/*/tasks/*}:re" - + "newLease:\001*\332A!name,schedule_time,lease_d" - + "uration\022\304\001\n\013CancelLease\022..google.cloud.t" - + "asks.v2beta2.CancelLeaseRequest\032 .google" - + ".cloud.tasks.v2beta2.Task\"c\202\323\344\223\002H\"C/v2be" - + "ta2/{name=projects/*/locations/*/queues/" - + "*/tasks/*}:cancelLease:\001*\332A\022name,schedul" - + "e_time\022\246\001\n\007RunTask\022*.google.cloud.tasks." - + "v2beta2.RunTaskRequest\032 .google.cloud.ta" - + "sks.v2beta2.Task\"M\202\323\344\223\002@\";/v2beta2/{name" - + "=projects/*/locations/*/queues/*/tasks/*" - + "}:run:\001*\332A\004name\032M\312A\031cloudtasks.googleapi" - + "s.com\322A.https://www.googleapis.com/auth/" - + "cloud-platformB|\n\036com.google.cloud.tasks" - + ".v2beta2B\017CloudTasksProtoP\001Z?google.gola" - + "ng.org/genproto/googleapis/cloud/tasks/v" - + "2beta2;tasks\242\002\005TASKSb\006proto3" + + "tasks/*}\332A\004name\022\315\001\n\nLeaseTasks\022-.google." + + "cloud.tasks.v2beta2.LeaseTasksRequest\032.." + + "google.cloud.tasks.v2beta2.LeaseTasksRes" + + "ponse\"`\202\323\344\223\002B\"=/v2beta2/{parent=projects" + + "/*/locations/*/queues/*}/tasks:lease:\001*\332" + + "A\025parent,lease_duration\022\302\001\n\017AcknowledgeT" + + "ask\0222.google.cloud.tasks.v2beta2.Acknowl" + + "edgeTaskRequest\032\026.google.protobuf.Empty\"" + + "c\202\323\344\223\002H\"C/v2beta2/{name=projects/*/locat" + + "ions/*/queues/*/tasks/*}:acknowledge:\001*\332" + + "A\022name,schedule_time\022\320\001\n\nRenewLease\022-.go" + + "ogle.cloud.tasks.v2beta2.RenewLeaseReque" + + "st\032 .google.cloud.tasks.v2beta2.Task\"q\202\323" + + "\344\223\002G\"B/v2beta2/{name=projects/*/location" + + "s/*/queues/*/tasks/*}:renewLease:\001*\332A!na" + + "me,schedule_time,lease_duration\022\304\001\n\013Canc" + + "elLease\022..google.cloud.tasks.v2beta2.Can" + + "celLeaseRequest\032 .google.cloud.tasks.v2b" + + "eta2.Task\"c\202\323\344\223\002H\"C/v2beta2/{name=projec" + + "ts/*/locations/*/queues/*/tasks/*}:cance" + + "lLease:\001*\332A\022name,schedule_time\022\246\001\n\007RunTa" + + "sk\022*.google.cloud.tasks.v2beta2.RunTaskR" + + "equest\032 .google.cloud.tasks.v2beta2.Task" + + "\"M\202\323\344\223\002@\";/v2beta2/{name=projects/*/loca" + + "tions/*/queues/*/tasks/*}:run:\001*\332A\004name\032" + + "M\312A\031cloudtasks.googleapis.com\322A.https://" + + "www.googleapis.com/auth/cloud-platformB|" + + "\n\036com.google.cloud.tasks.v2beta2B\017CloudT" + + "asksProtoP\001Z?google.golang.org/genproto/" + + "googleapis/cloud/tasks/v2beta2;tasks\242\002\005T" + + "ASKSb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -311,7 +314,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_descriptor, new java.lang.String[] { - "Parent", "Filter", "PageSize", "PageToken", + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_descriptor = getDescriptor().getMessageTypes().get(1); @@ -327,7 +330,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_descriptor, new java.lang.String[] { - "Name", + "Name", "ReadMask", }); internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_descriptor = getDescriptor().getMessageTypes().get(3); diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequest.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequest.java index 07a60ed0..975868dc 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequest.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequest.java @@ -75,6 +75,21 @@ private GetQueueRequest( java.lang.String s = input.readStringRequireUtf8(); name_ = s; + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + break; } default: @@ -166,6 +181,64 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int READ_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -183,6 +256,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (readMask_ != null) { + output.writeMessage(2, getReadMask()); + } unknownFields.writeTo(output); } @@ -195,6 +271,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadMask()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -212,6 +291,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.tasks.v2beta2.GetQueueRequest) obj; if (!getName().equals(other.getName())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -225,6 +308,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -372,6 +459,12 @@ public Builder clear() { super.clear(); name_ = ""; + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } return this; } @@ -400,6 +493,11 @@ public com.google.cloud.tasks.v2beta2.GetQueueRequest buildPartial() { com.google.cloud.tasks.v2beta2.GetQueueRequest result = new com.google.cloud.tasks.v2beta2.GetQueueRequest(this); result.name_ = name_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } onBuilt(); return result; } @@ -453,6 +551,9 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta2.GetQueueRequest other) { name_ = other.name_; onChanged(); } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -603,6 +704,221 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequestOrBuilder.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequestOrBuilder.java index 2fd1cbda..8a94e8ad 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequestOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequestOrBuilder.java @@ -53,4 +53,51 @@ public interface GetQueueRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); } diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequest.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequest.java index 15498e58..60de7b4c 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequest.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequest.java @@ -96,6 +96,21 @@ private ListQueuesRequest( java.lang.String s = input.readStringRequireUtf8(); pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + break; } default: @@ -336,6 +351,64 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -362,6 +435,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getPageTokenBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } unknownFields.writeTo(output); } @@ -383,6 +459,9 @@ public int getSerializedSize() { if (!getPageTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -403,6 +482,10 @@ public boolean equals(final java.lang.Object obj) { if (!getFilter().equals(other.getFilter())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -422,6 +505,10 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -575,6 +662,12 @@ public Builder clear() { pageToken_ = ""; + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } return this; } @@ -606,6 +699,11 @@ public com.google.cloud.tasks.v2beta2.ListQueuesRequest buildPartial() { result.filter_ = filter_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } onBuilt(); return result; } @@ -671,6 +769,9 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta2.ListQueuesRequest other) pageToken_ = other.pageToken_; onChanged(); } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1170,6 +1271,221 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequestOrBuilder.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequestOrBuilder.java index a027180f..167f4ec8 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequestOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequestOrBuilder.java @@ -149,4 +149,51 @@ public interface ListQueuesRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); } diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java index 6be1e6de..4c8c5f2b 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java @@ -167,6 +167,52 @@ private Queue( purgeTime_ = subBuilder.buildPartial(); } + break; + } + case 74: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (taskTtl_ != null) { + subBuilder = taskTtl_.toBuilder(); + } + taskTtl_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(taskTtl_); + taskTtl_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (tombstoneTtl_ != null) { + subBuilder = tombstoneTtl_.toBuilder(); + } + tombstoneTtl_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tombstoneTtl_); + tombstoneTtl_ = subBuilder.buildPartial(); + } + + break; + } + case 130: + { + com.google.cloud.tasks.v2beta2.QueueStats.Builder subBuilder = null; + if (stats_ != null) { + subBuilder = stats_.toBuilder(); + } + stats_ = + input.readMessage( + com.google.cloud.tasks.v2beta2.QueueStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stats_); + stats_ = subBuilder.buildPartial(); + } + break; } default: @@ -930,6 +976,206 @@ public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { return getPurgeTime(); } + public static final int TASK_TTL_FIELD_NUMBER = 9; + private com.google.protobuf.Duration taskTtl_; + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 9; + * + * @return Whether the taskTtl field is set. + */ + @java.lang.Override + public boolean hasTaskTtl() { + return taskTtl_ != null; + } + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 9; + * + * @return The taskTtl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTaskTtl() { + return taskTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : taskTtl_; + } + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 9; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTaskTtlOrBuilder() { + return getTaskTtl(); + } + + public static final int TOMBSTONE_TTL_FIELD_NUMBER = 10; + private com.google.protobuf.Duration tombstoneTtl_; + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or completed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + * + * @return Whether the tombstoneTtl field is set. + */ + @java.lang.Override + public boolean hasTombstoneTtl() { + return tombstoneTtl_ != null; + } + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or completed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + * + * @return The tombstoneTtl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTombstoneTtl() { + return tombstoneTtl_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : tombstoneTtl_; + } + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or completed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTombstoneTtlOrBuilder() { + return getTombstoneTtl(); + } + + public static final int STATS_FIELD_NUMBER = 16; + private com.google.cloud.tasks.v2beta2.QueueStats stats_; + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return stats_ != null; + } + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stats. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueueStats getStats() { + return stats_ == null ? com.google.cloud.tasks.v2beta2.QueueStats.getDefaultInstance() : stats_; + } + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueueStatsOrBuilder getStatsOrBuilder() { + return getStats(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -965,6 +1211,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (purgeTime_ != null) { output.writeMessage(8, getPurgeTime()); } + if (taskTtl_ != null) { + output.writeMessage(9, getTaskTtl()); + } + if (tombstoneTtl_ != null) { + output.writeMessage(10, getTombstoneTtl()); + } + if (stats_ != null) { + output.writeMessage(16, getStats()); + } unknownFields.writeTo(output); } @@ -999,6 +1254,15 @@ public int getSerializedSize() { if (purgeTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPurgeTime()); } + if (taskTtl_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getTaskTtl()); + } + if (tombstoneTtl_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getTombstoneTtl()); + } + if (stats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getStats()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1028,6 +1292,18 @@ public boolean equals(final java.lang.Object obj) { if (hasPurgeTime()) { if (!getPurgeTime().equals(other.getPurgeTime())) return false; } + if (hasTaskTtl() != other.hasTaskTtl()) return false; + if (hasTaskTtl()) { + if (!getTaskTtl().equals(other.getTaskTtl())) return false; + } + if (hasTombstoneTtl() != other.hasTombstoneTtl()) return false; + if (hasTombstoneTtl()) { + if (!getTombstoneTtl().equals(other.getTombstoneTtl())) return false; + } + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats().equals(other.getStats())) return false; + } if (!getTargetTypeCase().equals(other.getTargetTypeCase())) return false; switch (targetTypeCase_) { case 3: @@ -1066,6 +1342,18 @@ public int hashCode() { hash = (37 * hash) + PURGE_TIME_FIELD_NUMBER; hash = (53 * hash) + getPurgeTime().hashCode(); } + if (hasTaskTtl()) { + hash = (37 * hash) + TASK_TTL_FIELD_NUMBER; + hash = (53 * hash) + getTaskTtl().hashCode(); + } + if (hasTombstoneTtl()) { + hash = (37 * hash) + TOMBSTONE_TTL_FIELD_NUMBER; + hash = (53 * hash) + getTombstoneTtl().hashCode(); + } + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } switch (targetTypeCase_) { case 3: hash = (37 * hash) + APP_ENGINE_HTTP_TARGET_FIELD_NUMBER; @@ -1246,6 +1534,24 @@ public Builder clear() { purgeTime_ = null; purgeTimeBuilder_ = null; } + if (taskTtlBuilder_ == null) { + taskTtl_ = null; + } else { + taskTtl_ = null; + taskTtlBuilder_ = null; + } + if (tombstoneTtlBuilder_ == null) { + tombstoneTtl_ = null; + } else { + tombstoneTtl_ = null; + tombstoneTtlBuilder_ = null; + } + if (statsBuilder_ == null) { + stats_ = null; + } else { + stats_ = null; + statsBuilder_ = null; + } targetTypeCase_ = 0; targetType_ = null; return this; @@ -1305,6 +1611,21 @@ public com.google.cloud.tasks.v2beta2.Queue buildPartial() { } else { result.purgeTime_ = purgeTimeBuilder_.build(); } + if (taskTtlBuilder_ == null) { + result.taskTtl_ = taskTtl_; + } else { + result.taskTtl_ = taskTtlBuilder_.build(); + } + if (tombstoneTtlBuilder_ == null) { + result.tombstoneTtl_ = tombstoneTtl_; + } else { + result.tombstoneTtl_ = tombstoneTtlBuilder_.build(); + } + if (statsBuilder_ == null) { + result.stats_ = stats_; + } else { + result.stats_ = statsBuilder_.build(); + } result.targetTypeCase_ = targetTypeCase_; onBuilt(); return result; @@ -1371,6 +1692,15 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta2.Queue other) { if (other.hasPurgeTime()) { mergePurgeTime(other.getPurgeTime()); } + if (other.hasTaskTtl()) { + mergeTaskTtl(other.getTaskTtl()); + } + if (other.hasTombstoneTtl()) { + mergeTombstoneTtl(other.getTombstoneTtl()); + } + if (other.hasStats()) { + mergeStats(other.getStats()); + } switch (other.getTargetTypeCase()) { case APP_ENGINE_HTTP_TARGET: { @@ -2962,6 +3292,735 @@ public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { return purgeTimeBuilder_; } + private com.google.protobuf.Duration taskTtl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + taskTtlBuilder_; + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 9; + * + * @return Whether the taskTtl field is set. + */ + public boolean hasTaskTtl() { + return taskTtlBuilder_ != null || taskTtl_ != null; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 9; + * + * @return The taskTtl. + */ + public com.google.protobuf.Duration getTaskTtl() { + if (taskTtlBuilder_ == null) { + return taskTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : taskTtl_; + } else { + return taskTtlBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 9; + */ + public Builder setTaskTtl(com.google.protobuf.Duration value) { + if (taskTtlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskTtl_ = value; + onChanged(); + } else { + taskTtlBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 9; + */ + public Builder setTaskTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (taskTtlBuilder_ == null) { + taskTtl_ = builderForValue.build(); + onChanged(); + } else { + taskTtlBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 9; + */ + public Builder mergeTaskTtl(com.google.protobuf.Duration value) { + if (taskTtlBuilder_ == null) { + if (taskTtl_ != null) { + taskTtl_ = + com.google.protobuf.Duration.newBuilder(taskTtl_).mergeFrom(value).buildPartial(); + } else { + taskTtl_ = value; + } + onChanged(); + } else { + taskTtlBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 9; + */ + public Builder clearTaskTtl() { + if (taskTtlBuilder_ == null) { + taskTtl_ = null; + onChanged(); + } else { + taskTtl_ = null; + taskTtlBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 9; + */ + public com.google.protobuf.Duration.Builder getTaskTtlBuilder() { + + onChanged(); + return getTaskTtlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 9; + */ + public com.google.protobuf.DurationOrBuilder getTaskTtlOrBuilder() { + if (taskTtlBuilder_ != null) { + return taskTtlBuilder_.getMessageOrBuilder(); + } else { + return taskTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : taskTtl_; + } + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTaskTtlFieldBuilder() { + if (taskTtlBuilder_ == null) { + taskTtlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTaskTtl(), getParentForChildren(), isClean()); + taskTtl_ = null; + } + return taskTtlBuilder_; + } + + private com.google.protobuf.Duration tombstoneTtl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + tombstoneTtlBuilder_; + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or completed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + * + * @return Whether the tombstoneTtl field is set. + */ + public boolean hasTombstoneTtl() { + return tombstoneTtlBuilder_ != null || tombstoneTtl_ != null; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or completed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + * + * @return The tombstoneTtl. + */ + public com.google.protobuf.Duration getTombstoneTtl() { + if (tombstoneTtlBuilder_ == null) { + return tombstoneTtl_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : tombstoneTtl_; + } else { + return tombstoneTtlBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or completed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + */ + public Builder setTombstoneTtl(com.google.protobuf.Duration value) { + if (tombstoneTtlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tombstoneTtl_ = value; + onChanged(); + } else { + tombstoneTtlBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or completed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + */ + public Builder setTombstoneTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (tombstoneTtlBuilder_ == null) { + tombstoneTtl_ = builderForValue.build(); + onChanged(); + } else { + tombstoneTtlBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or completed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + */ + public Builder mergeTombstoneTtl(com.google.protobuf.Duration value) { + if (tombstoneTtlBuilder_ == null) { + if (tombstoneTtl_ != null) { + tombstoneTtl_ = + com.google.protobuf.Duration.newBuilder(tombstoneTtl_) + .mergeFrom(value) + .buildPartial(); + } else { + tombstoneTtl_ = value; + } + onChanged(); + } else { + tombstoneTtlBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or completed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + */ + public Builder clearTombstoneTtl() { + if (tombstoneTtlBuilder_ == null) { + tombstoneTtl_ = null; + onChanged(); + } else { + tombstoneTtl_ = null; + tombstoneTtlBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or completed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + */ + public com.google.protobuf.Duration.Builder getTombstoneTtlBuilder() { + + onChanged(); + return getTombstoneTtlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or completed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + */ + public com.google.protobuf.DurationOrBuilder getTombstoneTtlOrBuilder() { + if (tombstoneTtlBuilder_ != null) { + return tombstoneTtlBuilder_.getMessageOrBuilder(); + } else { + return tombstoneTtl_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : tombstoneTtl_; + } + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or completed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTombstoneTtlFieldBuilder() { + if (tombstoneTtlBuilder_ == null) { + tombstoneTtlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTombstoneTtl(), getParentForChildren(), isClean()); + tombstoneTtl_ = null; + } + return tombstoneTtlBuilder_; + } + + private com.google.cloud.tasks.v2beta2.QueueStats stats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.QueueStats, + com.google.cloud.tasks.v2beta2.QueueStats.Builder, + com.google.cloud.tasks.v2beta2.QueueStatsOrBuilder> + statsBuilder_; + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return statsBuilder_ != null || stats_ != null; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stats. + */ + public com.google.cloud.tasks.v2beta2.QueueStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null + ? com.google.cloud.tasks.v2beta2.QueueStats.getDefaultInstance() + : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStats(com.google.cloud.tasks.v2beta2.QueueStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + onChanged(); + } else { + statsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStats(com.google.cloud.tasks.v2beta2.QueueStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + onChanged(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStats(com.google.cloud.tasks.v2beta2.QueueStats value) { + if (statsBuilder_ == null) { + if (stats_ != null) { + stats_ = + com.google.cloud.tasks.v2beta2.QueueStats.newBuilder(stats_) + .mergeFrom(value) + .buildPartial(); + } else { + stats_ = value; + } + onChanged(); + } else { + statsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStats() { + if (statsBuilder_ == null) { + stats_ = null; + onChanged(); + } else { + stats_ = null; + statsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.tasks.v2beta2.QueueStats.Builder getStatsBuilder() { + + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.tasks.v2beta2.QueueStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null + ? com.google.cloud.tasks.v2beta2.QueueStats.getDefaultInstance() + : stats_; + } + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.QueueStats, + com.google.cloud.tasks.v2beta2.QueueStats.Builder, + com.google.cloud.tasks.v2beta2.QueueStatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.QueueStats, + com.google.cloud.tasks.v2beta2.QueueStats.Builder, + com.google.cloud.tasks.v2beta2.QueueStatsOrBuilder>( + getStats(), getParentForChildren(), isClean()); + stats_ = null; + } + return statsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java index a891e32e..95df0745 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java @@ -375,5 +375,170 @@ public interface QueueOrBuilder */ com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder(); + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 9; + * + * @return Whether the taskTtl field is set. + */ + boolean hasTaskTtl(); + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 9; + * + * @return The taskTtl. + */ + com.google.protobuf.Duration getTaskTtl(); + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 9; + */ + com.google.protobuf.DurationOrBuilder getTaskTtlOrBuilder(); + + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or completed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + * + * @return Whether the tombstoneTtl field is set. + */ + boolean hasTombstoneTtl(); + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or completed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + * + * @return The tombstoneTtl. + */ + com.google.protobuf.Duration getTombstoneTtl(); + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or completed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 10; + */ + com.google.protobuf.DurationOrBuilder getTombstoneTtlOrBuilder(); + + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stats field is set. + */ + boolean hasStats(); + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stats. + */ + com.google.cloud.tasks.v2beta2.QueueStats getStats(); + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.tasks.v2beta2.QueueStatsOrBuilder getStatsOrBuilder(); + public com.google.cloud.tasks.v2beta2.Queue.TargetTypeCase getTargetTypeCase(); } diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java index 7d4ba843..39c576fa 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java @@ -39,6 +39,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_tasks_v2beta2_RetryConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_tasks_v2beta2_RetryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_QueueStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_QueueStats_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -49,43 +53,55 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n&google/cloud/tasks/v2beta2/queue.proto" - + "\022\032google.cloud.tasks.v2beta2\032\031google/api" - + "/resource.proto\032\'google/cloud/tasks/v2be" - + "ta2/target.proto\032\036google/protobuf/durati" - + "on.proto\032\037google/protobuf/timestamp.prot" - + "o\032\034google/api/annotations.proto\"\277\004\n\005Queu" - + "e\022\014\n\004name\030\001 \001(\t\022Q\n\026app_engine_http_targe" - + "t\030\003 \001(\0132/.google.cloud.tasks.v2beta2.App" - + "EngineHttpTargetH\000\022=\n\013pull_target\030\004 \001(\0132" - + "&.google.cloud.tasks.v2beta2.PullTargetH" - + "\000\022;\n\013rate_limits\030\005 \001(\0132&.google.cloud.ta" - + "sks.v2beta2.RateLimits\022=\n\014retry_config\030\006" - + " \001(\0132\'.google.cloud.tasks.v2beta2.RetryC" - + "onfig\0226\n\005state\030\007 \001(\0162\'.google.cloud.task" - + "s.v2beta2.Queue.State\022.\n\npurge_time\030\010 \001(" - + "\0132\032.google.protobuf.Timestamp\"E\n\005State\022\025" - + "\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\n\n\006PA" - + "USED\020\002\022\014\n\010DISABLED\020\003:\\\352AY\n\037cloudtasks.go" - + "ogleapis.com/Queue\0226projects/{project}/l" - + "ocations/{location}/queues/{queue}B\r\n\013ta" - + "rget_type\"k\n\nRateLimits\022\'\n\037max_tasks_dis" - + "patched_per_second\030\001 \001(\001\022\026\n\016max_burst_si" - + "ze\030\002 \001(\005\022\034\n\024max_concurrent_tasks\030\003 \001(\005\"\201" - + "\002\n\013RetryConfig\022\026\n\014max_attempts\030\001 \001(\005H\000\022\034" - + "\n\022unlimited_attempts\030\002 \001(\010H\000\0225\n\022max_retr" - + "y_duration\030\003 \001(\0132\031.google.protobuf.Durat" - + "ion\022.\n\013min_backoff\030\004 \001(\0132\031.google.protob" - + "uf.Duration\022.\n\013max_backoff\030\005 \001(\0132\031.googl" - + "e.protobuf.Duration\022\025\n\rmax_doublings\030\006 \001" - + "(\005B\016\n\014num_attemptsBo\n\036com.google.cloud.t" - + "asks.v2beta2B\nQueueProtoP\001Z?google.golan" - + "g.org/genproto/googleapis/cloud/tasks/v2" - + "beta2;tasksb\006proto3" + + "\022\032google.cloud.tasks.v2beta2\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\032\'google/cloud/tasks/v2beta2/tar" + + "get.proto\032\036google/protobuf/duration.prot" + + "o\032\037google/protobuf/timestamp.proto\032\034goog" + + "le/api/annotations.proto\"\332\005\n\005Queue\022\014\n\004na" + + "me\030\001 \001(\t\022Q\n\026app_engine_http_target\030\003 \001(\013" + + "2/.google.cloud.tasks.v2beta2.AppEngineH" + + "ttpTargetH\000\022=\n\013pull_target\030\004 \001(\0132&.googl" + + "e.cloud.tasks.v2beta2.PullTargetH\000\022;\n\013ra" + + "te_limits\030\005 \001(\0132&.google.cloud.tasks.v2b" + + "eta2.RateLimits\022=\n\014retry_config\030\006 \001(\0132\'." + + "google.cloud.tasks.v2beta2.RetryConfig\0226" + + "\n\005state\030\007 \001(\0162\'.google.cloud.tasks.v2bet" + + "a2.Queue.State\022.\n\npurge_time\030\010 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022+\n\010task_ttl\030\t \001(\013" + + "2\031.google.protobuf.Duration\0220\n\rtombstone" + + "_ttl\030\n \001(\0132\031.google.protobuf.Duration\022:\n" + + "\005stats\030\020 \001(\0132&.google.cloud.tasks.v2beta" + + "2.QueueStatsB\003\340A\003\"E\n\005State\022\025\n\021STATE_UNSP" + + "ECIFIED\020\000\022\013\n\007RUNNING\020\001\022\n\n\006PAUSED\020\002\022\014\n\010DI" + + "SABLED\020\003:\\\352AY\n\037cloudtasks.googleapis.com" + + "/Queue\0226projects/{project}/locations/{lo" + + "cation}/queues/{queue}B\r\n\013target_type\"k\n" + + "\nRateLimits\022\'\n\037max_tasks_dispatched_per_" + + "second\030\001 \001(\001\022\026\n\016max_burst_size\030\002 \001(\005\022\034\n\024" + + "max_concurrent_tasks\030\003 \001(\005\"\201\002\n\013RetryConf" + + "ig\022\026\n\014max_attempts\030\001 \001(\005H\000\022\034\n\022unlimited_" + + "attempts\030\002 \001(\010H\000\0225\n\022max_retry_duration\030\003" + + " \001(\0132\031.google.protobuf.Duration\022.\n\013min_b" + + "ackoff\030\004 \001(\0132\031.google.protobuf.Duration\022" + + ".\n\013max_backoff\030\005 \001(\0132\031.google.protobuf.D" + + "uration\022\025\n\rmax_doublings\030\006 \001(\005B\016\n\014num_at" + + "tempts\"\350\001\n\nQueueStats\022\030\n\013tasks_count\030\001 \001" + + "(\003B\003\340A\003\022F\n\035oldest_estimated_arrival_time" + + "\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "\'\n\032executed_last_minute_count\030\003 \001(\003B\003\340A\003" + + "\022(\n\033concurrent_dispatches_count\030\004 \001(\003B\003\340" + + "A\003\022%\n\030effective_execution_rate\030\005 \001(\001B\003\340A" + + "\003Bo\n\036com.google.cloud.tasks.v2beta2B\nQue" + + "ueProtoP\001Z?google.golang.org/genproto/go" + + "ogleapis/cloud/tasks/v2beta2;tasksb\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.tasks.v2beta2.TargetProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), @@ -105,6 +121,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RetryConfig", "State", "PurgeTime", + "TaskTtl", + "TombstoneTtl", + "Stats", "TargetType", }); internal_static_google_cloud_tasks_v2beta2_RateLimits_descriptor = @@ -129,11 +148,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MaxDoublings", "NumAttempts", }); + internal_static_google_cloud_tasks_v2beta2_QueueStats_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_tasks_v2beta2_QueueStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_QueueStats_descriptor, + new java.lang.String[] { + "TasksCount", + "OldestEstimatedArrivalTime", + "ExecutedLastMinuteCount", + "ConcurrentDispatchesCount", + "EffectiveExecutionRate", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.tasks.v2beta2.TargetProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStats.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStats.java new file mode 100644 index 00000000..9464aaa0 --- /dev/null +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStats.java @@ -0,0 +1,1180 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/queue.proto + +package com.google.cloud.tasks.v2beta2; + +/** + * + * + *
+ * Statistics for a queue.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.QueueStats} + */ +public final class QueueStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.QueueStats) + QueueStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueueStats.newBuilder() to construct. + private QueueStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueueStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueueStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private QueueStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + tasksCount_ = input.readInt64(); + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (oldestEstimatedArrivalTime_ != null) { + subBuilder = oldestEstimatedArrivalTime_.toBuilder(); + } + oldestEstimatedArrivalTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(oldestEstimatedArrivalTime_); + oldestEstimatedArrivalTime_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + executedLastMinuteCount_ = input.readInt64(); + break; + } + case 32: + { + concurrentDispatchesCount_ = input.readInt64(); + break; + } + case 41: + { + effectiveExecutionRate_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.QueueProto + .internal_static_google_cloud_tasks_v2beta2_QueueStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.QueueProto + .internal_static_google_cloud_tasks_v2beta2_QueueStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.QueueStats.class, + com.google.cloud.tasks.v2beta2.QueueStats.Builder.class); + } + + public static final int TASKS_COUNT_FIELD_NUMBER = 1; + private long tasksCount_; + /** + * + * + *
+   * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+   * the queue that haven't been executed, the tasks in the queue which the
+   * queue has dispatched but has not yet received a reply for, and the failed
+   * tasks that the queue is retrying.
+   * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tasksCount. + */ + @java.lang.Override + public long getTasksCount() { + return tasksCount_; + } + + public static final int OLDEST_ESTIMATED_ARRIVAL_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp oldestEstimatedArrivalTime_; + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the oldestEstimatedArrivalTime field is set. + */ + @java.lang.Override + public boolean hasOldestEstimatedArrivalTime() { + return oldestEstimatedArrivalTime_ != null; + } + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The oldestEstimatedArrivalTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getOldestEstimatedArrivalTime() { + return oldestEstimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestEstimatedArrivalTime_; + } + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getOldestEstimatedArrivalTimeOrBuilder() { + return getOldestEstimatedArrivalTime(); + } + + public static final int EXECUTED_LAST_MINUTE_COUNT_FIELD_NUMBER = 3; + private long executedLastMinuteCount_; + /** + * + * + *
+   * Output only. The number of tasks that the queue has dispatched and received a reply for
+   * during the last minute. This variable counts both successful and
+   * non-successful executions.
+   * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The executedLastMinuteCount. + */ + @java.lang.Override + public long getExecutedLastMinuteCount() { + return executedLastMinuteCount_; + } + + public static final int CONCURRENT_DISPATCHES_COUNT_FIELD_NUMBER = 4; + private long concurrentDispatchesCount_; + /** + * + * + *
+   * Output only. The number of requests that the queue has dispatched but has not received
+   * a reply for yet.
+   * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The concurrentDispatchesCount. + */ + @java.lang.Override + public long getConcurrentDispatchesCount() { + return concurrentDispatchesCount_; + } + + public static final int EFFECTIVE_EXECUTION_RATE_FIELD_NUMBER = 5; + private double effectiveExecutionRate_; + /** + * + * + *
+   * Output only. The current maximum number of tasks per second executed by the queue.
+   * The maximum value of this variable is controlled by the RateLimits of the
+   * Queue. However, this value could be less to avoid overloading the endpoints
+   * tasks in the queue are targeting.
+   * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The effectiveExecutionRate. + */ + @java.lang.Override + public double getEffectiveExecutionRate() { + return effectiveExecutionRate_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (tasksCount_ != 0L) { + output.writeInt64(1, tasksCount_); + } + if (oldestEstimatedArrivalTime_ != null) { + output.writeMessage(2, getOldestEstimatedArrivalTime()); + } + if (executedLastMinuteCount_ != 0L) { + output.writeInt64(3, executedLastMinuteCount_); + } + if (concurrentDispatchesCount_ != 0L) { + output.writeInt64(4, concurrentDispatchesCount_); + } + if (effectiveExecutionRate_ != 0D) { + output.writeDouble(5, effectiveExecutionRate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tasksCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, tasksCount_); + } + if (oldestEstimatedArrivalTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getOldestEstimatedArrivalTime()); + } + if (executedLastMinuteCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, executedLastMinuteCount_); + } + if (concurrentDispatchesCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, concurrentDispatchesCount_); + } + if (effectiveExecutionRate_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, effectiveExecutionRate_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta2.QueueStats)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.QueueStats other = + (com.google.cloud.tasks.v2beta2.QueueStats) obj; + + if (getTasksCount() != other.getTasksCount()) return false; + if (hasOldestEstimatedArrivalTime() != other.hasOldestEstimatedArrivalTime()) return false; + if (hasOldestEstimatedArrivalTime()) { + if (!getOldestEstimatedArrivalTime().equals(other.getOldestEstimatedArrivalTime())) + return false; + } + if (getExecutedLastMinuteCount() != other.getExecutedLastMinuteCount()) return false; + if (getConcurrentDispatchesCount() != other.getConcurrentDispatchesCount()) return false; + if (java.lang.Double.doubleToLongBits(getEffectiveExecutionRate()) + != java.lang.Double.doubleToLongBits(other.getEffectiveExecutionRate())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TASKS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTasksCount()); + if (hasOldestEstimatedArrivalTime()) { + hash = (37 * hash) + OLDEST_ESTIMATED_ARRIVAL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getOldestEstimatedArrivalTime().hashCode(); + } + hash = (37 * hash) + EXECUTED_LAST_MINUTE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getExecutedLastMinuteCount()); + hash = (37 * hash) + CONCURRENT_DISPATCHES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getConcurrentDispatchesCount()); + hash = (37 * hash) + EFFECTIVE_EXECUTION_RATE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getEffectiveExecutionRate())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.QueueStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Statistics for a queue.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.QueueStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.QueueStats) + com.google.cloud.tasks.v2beta2.QueueStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta2.QueueProto + .internal_static_google_cloud_tasks_v2beta2_QueueStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.QueueProto + .internal_static_google_cloud_tasks_v2beta2_QueueStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.QueueStats.class, + com.google.cloud.tasks.v2beta2.QueueStats.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.QueueStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + tasksCount_ = 0L; + + if (oldestEstimatedArrivalTimeBuilder_ == null) { + oldestEstimatedArrivalTime_ = null; + } else { + oldestEstimatedArrivalTime_ = null; + oldestEstimatedArrivalTimeBuilder_ = null; + } + executedLastMinuteCount_ = 0L; + + concurrentDispatchesCount_ = 0L; + + effectiveExecutionRate_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.QueueProto + .internal_static_google_cloud_tasks_v2beta2_QueueStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueueStats getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.QueueStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueueStats build() { + com.google.cloud.tasks.v2beta2.QueueStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueueStats buildPartial() { + com.google.cloud.tasks.v2beta2.QueueStats result = + new com.google.cloud.tasks.v2beta2.QueueStats(this); + result.tasksCount_ = tasksCount_; + if (oldestEstimatedArrivalTimeBuilder_ == null) { + result.oldestEstimatedArrivalTime_ = oldestEstimatedArrivalTime_; + } else { + result.oldestEstimatedArrivalTime_ = oldestEstimatedArrivalTimeBuilder_.build(); + } + result.executedLastMinuteCount_ = executedLastMinuteCount_; + result.concurrentDispatchesCount_ = concurrentDispatchesCount_; + result.effectiveExecutionRate_ = effectiveExecutionRate_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.QueueStats) { + return mergeFrom((com.google.cloud.tasks.v2beta2.QueueStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.QueueStats other) { + if (other == com.google.cloud.tasks.v2beta2.QueueStats.getDefaultInstance()) return this; + if (other.getTasksCount() != 0L) { + setTasksCount(other.getTasksCount()); + } + if (other.hasOldestEstimatedArrivalTime()) { + mergeOldestEstimatedArrivalTime(other.getOldestEstimatedArrivalTime()); + } + if (other.getExecutedLastMinuteCount() != 0L) { + setExecutedLastMinuteCount(other.getExecutedLastMinuteCount()); + } + if (other.getConcurrentDispatchesCount() != 0L) { + setConcurrentDispatchesCount(other.getConcurrentDispatchesCount()); + } + if (other.getEffectiveExecutionRate() != 0D) { + setEffectiveExecutionRate(other.getEffectiveExecutionRate()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.QueueStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.QueueStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long tasksCount_; + /** + * + * + *
+     * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+     * the queue that haven't been executed, the tasks in the queue which the
+     * queue has dispatched but has not yet received a reply for, and the failed
+     * tasks that the queue is retrying.
+     * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tasksCount. + */ + @java.lang.Override + public long getTasksCount() { + return tasksCount_; + } + /** + * + * + *
+     * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+     * the queue that haven't been executed, the tasks in the queue which the
+     * queue has dispatched but has not yet received a reply for, and the failed
+     * tasks that the queue is retrying.
+     * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tasksCount to set. + * @return This builder for chaining. + */ + public Builder setTasksCount(long value) { + + tasksCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+     * the queue that haven't been executed, the tasks in the queue which the
+     * queue has dispatched but has not yet received a reply for, and the failed
+     * tasks that the queue is retrying.
+     * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTasksCount() { + + tasksCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp oldestEstimatedArrivalTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + oldestEstimatedArrivalTimeBuilder_; + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the oldestEstimatedArrivalTime field is set. + */ + public boolean hasOldestEstimatedArrivalTime() { + return oldestEstimatedArrivalTimeBuilder_ != null || oldestEstimatedArrivalTime_ != null; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The oldestEstimatedArrivalTime. + */ + public com.google.protobuf.Timestamp getOldestEstimatedArrivalTime() { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + return oldestEstimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestEstimatedArrivalTime_; + } else { + return oldestEstimatedArrivalTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOldestEstimatedArrivalTime(com.google.protobuf.Timestamp value) { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oldestEstimatedArrivalTime_ = value; + onChanged(); + } else { + oldestEstimatedArrivalTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOldestEstimatedArrivalTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + oldestEstimatedArrivalTime_ = builderForValue.build(); + onChanged(); + } else { + oldestEstimatedArrivalTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOldestEstimatedArrivalTime(com.google.protobuf.Timestamp value) { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + if (oldestEstimatedArrivalTime_ != null) { + oldestEstimatedArrivalTime_ = + com.google.protobuf.Timestamp.newBuilder(oldestEstimatedArrivalTime_) + .mergeFrom(value) + .buildPartial(); + } else { + oldestEstimatedArrivalTime_ = value; + } + onChanged(); + } else { + oldestEstimatedArrivalTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOldestEstimatedArrivalTime() { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + oldestEstimatedArrivalTime_ = null; + onChanged(); + } else { + oldestEstimatedArrivalTime_ = null; + oldestEstimatedArrivalTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getOldestEstimatedArrivalTimeBuilder() { + + onChanged(); + return getOldestEstimatedArrivalTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getOldestEstimatedArrivalTimeOrBuilder() { + if (oldestEstimatedArrivalTimeBuilder_ != null) { + return oldestEstimatedArrivalTimeBuilder_.getMessageOrBuilder(); + } else { + return oldestEstimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestEstimatedArrivalTime_; + } + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getOldestEstimatedArrivalTimeFieldBuilder() { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + oldestEstimatedArrivalTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getOldestEstimatedArrivalTime(), getParentForChildren(), isClean()); + oldestEstimatedArrivalTime_ = null; + } + return oldestEstimatedArrivalTimeBuilder_; + } + + private long executedLastMinuteCount_; + /** + * + * + *
+     * Output only. The number of tasks that the queue has dispatched and received a reply for
+     * during the last minute. This variable counts both successful and
+     * non-successful executions.
+     * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The executedLastMinuteCount. + */ + @java.lang.Override + public long getExecutedLastMinuteCount() { + return executedLastMinuteCount_; + } + /** + * + * + *
+     * Output only. The number of tasks that the queue has dispatched and received a reply for
+     * during the last minute. This variable counts both successful and
+     * non-successful executions.
+     * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The executedLastMinuteCount to set. + * @return This builder for chaining. + */ + public Builder setExecutedLastMinuteCount(long value) { + + executedLastMinuteCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of tasks that the queue has dispatched and received a reply for
+     * during the last minute. This variable counts both successful and
+     * non-successful executions.
+     * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearExecutedLastMinuteCount() { + + executedLastMinuteCount_ = 0L; + onChanged(); + return this; + } + + private long concurrentDispatchesCount_; + /** + * + * + *
+     * Output only. The number of requests that the queue has dispatched but has not received
+     * a reply for yet.
+     * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The concurrentDispatchesCount. + */ + @java.lang.Override + public long getConcurrentDispatchesCount() { + return concurrentDispatchesCount_; + } + /** + * + * + *
+     * Output only. The number of requests that the queue has dispatched but has not received
+     * a reply for yet.
+     * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The concurrentDispatchesCount to set. + * @return This builder for chaining. + */ + public Builder setConcurrentDispatchesCount(long value) { + + concurrentDispatchesCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of requests that the queue has dispatched but has not received
+     * a reply for yet.
+     * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearConcurrentDispatchesCount() { + + concurrentDispatchesCount_ = 0L; + onChanged(); + return this; + } + + private double effectiveExecutionRate_; + /** + * + * + *
+     * Output only. The current maximum number of tasks per second executed by the queue.
+     * The maximum value of this variable is controlled by the RateLimits of the
+     * Queue. However, this value could be less to avoid overloading the endpoints
+     * tasks in the queue are targeting.
+     * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveExecutionRate. + */ + @java.lang.Override + public double getEffectiveExecutionRate() { + return effectiveExecutionRate_; + } + /** + * + * + *
+     * Output only. The current maximum number of tasks per second executed by the queue.
+     * The maximum value of this variable is controlled by the RateLimits of the
+     * Queue. However, this value could be less to avoid overloading the endpoints
+     * tasks in the queue are targeting.
+     * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The effectiveExecutionRate to set. + * @return This builder for chaining. + */ + public Builder setEffectiveExecutionRate(double value) { + + effectiveExecutionRate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current maximum number of tasks per second executed by the queue.
+     * The maximum value of this variable is controlled by the RateLimits of the
+     * Queue. However, this value could be less to avoid overloading the endpoints
+     * tasks in the queue are targeting.
+     * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffectiveExecutionRate() { + + effectiveExecutionRate_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.QueueStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.QueueStats) + private static final com.google.cloud.tasks.v2beta2.QueueStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.QueueStats(); + } + + public static com.google.cloud.tasks.v2beta2.QueueStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueueStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueueStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta2.QueueStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStatsOrBuilder.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStatsOrBuilder.java new file mode 100644 index 00000000..d65aa3fd --- /dev/null +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStatsOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/queue.proto + +package com.google.cloud.tasks.v2beta2; + +public interface QueueStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.QueueStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+   * the queue that haven't been executed, the tasks in the queue which the
+   * queue has dispatched but has not yet received a reply for, and the failed
+   * tasks that the queue is retrying.
+   * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tasksCount. + */ + long getTasksCount(); + + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the oldestEstimatedArrivalTime field is set. + */ + boolean hasOldestEstimatedArrivalTime(); + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The oldestEstimatedArrivalTime. + */ + com.google.protobuf.Timestamp getOldestEstimatedArrivalTime(); + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getOldestEstimatedArrivalTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The number of tasks that the queue has dispatched and received a reply for
+   * during the last minute. This variable counts both successful and
+   * non-successful executions.
+   * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The executedLastMinuteCount. + */ + long getExecutedLastMinuteCount(); + + /** + * + * + *
+   * Output only. The number of requests that the queue has dispatched but has not received
+   * a reply for yet.
+   * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The concurrentDispatchesCount. + */ + long getConcurrentDispatchesCount(); + + /** + * + * + *
+   * Output only. The current maximum number of tasks per second executed by the queue.
+   * The maximum value of this variable is controlled by the RateLimits of the
+   * Queue. However, this value could be less to avoid overloading the endpoints
+   * tasks in the queue are targeting.
+   * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The effectiveExecutionRate. + */ + double getEffectiveExecutionRate(); +} diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java index 2fe4296d..40f1d735 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java @@ -155,7 +155,7 @@ public double getMaxTasksDispatchedPerSecond() { * * *
-   * Output only. The max burst size.
+   * The max burst size.
    * Max burst size limits how fast tasks in queue are processed when
    * many tasks are in the queue and the rate is high. This field
    * allows the queue to have a high rate so processing starts shortly
@@ -168,21 +168,20 @@ public double getMaxTasksDispatchedPerSecond() {
    * token is removed from the bucket. Tasks will be dispatched until
    * the queue's bucket runs out of tokens. The bucket will be
    * continuously refilled with new tokens based on
-   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
-   * Cloud Tasks will pick the value of `max_burst_size` based on the
-   * value of
-   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+   * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+   * The default value of `max_burst_size` is picked by Cloud Tasks
+   * based on the value of
+   * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+   * The maximum value of `max_burst_size` is 500.
    * For App Engine queues that were created or updated using
    * `queue.yaml/xml`, `max_burst_size` is equal to
    * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-   * Since `max_burst_size` is output only, if
-   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
-   * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-   * on the value of
-   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
-   * regardless of whether
-   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
-   * is updated.
+   * If
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue without
+   * explicitly setting a value for `max_burst_size`,
+   * `max_burst_size` value will get updated if
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is updating
+   * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
    * 
* * int32 max_burst_size = 2; @@ -665,7 +664,7 @@ public Builder clearMaxTasksDispatchedPerSecond() { * * *
-     * Output only. The max burst size.
+     * The max burst size.
      * Max burst size limits how fast tasks in queue are processed when
      * many tasks are in the queue and the rate is high. This field
      * allows the queue to have a high rate so processing starts shortly
@@ -678,21 +677,20 @@ public Builder clearMaxTasksDispatchedPerSecond() {
      * token is removed from the bucket. Tasks will be dispatched until
      * the queue's bucket runs out of tokens. The bucket will be
      * continuously refilled with new tokens based on
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
-     * Cloud Tasks will pick the value of `max_burst_size` based on the
-     * value of
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+     * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+     * The default value of `max_burst_size` is picked by Cloud Tasks
+     * based on the value of
+     * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+     * The maximum value of `max_burst_size` is 500.
      * For App Engine queues that were created or updated using
      * `queue.yaml/xml`, `max_burst_size` is equal to
      * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-     * Since `max_burst_size` is output only, if
-     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
-     * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-     * on the value of
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
-     * regardless of whether
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
-     * is updated.
+     * If
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue without
+     * explicitly setting a value for `max_burst_size`,
+     * `max_burst_size` value will get updated if
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is updating
+     * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
      * 
* * int32 max_burst_size = 2; @@ -707,7 +705,7 @@ public int getMaxBurstSize() { * * *
-     * Output only. The max burst size.
+     * The max burst size.
      * Max burst size limits how fast tasks in queue are processed when
      * many tasks are in the queue and the rate is high. This field
      * allows the queue to have a high rate so processing starts shortly
@@ -720,21 +718,20 @@ public int getMaxBurstSize() {
      * token is removed from the bucket. Tasks will be dispatched until
      * the queue's bucket runs out of tokens. The bucket will be
      * continuously refilled with new tokens based on
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
-     * Cloud Tasks will pick the value of `max_burst_size` based on the
-     * value of
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+     * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+     * The default value of `max_burst_size` is picked by Cloud Tasks
+     * based on the value of
+     * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+     * The maximum value of `max_burst_size` is 500.
      * For App Engine queues that were created or updated using
      * `queue.yaml/xml`, `max_burst_size` is equal to
      * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-     * Since `max_burst_size` is output only, if
-     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
-     * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-     * on the value of
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
-     * regardless of whether
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
-     * is updated.
+     * If
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue without
+     * explicitly setting a value for `max_burst_size`,
+     * `max_burst_size` value will get updated if
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is updating
+     * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
      * 
* * int32 max_burst_size = 2; @@ -752,7 +749,7 @@ public Builder setMaxBurstSize(int value) { * * *
-     * Output only. The max burst size.
+     * The max burst size.
      * Max burst size limits how fast tasks in queue are processed when
      * many tasks are in the queue and the rate is high. This field
      * allows the queue to have a high rate so processing starts shortly
@@ -765,21 +762,20 @@ public Builder setMaxBurstSize(int value) {
      * token is removed from the bucket. Tasks will be dispatched until
      * the queue's bucket runs out of tokens. The bucket will be
      * continuously refilled with new tokens based on
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
-     * Cloud Tasks will pick the value of `max_burst_size` based on the
-     * value of
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+     * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+     * The default value of `max_burst_size` is picked by Cloud Tasks
+     * based on the value of
+     * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+     * The maximum value of `max_burst_size` is 500.
      * For App Engine queues that were created or updated using
      * `queue.yaml/xml`, `max_burst_size` is equal to
      * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-     * Since `max_burst_size` is output only, if
-     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
-     * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-     * on the value of
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
-     * regardless of whether
-     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
-     * is updated.
+     * If
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue without
+     * explicitly setting a value for `max_burst_size`,
+     * `max_burst_size` value will get updated if
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is updating
+     * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
      * 
* * int32 max_burst_size = 2; diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java index e7610a13..373ee8d6 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java @@ -50,7 +50,7 @@ public interface RateLimitsOrBuilder * * *
-   * Output only. The max burst size.
+   * The max burst size.
    * Max burst size limits how fast tasks in queue are processed when
    * many tasks are in the queue and the rate is high. This field
    * allows the queue to have a high rate so processing starts shortly
@@ -63,21 +63,20 @@ public interface RateLimitsOrBuilder
    * token is removed from the bucket. Tasks will be dispatched until
    * the queue's bucket runs out of tokens. The bucket will be
    * continuously refilled with new tokens based on
-   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
-   * Cloud Tasks will pick the value of `max_burst_size` based on the
-   * value of
-   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+   * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+   * The default value of `max_burst_size` is picked by Cloud Tasks
+   * based on the value of
+   * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
+   * The maximum value of `max_burst_size` is 500.
    * For App Engine queues that were created or updated using
    * `queue.yaml/xml`, `max_burst_size` is equal to
    * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-   * Since `max_burst_size` is output only, if
-   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
-   * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-   * on the value of
-   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
-   * regardless of whether
-   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
-   * is updated.
+   * If
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue without
+   * explicitly setting a value for `max_burst_size`,
+   * `max_burst_size` value will get updated if
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is updating
+   * [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
    * 
* * int32 max_burst_size = 2; diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfig.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfig.java index eba7eecc..e9c6a638 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfig.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfig.java @@ -510,7 +510,7 @@ public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder() { * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, @@ -2011,7 +2011,7 @@ public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder() { * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, @@ -2047,7 +2047,7 @@ public int getMaxDoublings() { * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, @@ -2086,7 +2086,7 @@ public Builder setMaxDoublings(int value) { * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, diff --git a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfigOrBuilder.java b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfigOrBuilder.java index 43871870..6e985248 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfigOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfigOrBuilder.java @@ -270,7 +270,7 @@ public interface RetryConfigOrBuilder * A task's retry interval starts at * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of + * retries at intervals of * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, diff --git a/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto b/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto index afea6919..8b2fa57e 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto +++ b/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -431,6 +430,12 @@ message ListQueuesRequest { // method. It is an error to switch the value of the // [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages. string page_token = 4; + + // Optional. Read mask is used for a more granular control over what the API returns. + // If the mask is not present all fields will be returned except + // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + // specified in the mask. + google.protobuf.FieldMask read_mask = 5 [(google.api.field_behavior) = OPTIONAL]; } // Response message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. @@ -460,6 +465,12 @@ message GetQueueRequest { type: "cloudtasks.googleapis.com/Queue" } ]; + + // Optional. Read mask is used for a more granular control over what the API returns. + // If the mask is not present all fields will be returned except + // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + // specified in the mask. + google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. diff --git a/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto b/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto index 212ab738..1cc44651 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto +++ b/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,12 @@ // 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. -// syntax = "proto3"; package google.cloud.tasks.v2beta2; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/tasks/v2beta2/target.proto"; import "google/protobuf/duration.proto"; @@ -168,6 +168,37 @@ message Queue { // Purge time will be truncated to the nearest microsecond. Purge // time will be unset if the queue has never been purged. google.protobuf.Timestamp purge_time = 8; + + // The maximum amount of time that a task will be retained in + // this queue. + // + // Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + // After a task has lived for `task_ttl`, the task will be deleted + // regardless of whether it was dispatched or not. + // + // The `task_ttl` for queues created via queue.yaml/xml is equal to the + // maximum duration because there is a + // [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + // these queues. To view the maximum valid duration, see the documentation for + // [Duration][google.protobuf.Duration]. + google.protobuf.Duration task_ttl = 9; + + // The task tombstone time to live (TTL). + // + // After a task is deleted or completed, the task's tombstone is + // retained for the length of time specified by `tombstone_ttl`. + // The tombstone is used by task de-duplication; another task with the same + // name can't be created until the tombstone has expired. For more information + // about task de-duplication, see the documentation for + // [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. + // + // Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + google.protobuf.Duration tombstone_ttl = 10; + + // Output only. The realtime, informational statistics for a queue. In order + // to receive the statistics the caller should include this field in the + // FieldMask. + QueueStats stats = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Rate limits. @@ -195,7 +226,7 @@ message RateLimits { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). double max_tasks_dispatched_per_second = 1; - // Output only. The max burst size. + // The max burst size. // // Max burst size limits how fast tasks in queue are processed when // many tasks are in the queue and the rate is high. This field @@ -210,23 +241,23 @@ message RateLimits { // token is removed from the bucket. Tasks will be dispatched until // the queue's bucket runs out of tokens. The bucket will be // continuously refilled with new tokens based on - // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]. + // [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + // + // The default value of `max_burst_size` is picked by Cloud Tasks + // based on the value of + // [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. // - // Cloud Tasks will pick the value of `max_burst_size` based on the - // value of - // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]. + // The maximum value of `max_burst_size` is 500. // // For App Engine queues that were created or updated using // `queue.yaml/xml`, `max_burst_size` is equal to // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - // Since `max_burst_size` is output only, if - // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue - // created by `queue.yaml/xml`, `max_burst_size` will be reset based - // on the value of - // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second], - // regardless of whether - // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] - // is updated. + // If + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue without + // explicitly setting a value for `max_burst_size`, + // `max_burst_size` value will get updated if + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is updating + // [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. // int32 max_burst_size = 2; @@ -343,7 +374,7 @@ message RetryConfig { // A task's retry interval starts at // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles // `max_doublings` times, then increases linearly, and finally - // retries retries at intervals of + // retries at intervals of // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. // @@ -368,3 +399,31 @@ message RetryConfig { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). int32 max_doublings = 6; } + +// Statistics for a queue. +message QueueStats { + // Output only. An estimation of the number of tasks in the queue, that is, the tasks in + // the queue that haven't been executed, the tasks in the queue which the + // queue has dispatched but has not yet received a reply for, and the failed + // tasks that the queue is retrying. + int64 tasks_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An estimation of the nearest time in the future where a task in the queue + // is scheduled to be executed. + google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of tasks that the queue has dispatched and received a reply for + // during the last minute. This variable counts both successful and + // non-successful executions. + int64 executed_last_minute_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of requests that the queue has dispatched but has not received + // a reply for yet. + int64 concurrent_dispatches_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current maximum number of tasks per second executed by the queue. + // The maximum value of this variable is controlled by the RateLimits of the + // Queue. However, this value could be less to avoid overloading the endpoints + // tasks in the queue are targeting. + double effective_execution_rate = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto b/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto index decdbaf8..09c8fd78 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto +++ b/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; @@ -115,10 +114,10 @@ message AppEngineHttpTarget { // delivered to can be set at the queue-level or task-level: // // * If set, -// [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] -// is used for all tasks in the queue, no matter what the setting -// is for the -// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. +// [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] +// is used for all tasks in the queue, no matter what the setting +// is for the +// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. // // // The `url` that the task will be sent to is: @@ -151,14 +150,11 @@ message AppEngineHttpRequest { // The HTTP method to use for the request. The default is POST. // // The app's request handler for the task's target URL must be able to handle - // HTTP requests with this http_method, otherwise the task attempt will fail - // with error code 405 (Method Not Allowed). See - // [Writing a push task request + // HTTP requests with this http_method, otherwise the task attempt fails with + // error code 405 (Method Not Allowed). See [Writing a push task request // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - // and the documentation for the request handlers in the language your app is - // written in e.g. - // [Python Request - // Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass). + // and the App Engine documentation for your runtime on [How Requests are + // Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). HttpMethod http_method = 1; // Task-level setting for App Engine routing. diff --git a/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto b/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto index 9a927462..873a6f93 100644 --- a/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto +++ b/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // 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. -// syntax = "proto3"; diff --git a/synth.metadata b/synth.metadata index 89d06010..27b167ee 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-tasks.git", - "sha": "77bf9dc5d1b625f76cb8a1e1cb195bfbbf3eaa01" + "sha": "af2a6dad18df41fab32a56925ead49b769cb394e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "d7b8108668f224c8dc3b87c7f7a9afe78d3cafaf", + "internalRef": "353031255" } }, { @@ -267,6 +267,8 @@ "proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueName.java", "proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java", "proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java", + "proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStats.java", + "proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueStatsOrBuilder.java", "proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java", "proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java", "proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequest.java", From 014fa082554d7b377b720e3d2f23fb511044fe27 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Thu, 21 Jan 2021 15:00:45 -0800 Subject: [PATCH 2/2] feat: introducing field: ListQueuesRequest.read_mask, GetQueueRequest.read_mask, Queue.task_ttl, Queue.tombstone_ttl, Queue.stats, Task.pull_message and introducing messages: QueueStats PullMessage docs: updates to max burst size description PiperOrigin-RevId: 353032056 Source-Author: Google APIs Source-Date: Thu Jan 21 09:07:59 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: a0b91c3dfa479290ed8921fea27020ac4c492763 Source-Link: https://github.com/googleapis/googleapis/commit/a0b91c3dfa479290ed8921fea27020ac4c492763 --- .../v2beta3/stub/CloudTasksStubSettings.java | 12 +- .../tasks/v2beta3/CloudTasksClientTest.java | 33 + .../cloud/tasks/v2beta3/CloudTasksProto.java | 237 ++-- .../cloud/tasks/v2beta3/GetQueueRequest.java | 316 +++++ .../v2beta3/GetQueueRequestOrBuilder.java | 47 + .../tasks/v2beta3/ListQueuesRequest.java | 316 +++++ .../v2beta3/ListQueuesRequestOrBuilder.java | 47 + .../cloud/tasks/v2beta3/PullMessage.java | 782 +++++++++++ .../tasks/v2beta3/PullMessageOrBuilder.java | 75 ++ .../com/google/cloud/tasks/v2beta3/Queue.java | 1059 +++++++++++++++ .../cloud/tasks/v2beta3/QueueOrBuilder.java | 165 +++ .../cloud/tasks/v2beta3/QueueProto.java | 77 +- .../cloud/tasks/v2beta3/QueueStats.java | 1180 +++++++++++++++++ .../tasks/v2beta3/QueueStatsOrBuilder.java | 131 ++ .../cloud/tasks/v2beta3/RateLimits.java | 84 +- .../tasks/v2beta3/RateLimitsOrBuilder.java | 21 +- .../cloud/tasks/v2beta3/TargetProto.java | 89 +- .../com/google/cloud/tasks/v2beta3/Task.java | 379 ++++++ .../cloud/tasks/v2beta3/TaskOrBuilder.java | 53 + .../google/cloud/tasks/v2beta3/TaskProto.java | 51 +- .../cloud/tasks/v2beta3/cloudtasks.proto | 12 + .../google/cloud/tasks/v2beta3/queue.proto | 81 +- .../google/cloud/tasks/v2beta3/target.proto | 24 + .../google/cloud/tasks/v2beta3/task.proto | 9 + synth.metadata | 8 +- 25 files changed, 5011 insertions(+), 277 deletions(-) create mode 100644 proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessage.java create mode 100644 proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessageOrBuilder.java create mode 100644 proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStats.java create mode 100644 proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStatsOrBuilder.java diff --git a/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java b/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java index d0d46c0e..521debc6 100644 --- a/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java +++ b/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta3/stub/CloudTasksStubSettings.java @@ -457,18 +457,18 @@ public static class Builder extends StubSettings.Builder" - + "\202\323\344\223\0021\022//v2beta3/{name=projects/*/locati" - + "ons/*/queues/*}\332A\004name\022\257\001\n\013CreateQueue\022." - + ".google.cloud.tasks.v2beta3.CreateQueueR" - + "equest\032!.google.cloud.tasks.v2beta3.Queu" - + "e\"M\202\323\344\223\0028\"//v2beta3/{parent=projects/*/l" - + "ocations/*}/queues:\005queue\332A\014parent,queue" - + "\022\272\001\n\013UpdateQueue\022..google.cloud.tasks.v2" - + "beta3.UpdateQueueRequest\032!.google.cloud." - + "tasks.v2beta3.Queue\"X\202\323\344\223\002>25/v2beta3/{q" - + "ueue.name=projects/*/locations/*/queues/" - + "*}:\005queue\332A\021queue,update_mask\022\225\001\n\013Delete" - + "Queue\022..google.cloud.tasks.v2beta3.Delet" - + "eQueueRequest\032\026.google.protobuf.Empty\">\202" - + "\323\344\223\0021*//v2beta3/{name=projects/*/locatio" - + "ns/*/queues/*}\332A\004name\022\247\001\n\nPurgeQueue\022-.g" - + "oogle.cloud.tasks.v2beta3.PurgeQueueRequ" - + "est\032!.google.cloud.tasks.v2beta3.Queue\"G" - + "\202\323\344\223\002:\"5/v2beta3/{name=projects/*/locati" - + "ons/*/queues/*}:purge:\001*\332A\004name\022\247\001\n\nPaus" - + "eQueue\022-.google.cloud.tasks.v2beta3.Paus" - + "eQueueRequest\032!.google.cloud.tasks.v2bet" - + "a3.Queue\"G\202\323\344\223\002:\"5/v2beta3/{name=project" - + "s/*/locations/*/queues/*}:pause:\001*\332A\004nam" - + "e\022\252\001\n\013ResumeQueue\022..google.cloud.tasks.v" - + "2beta3.ResumeQueueRequest\032!.google.cloud" - + ".tasks.v2beta3.Queue\"H\202\323\344\223\002;\"6/v2beta3/{" - + "name=projects/*/locations/*/queues/*}:re" - + "sume:\001*\332A\004name\022\241\001\n\014GetIamPolicy\022\".google" - + ".iam.v1.GetIamPolicyRequest\032\025.google.iam" - + ".v1.Policy\"V\202\323\344\223\002E\"@/v2beta3/{resource=p" - + "rojects/*/locations/*/queues/*}:getIamPo" - + "licy:\001*\332A\010resource\022\250\001\n\014SetIamPolicy\022\".go" - + "ogle.iam.v1.SetIamPolicyRequest\032\025.google" - + ".iam.v1.Policy\"]\202\323\344\223\002E\"@/v2beta3/{resour" - + "ce=projects/*/locations/*/queues/*}:setI" - + "amPolicy:\001*\332A\017resource,policy\022\323\001\n\022TestIa" - + "mPermissions\022(.google.iam.v1.TestIamPerm" - + "issionsRequest\032).google.iam.v1.TestIamPe" - + "rmissionsResponse\"h\202\323\344\223\002K\"F/v2beta3/{res" - + "ource=projects/*/locations/*/queues/*}:t" - + "estIamPermissions:\001*\332A\024resource,permissi" - + "ons\022\262\001\n\tListTasks\022,.google.cloud.tasks.v" - + "2beta3.ListTasksRequest\032-.google.cloud.t" - + "asks.v2beta3.ListTasksResponse\"H\202\323\344\223\0029\0227" - + "/v2beta3/{parent=projects/*/locations/*/" - + "queues/*}/tasks\332A\006parent\022\237\001\n\007GetTask\022*.g" - + "oogle.cloud.tasks.v2beta3.GetTaskRequest" - + "\032 .google.cloud.tasks.v2beta3.Task\"F\202\323\344\223" - + "\0029\0227/v2beta3/{name=projects/*/locations/" - + "*/queues/*/tasks/*}\332A\004name\022\257\001\n\nCreateTas" - + "k\022-.google.cloud.tasks.v2beta3.CreateTas" - + "kRequest\032 .google.cloud.tasks.v2beta3.Ta" - + "sk\"P\202\323\344\223\002<\"7/v2beta3/{parent=projects/*/" - + "locations/*/queues/*}/tasks:\001*\332A\013parent," - + "task\022\233\001\n\nDeleteTask\022-.google.cloud.tasks" - + ".v2beta3.DeleteTaskRequest\032\026.google.prot" - + "obuf.Empty\"F\202\323\344\223\0029*7/v2beta3/{name=proje" - + "cts/*/locations/*/queues/*/tasks/*}\332A\004na" - + "me\022\246\001\n\007RunTask\022*.google.cloud.tasks.v2be" - + "ta3.RunTaskRequest\032 .google.cloud.tasks." - + "v2beta3.Task\"M\202\323\344\223\002@\";/v2beta3/{name=pro" - + "jects/*/locations/*/queues/*/tasks/*}:ru" - + "n:\001*\332A\004name\032M\312A\031cloudtasks.googleapis.co" - + "m\322A.https://www.googleapis.com/auth/clou" - + "d-platformB|\n\036com.google.cloud.tasks.v2b" - + "eta3B\017CloudTasksProtoP\001Z?google.golang.o" - + "rg/genproto/googleapis/cloud/tasks/v2bet" - + "a3;tasks\242\002\005TASKSb\006proto3" + + " \001(\t\0222\n\tread_mask\030\005 \001(\0132\032.google.protobu" + + "f.FieldMaskB\003\340A\001\"`\n\022ListQueuesResponse\0221" + + "\n\006queues\030\001 \003(\0132!.google.cloud.tasks.v2be" + + "ta3.Queue\022\027\n\017next_page_token\030\002 \001(\t\"|\n\017Ge" + + "tQueueRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037clo" + + "udtasks.googleapis.com/Queue\0222\n\tread_mas" + + "k\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001" + + "\"\204\001\n\022CreateQueueRequest\0227\n\006parent\030\001 \001(\tB" + + "\'\340A\002\372A!\022\037cloudtasks.googleapis.com/Queue" + + "\0225\n\005queue\030\002 \001(\0132!.google.cloud.tasks.v2b" + + "eta3.QueueB\003\340A\002\"|\n\022UpdateQueueRequest\0225\n" + + "\005queue\030\001 \001(\0132!.google.cloud.tasks.v2beta" + + "3.QueueB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.goog" + + "le.protobuf.FieldMask\"K\n\022DeleteQueueRequ" + + "est\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037cloudtasks.go" + + "ogleapis.com/Queue\"J\n\021PurgeQueueRequest\022" + + "5\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037cloudtasks.google" + + "apis.com/Queue\"J\n\021PauseQueueRequest\0225\n\004n" + + "ame\030\001 \001(\tB\'\340A\002\372A!\n\037cloudtasks.googleapis" + + ".com/Queue\"K\n\022ResumeQueueRequest\0225\n\004name" + + "\030\001 \001(\tB\'\340A\002\372A!\n\037cloudtasks.googleapis.co" + + "m/Queue\"\257\001\n\020ListTasksRequest\0226\n\006parent\030\001" + + " \001(\tB&\340A\002\372A \022\036cloudtasks.googleapis.com/" + + "Task\022<\n\rresponse_view\030\002 \001(\0162%.google.clo" + + "ud.tasks.v2beta3.Task.View\022\021\n\tpage_size\030" + + "\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"]\n\021ListTasksRe" + + "sponse\022/\n\005tasks\030\001 \003(\0132 .google.cloud.tas" + + "ks.v2beta3.Task\022\027\n\017next_page_token\030\002 \001(\t" + + "\"\204\001\n\016GetTaskRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A" + + " \n\036cloudtasks.googleapis.com/Task\022<\n\rres" + + "ponse_view\030\002 \001(\0162%.google.cloud.tasks.v2" + + "beta3.Task.View\"\276\001\n\021CreateTaskRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A \022\036cloudtasks.google" + + "apis.com/Task\0223\n\004task\030\002 \001(\0132 .google.clo" + + "ud.tasks.v2beta3.TaskB\003\340A\002\022<\n\rresponse_v" + + "iew\030\003 \001(\0162%.google.cloud.tasks.v2beta3.T" + + "ask.View\"I\n\021DeleteTaskRequest\0224\n\004name\030\001 " + + "\001(\tB&\340A\002\372A \n\036cloudtasks.googleapis.com/T" + + "ask\"\204\001\n\016RunTaskRequest\0224\n\004name\030\001 \001(\tB&\340A" + + "\002\372A \n\036cloudtasks.googleapis.com/Task\022<\n\r" + + "response_view\030\002 \001(\0162%.google.cloud.tasks" + + ".v2beta3.Task.View2\245\026\n\nCloudTasks\022\255\001\n\nLi" + + "stQueues\022-.google.cloud.tasks.v2beta3.Li" + + "stQueuesRequest\032..google.cloud.tasks.v2b" + + "eta3.ListQueuesResponse\"@\202\323\344\223\0021\022//v2beta" + + "3/{parent=projects/*/locations/*}/queues" + + "\332A\006parent\022\232\001\n\010GetQueue\022+.google.cloud.ta" + + "sks.v2beta3.GetQueueRequest\032!.google.clo" + + "ud.tasks.v2beta3.Queue\">\202\323\344\223\0021\022//v2beta3" + + "/{name=projects/*/locations/*/queues/*}\332" + + "A\004name\022\257\001\n\013CreateQueue\022..google.cloud.ta" + + "sks.v2beta3.CreateQueueRequest\032!.google." + + "cloud.tasks.v2beta3.Queue\"M\202\323\344\223\0028\"//v2be" + + "ta3/{parent=projects/*/locations/*}/queu" + + "es:\005queue\332A\014parent,queue\022\272\001\n\013UpdateQueue" + + "\022..google.cloud.tasks.v2beta3.UpdateQueu" + + "eRequest\032!.google.cloud.tasks.v2beta3.Qu" + + "eue\"X\202\323\344\223\002>25/v2beta3/{queue.name=projec" + + "ts/*/locations/*/queues/*}:\005queue\332A\021queu" + + "e,update_mask\022\225\001\n\013DeleteQueue\022..google.c" + + "loud.tasks.v2beta3.DeleteQueueRequest\032\026." + + "google.protobuf.Empty\">\202\323\344\223\0021*//v2beta3/" + + "{name=projects/*/locations/*/queues/*}\332A" + + "\004name\022\247\001\n\nPurgeQueue\022-.google.cloud.task" + + "s.v2beta3.PurgeQueueRequest\032!.google.clo" + + "ud.tasks.v2beta3.Queue\"G\202\323\344\223\002:\"5/v2beta3" + + "/{name=projects/*/locations/*/queues/*}:" + + "purge:\001*\332A\004name\022\247\001\n\nPauseQueue\022-.google." + + "cloud.tasks.v2beta3.PauseQueueRequest\032!." + + "google.cloud.tasks.v2beta3.Queue\"G\202\323\344\223\002:" + + "\"5/v2beta3/{name=projects/*/locations/*/" + + "queues/*}:pause:\001*\332A\004name\022\252\001\n\013ResumeQueu" + + "e\022..google.cloud.tasks.v2beta3.ResumeQue" + + "ueRequest\032!.google.cloud.tasks.v2beta3.Q" + + "ueue\"H\202\323\344\223\002;\"6/v2beta3/{name=projects/*/" + + "locations/*/queues/*}:resume:\001*\332A\004name\022\241" + + "\001\n\014GetIamPolicy\022\".google.iam.v1.GetIamPo" + + "licyRequest\032\025.google.iam.v1.Policy\"V\202\323\344\223" + + "\002E\"@/v2beta3/{resource=projects/*/locati" + + "ons/*/queues/*}:getIamPolicy:\001*\332A\010resour" + + "ce\022\250\001\n\014SetIamPolicy\022\".google.iam.v1.SetI" + + "amPolicyRequest\032\025.google.iam.v1.Policy\"]" + + "\202\323\344\223\002E\"@/v2beta3/{resource=projects/*/lo" + + "cations/*/queues/*}:setIamPolicy:\001*\332A\017re" + + "source,policy\022\323\001\n\022TestIamPermissions\022(.g" + + "oogle.iam.v1.TestIamPermissionsRequest\032)" + + ".google.iam.v1.TestIamPermissionsRespons" + + "e\"h\202\323\344\223\002K\"F/v2beta3/{resource=projects/*" + + "/locations/*/queues/*}:testIamPermission" + + "s:\001*\332A\024resource,permissions\022\262\001\n\tListTask" + + "s\022,.google.cloud.tasks.v2beta3.ListTasks" + + "Request\032-.google.cloud.tasks.v2beta3.Lis" + + "tTasksResponse\"H\202\323\344\223\0029\0227/v2beta3/{parent" + + "=projects/*/locations/*/queues/*}/tasks\332" + + "A\006parent\022\237\001\n\007GetTask\022*.google.cloud.task" + + "s.v2beta3.GetTaskRequest\032 .google.cloud." + + "tasks.v2beta3.Task\"F\202\323\344\223\0029\0227/v2beta3/{na" + + "me=projects/*/locations/*/queues/*/tasks" + + "/*}\332A\004name\022\257\001\n\nCreateTask\022-.google.cloud" + + ".tasks.v2beta3.CreateTaskRequest\032 .googl" + + "e.cloud.tasks.v2beta3.Task\"P\202\323\344\223\002<\"7/v2b" + + "eta3/{parent=projects/*/locations/*/queu" + + "es/*}/tasks:\001*\332A\013parent,task\022\233\001\n\nDeleteT" + + "ask\022-.google.cloud.tasks.v2beta3.DeleteT" + + "askRequest\032\026.google.protobuf.Empty\"F\202\323\344\223" + + "\0029*7/v2beta3/{name=projects/*/locations/" + + "*/queues/*/tasks/*}\332A\004name\022\246\001\n\007RunTask\022*" + + ".google.cloud.tasks.v2beta3.RunTaskReque" + + "st\032 .google.cloud.tasks.v2beta3.Task\"M\202\323" + + "\344\223\002@\";/v2beta3/{name=projects/*/location" + + "s/*/queues/*/tasks/*}:run:\001*\332A\004name\032M\312A\031" + + "cloudtasks.googleapis.com\322A.https://www." + + "googleapis.com/auth/cloud-platformB|\n\036co" + + "m.google.cloud.tasks.v2beta3B\017CloudTasks" + + "ProtoP\001Z?google.golang.org/genproto/goog" + + "leapis/cloud/tasks/v2beta3;tasks\242\002\005TASKS" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -245,7 +248,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_ListQueuesRequest_descriptor, new java.lang.String[] { - "Parent", "Filter", "PageSize", "PageToken", + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_tasks_v2beta3_ListQueuesResponse_descriptor = getDescriptor().getMessageTypes().get(1); @@ -261,7 +264,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_GetQueueRequest_descriptor, new java.lang.String[] { - "Name", + "Name", "ReadMask", }); internal_static_google_cloud_tasks_v2beta3_CreateQueueRequest_descriptor = getDescriptor().getMessageTypes().get(3); diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequest.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequest.java index 71c68f63..a73f9251 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequest.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequest.java @@ -75,6 +75,21 @@ private GetQueueRequest( java.lang.String s = input.readStringRequireUtf8(); name_ = s; + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + break; } default: @@ -166,6 +181,64 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int READ_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -183,6 +256,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (readMask_ != null) { + output.writeMessage(2, getReadMask()); + } unknownFields.writeTo(output); } @@ -195,6 +271,9 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadMask()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -212,6 +291,10 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.tasks.v2beta3.GetQueueRequest) obj; if (!getName().equals(other.getName())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -225,6 +308,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -372,6 +459,12 @@ public Builder clear() { super.clear(); name_ = ""; + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } return this; } @@ -400,6 +493,11 @@ public com.google.cloud.tasks.v2beta3.GetQueueRequest buildPartial() { com.google.cloud.tasks.v2beta3.GetQueueRequest result = new com.google.cloud.tasks.v2beta3.GetQueueRequest(this); result.name_ = name_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } onBuilt(); return result; } @@ -453,6 +551,9 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta3.GetQueueRequest other) { name_ = other.name_; onChanged(); } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -603,6 +704,221 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequestOrBuilder.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequestOrBuilder.java index 603ab6df..f8c79d47 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequestOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/GetQueueRequestOrBuilder.java @@ -53,4 +53,51 @@ public interface GetQueueRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); } diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequest.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequest.java index 6dbe9e6a..cf04dc95 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequest.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequest.java @@ -96,6 +96,21 @@ private ListQueuesRequest( java.lang.String s = input.readStringRequireUtf8(); pageToken_ = s; + break; + } + case 42: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + break; } default: @@ -336,6 +351,64 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int READ_MASK_FIELD_NUMBER = 5; + private com.google.protobuf.FieldMask readMask_; + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -362,6 +435,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getPageTokenBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); } + if (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } unknownFields.writeTo(output); } @@ -383,6 +459,9 @@ public int getSerializedSize() { if (!getPageTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -403,6 +482,10 @@ public boolean equals(final java.lang.Object obj) { if (!getFilter().equals(other.getFilter())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask().equals(other.getReadMask())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -422,6 +505,10 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -575,6 +662,12 @@ public Builder clear() { pageToken_ = ""; + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } return this; } @@ -606,6 +699,11 @@ public com.google.cloud.tasks.v2beta3.ListQueuesRequest buildPartial() { result.filter_ = filter_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } onBuilt(); return result; } @@ -671,6 +769,9 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta3.ListQueuesRequest other) pageToken_ = other.pageToken_; onChanged(); } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1170,6 +1271,221 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + readMaskBuilder_; + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReadMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Optional. Read mask is used for a more granular control over what the API returns.
+     * If the mask is not present all fields will be returned except
+     * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+     * specified in the mask.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), getParentForChildren(), isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequestOrBuilder.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequestOrBuilder.java index 4ee9f1fc..7d932d07 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequestOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ListQueuesRequestOrBuilder.java @@ -149,4 +149,51 @@ public interface ListQueuesRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Optional. Read mask is used for a more granular control over what the API returns.
+   * If the mask is not present all fields will be returned except
+   * [Queue.stats]. [Queue.stats] will be returned only if it was  explicitly
+   * specified in the mask.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); } diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessage.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessage.java new file mode 100644 index 00000000..a2738785 --- /dev/null +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessage.java @@ -0,0 +1,782 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +/** + * + * + *
+ * Pull Message.
+ * This proto can only be used for tasks in a queue which has
+ * [PULL][google.cloud.tasks.v2beta3.Queue.type] type. It currently exists for backwards compatibility with
+ * the App Engine Task Queue SDK. This message type maybe returned with methods
+ * [list][google.cloud.tasks.v2beta3.CloudTask.ListTasks] and
+ * [get][google.cloud.tasks.v2beta3.CloudTask.ListTasks], when the response view
+ * is [FULL][google.cloud.tasks.v2beta3.Task.View.Full].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.PullMessage} + */ +public final class PullMessage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.PullMessage) + PullMessageOrBuilder { + private static final long serialVersionUID = 0L; + // Use PullMessage.newBuilder() to construct. + private PullMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PullMessage() { + payload_ = com.google.protobuf.ByteString.EMPTY; + tag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PullMessage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PullMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + payload_ = input.readBytes(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + tag_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PullMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PullMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.PullMessage.class, + com.google.cloud.tasks.v2beta3.PullMessage.Builder.class); + } + + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString payload_; + /** + * + * + *
+   * A data payload consumed by the worker to execute the task.
+   * 
+ * + * bytes payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + public static final int TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object tag_; + /** + * + * + *
+   * The tasks's tag.
+   * The tag is less than 500 characters.
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or
+   * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+   * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+   * 
+ * + * string tag = 2; + * + * @return The tag. + */ + @java.lang.Override + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } + } + /** + * + * + *
+   * The tasks's tag.
+   * The tag is less than 500 characters.
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or
+   * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+   * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+   * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!payload_.isEmpty()) { + output.writeBytes(1, payload_); + } + if (!getTagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, payload_); + } + if (!getTagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.PullMessage)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.PullMessage other = + (com.google.cloud.tasks.v2beta3.PullMessage) obj; + + if (!getPayload().equals(other.getPayload())) return false; + if (!getTag().equals(other.getTag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta3.PullMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Pull Message.
+   * This proto can only be used for tasks in a queue which has
+   * [PULL][google.cloud.tasks.v2beta3.Queue.type] type. It currently exists for backwards compatibility with
+   * the App Engine Task Queue SDK. This message type maybe returned with methods
+   * [list][google.cloud.tasks.v2beta3.CloudTask.ListTasks] and
+   * [get][google.cloud.tasks.v2beta3.CloudTask.ListTasks], when the response view
+   * is [FULL][google.cloud.tasks.v2beta3.Task.View.Full].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.PullMessage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.PullMessage) + com.google.cloud.tasks.v2beta3.PullMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PullMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PullMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.PullMessage.class, + com.google.cloud.tasks.v2beta3.PullMessage.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.PullMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + payload_ = com.google.protobuf.ByteString.EMPTY; + + tag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.TargetProto + .internal_static_google_cloud_tasks_v2beta3_PullMessage_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PullMessage getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.PullMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PullMessage build() { + com.google.cloud.tasks.v2beta3.PullMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PullMessage buildPartial() { + com.google.cloud.tasks.v2beta3.PullMessage result = + new com.google.cloud.tasks.v2beta3.PullMessage(this); + result.payload_ = payload_; + result.tag_ = tag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.PullMessage) { + return mergeFrom((com.google.cloud.tasks.v2beta3.PullMessage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.PullMessage other) { + if (other == com.google.cloud.tasks.v2beta3.PullMessage.getDefaultInstance()) return this; + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + if (!other.getTag().isEmpty()) { + tag_ = other.tag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta3.PullMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta3.PullMessage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * A data payload consumed by the worker to execute the task.
+     * 
+ * + * bytes payload = 1; + * + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * + * + *
+     * A data payload consumed by the worker to execute the task.
+     * 
+ * + * bytes payload = 1; + * + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + payload_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A data payload consumed by the worker to execute the task.
+     * 
+ * + * bytes payload = 1; + * + * @return This builder for chaining. + */ + public Builder clearPayload() { + + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + private java.lang.Object tag_ = ""; + /** + * + * + *
+     * The tasks's tag.
+     * The tag is less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + * + * @return The tag. + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The tasks's tag.
+     * The tag is less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + public com.google.protobuf.ByteString getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The tasks's tag.
+     * The tag is less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + * + * @param value The tag to set. + * @return This builder for chaining. + */ + public Builder setTag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The tasks's tag.
+     * The tag is less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + * + * @return This builder for chaining. + */ + public Builder clearTag() { + + tag_ = getDefaultInstance().getTag(); + onChanged(); + return this; + } + /** + * + * + *
+     * The tasks's tag.
+     * The tag is less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + * + * @param value The bytes for tag to set. + * @return This builder for chaining. + */ + public Builder setTagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tag_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.PullMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.PullMessage) + private static final com.google.cloud.tasks.v2beta3.PullMessage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.PullMessage(); + } + + public static com.google.cloud.tasks.v2beta3.PullMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PullMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PullMessage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PullMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessageOrBuilder.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessageOrBuilder.java new file mode 100644 index 00000000..cfae720a --- /dev/null +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessageOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/target.proto + +package com.google.cloud.tasks.v2beta3; + +public interface PullMessageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.PullMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A data payload consumed by the worker to execute the task.
+   * 
+ * + * bytes payload = 1; + * + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + + /** + * + * + *
+   * The tasks's tag.
+   * The tag is less than 500 characters.
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or
+   * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+   * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+   * 
+ * + * string tag = 2; + * + * @return The tag. + */ + java.lang.String getTag(); + /** + * + * + *
+   * The tasks's tag.
+   * The tag is less than 500 characters.
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or
+   * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+   * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+   * 
+ * + * string tag = 2; + * + * @return The bytes for tag. + */ + com.google.protobuf.ByteString getTagBytes(); +} diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java index c1507464..4f3e3e1f 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java @@ -152,6 +152,36 @@ private Queue( purgeTime_ = subBuilder.buildPartial(); } + break; + } + case 66: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (taskTtl_ != null) { + subBuilder = taskTtl_.toBuilder(); + } + taskTtl_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(taskTtl_); + taskTtl_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (tombstoneTtl_ != null) { + subBuilder = tombstoneTtl_.toBuilder(); + } + tombstoneTtl_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tombstoneTtl_); + tombstoneTtl_ = subBuilder.buildPartial(); + } + break; } case 82: @@ -176,6 +206,22 @@ private Queue( int rawValue = input.readEnum(); type_ = rawValue; + break; + } + case 98: + { + com.google.cloud.tasks.v2beta3.QueueStats.Builder subBuilder = null; + if (stats_ != null) { + subBuilder = stats_.toBuilder(); + } + stats_ = + input.readMessage( + com.google.cloud.tasks.v2beta3.QueueStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stats_); + stats_ = subBuilder.buildPartial(); + } + break; } default: @@ -1055,6 +1101,148 @@ public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { return getPurgeTime(); } + public static final int TASK_TTL_FIELD_NUMBER = 8; + private com.google.protobuf.Duration taskTtl_; + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 8; + * + * @return Whether the taskTtl field is set. + */ + @java.lang.Override + public boolean hasTaskTtl() { + return taskTtl_ != null; + } + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 8; + * + * @return The taskTtl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTaskTtl() { + return taskTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : taskTtl_; + } + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 8; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTaskTtlOrBuilder() { + return getTaskTtl(); + } + + public static final int TOMBSTONE_TTL_FIELD_NUMBER = 9; + private com.google.protobuf.Duration tombstoneTtl_; + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or executed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + * + * @return Whether the tombstoneTtl field is set. + */ + @java.lang.Override + public boolean hasTombstoneTtl() { + return tombstoneTtl_ != null; + } + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or executed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + * + * @return The tombstoneTtl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTombstoneTtl() { + return tombstoneTtl_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : tombstoneTtl_; + } + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or executed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTombstoneTtlOrBuilder() { + return getTombstoneTtl(); + } + public static final int STACKDRIVER_LOGGING_CONFIG_FIELD_NUMBER = 10; private com.google.cloud.tasks.v2beta3.StackdriverLoggingConfig stackdriverLoggingConfig_; /** @@ -1159,6 +1347,64 @@ public com.google.cloud.tasks.v2beta3.Queue.Type getType() { return result == null ? com.google.cloud.tasks.v2beta3.Queue.Type.UNRECOGNIZED : result; } + public static final int STATS_FIELD_NUMBER = 12; + private com.google.cloud.tasks.v2beta3.QueueStats stats_; + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return stats_ != null; + } + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stats. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueueStats getStats() { + return stats_ == null ? com.google.cloud.tasks.v2beta3.QueueStats.getDefaultInstance() : stats_; + } + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueueStatsOrBuilder getStatsOrBuilder() { + return getStats(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1191,12 +1437,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (purgeTime_ != null) { output.writeMessage(7, getPurgeTime()); } + if (taskTtl_ != null) { + output.writeMessage(8, getTaskTtl()); + } + if (tombstoneTtl_ != null) { + output.writeMessage(9, getTombstoneTtl()); + } if (stackdriverLoggingConfig_ != null) { output.writeMessage(10, getStackdriverLoggingConfig()); } if (type_ != com.google.cloud.tasks.v2beta3.Queue.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(11, type_); } + if (stats_ != null) { + output.writeMessage(12, getStats()); + } unknownFields.writeTo(output); } @@ -1226,6 +1481,12 @@ public int getSerializedSize() { if (purgeTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPurgeTime()); } + if (taskTtl_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getTaskTtl()); + } + if (tombstoneTtl_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getTombstoneTtl()); + } if (stackdriverLoggingConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -1234,6 +1495,9 @@ public int getSerializedSize() { if (type_ != com.google.cloud.tasks.v2beta3.Queue.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, type_); } + if (stats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getStats()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1263,11 +1527,23 @@ public boolean equals(final java.lang.Object obj) { if (hasPurgeTime()) { if (!getPurgeTime().equals(other.getPurgeTime())) return false; } + if (hasTaskTtl() != other.hasTaskTtl()) return false; + if (hasTaskTtl()) { + if (!getTaskTtl().equals(other.getTaskTtl())) return false; + } + if (hasTombstoneTtl() != other.hasTombstoneTtl()) return false; + if (hasTombstoneTtl()) { + if (!getTombstoneTtl().equals(other.getTombstoneTtl())) return false; + } if (hasStackdriverLoggingConfig() != other.hasStackdriverLoggingConfig()) return false; if (hasStackdriverLoggingConfig()) { if (!getStackdriverLoggingConfig().equals(other.getStackdriverLoggingConfig())) return false; } if (type_ != other.type_) return false; + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats().equals(other.getStats())) return false; + } if (!getQueueTypeCase().equals(other.getQueueTypeCase())) return false; switch (queueTypeCase_) { case 3: @@ -1303,12 +1579,24 @@ public int hashCode() { hash = (37 * hash) + PURGE_TIME_FIELD_NUMBER; hash = (53 * hash) + getPurgeTime().hashCode(); } + if (hasTaskTtl()) { + hash = (37 * hash) + TASK_TTL_FIELD_NUMBER; + hash = (53 * hash) + getTaskTtl().hashCode(); + } + if (hasTombstoneTtl()) { + hash = (37 * hash) + TOMBSTONE_TTL_FIELD_NUMBER; + hash = (53 * hash) + getTombstoneTtl().hashCode(); + } if (hasStackdriverLoggingConfig()) { hash = (37 * hash) + STACKDRIVER_LOGGING_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getStackdriverLoggingConfig().hashCode(); } hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } switch (queueTypeCase_) { case 3: hash = (37 * hash) + APP_ENGINE_HTTP_QUEUE_FIELD_NUMBER; @@ -1485,6 +1773,18 @@ public Builder clear() { purgeTime_ = null; purgeTimeBuilder_ = null; } + if (taskTtlBuilder_ == null) { + taskTtl_ = null; + } else { + taskTtl_ = null; + taskTtlBuilder_ = null; + } + if (tombstoneTtlBuilder_ == null) { + tombstoneTtl_ = null; + } else { + tombstoneTtl_ = null; + tombstoneTtlBuilder_ = null; + } if (stackdriverLoggingConfigBuilder_ == null) { stackdriverLoggingConfig_ = null; } else { @@ -1493,6 +1793,12 @@ public Builder clear() { } type_ = 0; + if (statsBuilder_ == null) { + stats_ = null; + } else { + stats_ = null; + statsBuilder_ = null; + } queueTypeCase_ = 0; queueType_ = null; return this; @@ -1545,12 +1851,27 @@ public com.google.cloud.tasks.v2beta3.Queue buildPartial() { } else { result.purgeTime_ = purgeTimeBuilder_.build(); } + if (taskTtlBuilder_ == null) { + result.taskTtl_ = taskTtl_; + } else { + result.taskTtl_ = taskTtlBuilder_.build(); + } + if (tombstoneTtlBuilder_ == null) { + result.tombstoneTtl_ = tombstoneTtl_; + } else { + result.tombstoneTtl_ = tombstoneTtlBuilder_.build(); + } if (stackdriverLoggingConfigBuilder_ == null) { result.stackdriverLoggingConfig_ = stackdriverLoggingConfig_; } else { result.stackdriverLoggingConfig_ = stackdriverLoggingConfigBuilder_.build(); } result.type_ = type_; + if (statsBuilder_ == null) { + result.stats_ = stats_; + } else { + result.stats_ = statsBuilder_.build(); + } result.queueTypeCase_ = queueTypeCase_; onBuilt(); return result; @@ -1617,12 +1938,21 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta3.Queue other) { if (other.hasPurgeTime()) { mergePurgeTime(other.getPurgeTime()); } + if (other.hasTaskTtl()) { + mergeTaskTtl(other.getTaskTtl()); + } + if (other.hasTombstoneTtl()) { + mergeTombstoneTtl(other.getTombstoneTtl()); + } if (other.hasStackdriverLoggingConfig()) { mergeStackdriverLoggingConfig(other.getStackdriverLoggingConfig()); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } + if (other.hasStats()) { + mergeStats(other.getStats()); + } switch (other.getQueueTypeCase()) { case APP_ENGINE_HTTP_QUEUE: { @@ -3062,6 +3392,514 @@ public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { return purgeTimeBuilder_; } + private com.google.protobuf.Duration taskTtl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + taskTtlBuilder_; + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 8; + * + * @return Whether the taskTtl field is set. + */ + public boolean hasTaskTtl() { + return taskTtlBuilder_ != null || taskTtl_ != null; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 8; + * + * @return The taskTtl. + */ + public com.google.protobuf.Duration getTaskTtl() { + if (taskTtlBuilder_ == null) { + return taskTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : taskTtl_; + } else { + return taskTtlBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 8; + */ + public Builder setTaskTtl(com.google.protobuf.Duration value) { + if (taskTtlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskTtl_ = value; + onChanged(); + } else { + taskTtlBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 8; + */ + public Builder setTaskTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (taskTtlBuilder_ == null) { + taskTtl_ = builderForValue.build(); + onChanged(); + } else { + taskTtlBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 8; + */ + public Builder mergeTaskTtl(com.google.protobuf.Duration value) { + if (taskTtlBuilder_ == null) { + if (taskTtl_ != null) { + taskTtl_ = + com.google.protobuf.Duration.newBuilder(taskTtl_).mergeFrom(value).buildPartial(); + } else { + taskTtl_ = value; + } + onChanged(); + } else { + taskTtlBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 8; + */ + public Builder clearTaskTtl() { + if (taskTtlBuilder_ == null) { + taskTtl_ = null; + onChanged(); + } else { + taskTtl_ = null; + taskTtlBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 8; + */ + public com.google.protobuf.Duration.Builder getTaskTtlBuilder() { + + onChanged(); + return getTaskTtlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 8; + */ + public com.google.protobuf.DurationOrBuilder getTaskTtlOrBuilder() { + if (taskTtlBuilder_ != null) { + return taskTtlBuilder_.getMessageOrBuilder(); + } else { + return taskTtl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : taskTtl_; + } + } + /** + * + * + *
+     * The maximum amount of time that a task will be retained in
+     * this queue.
+     * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+     * After a task has lived for `task_ttl`, the task will be deleted
+     * regardless of whether it was dispatched or not.
+     * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+     * maximum duration because there is a
+     * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+     * these queues. To view the maximum valid duration, see the documentation for
+     * [Duration][google.protobuf.Duration].
+     * 
+ * + * .google.protobuf.Duration task_ttl = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTaskTtlFieldBuilder() { + if (taskTtlBuilder_ == null) { + taskTtlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTaskTtl(), getParentForChildren(), isClean()); + taskTtl_ = null; + } + return taskTtlBuilder_; + } + + private com.google.protobuf.Duration tombstoneTtl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + tombstoneTtlBuilder_; + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or executed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + * + * @return Whether the tombstoneTtl field is set. + */ + public boolean hasTombstoneTtl() { + return tombstoneTtlBuilder_ != null || tombstoneTtl_ != null; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or executed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + * + * @return The tombstoneTtl. + */ + public com.google.protobuf.Duration getTombstoneTtl() { + if (tombstoneTtlBuilder_ == null) { + return tombstoneTtl_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : tombstoneTtl_; + } else { + return tombstoneTtlBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or executed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + */ + public Builder setTombstoneTtl(com.google.protobuf.Duration value) { + if (tombstoneTtlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tombstoneTtl_ = value; + onChanged(); + } else { + tombstoneTtlBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or executed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + */ + public Builder setTombstoneTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (tombstoneTtlBuilder_ == null) { + tombstoneTtl_ = builderForValue.build(); + onChanged(); + } else { + tombstoneTtlBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or executed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + */ + public Builder mergeTombstoneTtl(com.google.protobuf.Duration value) { + if (tombstoneTtlBuilder_ == null) { + if (tombstoneTtl_ != null) { + tombstoneTtl_ = + com.google.protobuf.Duration.newBuilder(tombstoneTtl_) + .mergeFrom(value) + .buildPartial(); + } else { + tombstoneTtl_ = value; + } + onChanged(); + } else { + tombstoneTtlBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or executed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + */ + public Builder clearTombstoneTtl() { + if (tombstoneTtlBuilder_ == null) { + tombstoneTtl_ = null; + onChanged(); + } else { + tombstoneTtl_ = null; + tombstoneTtlBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or executed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + */ + public com.google.protobuf.Duration.Builder getTombstoneTtlBuilder() { + + onChanged(); + return getTombstoneTtlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or executed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + */ + public com.google.protobuf.DurationOrBuilder getTombstoneTtlOrBuilder() { + if (tombstoneTtlBuilder_ != null) { + return tombstoneTtlBuilder_.getMessageOrBuilder(); + } else { + return tombstoneTtl_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : tombstoneTtl_; + } + } + /** + * + * + *
+     * The task tombstone time to live (TTL).
+     * After a task is deleted or executed, the task's tombstone is
+     * retained for the length of time specified by `tombstone_ttl`.
+     * The tombstone is used by task de-duplication; another task with the same
+     * name can't be created until the tombstone has expired. For more information
+     * about task de-duplication, see the documentation for
+     * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+     * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+     * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTombstoneTtlFieldBuilder() { + if (tombstoneTtlBuilder_ == null) { + tombstoneTtlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTombstoneTtl(), getParentForChildren(), isClean()); + tombstoneTtl_ = null; + } + return tombstoneTtlBuilder_; + } + private com.google.cloud.tasks.v2beta3.StackdriverLoggingConfig stackdriverLoggingConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.tasks.v2beta3.StackdriverLoggingConfig, @@ -3396,6 +4234,227 @@ public Builder clearType() { return this; } + private com.google.cloud.tasks.v2beta3.QueueStats stats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.QueueStats, + com.google.cloud.tasks.v2beta3.QueueStats.Builder, + com.google.cloud.tasks.v2beta3.QueueStatsOrBuilder> + statsBuilder_; + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return statsBuilder_ != null || stats_ != null; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stats. + */ + public com.google.cloud.tasks.v2beta3.QueueStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null + ? com.google.cloud.tasks.v2beta3.QueueStats.getDefaultInstance() + : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStats(com.google.cloud.tasks.v2beta3.QueueStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + onChanged(); + } else { + statsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStats(com.google.cloud.tasks.v2beta3.QueueStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + onChanged(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStats(com.google.cloud.tasks.v2beta3.QueueStats value) { + if (statsBuilder_ == null) { + if (stats_ != null) { + stats_ = + com.google.cloud.tasks.v2beta3.QueueStats.newBuilder(stats_) + .mergeFrom(value) + .buildPartial(); + } else { + stats_ = value; + } + onChanged(); + } else { + statsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStats() { + if (statsBuilder_ == null) { + stats_ = null; + onChanged(); + } else { + stats_ = null; + statsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.tasks.v2beta3.QueueStats.Builder getStatsBuilder() { + + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.tasks.v2beta3.QueueStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null + ? com.google.cloud.tasks.v2beta3.QueueStats.getDefaultInstance() + : stats_; + } + } + /** + * + * + *
+     * Output only. The realtime, informational statistics for a queue. In order
+     * to receive the statistics the caller should include this field in the
+     * FieldMask.
+     * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.QueueStats, + com.google.cloud.tasks.v2beta3.QueueStats.Builder, + com.google.cloud.tasks.v2beta3.QueueStatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.QueueStats, + com.google.cloud.tasks.v2beta3.QueueStats.Builder, + com.google.cloud.tasks.v2beta3.QueueStatsOrBuilder>( + getStats(), getParentForChildren(), isClean()); + stats_ = null; + } + return statsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java index 50251c2d..6ad394d6 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java @@ -361,6 +361,124 @@ public interface QueueOrBuilder */ com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder(); + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 8; + * + * @return Whether the taskTtl field is set. + */ + boolean hasTaskTtl(); + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 8; + * + * @return The taskTtl. + */ + com.google.protobuf.Duration getTaskTtl(); + /** + * + * + *
+   * The maximum amount of time that a task will be retained in
+   * this queue.
+   * Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
+   * After a task has lived for `task_ttl`, the task will be deleted
+   * regardless of whether it was dispatched or not.
+   * The `task_ttl` for queues created via queue.yaml/xml is equal to the
+   * maximum duration because there is a
+   * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
+   * these queues. To view the maximum valid duration, see the documentation for
+   * [Duration][google.protobuf.Duration].
+   * 
+ * + * .google.protobuf.Duration task_ttl = 8; + */ + com.google.protobuf.DurationOrBuilder getTaskTtlOrBuilder(); + + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or executed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + * + * @return Whether the tombstoneTtl field is set. + */ + boolean hasTombstoneTtl(); + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or executed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + * + * @return The tombstoneTtl. + */ + com.google.protobuf.Duration getTombstoneTtl(); + /** + * + * + *
+   * The task tombstone time to live (TTL).
+   * After a task is deleted or executed, the task's tombstone is
+   * retained for the length of time specified by `tombstone_ttl`.
+   * The tombstone is used by task de-duplication; another task with the same
+   * name can't be created until the tombstone has expired. For more information
+   * about task de-duplication, see the documentation for
+   * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task].
+   * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
+   * 
+ * + * .google.protobuf.Duration tombstone_ttl = 9; + */ + com.google.protobuf.DurationOrBuilder getTombstoneTtlOrBuilder(); + /** * * @@ -441,5 +559,52 @@ public interface QueueOrBuilder */ com.google.cloud.tasks.v2beta3.Queue.Type getType(); + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stats field is set. + */ + boolean hasStats(); + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stats. + */ + com.google.cloud.tasks.v2beta3.QueueStats getStats(); + /** + * + * + *
+   * Output only. The realtime, informational statistics for a queue. In order
+   * to receive the statistics the caller should include this field in the
+   * FieldMask.
+   * 
+ * + * + * .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.tasks.v2beta3.QueueStatsOrBuilder getStatsOrBuilder(); + public com.google.cloud.tasks.v2beta3.Queue.QueueTypeCase getQueueTypeCase(); } diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java index 340ab7c3..6e32a784 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java @@ -43,6 +43,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_tasks_v2beta3_StackdriverLoggingConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_tasks_v2beta3_StackdriverLoggingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_QueueStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_QueueStats_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -58,7 +62,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ce.proto\032\'google/cloud/tasks/v2beta3/tar" + "get.proto\032\036google/protobuf/duration.prot" + "o\032\037google/protobuf/timestamp.proto\032\034goog" - + "le/api/annotations.proto\"\304\005\n\005Queue\022\014\n\004na" + + "le/api/annotations.proto\"\337\006\n\005Queue\022\014\n\004na" + "me\030\001 \001(\t\022O\n\025app_engine_http_queue\030\003 \001(\0132" + "..google.cloud.tasks.v2beta3.AppEngineHt" + "tpQueueH\000\022;\n\013rate_limits\030\004 \001(\0132&.google." @@ -66,29 +70,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "config\030\005 \001(\0132\'.google.cloud.tasks.v2beta" + "3.RetryConfig\0226\n\005state\030\006 \001(\0162\'.google.cl" + "oud.tasks.v2beta3.Queue.State\022.\n\npurge_t" - + "ime\030\007 \001(\0132\032.google.protobuf.Timestamp\022X\n" - + "\032stackdriver_logging_config\030\n \001(\01324.goog" - + "le.cloud.tasks.v2beta3.StackdriverLoggin" - + "gConfig\0229\n\004type\030\013 \001(\0162&.google.cloud.tas" - + "ks.v2beta3.Queue.TypeB\003\340A\005\"E\n\005State\022\025\n\021S" - + "TATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\n\n\006PAUSE" - + "D\020\002\022\014\n\010DISABLED\020\003\"0\n\004Type\022\024\n\020TYPE_UNSPEC" - + "IFIED\020\000\022\010\n\004PULL\020\001\022\010\n\004PUSH\020\002:\\\352AY\n\037cloudt" - + "asks.googleapis.com/Queue\0226projects/{pro" - + "ject}/locations/{location}/queues/{queue" - + "}B\014\n\nqueue_type\"j\n\nRateLimits\022!\n\031max_dis" - + "patches_per_second\030\001 \001(\001\022\026\n\016max_burst_si" - + "ze\030\002 \001(\005\022!\n\031max_concurrent_dispatches\030\003 " - + "\001(\005\"\321\001\n\013RetryConfig\022\024\n\014max_attempts\030\001 \001(" - + "\005\0225\n\022max_retry_duration\030\002 \001(\0132\031.google.p" - + "rotobuf.Duration\022.\n\013min_backoff\030\003 \001(\0132\031." - + "google.protobuf.Duration\022.\n\013max_backoff\030" - + "\004 \001(\0132\031.google.protobuf.Duration\022\025\n\rmax_" - + "doublings\030\005 \001(\005\"2\n\030StackdriverLoggingCon" - + "fig\022\026\n\016sampling_ratio\030\001 \001(\001Bo\n\036com.googl" - + "e.cloud.tasks.v2beta3B\nQueueProtoP\001Z?goo" - + "gle.golang.org/genproto/googleapis/cloud" - + "/tasks/v2beta3;tasksb\006proto3" + + "ime\030\007 \001(\0132\032.google.protobuf.Timestamp\022+\n" + + "\010task_ttl\030\010 \001(\0132\031.google.protobuf.Durati" + + "on\0220\n\rtombstone_ttl\030\t \001(\0132\031.google.proto" + + "buf.Duration\022X\n\032stackdriver_logging_conf" + + "ig\030\n \001(\01324.google.cloud.tasks.v2beta3.St" + + "ackdriverLoggingConfig\0229\n\004type\030\013 \001(\0162&.g" + + "oogle.cloud.tasks.v2beta3.Queue.TypeB\003\340A" + + "\005\022:\n\005stats\030\014 \001(\0132&.google.cloud.tasks.v2" + + "beta3.QueueStatsB\003\340A\003\"E\n\005State\022\025\n\021STATE_" + + "UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\n\n\006PAUSED\020\002\022\014" + + "\n\010DISABLED\020\003\"0\n\004Type\022\024\n\020TYPE_UNSPECIFIED" + + "\020\000\022\010\n\004PULL\020\001\022\010\n\004PUSH\020\002:\\\352AY\n\037cloudtasks." + + "googleapis.com/Queue\0226projects/{project}" + + "/locations/{location}/queues/{queue}B\014\n\n" + + "queue_type\"j\n\nRateLimits\022!\n\031max_dispatch" + + "es_per_second\030\001 \001(\001\022\026\n\016max_burst_size\030\002 " + + "\001(\005\022!\n\031max_concurrent_dispatches\030\003 \001(\005\"\321" + + "\001\n\013RetryConfig\022\024\n\014max_attempts\030\001 \001(\005\0225\n\022" + + "max_retry_duration\030\002 \001(\0132\031.google.protob" + + "uf.Duration\022.\n\013min_backoff\030\003 \001(\0132\031.googl" + + "e.protobuf.Duration\022.\n\013max_backoff\030\004 \001(\013" + + "2\031.google.protobuf.Duration\022\025\n\rmax_doubl" + + "ings\030\005 \001(\005\"2\n\030StackdriverLoggingConfig\022\026" + + "\n\016sampling_ratio\030\001 \001(\001\"\350\001\n\nQueueStats\022\030\n" + + "\013tasks_count\030\001 \001(\003B\003\340A\003\022F\n\035oldest_estima" + + "ted_arrival_time\030\002 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\022\'\n\032executed_last_minute_" + + "count\030\003 \001(\003B\003\340A\003\022(\n\033concurrent_dispatche" + + "s_count\030\004 \001(\003B\003\340A\003\022%\n\030effective_executio" + + "n_rate\030\005 \001(\001B\003\340A\003Bo\n\036com.google.cloud.ta" + + "sks.v2beta3B\nQueueProtoP\001Z?google.golang" + + ".org/genproto/googleapis/cloud/tasks/v2b" + + "eta3;tasksb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -113,8 +127,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RetryConfig", "State", "PurgeTime", + "TaskTtl", + "TombstoneTtl", "StackdriverLoggingConfig", "Type", + "Stats", "QueueType", }); internal_static_google_cloud_tasks_v2beta3_RateLimits_descriptor = @@ -141,6 +158,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "SamplingRatio", }); + internal_static_google_cloud_tasks_v2beta3_QueueStats_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_tasks_v2beta3_QueueStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_QueueStats_descriptor, + new java.lang.String[] { + "TasksCount", + "OldestEstimatedArrivalTime", + "ExecutedLastMinuteCount", + "ConcurrentDispatchesCount", + "EffectiveExecutionRate", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStats.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStats.java new file mode 100644 index 00000000..c22b4d05 --- /dev/null +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStats.java @@ -0,0 +1,1180 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/queue.proto + +package com.google.cloud.tasks.v2beta3; + +/** + * + * + *
+ * Statistics for a queue.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.QueueStats} + */ +public final class QueueStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.QueueStats) + QueueStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueueStats.newBuilder() to construct. + private QueueStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueueStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueueStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private QueueStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + tasksCount_ = input.readInt64(); + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (oldestEstimatedArrivalTime_ != null) { + subBuilder = oldestEstimatedArrivalTime_.toBuilder(); + } + oldestEstimatedArrivalTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(oldestEstimatedArrivalTime_); + oldestEstimatedArrivalTime_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + executedLastMinuteCount_ = input.readInt64(); + break; + } + case 32: + { + concurrentDispatchesCount_ = input.readInt64(); + break; + } + case 41: + { + effectiveExecutionRate_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.QueueProto + .internal_static_google_cloud_tasks_v2beta3_QueueStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.QueueProto + .internal_static_google_cloud_tasks_v2beta3_QueueStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.QueueStats.class, + com.google.cloud.tasks.v2beta3.QueueStats.Builder.class); + } + + public static final int TASKS_COUNT_FIELD_NUMBER = 1; + private long tasksCount_; + /** + * + * + *
+   * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+   * the queue that haven't been executed, the tasks in the queue which the
+   * queue has dispatched but has not yet received a reply for, and the failed
+   * tasks that the queue is retrying.
+   * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tasksCount. + */ + @java.lang.Override + public long getTasksCount() { + return tasksCount_; + } + + public static final int OLDEST_ESTIMATED_ARRIVAL_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp oldestEstimatedArrivalTime_; + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the oldestEstimatedArrivalTime field is set. + */ + @java.lang.Override + public boolean hasOldestEstimatedArrivalTime() { + return oldestEstimatedArrivalTime_ != null; + } + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The oldestEstimatedArrivalTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getOldestEstimatedArrivalTime() { + return oldestEstimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestEstimatedArrivalTime_; + } + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getOldestEstimatedArrivalTimeOrBuilder() { + return getOldestEstimatedArrivalTime(); + } + + public static final int EXECUTED_LAST_MINUTE_COUNT_FIELD_NUMBER = 3; + private long executedLastMinuteCount_; + /** + * + * + *
+   * Output only. The number of tasks that the queue has dispatched and received a reply for
+   * during the last minute. This variable counts both successful and
+   * non-successful executions.
+   * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The executedLastMinuteCount. + */ + @java.lang.Override + public long getExecutedLastMinuteCount() { + return executedLastMinuteCount_; + } + + public static final int CONCURRENT_DISPATCHES_COUNT_FIELD_NUMBER = 4; + private long concurrentDispatchesCount_; + /** + * + * + *
+   * Output only. The number of requests that the queue has dispatched but has not received
+   * a reply for yet.
+   * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The concurrentDispatchesCount. + */ + @java.lang.Override + public long getConcurrentDispatchesCount() { + return concurrentDispatchesCount_; + } + + public static final int EFFECTIVE_EXECUTION_RATE_FIELD_NUMBER = 5; + private double effectiveExecutionRate_; + /** + * + * + *
+   * Output only. The current maximum number of tasks per second executed by the queue.
+   * The maximum value of this variable is controlled by the RateLimits of the
+   * Queue. However, this value could be less to avoid overloading the endpoints
+   * tasks in the queue are targeting.
+   * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The effectiveExecutionRate. + */ + @java.lang.Override + public double getEffectiveExecutionRate() { + return effectiveExecutionRate_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (tasksCount_ != 0L) { + output.writeInt64(1, tasksCount_); + } + if (oldestEstimatedArrivalTime_ != null) { + output.writeMessage(2, getOldestEstimatedArrivalTime()); + } + if (executedLastMinuteCount_ != 0L) { + output.writeInt64(3, executedLastMinuteCount_); + } + if (concurrentDispatchesCount_ != 0L) { + output.writeInt64(4, concurrentDispatchesCount_); + } + if (effectiveExecutionRate_ != 0D) { + output.writeDouble(5, effectiveExecutionRate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tasksCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, tasksCount_); + } + if (oldestEstimatedArrivalTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getOldestEstimatedArrivalTime()); + } + if (executedLastMinuteCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, executedLastMinuteCount_); + } + if (concurrentDispatchesCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, concurrentDispatchesCount_); + } + if (effectiveExecutionRate_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, effectiveExecutionRate_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.tasks.v2beta3.QueueStats)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta3.QueueStats other = + (com.google.cloud.tasks.v2beta3.QueueStats) obj; + + if (getTasksCount() != other.getTasksCount()) return false; + if (hasOldestEstimatedArrivalTime() != other.hasOldestEstimatedArrivalTime()) return false; + if (hasOldestEstimatedArrivalTime()) { + if (!getOldestEstimatedArrivalTime().equals(other.getOldestEstimatedArrivalTime())) + return false; + } + if (getExecutedLastMinuteCount() != other.getExecutedLastMinuteCount()) return false; + if (getConcurrentDispatchesCount() != other.getConcurrentDispatchesCount()) return false; + if (java.lang.Double.doubleToLongBits(getEffectiveExecutionRate()) + != java.lang.Double.doubleToLongBits(other.getEffectiveExecutionRate())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TASKS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTasksCount()); + if (hasOldestEstimatedArrivalTime()) { + hash = (37 * hash) + OLDEST_ESTIMATED_ARRIVAL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getOldestEstimatedArrivalTime().hashCode(); + } + hash = (37 * hash) + EXECUTED_LAST_MINUTE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getExecutedLastMinuteCount()); + hash = (37 * hash) + CONCURRENT_DISPATCHES_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getConcurrentDispatchesCount()); + hash = (37 * hash) + EFFECTIVE_EXECUTION_RATE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getEffectiveExecutionRate())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.tasks.v2beta3.QueueStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Statistics for a queue.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta3.QueueStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.QueueStats) + com.google.cloud.tasks.v2beta3.QueueStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.tasks.v2beta3.QueueProto + .internal_static_google_cloud_tasks_v2beta3_QueueStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta3.QueueProto + .internal_static_google_cloud_tasks_v2beta3_QueueStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta3.QueueStats.class, + com.google.cloud.tasks.v2beta3.QueueStats.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta3.QueueStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + tasksCount_ = 0L; + + if (oldestEstimatedArrivalTimeBuilder_ == null) { + oldestEstimatedArrivalTime_ = null; + } else { + oldestEstimatedArrivalTime_ = null; + oldestEstimatedArrivalTimeBuilder_ = null; + } + executedLastMinuteCount_ = 0L; + + concurrentDispatchesCount_ = 0L; + + effectiveExecutionRate_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.tasks.v2beta3.QueueProto + .internal_static_google_cloud_tasks_v2beta3_QueueStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueueStats getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta3.QueueStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueueStats build() { + com.google.cloud.tasks.v2beta3.QueueStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueueStats buildPartial() { + com.google.cloud.tasks.v2beta3.QueueStats result = + new com.google.cloud.tasks.v2beta3.QueueStats(this); + result.tasksCount_ = tasksCount_; + if (oldestEstimatedArrivalTimeBuilder_ == null) { + result.oldestEstimatedArrivalTime_ = oldestEstimatedArrivalTime_; + } else { + result.oldestEstimatedArrivalTime_ = oldestEstimatedArrivalTimeBuilder_.build(); + } + result.executedLastMinuteCount_ = executedLastMinuteCount_; + result.concurrentDispatchesCount_ = concurrentDispatchesCount_; + result.effectiveExecutionRate_ = effectiveExecutionRate_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta3.QueueStats) { + return mergeFrom((com.google.cloud.tasks.v2beta3.QueueStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta3.QueueStats other) { + if (other == com.google.cloud.tasks.v2beta3.QueueStats.getDefaultInstance()) return this; + if (other.getTasksCount() != 0L) { + setTasksCount(other.getTasksCount()); + } + if (other.hasOldestEstimatedArrivalTime()) { + mergeOldestEstimatedArrivalTime(other.getOldestEstimatedArrivalTime()); + } + if (other.getExecutedLastMinuteCount() != 0L) { + setExecutedLastMinuteCount(other.getExecutedLastMinuteCount()); + } + if (other.getConcurrentDispatchesCount() != 0L) { + setConcurrentDispatchesCount(other.getConcurrentDispatchesCount()); + } + if (other.getEffectiveExecutionRate() != 0D) { + setEffectiveExecutionRate(other.getEffectiveExecutionRate()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta3.QueueStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta3.QueueStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long tasksCount_; + /** + * + * + *
+     * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+     * the queue that haven't been executed, the tasks in the queue which the
+     * queue has dispatched but has not yet received a reply for, and the failed
+     * tasks that the queue is retrying.
+     * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tasksCount. + */ + @java.lang.Override + public long getTasksCount() { + return tasksCount_; + } + /** + * + * + *
+     * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+     * the queue that haven't been executed, the tasks in the queue which the
+     * queue has dispatched but has not yet received a reply for, and the failed
+     * tasks that the queue is retrying.
+     * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tasksCount to set. + * @return This builder for chaining. + */ + public Builder setTasksCount(long value) { + + tasksCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+     * the queue that haven't been executed, the tasks in the queue which the
+     * queue has dispatched but has not yet received a reply for, and the failed
+     * tasks that the queue is retrying.
+     * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTasksCount() { + + tasksCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp oldestEstimatedArrivalTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + oldestEstimatedArrivalTimeBuilder_; + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the oldestEstimatedArrivalTime field is set. + */ + public boolean hasOldestEstimatedArrivalTime() { + return oldestEstimatedArrivalTimeBuilder_ != null || oldestEstimatedArrivalTime_ != null; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The oldestEstimatedArrivalTime. + */ + public com.google.protobuf.Timestamp getOldestEstimatedArrivalTime() { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + return oldestEstimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestEstimatedArrivalTime_; + } else { + return oldestEstimatedArrivalTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOldestEstimatedArrivalTime(com.google.protobuf.Timestamp value) { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oldestEstimatedArrivalTime_ = value; + onChanged(); + } else { + oldestEstimatedArrivalTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOldestEstimatedArrivalTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + oldestEstimatedArrivalTime_ = builderForValue.build(); + onChanged(); + } else { + oldestEstimatedArrivalTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOldestEstimatedArrivalTime(com.google.protobuf.Timestamp value) { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + if (oldestEstimatedArrivalTime_ != null) { + oldestEstimatedArrivalTime_ = + com.google.protobuf.Timestamp.newBuilder(oldestEstimatedArrivalTime_) + .mergeFrom(value) + .buildPartial(); + } else { + oldestEstimatedArrivalTime_ = value; + } + onChanged(); + } else { + oldestEstimatedArrivalTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOldestEstimatedArrivalTime() { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + oldestEstimatedArrivalTime_ = null; + onChanged(); + } else { + oldestEstimatedArrivalTime_ = null; + oldestEstimatedArrivalTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getOldestEstimatedArrivalTimeBuilder() { + + onChanged(); + return getOldestEstimatedArrivalTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getOldestEstimatedArrivalTimeOrBuilder() { + if (oldestEstimatedArrivalTimeBuilder_ != null) { + return oldestEstimatedArrivalTimeBuilder_.getMessageOrBuilder(); + } else { + return oldestEstimatedArrivalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : oldestEstimatedArrivalTime_; + } + } + /** + * + * + *
+     * Output only. An estimation of the nearest time in the future where a task in the queue
+     * is scheduled to be executed.
+     * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getOldestEstimatedArrivalTimeFieldBuilder() { + if (oldestEstimatedArrivalTimeBuilder_ == null) { + oldestEstimatedArrivalTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getOldestEstimatedArrivalTime(), getParentForChildren(), isClean()); + oldestEstimatedArrivalTime_ = null; + } + return oldestEstimatedArrivalTimeBuilder_; + } + + private long executedLastMinuteCount_; + /** + * + * + *
+     * Output only. The number of tasks that the queue has dispatched and received a reply for
+     * during the last minute. This variable counts both successful and
+     * non-successful executions.
+     * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The executedLastMinuteCount. + */ + @java.lang.Override + public long getExecutedLastMinuteCount() { + return executedLastMinuteCount_; + } + /** + * + * + *
+     * Output only. The number of tasks that the queue has dispatched and received a reply for
+     * during the last minute. This variable counts both successful and
+     * non-successful executions.
+     * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The executedLastMinuteCount to set. + * @return This builder for chaining. + */ + public Builder setExecutedLastMinuteCount(long value) { + + executedLastMinuteCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of tasks that the queue has dispatched and received a reply for
+     * during the last minute. This variable counts both successful and
+     * non-successful executions.
+     * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearExecutedLastMinuteCount() { + + executedLastMinuteCount_ = 0L; + onChanged(); + return this; + } + + private long concurrentDispatchesCount_; + /** + * + * + *
+     * Output only. The number of requests that the queue has dispatched but has not received
+     * a reply for yet.
+     * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The concurrentDispatchesCount. + */ + @java.lang.Override + public long getConcurrentDispatchesCount() { + return concurrentDispatchesCount_; + } + /** + * + * + *
+     * Output only. The number of requests that the queue has dispatched but has not received
+     * a reply for yet.
+     * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The concurrentDispatchesCount to set. + * @return This builder for chaining. + */ + public Builder setConcurrentDispatchesCount(long value) { + + concurrentDispatchesCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of requests that the queue has dispatched but has not received
+     * a reply for yet.
+     * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearConcurrentDispatchesCount() { + + concurrentDispatchesCount_ = 0L; + onChanged(); + return this; + } + + private double effectiveExecutionRate_; + /** + * + * + *
+     * Output only. The current maximum number of tasks per second executed by the queue.
+     * The maximum value of this variable is controlled by the RateLimits of the
+     * Queue. However, this value could be less to avoid overloading the endpoints
+     * tasks in the queue are targeting.
+     * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveExecutionRate. + */ + @java.lang.Override + public double getEffectiveExecutionRate() { + return effectiveExecutionRate_; + } + /** + * + * + *
+     * Output only. The current maximum number of tasks per second executed by the queue.
+     * The maximum value of this variable is controlled by the RateLimits of the
+     * Queue. However, this value could be less to avoid overloading the endpoints
+     * tasks in the queue are targeting.
+     * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The effectiveExecutionRate to set. + * @return This builder for chaining. + */ + public Builder setEffectiveExecutionRate(double value) { + + effectiveExecutionRate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current maximum number of tasks per second executed by the queue.
+     * The maximum value of this variable is controlled by the RateLimits of the
+     * Queue. However, this value could be less to avoid overloading the endpoints
+     * tasks in the queue are targeting.
+     * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffectiveExecutionRate() { + + effectiveExecutionRate_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.QueueStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.QueueStats) + private static final com.google.cloud.tasks.v2beta3.QueueStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.QueueStats(); + } + + public static com.google.cloud.tasks.v2beta3.QueueStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueueStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueueStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.tasks.v2beta3.QueueStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStatsOrBuilder.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStatsOrBuilder.java new file mode 100644 index 00000000..2ae27c91 --- /dev/null +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStatsOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2020 Google LLC + * + * 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 + * + * https://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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta3/queue.proto + +package com.google.cloud.tasks.v2beta3; + +public interface QueueStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta3.QueueStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. An estimation of the number of tasks in the queue, that is, the tasks in
+   * the queue that haven't been executed, the tasks in the queue which the
+   * queue has dispatched but has not yet received a reply for, and the failed
+   * tasks that the queue is retrying.
+   * 
+ * + * int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tasksCount. + */ + long getTasksCount(); + + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the oldestEstimatedArrivalTime field is set. + */ + boolean hasOldestEstimatedArrivalTime(); + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The oldestEstimatedArrivalTime. + */ + com.google.protobuf.Timestamp getOldestEstimatedArrivalTime(); + /** + * + * + *
+   * Output only. An estimation of the nearest time in the future where a task in the queue
+   * is scheduled to be executed.
+   * 
+ * + * + * .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getOldestEstimatedArrivalTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The number of tasks that the queue has dispatched and received a reply for
+   * during the last minute. This variable counts both successful and
+   * non-successful executions.
+   * 
+ * + * int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The executedLastMinuteCount. + */ + long getExecutedLastMinuteCount(); + + /** + * + * + *
+   * Output only. The number of requests that the queue has dispatched but has not received
+   * a reply for yet.
+   * 
+ * + * int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The concurrentDispatchesCount. + */ + long getConcurrentDispatchesCount(); + + /** + * + * + *
+   * Output only. The current maximum number of tasks per second executed by the queue.
+   * The maximum value of this variable is controlled by the RateLimits of the
+   * Queue. However, this value could be less to avoid overloading the endpoints
+   * tasks in the queue are targeting.
+   * 
+ * + * double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The effectiveExecutionRate. + */ + double getEffectiveExecutionRate(); +} diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimits.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimits.java index 2526eabf..707b2d88 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimits.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimits.java @@ -152,7 +152,7 @@ public double getMaxDispatchesPerSecond() { * * *
-   * Output only. The max burst size.
+   * The max burst size.
    * Max burst size limits how fast tasks in queue are processed when
    * many tasks are in the queue and the rate is high. This field
    * allows the queue to have a high rate so processing starts shortly
@@ -166,20 +166,19 @@ public double getMaxDispatchesPerSecond() {
    * the queue's bucket runs out of tokens. The bucket will be
    * continuously refilled with new tokens based on
    * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
-   * Cloud Tasks will pick the value of `max_burst_size` based on the
-   * value of
+   * The default value of `max_burst_size` is picked by Cloud Tasks
+   * based on the value of
    * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
+   * The maximum value of `max_burst_size` is 500.
    * For App Engine queues that were created or updated using
    * `queue.yaml/xml`, `max_burst_size` is equal to
    * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-   * Since `max_burst_size` is output only, if
-   * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue
-   * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-   * on the value of
-   * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second],
-   * regardless of whether
-   * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]
-   * is updated.
+   * If
+   * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue without
+   * explicitly setting a value for `max_burst_size`,
+   * `max_burst_size` value will get updated if
+   * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is updating
+   * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
    * 
* * int32 max_burst_size = 2; @@ -649,7 +648,7 @@ public Builder clearMaxDispatchesPerSecond() { * * *
-     * Output only. The max burst size.
+     * The max burst size.
      * Max burst size limits how fast tasks in queue are processed when
      * many tasks are in the queue and the rate is high. This field
      * allows the queue to have a high rate so processing starts shortly
@@ -663,20 +662,19 @@ public Builder clearMaxDispatchesPerSecond() {
      * the queue's bucket runs out of tokens. The bucket will be
      * continuously refilled with new tokens based on
      * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
-     * Cloud Tasks will pick the value of `max_burst_size` based on the
-     * value of
+     * The default value of `max_burst_size` is picked by Cloud Tasks
+     * based on the value of
      * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
+     * The maximum value of `max_burst_size` is 500.
      * For App Engine queues that were created or updated using
      * `queue.yaml/xml`, `max_burst_size` is equal to
      * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-     * Since `max_burst_size` is output only, if
-     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue
-     * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-     * on the value of
-     * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second],
-     * regardless of whether
-     * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]
-     * is updated.
+     * If
+     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue without
+     * explicitly setting a value for `max_burst_size`,
+     * `max_burst_size` value will get updated if
+     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is updating
+     * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
      * 
* * int32 max_burst_size = 2; @@ -691,7 +689,7 @@ public int getMaxBurstSize() { * * *
-     * Output only. The max burst size.
+     * The max burst size.
      * Max burst size limits how fast tasks in queue are processed when
      * many tasks are in the queue and the rate is high. This field
      * allows the queue to have a high rate so processing starts shortly
@@ -705,20 +703,19 @@ public int getMaxBurstSize() {
      * the queue's bucket runs out of tokens. The bucket will be
      * continuously refilled with new tokens based on
      * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
-     * Cloud Tasks will pick the value of `max_burst_size` based on the
-     * value of
+     * The default value of `max_burst_size` is picked by Cloud Tasks
+     * based on the value of
      * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
+     * The maximum value of `max_burst_size` is 500.
      * For App Engine queues that were created or updated using
      * `queue.yaml/xml`, `max_burst_size` is equal to
      * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-     * Since `max_burst_size` is output only, if
-     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue
-     * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-     * on the value of
-     * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second],
-     * regardless of whether
-     * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]
-     * is updated.
+     * If
+     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue without
+     * explicitly setting a value for `max_burst_size`,
+     * `max_burst_size` value will get updated if
+     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is updating
+     * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
      * 
* * int32 max_burst_size = 2; @@ -736,7 +733,7 @@ public Builder setMaxBurstSize(int value) { * * *
-     * Output only. The max burst size.
+     * The max burst size.
      * Max burst size limits how fast tasks in queue are processed when
      * many tasks are in the queue and the rate is high. This field
      * allows the queue to have a high rate so processing starts shortly
@@ -750,20 +747,19 @@ public Builder setMaxBurstSize(int value) {
      * the queue's bucket runs out of tokens. The bucket will be
      * continuously refilled with new tokens based on
      * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
-     * Cloud Tasks will pick the value of `max_burst_size` based on the
-     * value of
+     * The default value of `max_burst_size` is picked by Cloud Tasks
+     * based on the value of
      * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
+     * The maximum value of `max_burst_size` is 500.
      * For App Engine queues that were created or updated using
      * `queue.yaml/xml`, `max_burst_size` is equal to
      * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-     * Since `max_burst_size` is output only, if
-     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue
-     * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-     * on the value of
-     * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second],
-     * regardless of whether
-     * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]
-     * is updated.
+     * If
+     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue without
+     * explicitly setting a value for `max_burst_size`,
+     * `max_burst_size` value will get updated if
+     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is updating
+     * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
      * 
* * int32 max_burst_size = 2; diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimitsOrBuilder.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimitsOrBuilder.java index 26a6afe0..98144881 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimitsOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimitsOrBuilder.java @@ -47,7 +47,7 @@ public interface RateLimitsOrBuilder * * *
-   * Output only. The max burst size.
+   * The max burst size.
    * Max burst size limits how fast tasks in queue are processed when
    * many tasks are in the queue and the rate is high. This field
    * allows the queue to have a high rate so processing starts shortly
@@ -61,20 +61,19 @@ public interface RateLimitsOrBuilder
    * the queue's bucket runs out of tokens. The bucket will be
    * continuously refilled with new tokens based on
    * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
-   * Cloud Tasks will pick the value of `max_burst_size` based on the
-   * value of
+   * The default value of `max_burst_size` is picked by Cloud Tasks
+   * based on the value of
    * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
+   * The maximum value of `max_burst_size` is 500.
    * For App Engine queues that were created or updated using
    * `queue.yaml/xml`, `max_burst_size` is equal to
    * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
-   * Since `max_burst_size` is output only, if
-   * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue
-   * created by `queue.yaml/xml`, `max_burst_size` will be reset based
-   * on the value of
-   * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second],
-   * regardless of whether
-   * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]
-   * is updated.
+   * If
+   * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue without
+   * explicitly setting a value for `max_burst_size`,
+   * `max_burst_size` value will get updated if
+   * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is updating
+   * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
    * 
* * int32 max_burst_size = 2; diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java index c45f020c..b76a8c8c 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TargetProto.java @@ -27,6 +27,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta3_PullMessage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta3_PullMessage_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -70,38 +74,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n\'google/cloud/tasks/v2beta3/target.prot" + "o\022\032google.cloud.tasks.v2beta3\032\034google/ap" - + "i/annotations.proto\"\360\002\n\013HttpRequest\022\013\n\003u" - + "rl\030\001 \001(\t\022;\n\013http_method\030\002 \001(\0162&.google.c" - + "loud.tasks.v2beta3.HttpMethod\022E\n\007headers" - + "\030\003 \003(\01324.google.cloud.tasks.v2beta3.Http" - + "Request.HeadersEntry\022\014\n\004body\030\004 \001(\014\022=\n\013oa" - + "uth_token\030\005 \001(\0132&.google.cloud.tasks.v2b" - + "eta3.OAuthTokenH\000\022;\n\noidc_token\030\006 \001(\0132%." - + "google.cloud.tasks.v2beta3.OidcTokenH\000\032." - + "\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001B\026\n\024authorization_header\"g\n\022AppEng" - + "ineHttpQueue\022Q\n\033app_engine_routing_overr" - + "ide\030\001 \001(\0132,.google.cloud.tasks.v2beta3.A" - + "ppEngineRouting\"\301\002\n\024AppEngineHttpRequest" - + "\022;\n\013http_method\030\001 \001(\0162&.google.cloud.tas" - + "ks.v2beta3.HttpMethod\022H\n\022app_engine_rout" - + "ing\030\002 \001(\0132,.google.cloud.tasks.v2beta3.A" - + "ppEngineRouting\022\024\n\014relative_uri\030\003 \001(\t\022N\n" - + "\007headers\030\004 \003(\0132=.google.cloud.tasks.v2be" - + "ta3.AppEngineHttpRequest.HeadersEntry\022\014\n" - + "\004body\030\005 \001(\014\032.\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t" - + "\022\r\n\005value\030\002 \001(\t:\0028\001\"T\n\020AppEngineRouting\022" - + "\017\n\007service\030\001 \001(\t\022\017\n\007version\030\002 \001(\t\022\020\n\010ins" - + "tance\030\003 \001(\t\022\014\n\004host\030\004 \001(\t\":\n\nOAuthToken\022" - + "\035\n\025service_account_email\030\001 \001(\t\022\r\n\005scope\030" - + "\002 \001(\t\"<\n\tOidcToken\022\035\n\025service_account_em" - + "ail\030\001 \001(\t\022\020\n\010audience\030\002 \001(\t*s\n\nHttpMetho" - + "d\022\033\n\027HTTP_METHOD_UNSPECIFIED\020\000\022\010\n\004POST\020\001" - + "\022\007\n\003GET\020\002\022\010\n\004HEAD\020\003\022\007\n\003PUT\020\004\022\n\n\006DELETE\020\005" - + "\022\t\n\005PATCH\020\006\022\013\n\007OPTIONS\020\007Bp\n\036com.google.c" - + "loud.tasks.v2beta3B\013TargetProtoP\001Z?googl" - + "e.golang.org/genproto/googleapis/cloud/t" - + "asks/v2beta3;tasksb\006proto3" + + "i/annotations.proto\"+\n\013PullMessage\022\017\n\007pa" + + "yload\030\001 \001(\014\022\013\n\003tag\030\002 \001(\t\"\360\002\n\013HttpRequest" + + "\022\013\n\003url\030\001 \001(\t\022;\n\013http_method\030\002 \001(\0162&.goo" + + "gle.cloud.tasks.v2beta3.HttpMethod\022E\n\007he" + + "aders\030\003 \003(\01324.google.cloud.tasks.v2beta3" + + ".HttpRequest.HeadersEntry\022\014\n\004body\030\004 \001(\014\022" + + "=\n\013oauth_token\030\005 \001(\0132&.google.cloud.task" + + "s.v2beta3.OAuthTokenH\000\022;\n\noidc_token\030\006 \001" + + "(\0132%.google.cloud.tasks.v2beta3.OidcToke" + + "nH\000\032.\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001B\026\n\024authorization_header\"g\n\022A" + + "ppEngineHttpQueue\022Q\n\033app_engine_routing_" + + "override\030\001 \001(\0132,.google.cloud.tasks.v2be" + + "ta3.AppEngineRouting\"\301\002\n\024AppEngineHttpRe" + + "quest\022;\n\013http_method\030\001 \001(\0162&.google.clou" + + "d.tasks.v2beta3.HttpMethod\022H\n\022app_engine" + + "_routing\030\002 \001(\0132,.google.cloud.tasks.v2be" + + "ta3.AppEngineRouting\022\024\n\014relative_uri\030\003 \001" + + "(\t\022N\n\007headers\030\004 \003(\0132=.google.cloud.tasks" + + ".v2beta3.AppEngineHttpRequest.HeadersEnt" + + "ry\022\014\n\004body\030\005 \001(\014\032.\n\014HeadersEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"T\n\020AppEngineRou" + + "ting\022\017\n\007service\030\001 \001(\t\022\017\n\007version\030\002 \001(\t\022\020" + + "\n\010instance\030\003 \001(\t\022\014\n\004host\030\004 \001(\t\":\n\nOAuthT" + + "oken\022\035\n\025service_account_email\030\001 \001(\t\022\r\n\005s" + + "cope\030\002 \001(\t\"<\n\tOidcToken\022\035\n\025service_accou" + + "nt_email\030\001 \001(\t\022\020\n\010audience\030\002 \001(\t*s\n\nHttp" + + "Method\022\033\n\027HTTP_METHOD_UNSPECIFIED\020\000\022\010\n\004P" + + "OST\020\001\022\007\n\003GET\020\002\022\010\n\004HEAD\020\003\022\007\n\003PUT\020\004\022\n\n\006DEL" + + "ETE\020\005\022\t\n\005PATCH\020\006\022\013\n\007OPTIONS\020\007Bp\n\036com.goo" + + "gle.cloud.tasks.v2beta3B\013TargetProtoP\001Z?" + + "google.golang.org/genproto/googleapis/cl" + + "oud/tasks/v2beta3;tasksb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -109,8 +114,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.AnnotationsProto.getDescriptor(), }); - internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor = + internal_static_google_cloud_tasks_v2beta3_PullMessage_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_tasks_v2beta3_PullMessage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta3_PullMessage_descriptor, + new java.lang.String[] { + "Payload", "Tag", + }); + internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor = + getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_tasks_v2beta3_HttpRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_HttpRequest_descriptor, @@ -132,7 +145,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_AppEngineHttpQueue_descriptor, @@ -140,7 +153,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AppEngineRoutingOverride", }); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpRequest_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_tasks_v2beta3_AppEngineHttpRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_AppEngineHttpRequest_descriptor, @@ -158,7 +171,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_AppEngineRouting_descriptor, @@ -166,7 +179,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Service", "Version", "Instance", "Host", }); internal_static_google_cloud_tasks_v2beta3_OAuthToken_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_tasks_v2beta3_OAuthToken_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_OAuthToken_descriptor, @@ -174,7 +187,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ServiceAccountEmail", "Scope", }); internal_static_google_cloud_tasks_v2beta3_OidcToken_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_tasks_v2beta3_OidcToken_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_tasks_v2beta3_OidcToken_descriptor, diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Task.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Task.java index c97c3691..c8d25571 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Task.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Task.java @@ -207,6 +207,23 @@ private Task( dispatchDeadline_ = subBuilder.buildPartial(); } + break; + } + case 106: + { + com.google.cloud.tasks.v2beta3.PullMessage.Builder subBuilder = null; + if (payloadTypeCase_ == 13) { + subBuilder = + ((com.google.cloud.tasks.v2beta3.PullMessage) payloadType_).toBuilder(); + } + payloadType_ = + input.readMessage( + com.google.cloud.tasks.v2beta3.PullMessage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.tasks.v2beta3.PullMessage) payloadType_); + payloadType_ = subBuilder.buildPartial(); + } + payloadTypeCase_ = 13; break; } default: @@ -432,6 +449,7 @@ public enum PayloadTypeCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { APP_ENGINE_HTTP_REQUEST(3), HTTP_REQUEST(11), + PULL_MESSAGE(13), PAYLOADTYPE_NOT_SET(0); private final int value; @@ -454,6 +472,8 @@ public static PayloadTypeCase forNumber(int value) { return APP_ENGINE_HTTP_REQUEST; case 11: return HTTP_REQUEST; + case 13: + return PULL_MESSAGE; case 0: return PAYLOADTYPE_NOT_SET; default: @@ -660,6 +680,75 @@ public com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder getHttpRequestOrBuild return com.google.cloud.tasks.v2beta3.HttpRequest.getDefaultInstance(); } + public static final int PULL_MESSAGE_FIELD_NUMBER = 13; + /** + * + * + *
+   * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+   * payload type cannot be explicitly set through Cloud Tasks API. Its
+   * purpose, currently is to provide backward compatibility with App Engine
+   * Task Queue
+   * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+   * queues to provide a way to inspect contents of pull tasks through the
+   * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+   * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + * + * @return Whether the pullMessage field is set. + */ + @java.lang.Override + public boolean hasPullMessage() { + return payloadTypeCase_ == 13; + } + /** + * + * + *
+   * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+   * payload type cannot be explicitly set through Cloud Tasks API. Its
+   * purpose, currently is to provide backward compatibility with App Engine
+   * Task Queue
+   * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+   * queues to provide a way to inspect contents of pull tasks through the
+   * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+   * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + * + * @return The pullMessage. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PullMessage getPullMessage() { + if (payloadTypeCase_ == 13) { + return (com.google.cloud.tasks.v2beta3.PullMessage) payloadType_; + } + return com.google.cloud.tasks.v2beta3.PullMessage.getDefaultInstance(); + } + /** + * + * + *
+   * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+   * payload type cannot be explicitly set through Cloud Tasks API. Its
+   * purpose, currently is to provide backward compatibility with App Engine
+   * Task Queue
+   * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+   * queues to provide a way to inspect contents of pull tasks through the
+   * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+   * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PullMessageOrBuilder getPullMessageOrBuilder() { + if (payloadTypeCase_ == 13) { + return (com.google.cloud.tasks.v2beta3.PullMessage) payloadType_; + } + return com.google.cloud.tasks.v2beta3.PullMessage.getDefaultInstance(); + } + public static final int SCHEDULE_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Timestamp scheduleTime_; /** @@ -1111,6 +1200,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dispatchDeadline_ != null) { output.writeMessage(12, getDispatchDeadline()); } + if (payloadTypeCase_ == 13) { + output.writeMessage(13, (com.google.cloud.tasks.v2beta3.PullMessage) payloadType_); + } unknownFields.writeTo(output); } @@ -1157,6 +1249,11 @@ public int getSerializedSize() { if (dispatchDeadline_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDispatchDeadline()); } + if (payloadTypeCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.tasks.v2beta3.PullMessage) payloadType_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1204,6 +1301,9 @@ public boolean equals(final java.lang.Object obj) { case 11: if (!getHttpRequest().equals(other.getHttpRequest())) return false; break; + case 13: + if (!getPullMessage().equals(other.getPullMessage())) return false; + break; case 0: default: } @@ -1255,6 +1355,10 @@ public int hashCode() { hash = (37 * hash) + HTTP_REQUEST_FIELD_NUMBER; hash = (53 * hash) + getHttpRequest().hashCode(); break; + case 13: + hash = (37 * hash) + PULL_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getPullMessage().hashCode(); + break; case 0: default: } @@ -1483,6 +1587,13 @@ public com.google.cloud.tasks.v2beta3.Task buildPartial() { result.payloadType_ = httpRequestBuilder_.build(); } } + if (payloadTypeCase_ == 13) { + if (pullMessageBuilder_ == null) { + result.payloadType_ = payloadType_; + } else { + result.payloadType_ = pullMessageBuilder_.build(); + } + } if (scheduleTimeBuilder_ == null) { result.scheduleTime_ = scheduleTime_; } else { @@ -1600,6 +1711,11 @@ public Builder mergeFrom(com.google.cloud.tasks.v2beta3.Task other) { mergeHttpRequest(other.getHttpRequest()); break; } + case PULL_MESSAGE: + { + mergePullMessage(other.getPullMessage()); + break; + } case PAYLOADTYPE_NOT_SET: { break; @@ -2275,6 +2391,269 @@ public com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder getHttpRequestOrBuild return httpRequestBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.PullMessage, + com.google.cloud.tasks.v2beta3.PullMessage.Builder, + com.google.cloud.tasks.v2beta3.PullMessageOrBuilder> + pullMessageBuilder_; + /** + * + * + *
+     * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+     * payload type cannot be explicitly set through Cloud Tasks API. Its
+     * purpose, currently is to provide backward compatibility with App Engine
+     * Task Queue
+     * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+     * queues to provide a way to inspect contents of pull tasks through the
+     * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+     * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + * + * @return Whether the pullMessage field is set. + */ + @java.lang.Override + public boolean hasPullMessage() { + return payloadTypeCase_ == 13; + } + /** + * + * + *
+     * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+     * payload type cannot be explicitly set through Cloud Tasks API. Its
+     * purpose, currently is to provide backward compatibility with App Engine
+     * Task Queue
+     * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+     * queues to provide a way to inspect contents of pull tasks through the
+     * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+     * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + * + * @return The pullMessage. + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PullMessage getPullMessage() { + if (pullMessageBuilder_ == null) { + if (payloadTypeCase_ == 13) { + return (com.google.cloud.tasks.v2beta3.PullMessage) payloadType_; + } + return com.google.cloud.tasks.v2beta3.PullMessage.getDefaultInstance(); + } else { + if (payloadTypeCase_ == 13) { + return pullMessageBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta3.PullMessage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+     * payload type cannot be explicitly set through Cloud Tasks API. Its
+     * purpose, currently is to provide backward compatibility with App Engine
+     * Task Queue
+     * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+     * queues to provide a way to inspect contents of pull tasks through the
+     * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+     * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + */ + public Builder setPullMessage(com.google.cloud.tasks.v2beta3.PullMessage value) { + if (pullMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payloadType_ = value; + onChanged(); + } else { + pullMessageBuilder_.setMessage(value); + } + payloadTypeCase_ = 13; + return this; + } + /** + * + * + *
+     * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+     * payload type cannot be explicitly set through Cloud Tasks API. Its
+     * purpose, currently is to provide backward compatibility with App Engine
+     * Task Queue
+     * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+     * queues to provide a way to inspect contents of pull tasks through the
+     * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+     * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + */ + public Builder setPullMessage( + com.google.cloud.tasks.v2beta3.PullMessage.Builder builderForValue) { + if (pullMessageBuilder_ == null) { + payloadType_ = builderForValue.build(); + onChanged(); + } else { + pullMessageBuilder_.setMessage(builderForValue.build()); + } + payloadTypeCase_ = 13; + return this; + } + /** + * + * + *
+     * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+     * payload type cannot be explicitly set through Cloud Tasks API. Its
+     * purpose, currently is to provide backward compatibility with App Engine
+     * Task Queue
+     * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+     * queues to provide a way to inspect contents of pull tasks through the
+     * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+     * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + */ + public Builder mergePullMessage(com.google.cloud.tasks.v2beta3.PullMessage value) { + if (pullMessageBuilder_ == null) { + if (payloadTypeCase_ == 13 + && payloadType_ != com.google.cloud.tasks.v2beta3.PullMessage.getDefaultInstance()) { + payloadType_ = + com.google.cloud.tasks.v2beta3.PullMessage.newBuilder( + (com.google.cloud.tasks.v2beta3.PullMessage) payloadType_) + .mergeFrom(value) + .buildPartial(); + } else { + payloadType_ = value; + } + onChanged(); + } else { + if (payloadTypeCase_ == 13) { + pullMessageBuilder_.mergeFrom(value); + } + pullMessageBuilder_.setMessage(value); + } + payloadTypeCase_ = 13; + return this; + } + /** + * + * + *
+     * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+     * payload type cannot be explicitly set through Cloud Tasks API. Its
+     * purpose, currently is to provide backward compatibility with App Engine
+     * Task Queue
+     * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+     * queues to provide a way to inspect contents of pull tasks through the
+     * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+     * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + */ + public Builder clearPullMessage() { + if (pullMessageBuilder_ == null) { + if (payloadTypeCase_ == 13) { + payloadTypeCase_ = 0; + payloadType_ = null; + onChanged(); + } + } else { + if (payloadTypeCase_ == 13) { + payloadTypeCase_ = 0; + payloadType_ = null; + } + pullMessageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+     * payload type cannot be explicitly set through Cloud Tasks API. Its
+     * purpose, currently is to provide backward compatibility with App Engine
+     * Task Queue
+     * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+     * queues to provide a way to inspect contents of pull tasks through the
+     * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+     * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + */ + public com.google.cloud.tasks.v2beta3.PullMessage.Builder getPullMessageBuilder() { + return getPullMessageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+     * payload type cannot be explicitly set through Cloud Tasks API. Its
+     * purpose, currently is to provide backward compatibility with App Engine
+     * Task Queue
+     * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+     * queues to provide a way to inspect contents of pull tasks through the
+     * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+     * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + */ + @java.lang.Override + public com.google.cloud.tasks.v2beta3.PullMessageOrBuilder getPullMessageOrBuilder() { + if ((payloadTypeCase_ == 13) && (pullMessageBuilder_ != null)) { + return pullMessageBuilder_.getMessageOrBuilder(); + } else { + if (payloadTypeCase_ == 13) { + return (com.google.cloud.tasks.v2beta3.PullMessage) payloadType_; + } + return com.google.cloud.tasks.v2beta3.PullMessage.getDefaultInstance(); + } + } + /** + * + * + *
+     * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+     * payload type cannot be explicitly set through Cloud Tasks API. Its
+     * purpose, currently is to provide backward compatibility with App Engine
+     * Task Queue
+     * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+     * queues to provide a way to inspect contents of pull tasks through the
+     * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+     * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.PullMessage, + com.google.cloud.tasks.v2beta3.PullMessage.Builder, + com.google.cloud.tasks.v2beta3.PullMessageOrBuilder> + getPullMessageFieldBuilder() { + if (pullMessageBuilder_ == null) { + if (!(payloadTypeCase_ == 13)) { + payloadType_ = com.google.cloud.tasks.v2beta3.PullMessage.getDefaultInstance(); + } + pullMessageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta3.PullMessage, + com.google.cloud.tasks.v2beta3.PullMessage.Builder, + com.google.cloud.tasks.v2beta3.PullMessageOrBuilder>( + (com.google.cloud.tasks.v2beta3.PullMessage) payloadType_, + getParentForChildren(), + isClean()); + payloadType_ = null; + } + payloadTypeCase_ = 13; + onChanged(); + ; + return pullMessageBuilder_; + } + private com.google.protobuf.Timestamp scheduleTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskOrBuilder.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskOrBuilder.java index a182290d..674d4ee6 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskOrBuilder.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskOrBuilder.java @@ -156,6 +156,59 @@ public interface TaskOrBuilder */ com.google.cloud.tasks.v2beta3.HttpRequestOrBuilder getHttpRequestOrBuilder(); + /** + * + * + *
+   * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+   * payload type cannot be explicitly set through Cloud Tasks API. Its
+   * purpose, currently is to provide backward compatibility with App Engine
+   * Task Queue
+   * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+   * queues to provide a way to inspect contents of pull tasks through the
+   * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+   * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + * + * @return Whether the pullMessage field is set. + */ + boolean hasPullMessage(); + /** + * + * + *
+   * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+   * payload type cannot be explicitly set through Cloud Tasks API. Its
+   * purpose, currently is to provide backward compatibility with App Engine
+   * Task Queue
+   * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+   * queues to provide a way to inspect contents of pull tasks through the
+   * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+   * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + * + * @return The pullMessage. + */ + com.google.cloud.tasks.v2beta3.PullMessage getPullMessage(); + /** + * + * + *
+   * Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This
+   * payload type cannot be explicitly set through Cloud Tasks API. Its
+   * purpose, currently is to provide backward compatibility with App Engine
+   * Task Queue
+   * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
+   * queues to provide a way to inspect contents of pull tasks through the
+   * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask].
+   * 
+ * + * .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + */ + com.google.cloud.tasks.v2beta3.PullMessageOrBuilder getPullMessageOrBuilder(); + /** * * diff --git a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskProto.java b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskProto.java index 2a16d87d..e57410e2 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskProto.java +++ b/proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/TaskProto.java @@ -50,33 +50,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "a3/target.proto\032\036google/protobuf/duratio" + "n.proto\032\037google/protobuf/timestamp.proto" + "\032\027google/rpc/status.proto\032\034google/api/an" - + "notations.proto\"\315\005\n\004Task\022\014\n\004name\030\001 \001(\t\022S" + + "notations.proto\"\216\006\n\004Task\022\014\n\004name\030\001 \001(\t\022S" + "\n\027app_engine_http_request\030\003 \001(\01320.google" + ".cloud.tasks.v2beta3.AppEngineHttpReques" + "tH\000\022?\n\014http_request\030\013 \001(\0132\'.google.cloud" - + ".tasks.v2beta3.HttpRequestH\000\0221\n\rschedule" - + "_time\030\004 \001(\0132\032.google.protobuf.Timestamp\022" - + "/\n\013create_time\030\005 \001(\0132\032.google.protobuf.T" - + "imestamp\0224\n\021dispatch_deadline\030\014 \001(\0132\031.go" - + "ogle.protobuf.Duration\022\026\n\016dispatch_count" - + "\030\006 \001(\005\022\026\n\016response_count\030\007 \001(\005\022:\n\rfirst_" - + "attempt\030\010 \001(\0132#.google.cloud.tasks.v2bet" - + "a3.Attempt\0229\n\014last_attempt\030\t \001(\0132#.googl" - + "e.cloud.tasks.v2beta3.Attempt\0223\n\004view\030\n " - + "\001(\0162%.google.cloud.tasks.v2beta3.Task.Vi" - + "ew\"1\n\004View\022\024\n\020VIEW_UNSPECIFIED\020\000\022\t\n\005BASI" - + "C\020\001\022\010\n\004FULL\020\002:h\352Ae\n\036cloudtasks.googleapi" - + "s.com/Task\022Cprojects/{project}/locations" - + "/{location}/queues/{queue}/tasks/{task}B" - + "\016\n\014payload_type\"\317\001\n\007Attempt\0221\n\rschedule_" - + "time\030\001 \001(\0132\032.google.protobuf.Timestamp\0221" - + "\n\rdispatch_time\030\002 \001(\0132\032.google.protobuf." - + "Timestamp\0221\n\rresponse_time\030\003 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022+\n\017response_status\030" - + "\004 \001(\0132\022.google.rpc.StatusBn\n\036com.google." - + "cloud.tasks.v2beta3B\tTaskProtoP\001Z?google" - + ".golang.org/genproto/googleapis/cloud/ta" - + "sks/v2beta3;tasksb\006proto3" + + ".tasks.v2beta3.HttpRequestH\000\022?\n\014pull_mes" + + "sage\030\r \001(\0132\'.google.cloud.tasks.v2beta3." + + "PullMessageH\000\0221\n\rschedule_time\030\004 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022/\n\013create_time\030" + + "\005 \001(\0132\032.google.protobuf.Timestamp\0224\n\021dis" + + "patch_deadline\030\014 \001(\0132\031.google.protobuf.D" + + "uration\022\026\n\016dispatch_count\030\006 \001(\005\022\026\n\016respo" + + "nse_count\030\007 \001(\005\022:\n\rfirst_attempt\030\010 \001(\0132#" + + ".google.cloud.tasks.v2beta3.Attempt\0229\n\014l" + + "ast_attempt\030\t \001(\0132#.google.cloud.tasks.v" + + "2beta3.Attempt\0223\n\004view\030\n \001(\0162%.google.cl" + + "oud.tasks.v2beta3.Task.View\"1\n\004View\022\024\n\020V" + + "IEW_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002:h" + + "\352Ae\n\036cloudtasks.googleapis.com/Task\022Cpro" + + "jects/{project}/locations/{location}/que" + + "ues/{queue}/tasks/{task}B\016\n\014payload_type" + + "\"\317\001\n\007Attempt\0221\n\rschedule_time\030\001 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\0221\n\rdispatch_time" + + "\030\002 \001(\0132\032.google.protobuf.Timestamp\0221\n\rre" + + "sponse_time\030\003 \001(\0132\032.google.protobuf.Time" + + "stamp\022+\n\017response_status\030\004 \001(\0132\022.google." + + "rpc.StatusBn\n\036com.google.cloud.tasks.v2b" + + "eta3B\tTaskProtoP\001Z?google.golang.org/gen" + + "proto/googleapis/cloud/tasks/v2beta3;tas" + + "ksb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -98,6 +100,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "AppEngineHttpRequest", "HttpRequest", + "PullMessage", "ScheduleTime", "CreateTime", "DispatchDeadline", diff --git a/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto b/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto index de3460f6..81e2098d 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto +++ b/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/cloudtasks.proto @@ -345,6 +345,12 @@ message ListQueuesRequest { // method. It is an error to switch the value of the // [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. string page_token = 4; + + // Optional. Read mask is used for a more granular control over what the API returns. + // If the mask is not present all fields will be returned except + // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + // specified in the mask. + google.protobuf.FieldMask read_mask = 5 [(google.api.field_behavior) = OPTIONAL]; } // Response message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. @@ -374,6 +380,12 @@ message GetQueueRequest { type: "cloudtasks.googleapis.com/Queue" } ]; + + // Optional. Read mask is used for a more granular control over what the API returns. + // If the mask is not present all fields will be returned except + // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + // specified in the mask. + google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue]. diff --git a/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto b/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto index b24b7063..2b042a12 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto +++ b/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/queue.proto @@ -174,6 +174,32 @@ message Queue { // time will be unset if the queue has never been purged. google.protobuf.Timestamp purge_time = 7; + // The maximum amount of time that a task will be retained in + // this queue. + // + // Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + // After a task has lived for `task_ttl`, the task will be deleted + // regardless of whether it was dispatched or not. + // + // The `task_ttl` for queues created via queue.yaml/xml is equal to the + // maximum duration because there is a + // [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + // these queues. To view the maximum valid duration, see the documentation for + // [Duration][google.protobuf.Duration]. + google.protobuf.Duration task_ttl = 8; + + // The task tombstone time to live (TTL). + // + // After a task is deleted or executed, the task's tombstone is + // retained for the length of time specified by `tombstone_ttl`. + // The tombstone is used by task de-duplication; another task with the same + // name can't be created until the tombstone has expired. For more information + // about task de-duplication, see the documentation for + // [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. + // + // Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + google.protobuf.Duration tombstone_ttl = 9; + // Configuration options for writing logs to // [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this // field is unset, then no logs are written. @@ -185,6 +211,11 @@ message Queue { // creation time. When left unspecified, the default value of `PUSH` is // selected. Type type = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The realtime, informational statistics for a queue. In order + // to receive the statistics the caller should include this field in the + // FieldMask. + QueueStats stats = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Rate limits. @@ -209,7 +240,7 @@ message RateLimits { // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). double max_dispatches_per_second = 1; - // Output only. The max burst size. + // The max burst size. // // Max burst size limits how fast tasks in queue are processed when // many tasks are in the queue and the rate is high. This field @@ -226,21 +257,21 @@ message RateLimits { // continuously refilled with new tokens based on // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. // - // Cloud Tasks will pick the value of `max_burst_size` based on the - // value of + // The default value of `max_burst_size` is picked by Cloud Tasks + // based on the value of // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. // + // The maximum value of `max_burst_size` is 500. + // // For App Engine queues that were created or updated using // `queue.yaml/xml`, `max_burst_size` is equal to // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - // Since `max_burst_size` is output only, if - // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue - // created by `queue.yaml/xml`, `max_burst_size` will be reset based - // on the value of - // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second], - // regardless of whether - // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second] - // is updated. + // If + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue without + // explicitly setting a value for `max_burst_size`, + // `max_burst_size` value will get updated if + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is updating + // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. // int32 max_burst_size = 2; @@ -374,3 +405,31 @@ message StackdriverLoggingConfig { // 0.0 is the default and means that no operations are logged. double sampling_ratio = 1; } + +// Statistics for a queue. +message QueueStats { + // Output only. An estimation of the number of tasks in the queue, that is, the tasks in + // the queue that haven't been executed, the tasks in the queue which the + // queue has dispatched but has not yet received a reply for, and the failed + // tasks that the queue is retrying. + int64 tasks_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An estimation of the nearest time in the future where a task in the queue + // is scheduled to be executed. + google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of tasks that the queue has dispatched and received a reply for + // during the last minute. This variable counts both successful and + // non-successful executions. + int64 executed_last_minute_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of requests that the queue has dispatched but has not received + // a reply for yet. + int64 concurrent_dispatches_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current maximum number of tasks per second executed by the queue. + // The maximum value of this variable is controlled by the RateLimits of the + // Queue. However, this value could be less to avoid overloading the endpoints + // tasks in the queue are targeting. + double effective_execution_rate = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto b/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto index cc0c5cfe..5ef1ee08 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto +++ b/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/target.proto @@ -23,6 +23,30 @@ option java_multiple_files = true; option java_outer_classname = "TargetProto"; option java_package = "com.google.cloud.tasks.v2beta3"; +// Pull Message. +// +// This proto can only be used for tasks in a queue which has +// [PULL][google.cloud.tasks.v2beta3.Queue.type] type. It currently exists for backwards compatibility with +// the App Engine Task Queue SDK. This message type maybe returned with methods +// [list][google.cloud.tasks.v2beta3.CloudTask.ListTasks] and +// [get][google.cloud.tasks.v2beta3.CloudTask.ListTasks], when the response view +// is [FULL][google.cloud.tasks.v2beta3.Task.View.Full]. +message PullMessage { + // A data payload consumed by the worker to execute the task. + bytes payload = 1; + + // The tasks's tag. + // + // The tag is less than 500 characters. + // + // SDK compatibility: Although the SDK allows tags to be either + // string or + // [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + // encoded, the tag will be empty when the task is returned by Cloud Tasks. + string tag = 2; +} + // HTTP request. // // The task will be pushed to the worker as an HTTP request. If the worker diff --git a/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto b/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto index 96d552e0..8a652566 100644 --- a/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto +++ b/proto-google-cloud-tasks-v2beta3/src/main/proto/google/cloud/tasks/v2beta3/task.proto @@ -97,6 +97,15 @@ message Task { // // An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. HttpRequest http_request = 11; + + // Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This + // payload type cannot be explicitly set through Cloud Tasks API. Its + // purpose, currently is to provide backward compatibility with App Engine + // Task Queue + // [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) + // queues to provide a way to inspect contents of pull tasks through the + // [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. + PullMessage pull_message = 13; } // The time when the task is scheduled to be attempted. diff --git a/synth.metadata b/synth.metadata index 27b167ee..5c0e42f1 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d7b8108668f224c8dc3b87c7f7a9afe78d3cafaf", - "internalRef": "353031255" + "sha": "a0b91c3dfa479290ed8921fea27020ac4c492763", + "internalRef": "353032056" } }, { @@ -331,12 +331,16 @@ "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/OidcTokenOrBuilder.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PauseQueueRequest.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PauseQueueRequestOrBuilder.java", + "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessage.java", + "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PullMessageOrBuilder.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PurgeQueueRequest.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/PurgeQueueRequestOrBuilder.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/Queue.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueName.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueOrBuilder.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueProto.java", + "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStats.java", + "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/QueueStatsOrBuilder.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimits.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/RateLimitsOrBuilder.java", "proto-google-cloud-tasks-v2beta3/src/main/java/com/google/cloud/tasks/v2beta3/ResumeQueueRequest.java",