From ec3435d0dfca41d66325eec0392fe3029b1896c0 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 16:58:39 -0700 Subject: [PATCH] fix: remove unused files from package (#404) --- packages/google-cloud-tasks/.eslintignore | 3 +- packages/google-cloud-tasks/.prettierignore | 9 +- packages/google-cloud-tasks/package.json | 5 +- .../google-cloud-tasks/samples/.eslintrc.yml | 3 - .../google-cloud-tasks/samples/package.json | 8 +- .../google/cloud/tasks/v2/doc_cloudtasks.js | 446 ------------ .../v2/doc/google/cloud/tasks/v2/doc_queue.js | 381 ---------- .../doc/google/cloud/tasks/v2/doc_target.js | 480 ------------- .../v2/doc/google/cloud/tasks/v2/doc_task.js | 221 ------ .../v2/doc/google/iam/v1/doc_iam_policy.js | 96 --- .../src/v2/doc/google/iam/v1/doc_options.js | 37 - .../src/v2/doc/google/iam/v1/doc_policy.js | 167 ----- .../src/v2/doc/google/protobuf/doc_any.js | 137 ---- .../v2/doc/google/protobuf/doc_duration.js | 97 --- .../src/v2/doc/google/protobuf/doc_empty.js | 34 - .../v2/doc/google/protobuf/doc_field_mask.js | 228 ------ .../v2/doc/google/protobuf/doc_timestamp.js | 117 --- .../src/v2/doc/google/rpc/doc_status.js | 95 --- .../src/v2/doc/google/type/doc_expr.js | 51 -- .../cloud/tasks/v2beta2/doc_cloudtasks.js | 675 ------------------ .../google/cloud/tasks/v2beta2/doc_queue.js | 386 ---------- .../google/cloud/tasks/v2beta2/doc_target.js | 434 ----------- .../google/cloud/tasks/v2beta2/doc_task.js | 220 ------ .../doc/google/iam/v1/doc_iam_policy.js | 96 --- .../v2beta2/doc/google/iam/v1/doc_options.js | 37 - .../v2beta2/doc/google/iam/v1/doc_policy.js | 167 ----- .../v2beta2/doc/google/protobuf/doc_any.js | 137 ---- .../doc/google/protobuf/doc_duration.js | 97 --- .../v2beta2/doc/google/protobuf/doc_empty.js | 34 - .../doc/google/protobuf/doc_field_mask.js | 228 ------ .../doc/google/protobuf/doc_timestamp.js | 117 --- .../src/v2beta2/doc/google/rpc/doc_status.js | 95 --- .../src/v2beta2/doc/google/type/doc_expr.js | 51 -- .../cloud/tasks/v2beta3/doc_cloudtasks.js | 446 ------------ .../google/cloud/tasks/v2beta3/doc_queue.js | 400 ----------- .../google/cloud/tasks/v2beta3/doc_target.js | 507 ------------- .../google/cloud/tasks/v2beta3/doc_task.js | 223 ------ .../doc/google/iam/v1/doc_iam_policy.js | 96 --- .../v2beta3/doc/google/iam/v1/doc_options.js | 37 - .../v2beta3/doc/google/iam/v1/doc_policy.js | 167 ----- .../v2beta3/doc/google/protobuf/doc_any.js | 137 ---- .../doc/google/protobuf/doc_duration.js | 97 --- .../v2beta3/doc/google/protobuf/doc_empty.js | 34 - .../doc/google/protobuf/doc_field_mask.js | 228 ------ .../doc/google/protobuf/doc_timestamp.js | 117 --- .../src/v2beta3/doc/google/rpc/doc_status.js | 95 --- .../src/v2beta3/doc/google/type/doc_expr.js | 51 -- packages/google-cloud-tasks/synth.metadata | 14 +- packages/google-cloud-tasks/synth.py | 7 +- .../system-test/.eslintrc.yml | 4 - .../google-cloud-tasks/system-test/install.ts | 4 +- .../google-cloud-tasks/test/.eslintrc.yml | 3 - packages/google-cloud-tasks/tslint.json | 3 - 53 files changed, 29 insertions(+), 8030 deletions(-) delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_cloudtasks.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_queue.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_target.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_task.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_iam_policy.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_options.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_policy.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_any.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_duration.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_empty.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_field_mask.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_timestamp.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/rpc/doc_status.js delete mode 100644 packages/google-cloud-tasks/src/v2/doc/google/type/doc_expr.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_cloudtasks.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_queue.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_target.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_task.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_iam_policy.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_options.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_policy.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_any.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_duration.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_empty.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_field_mask.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_timestamp.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/rpc/doc_status.js delete mode 100644 packages/google-cloud-tasks/src/v2beta2/doc/google/type/doc_expr.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_cloudtasks.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_queue.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_target.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_task.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_iam_policy.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_options.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_policy.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_any.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_duration.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_empty.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_field_mask.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_timestamp.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/rpc/doc_status.js delete mode 100644 packages/google-cloud-tasks/src/v2beta3/doc/google/type/doc_expr.js delete mode 100644 packages/google-cloud-tasks/system-test/.eslintrc.yml delete mode 100644 packages/google-cloud-tasks/test/.eslintrc.yml delete mode 100644 packages/google-cloud-tasks/tslint.json diff --git a/packages/google-cloud-tasks/.eslintignore b/packages/google-cloud-tasks/.eslintignore index 09b31fe735a..9340ad9b86d 100644 --- a/packages/google-cloud-tasks/.eslintignore +++ b/packages/google-cloud-tasks/.eslintignore @@ -1,5 +1,6 @@ **/node_modules -src/**/doc/* +**/coverage +test/fixtures build/ docs/ protos/ diff --git a/packages/google-cloud-tasks/.prettierignore b/packages/google-cloud-tasks/.prettierignore index f6fac98b0a8..9340ad9b86d 100644 --- a/packages/google-cloud-tasks/.prettierignore +++ b/packages/google-cloud-tasks/.prettierignore @@ -1,3 +1,6 @@ -node_modules/* -samples/node_modules/* -src/**/doc/* +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-tasks/package.json b/packages/google-cloud-tasks/package.json index 287453e29f6..d31c2d18f92 100644 --- a/packages/google-cloud-tasks/package.json +++ b/packages/google-cloud-tasks/package.json @@ -11,9 +11,7 @@ "main": "build/src/index.js", "files": [ "build/protos", - "build/src", - "AUTHORS", - "COPYING" + "build/src" ], "keywords": [ "google apis client", @@ -60,7 +58,6 @@ "mocha": "^7.0.0", "null-loader": "^3.0.0", "pack-n-play": "^1.0.0-2", - "prettier": "^1.11.1", "sinon": "^9.0.1", "ts-loader": "^6.2.1", "typescript": "^3.8.3", diff --git a/packages/google-cloud-tasks/samples/.eslintrc.yml b/packages/google-cloud-tasks/samples/.eslintrc.yml index ed671114802..282535f55f6 100644 --- a/packages/google-cloud-tasks/samples/.eslintrc.yml +++ b/packages/google-cloud-tasks/samples/.eslintrc.yml @@ -1,6 +1,3 @@ --- rules: no-console: off - node/no-missing-require: off -parserOptions: - ecmaVersion: 8 diff --git a/packages/google-cloud-tasks/samples/package.json b/packages/google-cloud-tasks/samples/package.json index 8de42839e07..92236f85423 100644 --- a/packages/google-cloud-tasks/samples/package.json +++ b/packages/google-cloud-tasks/samples/package.json @@ -5,12 +5,14 @@ "author": "Google Inc.", "private": true, "engines": { - "node": ">=8" + "node": ">=10" }, + "files": [ + "*.js" + ], "scripts": { "test": "mocha", - "start": "node server.js", - "lint": "eslint '**/*.js'" + "start": "node server.js" }, "dependencies": { "@google-cloud/tasks": "^2.0.0", diff --git a/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_cloudtasks.js b/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_cloudtasks.js deleted file mode 100644 index 1dfd3339e19..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_cloudtasks.js +++ /dev/null @@ -1,446 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Request message for ListQueues. - * - * @property {string} parent - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * @property {string} filter - * `filter` can be used to specify a subset of queues. Any Queue - * field can be used as a filter and several operators as supported. - * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - * described in - * [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * - * Sample filter "state: PAUSED". - * - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * - * @property {number} pageSize - * Requested page size. - * - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * next_page_token in the - * response to determine if more queues exist. - * - * @property {string} pageToken - * A token identifying the page of results to return. - * - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * next_page_token returned - * from the previous call to ListQueues - * method. It is an error to switch the value of the - * filter while iterating through pages. - * - * @typedef ListQueuesRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.ListQueuesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const ListQueuesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for ListQueues. - * - * @property {Object[]} queues - * The list of queues. - * - * This object should have the same structure as [Queue]{@link google.cloud.tasks.v2.Queue} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * - * To return the next page of results, call - * ListQueues with this value as the - * page_token. - * - * If the next_page_token is empty, there are no more results. - * - * The page token is valid for only 2 hours. - * - * @typedef ListQueuesResponse - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.ListQueuesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const ListQueuesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for GetQueue. - * - * @property {string} name - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef GetQueueRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.GetQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const GetQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for CreateQueue. - * - * @property {string} parent - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * ListLocations. - * - * @property {Object} queue - * Required. The queue to create. - * - * Queue's name cannot be the same as an existing queue. - * - * This object should have the same structure as [Queue]{@link google.cloud.tasks.v2.Queue} - * - * @typedef CreateQueueRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.CreateQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const CreateQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for UpdateQueue. - * - * @property {Object} queue - * Required. The queue to create or update. - * - * The queue's name must be specified. - * - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's name cannot be changed. - * - * This object should have the same structure as [Queue]{@link google.cloud.tasks.v2.Queue} - * - * @property {Object} updateMask - * A mask used to specify which fields of the queue are being updated. - * - * If empty, then all fields will be updated. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateQueueRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.UpdateQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const UpdateQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for DeleteQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef DeleteQueueRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.DeleteQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const DeleteQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PurgeQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef PurgeQueueRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.PurgeQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const PurgeQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PauseQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef PauseQueueRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.PauseQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const PauseQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for ResumeQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef ResumeQueueRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.ResumeQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const ResumeQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for listing tasks using ListTasks. - * - * @property {string} parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2.View} - * - * @property {number} pageSize - * Maximum page size. - * - * Fewer tasks than requested might be returned, even if more tasks exist; use - * next_page_token in the response to - * determine if more tasks exist. - * - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * @property {string} pageToken - * A token identifying the page of results to return. - * - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * next_page_token returned - * from the previous call to ListTasks - * method. - * - * The page token is valid for only 2 hours. - * - * @typedef ListTasksRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.ListTasksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const ListTasksRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for listing tasks using ListTasks. - * - * @property {Object[]} tasks - * The list of tasks. - * - * This object should have the same structure as [Task]{@link google.cloud.tasks.v2.Task} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * - * To return the next page of results, call - * ListTasks with this value as the - * page_token. - * - * If the next_page_token is empty, there are no more results. - * - * @typedef ListTasksResponse - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.ListTasksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const ListTasksResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for getting a task using GetTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2.View} - * - * @typedef GetTaskRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.GetTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const GetTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for CreateTask. - * - * @property {string} parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * The queue must already exist. - * - * @property {Object} task - * Required. The task to add. - * - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task name. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * response. - * - * If schedule_time is not set or is in the - * past then Cloud Tasks will set it to the current time. - * - * Task De-duplication: - * - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with ALREADY_EXISTS. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. - * - * Because there is an extra lookup cost to identify duplicate task - * names, these CreateTask calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * This object should have the same structure as [Task]{@link google.cloud.tasks.v2.Task} - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2.View} - * - * @typedef CreateTaskRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.CreateTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const CreateTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for deleting a task using - * DeleteTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @typedef DeleteTaskRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.DeleteTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const DeleteTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for forcing a task to run now using - * RunTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2.View} - * - * @typedef RunTaskRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.RunTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/cloudtasks.proto} - */ -const RunTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_queue.js b/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_queue.js deleted file mode 100644 index f3301f9632c..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_queue.js +++ /dev/null @@ -1,381 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A queue is a container of related tasks. Queues are configured to manage - * how those tasks are dispatched. Configurable properties include rate limits, - * retry options, queue types, and others. - * - * @property {string} name - * Caller-specified and required in CreateQueue, - * after which it becomes output only. - * - * The queue name. - * - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * ListLocations. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * @property {Object} appEngineRoutingOverride - * Overrides for - * task-level app_engine_routing. - * These settings apply only to - * App Engine tasks in this queue. - * Http tasks are not affected. - * - * If set, `app_engine_routing_override` is used for all - * App Engine tasks in the queue, no matter what the - * setting is for the - * task-level app_engine_routing. - * - * This object should have the same structure as [AppEngineRouting]{@link google.cloud.tasks.v2.AppEngineRouting} - * - * @property {Object} rateLimits - * Rate limits for task dispatches. - * - * rate_limits and retry_config are - * related because they both control task attempts. However they control task - * attempts in different ways: - * - * * rate_limits controls the total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * retry_config controls what happens to - * particular a task after its first attempt fails. That is, - * retry_config controls task retries (the - * second attempt, third attempt, etc). - * - * The queue's actual dispatch rate is the result of: - * - * * Number of tasks in the queue - * * User-specified throttling: rate_limits, - * retry_config, and the - * queue's state. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * - * This object should have the same structure as [RateLimits]{@link google.cloud.tasks.v2.RateLimits} - * - * @property {Object} retryConfig - * Settings that determine the retry behavior. - * - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * This object should have the same structure as [RetryConfig]{@link google.cloud.tasks.v2.RetryConfig} - * - * @property {number} state - * Output only. The state of the queue. - * - * `state` can only be changed by called - * PauseQueue, - * ResumeQueue, or uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * UpdateQueue cannot be used to change `state`. - * - * The number should be among the values of [State]{@link google.cloud.tasks.v2.State} - * - * @property {Object} purgeTime - * Output only. The last time this queue was purged. - * - * All tasks that were created before this time - * were purged. - * - * A queue can be purged using PurgeQueue, the - * [App Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef Queue - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.Queue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/queue.proto} - */ -const Queue = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * State of the queue. - * - * @enum {number} - * @memberof google.cloud.tasks.v2 - */ - State: { - - /** - * Unspecified state. - */ - STATE_UNSPECIFIED: 0, - - /** - * The queue is running. Tasks can be dispatched. - * - * If the queue was created using Cloud Tasks and the queue has - * had no activity (method calls or task dispatches) for 30 days, - * the queue may take a few minutes to re-activate. Some method - * calls may return NOT_FOUND and - * tasks may not be dispatched for a few minutes until the queue - * has been re-activated. - */ - RUNNING: 1, - - /** - * Tasks are paused by the user. If the queue is paused then Cloud - * Tasks will stop delivering tasks from it, but more tasks can - * still be added to it by the user. - */ - PAUSED: 2, - - /** - * The queue is disabled. - * - * A queue becomes `DISABLED` when - * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) - * or - * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - * is uploaded which does not contain the queue. You cannot directly disable - * a queue. - * - * When a queue is disabled, tasks can still be added to a queue - * but the tasks are not dispatched. - * - * To permanently delete this queue and all of its tasks, call - * DeleteQueue. - */ - DISABLED: 3 - } -}; - -/** - * Rate limits. - * - * This message determines the maximum rate that tasks can be dispatched by a - * queue, regardless of whether the dispatch is a first task attempt or a retry. - * - * Note: The debugging command, RunTask, will run a task - * even if the queue has reached its RateLimits. - * - * @property {number} maxDispatchesPerSecond - * The maximum rate at which tasks are dispatched from this queue. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * * The maximum allowed value is 500. - * - * - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * @property {number} maxBurstSize - * Output only. 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 - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * 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_dispatches_per_second. - * - * Cloud Tasks will pick the value of `max_burst_size` based on the - * value of - * max_dispatches_per_second. - * - * For 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 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, - * regardless of whether - * max_dispatches_per_second - * is updated. - * - * @property {number} maxConcurrentDispatches - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * The maximum allowed value is 5,000. - * - * - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * @typedef RateLimits - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.RateLimits definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/queue.proto} - */ -const RateLimits = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Retry config. - * - * These settings determine when a failed task attempt is retried. - * - * @property {number} maxAttempts - * Number of attempts per task. - * - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * -1 indicates unlimited attempts. - * - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * @property {Object} maxRetryDuration - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted max_attempts - * times, no further attempts will be made and the task will be - * deleted. - * - * If zero, then the task age is unlimited. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * `max_retry_duration` will be truncated to the nearest second. - * - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} minBackoff - * A task will be scheduled for retry between - * min_backoff and - * max_backoff duration after it fails, - * if the queue's RetryConfig specifies that the task should be - * retried. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * `min_backoff` will be truncated to the nearest second. - * - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} maxBackoff - * A task will be scheduled for retry between - * min_backoff and - * max_backoff duration after it fails, - * if the queue's RetryConfig specifies that the task should be - * retried. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * `max_backoff` will be truncated to the nearest second. - * - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} maxDoublings - * The time between retries will double `max_doublings` times. - * - * A task's retry interval starts at - * min_backoff, then doubles - * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of - * max_backoff up to - * max_attempts times. - * - * For example, if min_backoff is 10s, - * max_backoff is 300s, and - * `max_doublings` is 3, then the a task will first be retried in - * 10s. The retry interval will double three times, and then - * increase linearly by 2^3 * 10s. Finally, the task will retry at - * intervals of max_backoff until the - * task has been attempted max_attempts - * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, - * 240s, 300s, 300s, .... - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * @typedef RetryConfig - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.RetryConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/queue.proto} - */ -const RetryConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_target.js b/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_target.js deleted file mode 100644 index 85b5ae9dd22..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_target.js +++ /dev/null @@ -1,480 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * HTTP request. - * - * The task will be pushed to the worker as an HTTP request. If the worker - * or the redirected worker acknowledges the task by returning a successful HTTP - * response code ([`200` - `299`]), the task will removed from the queue. If - * any other HTTP response code is returned or no response is received, the - * task will be retried according to the following: - * - * * User-specified throttling: retry configuration, - * rate limits, and the queue's state. - * - * * System throttling: To prevent the worker from overloading, Cloud Tasks may - * temporarily reduce the queue's effective rate. User-specified settings - * will not be changed. - * - * System throttling happens because: - * - * * Cloud Tasks backs off on all errors. Normally the backoff specified in - * rate limits will be used. But if the worker returns - * `429` (Too Many Requests), `503` (Service Unavailable), or the rate of - * errors is high, Cloud Tasks will use a higher backoff rate. The retry - * specified in the `Retry-After` HTTP response header is considered. - * - * * To prevent traffic spikes and to smooth sudden large traffic spikes, - * dispatches ramp up slowly when the queue is newly created or idle and - * if large numbers of tasks suddenly become available to dispatch (due to - * spikes in create task rates, the queue being unpaused, or many tasks - * that are scheduled at the same time). - * - * @property {string} url - * Required. The full url path that the request will be sent to. - * - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * @property {number} httpMethod - * The HTTP method to use for the request. The default is POST. - * - * The number should be among the values of [HttpMethod]{@link google.cloud.tasks.v2.HttpMethod} - * - * @property {Object.} headers - * HTTP request headers. - * - * This map contains the header field names and values. - * Headers can be set when the - * task is created. - * - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * - * A partial list of headers that will be ignored or replaced is: - * - * * Host: This will be computed by Cloud Tasks and derived from - * HttpRequest.url. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * X-Google-*: Google use only. - * * X-AppEngine-*: Google use only. - * - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * task is created. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * - * The size of the headers must be less than 80KB. - * - * @property {Buffer} body - * HTTP request body. - * - * A request body is allowed only if the - * HTTP method is POST, PUT, or PATCH. It is an - * error to set body on a task with an incompatible HttpMethod. - * - * @property {Object} oauthToken - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * This object should have the same structure as [OAuthToken]{@link google.cloud.tasks.v2.OAuthToken} - * - * @property {Object} oidcToken - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * This object should have the same structure as [OidcToken]{@link google.cloud.tasks.v2.OidcToken} - * - * @typedef HttpRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/target.proto} - */ -const HttpRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine HTTP request. - * - * The message defines the HTTP request that is sent to an App Engine app when - * the task is dispatched. - * - * Using AppEngineHttpRequest requires - * [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - * Google IAM permission for the project - * and the following scope: - * - * `https://www.googleapis.com/auth/cloud-platform` - * - * The task will be delivered to the App Engine app which belongs to the same - * project as the queue. For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and how routing is affected by - * [dispatch - * files](https://cloud.google.com/appengine/docs/python/config/dispatchref). - * Traffic is encrypted during transport and never leaves Google datacenters. - * Because this traffic is carried over a communication mechanism internal to - * Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). - * The request to the handler, however, will appear to have used the HTTP - * protocol. - * - * The AppEngineRouting used to construct the URL that the task is - * delivered to can be set at the queue-level or task-level: - * - * * If app_engine_routing_override is set on the - * queue, this value is used for all - * tasks in the queue, no matter what the setting is for the task-level - * app_engine_routing. - * - * - * The `url` that the task will be sent to is: - * - * * `url =` host `+` - * relative_uri - * - * Tasks can be dispatched to secure app handlers, unsecure app handlers, and - * URIs restricted with - * [`login: - * admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). - * Because tasks are not run as any user, they cannot be dispatched to URIs - * restricted with - * [`login: - * required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) - * Task dispatches also do not follow redirects. - * - * The task attempt has succeeded if the app's request handler returns an HTTP - * response code in the range [`200` - `299`]. The task attempt has failed if - * the app's handler returns a non-2xx response code or Cloud Tasks does - * not receive response before the deadline. Failed - * tasks will be retried according to the - * retry configuration. `503` (Service Unavailable) is - * considered an App Engine system error instead of an application error and - * will cause Cloud Tasks' traffic congestion control to temporarily throttle - * the queue's dispatches. Unlike other types of task targets, a `429` (Too Many - * Requests) response from an app handler does not cause traffic congestion - * control to throttle the queue. - * - * @property {number} httpMethod - * 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 - * 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). - * - * The number should be among the values of [HttpMethod]{@link google.cloud.tasks.v2.HttpMethod} - * - * @property {Object} appEngineRouting - * Task-level setting for App Engine routing. - * - * * If app_engine_routing_override is set on the - * queue, this value is used for all - * tasks in the queue, no matter what the setting is for the task-level - * app_engine_routing. - * - * This object should have the same structure as [AppEngineRouting]{@link google.cloud.tasks.v2.AppEngineRouting} - * - * @property {string} relativeUri - * The relative URI. - * - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * @property {Object.} headers - * HTTP request headers. - * - * This map contains the header field names and values. - * Headers can be set when the - * task is created. - * Repeated headers are not supported but a header value can contain commas. - * - * Cloud Tasks sets some headers to default values: - * - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * - * If the task has a body, Cloud - * Tasks sets the following headers: - * - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * task is created. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * - * The headers below cannot be set or overridden: - * - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the Task. For more - * information, see the CreateTask documentation. - * - * @property {Buffer} body - * HTTP request body. - * - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible HttpMethod. - * - * @typedef AppEngineHttpRequest - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.AppEngineHttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/target.proto} - */ -const AppEngineHttpRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine Routing. - * - * Defines routing characteristics specific to App Engine - service, version, - * and instance. - * - * For more information about services, versions, and instances see - * [An Overview of App - * Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), - * [Microservices Architecture on Google App - * Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Using AppEngineRouting requires - * [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - * Google IAM permission for the project - * and the following scope: - * - * `https://www.googleapis.com/auth/cloud-platform` - * - * @property {string} service - * App service. - * - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * - * For some queues or tasks which were created using the App Engine - * Task Queue API, host is not parsable - * into service, - * version, and - * instance. For example, some tasks - * which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * host is not parsable, then - * service, - * version, and - * instance are the empty string. - * - * @property {string} version - * App version. - * - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * - * For some queues or tasks which were created using the App Engine - * Task Queue API, host is not parsable - * into service, - * version, and - * instance. For example, some tasks - * which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * host is not parsable, then - * service, - * version, and - * instance are the empty string. - * - * @property {string} instance - * App instance. - * - * By default, the task is sent to an instance which is available when - * the task is attempted. - * - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * @property {string} host - * Output only. The host that the task is sent to. - * - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * service, version, - * and instance. Tasks which were created using - * the App Engine SDK might have a custom domain name. - * - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * - * @typedef AppEngineRouting - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.AppEngineRouting definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/target.proto} - */ -const AppEngineRouting = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Contains information needed for generating an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2). - * This type of authorization should generally only be used when calling Google - * APIs hosted on *.googleapis.com. - * - * @property {string} serviceAccountEmail - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * @property {string} scope - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * @typedef OAuthToken - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.OAuthToken definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/target.proto} - */ -const OAuthToken = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Contains information needed for generating an - * [OpenID Connect - * token](https://developers.google.com/identity/protocols/OpenIDConnect). - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * @property {string} serviceAccountEmail - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * @property {string} audience - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * @typedef OidcToken - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.OidcToken definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/target.proto} - */ -const OidcToken = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The HTTP method used to deliver the task. - * - * @enum {number} - * @memberof google.cloud.tasks.v2 - */ -const HttpMethod = { - - /** - * HTTP method unspecified - */ - HTTP_METHOD_UNSPECIFIED: 0, - - /** - * HTTP POST - */ - POST: 1, - - /** - * HTTP GET - */ - GET: 2, - - /** - * HTTP HEAD - */ - HEAD: 3, - - /** - * HTTP PUT - */ - PUT: 4, - - /** - * HTTP DELETE - */ - DELETE: 5, - - /** - * HTTP PATCH - */ - PATCH: 6, - - /** - * HTTP OPTIONS - */ - OPTIONS: 7 -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_task.js b/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_task.js deleted file mode 100644 index ef65cebc89f..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/cloud/tasks/v2/doc_task.js +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A unit of scheduled work. - * - * @property {string} name - * Optionally caller-specified in CreateTask. - * - * The task name. - * - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * ListLocations. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * @property {Object} appEngineHttpRequest - * HTTP request that is sent to the App Engine app handler. - * - * An App Engine task is a task that has AppEngineHttpRequest set. - * - * This object should have the same structure as [AppEngineHttpRequest]{@link google.cloud.tasks.v2.AppEngineHttpRequest} - * - * @property {Object} httpRequest - * HTTP request that is sent to the worker. - * - * An HTTP task is a task that has HttpRequest set. - * - * This object should have the same structure as [HttpRequest]{@link google.cloud.tasks.v2.HttpRequest} - * - * @property {Object} scheduleTime - * The time when the task is scheduled to be attempted or retried. - * - * `schedule_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} createTime - * Output only. The time that the task was created. - * - * `create_time` will be truncated to the nearest second. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} dispatchDeadline - * The deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the RetryConfig. - * - * Note that when the request is cancelled, Cloud Tasks will stop listing for - * the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * - * The default and maximum values depend on the type of request: - * - * * For HTTP tasks, the default is 10 minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * - * * For App Engine tasks, 0 indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} dispatchCount - * Output only. The number of attempts dispatched. - * - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * @property {number} responseCount - * Output only. The number of attempts which have received a response. - * - * @property {Object} firstAttempt - * Output only. The status of the task's first attempt. - * - * Only dispatch_time will be set. - * The other Attempt information is not retained by Cloud Tasks. - * - * This object should have the same structure as [Attempt]{@link google.cloud.tasks.v2.Attempt} - * - * @property {Object} lastAttempt - * Output only. The status of the task's last attempt. - * - * This object should have the same structure as [Attempt]{@link google.cloud.tasks.v2.Attempt} - * - * @property {number} view - * Output only. The view specifies which subset of the Task has - * been returned. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2.View} - * - * @typedef Task - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.Task definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/task.proto} - */ -const Task = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The view specifies a subset of Task data. - * - * When a task is returned in a response, not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * @enum {number} - * @memberof google.cloud.tasks.v2 - */ - View: { - - /** - * Unspecified. Defaults to BASIC. - */ - VIEW_UNSPECIFIED: 0, - - /** - * The basic view omits fields which can be large or can contain - * sensitive data. - * - * This view does not include the - * body in AppEngineHttpRequest. - * Bodies are desirable to return only when needed, because they - * can be large and because of the sensitivity of the data that you - * choose to store in it. - */ - BASIC: 1, - - /** - * All information is returned. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Queue resource. - */ - FULL: 2 - } -}; - -/** - * The status of a task attempt. - * - * @property {Object} scheduleTime - * Output only. The time that this attempt was scheduled. - * - * `schedule_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} dispatchTime - * Output only. The time that this attempt was dispatched. - * - * `dispatch_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} responseTime - * Output only. The time that this attempt response was received. - * - * `response_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} responseStatus - * Output only. The response from the worker for this attempt. - * - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @typedef Attempt - * @memberof google.cloud.tasks.v2 - * @see [google.cloud.tasks.v2.Attempt definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2/task.proto} - */ -const Attempt = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_iam_policy.js deleted file mode 100644 index 15b6fb823d4..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_iam_policy.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Request message for `SetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * - * @property {Object} policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * - * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} - * - * @typedef SetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.SetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const SetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `GetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * - * @property {Object} options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} - * - * @typedef GetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.GetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const GetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `TestIamPermissions` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * - * @property {string[]} permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * - * @typedef TestIamPermissionsRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for `TestIamPermissions` method. - * - * @property {string[]} permissions - * A subset of `TestPermissionsRequest.permissions` that the caller is - * allowed. - * - * @typedef TestIamPermissionsResponse - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_options.js b/packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_options.js deleted file mode 100644 index b725d806cce..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_options.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Encapsulates settings provided to GetIamPolicy. - * - * @property {number} requestedPolicyVersion - * Optional. The policy format version to be returned. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Requests for policies with any conditional bindings must specify version 3. - * Policies without any conditional bindings may specify any valid value or - * leave the field unset. - * - * @typedef GetPolicyOptions - * @memberof google.iam.v1 - * @see [google.iam.v1.GetPolicyOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/options.proto} - */ -const GetPolicyOptions = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_policy.js deleted file mode 100644 index 606cdf98cad..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/iam/v1/doc_policy.js +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Defines an Identity and Access Management (IAM) policy. It is used to - * specify access control policies for Cloud Platform resources. - * - * - * A `Policy` is a collection of `bindings`. A `binding` binds one or more - * `members` to a single `role`. Members can be user accounts, service accounts, - * Google groups, and domains (such as G Suite). A `role` is a named list of - * permissions (defined by IAM or configured by users). A `binding` can - * optionally specify a `condition`, which is a logic expression that further - * constrains the role binding based on attributes about the request and/or - * target resource. - * - * **JSON Example** - * - * { - * "bindings": [ - * { - * "role": "roles/resourcemanager.organizationAdmin", - * "members": [ - * "user:mike@example.com", - * "group:admins@example.com", - * "domain:google.com", - * "serviceAccount:my-project-id@appspot.gserviceaccount.com" - * ] - * }, - * { - * "role": "roles/resourcemanager.organizationViewer", - * "members": ["user:eve@example.com"], - * "condition": { - * "title": "expirable access", - * "description": "Does not grant access after Sep 2020", - * "expression": "request.time < - * timestamp('2020-10-01T00:00:00.000Z')", - * } - * } - * ] - * } - * - * **YAML Example** - * - * bindings: - * - members: - * - user:mike@example.com - * - group:admins@example.com - * - domain:google.com - * - serviceAccount:my-project-id@appspot.gserviceaccount.com - * role: roles/resourcemanager.organizationAdmin - * - members: - * - user:eve@example.com - * role: roles/resourcemanager.organizationViewer - * condition: - * title: expirable access - * description: Does not grant access after Sep 2020 - * expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - * - * For a description of IAM and its features, see the - * [IAM developer's guide](https://cloud.google.com/iam/docs). - * - * @property {number} version - * Specifies the format of the policy. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Operations affecting conditional bindings must specify version 3. This can - * be either setting a conditional policy, modifying a conditional binding, - * or removing a binding (conditional or unconditional) from the stored - * conditional policy. - * Operations on non-conditional policies may specify any valid value or - * leave the field unset. - * - * If no etag is provided in the call to `setIamPolicy`, version compliance - * checks against the stored policy is skipped. - * - * @property {Object[]} bindings - * Associates a list of `members` to a `role`. Optionally may specify a - * `condition` that determines when binding is in effect. - * `bindings` with no members will result in an error. - * - * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} - * - * @property {Buffer} etag - * `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a policy from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform policy updates in order to avoid race - * conditions: An `etag` is returned in the response to `getIamPolicy`, and - * systems are expected to put that etag in the request to `setIamPolicy` to - * ensure that their change will be applied to the same version of the policy. - * - * If no `etag` is provided in the call to `setIamPolicy`, then the existing - * policy is overwritten. Due to blind-set semantics of an etag-less policy, - * 'setIamPolicy' will not fail even if the incoming policy version does not - * meet the requirements for modifying the stored policy. - * - * @typedef Policy - * @memberof google.iam.v1 - * @see [google.iam.v1.Policy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const Policy = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Associates `members` with a `role`. - * - * @property {string} role - * Role that is assigned to `members`. - * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - * - * @property {string[]} members - * Specifies the identities requesting access for a Cloud Platform resource. - * `members` can have the following values: - * - * * `allUsers`: A special identifier that represents anyone who is - * on the internet; with or without a Google account. - * - * * `allAuthenticatedUsers`: A special identifier that represents anyone - * who is authenticated with a Google account or a service account. - * - * * `user:{emailid}`: An email address that represents a specific Google - * account. For example, `alice@example.com` . - * - * - * * `serviceAccount:{emailid}`: An email address that represents a service - * account. For example, `my-other-app@appspot.gserviceaccount.com`. - * - * * `group:{emailid}`: An email address that represents a Google group. - * For example, `admins@example.com`. - * - * - * * `domain:{domain}`: The G Suite domain (primary) that represents all the - * users of that domain. For example, `google.com` or `example.com`. - * - * @property {Object} condition - * The condition that is associated with this binding. - * NOTE: An unsatisfied condition will not allow user access via current - * binding. Different bindings, including their conditions, are examined - * independently. - * - * This object should have the same structure as [Expr]{@link google.type.Expr} - * - * @typedef Binding - * @memberof google.iam.v1 - * @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const Binding = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_any.js b/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_any.js deleted file mode 100644 index cdd2fc80e49..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_any.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * # JSON - * - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message google.protobuf.Duration): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - * - * @property {string} typeUrl - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a google.protobuf.Type - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - * - * @property {Buffer} value - * Must be a valid serialized protocol buffer of the above specified type. - * - * @typedef Any - * @memberof google.protobuf - * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} - */ -const Any = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_duration.js b/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_duration.js deleted file mode 100644 index 1275f8f4d13..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_duration.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - * - * @property {number} seconds - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - * - * @property {number} nanos - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * - * @typedef Duration - * @memberof google.protobuf - * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} - */ -const Duration = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_empty.js b/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 0b446dd9ce4..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_empty.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - * @typedef Empty - * @memberof google.protobuf - * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} - */ -const Empty = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 011207b8626..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_field_mask.js +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `FieldMask` represents a set of symbolic field paths, for example: - * - * paths: "f.a" - * paths: "f.b.d" - * - * Here `f` represents a field in some root message, `a` and `b` - * fields in the message found in `f`, and `d` a field found in the - * message in `f.b`. - * - * Field masks are used to specify a subset of fields that should be - * returned by a get operation or modified by an update operation. - * Field masks also have a custom JSON encoding (see below). - * - * # Field Masks in Projections - * - * When used in the context of a projection, a response message or - * sub-message is filtered by the API to only contain those fields as - * specified in the mask. For example, if the mask in the previous - * example is applied to a response message as follows: - * - * f { - * a : 22 - * b { - * d : 1 - * x : 2 - * } - * y : 13 - * } - * z: 8 - * - * The result will not contain specific values for fields x,y and z - * (their value will be set to the default, and omitted in proto text - * output): - * - * - * f { - * a : 22 - * b { - * d : 1 - * } - * } - * - * A repeated field is not allowed except at the last position of a - * paths string. - * - * If a FieldMask object is not present in a get operation, the - * operation applies to all fields (as if a FieldMask of all fields - * had been specified). - * - * Note that a field mask does not necessarily apply to the - * top-level response message. In case of a REST get operation, the - * field mask applies directly to the response, but in case of a REST - * list operation, the mask instead applies to each individual message - * in the returned resource list. In case of a REST custom method, - * other definitions may be used. Where the mask applies will be - * clearly documented together with its declaration in the API. In - * any case, the effect on the returned resource/resources is required - * behavior for APIs. - * - * # Field Masks in Update Operations - * - * A field mask in update operations specifies which fields of the - * targeted resource are going to be updated. The API is required - * to only change the values of the fields as specified in the mask - * and leave the others untouched. If a resource is passed in to - * describe the updated values, the API ignores the values of all - * fields not covered by the mask. - * - * If a repeated field is specified for an update operation, new values will - * be appended to the existing repeated field in the target resource. Note that - * a repeated field is only allowed in the last position of a `paths` string. - * - * If a sub-message is specified in the last position of the field mask for an - * update operation, then new value will be merged into the existing sub-message - * in the target resource. - * - * For example, given the target message: - * - * f { - * b { - * d: 1 - * x: 2 - * } - * c: [1] - * } - * - * And an update message: - * - * f { - * b { - * d: 10 - * } - * c: [2] - * } - * - * then if the field mask is: - * - * paths: ["f.b", "f.c"] - * - * then the result will be: - * - * f { - * b { - * d: 10 - * x: 2 - * } - * c: [1, 2] - * } - * - * An implementation may provide options to override this default behavior for - * repeated and message fields. - * - * In order to reset a field's value to the default, the field must - * be in the mask and set to the default value in the provided resource. - * Hence, in order to reset all fields of a resource, provide a default - * instance of the resource and set all fields in the mask, or do - * not provide a mask as described below. - * - * If a field mask is not present on update, the operation applies to - * all fields (as if a field mask of all fields has been specified). - * Note that in the presence of schema evolution, this may mean that - * fields the client does not know and has therefore not filled into - * the request will be reset to their default. If this is unwanted - * behavior, a specific service may require a client to always specify - * a field mask, producing an error if not. - * - * As with get operations, the location of the resource which - * describes the updated values in the request message depends on the - * operation kind. In any case, the effect of the field mask is - * required to be honored by the API. - * - * ## Considerations for HTTP REST - * - * The HTTP kind of an update operation which uses a field mask must - * be set to PATCH instead of PUT in order to satisfy HTTP semantics - * (PUT must only be used for full updates). - * - * # JSON Encoding of Field Masks - * - * In JSON, a field mask is encoded as a single string where paths are - * separated by a comma. Fields name in each path are converted - * to/from lower-camel naming conventions. - * - * As an example, consider the following message declarations: - * - * message Profile { - * User user = 1; - * Photo photo = 2; - * } - * message User { - * string display_name = 1; - * string address = 2; - * } - * - * In proto a field mask for `Profile` may look as such: - * - * mask { - * paths: "user.display_name" - * paths: "photo" - * } - * - * In JSON, the same mask is represented as below: - * - * { - * mask: "user.displayName,photo" - * } - * - * # Field Masks and Oneof Fields - * - * Field masks treat fields in oneofs just as regular fields. Consider the - * following message: - * - * message SampleMessage { - * oneof test_oneof { - * string name = 4; - * SubMessage sub_message = 9; - * } - * } - * - * The field mask can be: - * - * mask { - * paths: "name" - * } - * - * Or: - * - * mask { - * paths: "sub_message" - * } - * - * Note that oneof type names ("test_oneof" in this case) cannot be used in - * paths. - * - * ## Field Mask Verification - * - * The implementation of any API method which has a FieldMask type field in the - * request should verify the included field paths, and return an - * `INVALID_ARGUMENT` error if any path is duplicated or unmappable. - * - * @property {string[]} paths - * The set of field mask paths. - * - * @typedef FieldMask - * @memberof google.protobuf - * @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto} - */ -const FieldMask = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index c457acc0c7d..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/protobuf/doc_timestamp.js +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D) to obtain a formatter capable of generating timestamps in this format. - * - * @property {number} seconds - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * - * @property {number} nanos - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * - * @typedef Timestamp - * @memberof google.protobuf - * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} - */ -const Timestamp = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/rpc/doc_status.js b/packages/google-cloud-tasks/src/v2/doc/google/rpc/doc_status.js deleted file mode 100644 index 432ab6bb928..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/rpc/doc_status.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * The `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). The error model is designed to be: - * - * - Simple to use and understand for most users - * - Flexible enough to meet unexpected needs - * - * # Overview - * - * The `Status` message contains three pieces of data: error code, error - * message, and error details. The error code should be an enum value of - * google.rpc.Code, but it may accept additional error codes - * if needed. The error message should be a developer-facing English message - * that helps developers *understand* and *resolve* the error. If a localized - * user-facing error message is needed, put the localized message in the error - * details or localize it in the client. The optional error details may contain - * arbitrary information about the error. There is a predefined set of error - * detail types in the package `google.rpc` that can be used for common error - * conditions. - * - * # Language mapping - * - * The `Status` message is the logical representation of the error model, but it - * is not necessarily the actual wire format. When the `Status` message is - * exposed in different client libraries and different wire protocols, it can be - * mapped differently. For example, it will likely be mapped to some exceptions - * in Java, but more likely mapped to some error codes in C. - * - * # Other uses - * - * The error model and the `Status` message can be used in a variety of - * environments, either with or without APIs, to provide a - * consistent developer experience across different environments. - * - * Example uses of this error model include: - * - * - Partial errors. If a service needs to return partial errors to the client, - * it may embed the `Status` in the normal response to indicate the partial - * errors. - * - * - Workflow errors. A typical workflow has multiple steps. Each step may - * have a `Status` message for error reporting. - * - * - Batch operations. If a client uses batch request and batch response, the - * `Status` message should be used directly inside batch response, one for - * each error sub-response. - * - * - Asynchronous operations. If an API call embeds asynchronous operation - * results in its response, the status of those operations should be - * represented directly using the `Status` message. - * - * - Logging. If some API errors are stored in logs, the message `Status` could - * be used directly after any stripping needed for security/privacy reasons. - * - * @property {number} code - * The status code, which should be an enum value of - * google.rpc.Code. - * - * @property {string} message - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * google.rpc.Status.details field, or localized - * by the client. - * - * @property {Object[]} details - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Status - * @memberof google.rpc - * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} - */ -const Status = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2/doc/google/type/doc_expr.js b/packages/google-cloud-tasks/src/v2/doc/google/type/doc_expr.js deleted file mode 100644 index 421a7ee9e6a..00000000000 --- a/packages/google-cloud-tasks/src/v2/doc/google/type/doc_expr.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Represents an expression text. Example: - * - * title: "User account presence" - * description: "Determines whether the request has a user account" - * expression: "size(request.user) > 0" - * - * @property {string} expression - * Textual representation of an expression in - * Common Expression Language syntax. - * - * The application context of the containing message determines which - * well-known feature set of CEL is supported. - * - * @property {string} title - * An optional title for the expression, i.e. a short string describing - * its purpose. This can be used e.g. in UIs which allow to enter the - * expression. - * - * @property {string} description - * An optional description of the expression. This is a longer text which - * describes the expression, e.g. when hovered over it in a UI. - * - * @property {string} location - * An optional string indicating the location of the expression for error - * reporting, e.g. a file name and a position in the file. - * - * @typedef Expr - * @memberof google.type - * @see [google.type.Expr definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/type/expr.proto} - */ -const Expr = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_cloudtasks.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_cloudtasks.js deleted file mode 100644 index b918afd7d40..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_cloudtasks.js +++ /dev/null @@ -1,675 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Request message for ListQueues. - * - * @property {string} parent - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * @property {string} filter - * `filter` can be used to specify a subset of queues. Any Queue - * field can be used as a filter and several operators as supported. - * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - * described in - * [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * - * Sample filter "app_engine_http_target: *". - * - * Note that using filters might cause fewer queues than the - * requested_page size to be returned. - * - * @property {number} pageSize - * Requested page size. - * - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * next_page_token in the - * response to determine if more queues exist. - * - * @property {string} pageToken - * A token identifying the page of results to return. - * - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * next_page_token returned - * from the previous call to ListQueues - * method. It is an error to switch the value of the - * filter while iterating through pages. - * - * @typedef ListQueuesRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.ListQueuesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const ListQueuesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for ListQueues. - * - * @property {Object[]} queues - * The list of queues. - * - * This object should have the same structure as [Queue]{@link google.cloud.tasks.v2beta2.Queue} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * - * To return the next page of results, call - * ListQueues with this value as the - * page_token. - * - * If the next_page_token is empty, there are no more results. - * - * The page token is valid for only 2 hours. - * - * @typedef ListQueuesResponse - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.ListQueuesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const ListQueuesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for GetQueue. - * - * @property {string} name - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef GetQueueRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.GetQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const GetQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for CreateQueue. - * - * @property {string} parent - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * ListLocations. - * - * @property {Object} queue - * Required. The queue to create. - * - * Queue's name cannot be the same as an existing queue. - * - * This object should have the same structure as [Queue]{@link google.cloud.tasks.v2beta2.Queue} - * - * @typedef CreateQueueRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.CreateQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const CreateQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for UpdateQueue. - * - * @property {Object} queue - * Required. The queue to create or update. - * - * The queue's name must be specified. - * - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's name cannot be changed. - * - * This object should have the same structure as [Queue]{@link google.cloud.tasks.v2beta2.Queue} - * - * @property {Object} updateMask - * A mask used to specify which fields of the queue are being updated. - * - * If empty, then all fields will be updated. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateQueueRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.UpdateQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const UpdateQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for DeleteQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef DeleteQueueRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.DeleteQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const DeleteQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PurgeQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef PurgeQueueRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.PurgeQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const PurgeQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PauseQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef PauseQueueRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.PauseQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const PauseQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for ResumeQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef ResumeQueueRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.ResumeQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const ResumeQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for listing tasks using ListTasks. - * - * @property {string} parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta2.View} - * - * @property {number} pageSize - * Maximum page size. - * - * Fewer tasks than requested might be returned, even if more tasks exist; use - * next_page_token in the response to - * determine if more tasks exist. - * - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * @property {string} pageToken - * A token identifying the page of results to return. - * - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * next_page_token returned - * from the previous call to ListTasks - * method. - * - * The page token is valid for only 2 hours. - * - * @typedef ListTasksRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.ListTasksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const ListTasksRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for listing tasks using ListTasks. - * - * @property {Object[]} tasks - * The list of tasks. - * - * This object should have the same structure as [Task]{@link google.cloud.tasks.v2beta2.Task} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * - * To return the next page of results, call - * ListTasks with this value as the - * page_token. - * - * If the next_page_token is empty, there are no more results. - * - * @typedef ListTasksResponse - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.ListTasksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const ListTasksResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for getting a task using GetTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta2.View} - * - * @typedef GetTaskRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.GetTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const GetTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for CreateTask. - * - * @property {string} parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * The queue must already exist. - * - * @property {Object} task - * Required. The task to add. - * - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task name. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * response. - * - * If schedule_time is not set or is in the - * past then Cloud Tasks will set it to the current time. - * - * Task De-duplication: - * - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or completed recently then the call will fail - * with ALREADY_EXISTS. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was - * deleted or completed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or completed. - * - * Because there is an extra lookup cost to identify duplicate task - * names, these CreateTask calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * This object should have the same structure as [Task]{@link google.cloud.tasks.v2beta2.Task} - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta2.View} - * - * @typedef CreateTaskRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.CreateTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const CreateTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for deleting a task using - * DeleteTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @typedef DeleteTaskRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.DeleteTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const DeleteTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for leasing tasks using LeaseTasks. - * - * @property {string} parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @property {number} maxTasks - * The maximum number of tasks to lease. - * - * The system will make a best effort to return as close to as - * `max_tasks` as possible. - * - * The largest that `max_tasks` can be is 1000. - * - * The maximum total size of a lease tasks response is - * 32 MB. If the sum of all task sizes requested reaches this limit, - * fewer tasks than requested are returned. - * - * @property {Object} leaseDuration - * Required. The duration of the lease. - * - * Each task returned in the response will - * have its schedule_time set to the current - * time plus the `lease_duration`. The task is leased until its - * schedule_time; thus, the task will not be - * returned to another LeaseTasks call - * before its schedule_time. - * - * - * After the worker has successfully finished the work associated - * with the task, the worker must call via - * AcknowledgeTask before the - * schedule_time. Otherwise the task will be - * returned to a later LeaseTasks call so - * that another worker can retry it. - * - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta2.View} - * - * @property {string} filter - * `filter` can be used to specify a subset of tasks to lease. - * - * When `filter` is set to `tag=` then the - * response will contain only tasks whose - * tag is equal to ``. `` must be - * less than 500 characters. - * - * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - * the same tag as the task with the oldest - * schedule_time will be returned. - * - * Grammar Syntax: - * - * * `filter = "tag=" tag | "tag_function=" function` - * - * * `tag = string` - * - * * `function = "oldest_tag()"` - * - * The `oldest_tag()` function returns tasks which have the same tag as the - * oldest task (ordered by schedule time). - * - * 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. Tag which - * aren't UTF-8 encoded can't be used in the - * filter and the task's - * tag will be displayed as empty in Cloud Tasks. - * - * @typedef LeaseTasksRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.LeaseTasksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const LeaseTasksRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for leasing tasks using LeaseTasks. - * - * @property {Object[]} tasks - * The leased tasks. - * - * This object should have the same structure as [Task]{@link google.cloud.tasks.v2beta2.Task} - * - * @typedef LeaseTasksResponse - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.LeaseTasksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const LeaseTasksResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for acknowledging a task using - * AcknowledgeTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @property {Object} scheduleTime - * Required. The task's current schedule time, available in the - * schedule_time returned by - * LeaseTasks response or - * RenewLease response. This restriction is - * to ensure that your worker currently holds the lease. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef AcknowledgeTaskRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.AcknowledgeTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const AcknowledgeTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for renewing a lease using - * RenewLease. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @property {Object} scheduleTime - * Required. The task's current schedule time, available in the - * schedule_time returned by - * LeaseTasks response or - * RenewLease response. This restriction is - * to ensure that your worker currently holds the lease. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} leaseDuration - * Required. The desired new lease duration, starting from now. - * - * - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta2.View} - * - * @typedef RenewLeaseRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.RenewLeaseRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const RenewLeaseRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for canceling a lease using - * CancelLease. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @property {Object} scheduleTime - * Required. The task's current schedule time, available in the - * schedule_time returned by - * LeaseTasks response or - * RenewLease response. This restriction is - * to ensure that your worker currently holds the lease. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta2.View} - * - * @typedef CancelLeaseRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.CancelLeaseRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const CancelLeaseRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for forcing a task to run now using - * RunTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta2.View} - * - * @typedef RunTaskRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.RunTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/cloudtasks.proto} - */ -const RunTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_queue.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_queue.js deleted file mode 100644 index d9accf87599..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_queue.js +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A queue is a container of related tasks. Queues are configured to manage - * how those tasks are dispatched. Configurable properties include rate limits, - * retry options, target types, and others. - * - * @property {string} name - * Caller-specified and required in CreateQueue, - * after which it becomes output only. - * - * The queue name. - * - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * ListLocations. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * @property {Object} appEngineHttpTarget - * App Engine HTTP target. - * - * An App Engine queue is a queue that has an AppEngineHttpTarget. - * - * This object should have the same structure as [AppEngineHttpTarget]{@link google.cloud.tasks.v2beta2.AppEngineHttpTarget} - * - * @property {Object} pullTarget - * Pull target. - * - * A pull queue is a queue that has a PullTarget. - * - * This object should have the same structure as [PullTarget]{@link google.cloud.tasks.v2beta2.PullTarget} - * - * @property {Object} rateLimits - * Rate limits for task dispatches. - * - * rate_limits and - * retry_config are related because they both - * control task attempts however they control how tasks are - * attempted in different ways: - * - * * rate_limits controls the total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * retry_config controls what happens to - * particular a task after its first attempt fails. That is, - * retry_config controls task retries (the - * second attempt, third attempt, etc). - * - * This object should have the same structure as [RateLimits]{@link google.cloud.tasks.v2beta2.RateLimits} - * - * @property {Object} retryConfig - * Settings that determine the retry behavior. - * - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * This object should have the same structure as [RetryConfig]{@link google.cloud.tasks.v2beta2.RetryConfig} - * - * @property {number} state - * Output only. The state of the queue. - * - * `state` can only be changed by called - * PauseQueue, - * ResumeQueue, or uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * UpdateQueue cannot be used to change `state`. - * - * The number should be among the values of [State]{@link google.cloud.tasks.v2beta2.State} - * - * @property {Object} purgeTime - * Output only. The last time this queue was purged. - * - * All tasks that were created before this time - * were purged. - * - * A queue can be purged using PurgeQueue, the - * [App Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef Queue - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.Queue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/queue.proto} - */ -const Queue = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * State of the queue. - * - * @enum {number} - * @memberof google.cloud.tasks.v2beta2 - */ - State: { - - /** - * Unspecified state. - */ - STATE_UNSPECIFIED: 0, - - /** - * The queue is running. Tasks can be dispatched. - * - * If the queue was created using Cloud Tasks and the queue has - * had no activity (method calls or task dispatches) for 30 days, - * the queue may take a few minutes to re-activate. Some method - * calls may return NOT_FOUND and - * tasks may not be dispatched for a few minutes until the queue - * has been re-activated. - */ - RUNNING: 1, - - /** - * Tasks are paused by the user. If the queue is paused then Cloud - * Tasks will stop delivering tasks from it, but more tasks can - * still be added to it by the user. When a pull queue is paused, - * all LeaseTasks calls will return a - * FAILED_PRECONDITION. - */ - PAUSED: 2, - - /** - * The queue is disabled. - * - * A queue becomes `DISABLED` when - * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) - * or - * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - * is uploaded which does not contain the queue. You cannot directly disable - * a queue. - * - * When a queue is disabled, tasks can still be added to a queue - * but the tasks are not dispatched and - * LeaseTasks calls return a - * `FAILED_PRECONDITION` error. - * - * To permanently delete this queue and all of its tasks, call - * DeleteQueue. - */ - DISABLED: 3 - } -}; - -/** - * Rate limits. - * - * This message determines the maximum rate that tasks can be dispatched by a - * queue, regardless of whether the dispatch is a first task attempt or a retry. - * - * Note: The debugging command, RunTask, will run a task - * even if the queue has reached its RateLimits. - * - * @property {number} maxTasksDispatchedPerSecond - * The maximum rate at which tasks are dispatched from this queue. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * * For App Engine queues, the maximum allowed value - * is 500. - * * This field is output only for pull queues. In addition to the - * `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of - * LeaseTasks requests are allowed per pull queue. - * - * - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * @property {number} maxBurstSize - * Output only. 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 - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * 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. - * - * Cloud Tasks will pick the value of `max_burst_size` based on the - * value of - * max_tasks_dispatched_per_second. - * - * 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 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, - * regardless of whether - * max_tasks_dispatched_per_second - * is updated. - * - * @property {number} maxConcurrentTasks - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * The maximum allowed value is 5,000. - * - * This field is output only for - * pull queues and always -1, which indicates no limit. No other - * queue types can have `max_concurrent_tasks` set to -1. - * - * - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * @typedef RateLimits - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.RateLimits definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/queue.proto} - */ -const RateLimits = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Retry config. - * - * These settings determine how a failed task attempt is retried. - * - * @property {number} maxAttempts - * The maximum number of attempts for a task. - * - * Cloud Tasks will attempt the task `max_attempts` times (that - * is, if the first attempt fails, then there will be - * `max_attempts - 1` retries). Must be > 0. - * - * @property {boolean} unlimitedAttempts - * If true, then the number of attempts is unlimited. - * - * @property {Object} maxRetryDuration - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted max_attempts - * times, no further attempts will be made and the task will be - * deleted. - * - * If zero, then the task age is unlimited. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * This field is output only for pull queues. - * - * - * `max_retry_duration` will be truncated to the nearest second. - * - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} minBackoff - * A task will be scheduled for retry between - * min_backoff and - * max_backoff duration after it fails, - * if the queue's RetryConfig specifies that the task should be - * retried. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * This field is output only for pull queues. - * - * - * `min_backoff` will be truncated to the nearest second. - * - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} maxBackoff - * A task will be scheduled for retry between - * min_backoff and - * max_backoff duration after it fails, - * if the queue's RetryConfig specifies that the task should be - * retried. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * This field is output only for pull queues. - * - * - * `max_backoff` will be truncated to the nearest second. - * - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} maxDoublings - * The time between retries will double `max_doublings` times. - * - * A task's retry interval starts at - * min_backoff, then doubles - * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of - * max_backoff up to - * max_attempts times. - * - * For example, if min_backoff is 10s, - * max_backoff is 300s, and - * `max_doublings` is 3, then the a task will first be retried in - * 10s. The retry interval will double three times, and then - * increase linearly by 2^3 * 10s. Finally, the task will retry at - * intervals of max_backoff until the - * task has been attempted max_attempts - * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, - * 240s, 300s, 300s, .... - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * This field is output only for pull queues. - * - * - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * @typedef RetryConfig - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.RetryConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/queue.proto} - */ -const RetryConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_target.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_target.js deleted file mode 100644 index 8c38f85c215..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_target.js +++ /dev/null @@ -1,434 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Pull target. - * @typedef PullTarget - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.PullTarget definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/target.proto} - */ -const PullTarget = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The pull message contains data that can be used by the caller of - * LeaseTasks to process the task. - * - * This proto can only be used for tasks in a queue which has - * pull_target set. - * - * @property {Buffer} payload - * A data payload consumed by the worker to execute the task. - * - * @property {string} tag - * The task's tag. - * - * Tags allow similar tasks to be processed in a batch. If you label - * tasks with a tag, your worker can - * lease tasks with the same tag using - * filter. For example, if you want to - * aggregate the events associated with a specific user once a day, - * you could tag tasks with the user ID. - * - * The task's tag can only be set when the - * task is created. - * - * The tag must be 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. - * - * @typedef PullMessage - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.PullMessage definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/target.proto} - */ -const PullMessage = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine HTTP target. - * - * The task will be delivered to the App Engine application hostname - * specified by its AppEngineHttpTarget and AppEngineHttpRequest. - * The documentation for AppEngineHttpRequest explains how the - * task's host URL is constructed. - * - * Using AppEngineHttpTarget requires - * [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - * Google IAM permission for the project - * and the following scope: - * - * `https://www.googleapis.com/auth/cloud-platform` - * - * @property {Object} appEngineRoutingOverride - * Overrides for the - * task-level app_engine_routing. - * - * If set, `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. - * - * This object should have the same structure as [AppEngineRouting]{@link google.cloud.tasks.v2beta2.AppEngineRouting} - * - * @typedef AppEngineHttpTarget - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.AppEngineHttpTarget definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/target.proto} - */ -const AppEngineHttpTarget = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine HTTP request. - * - * The message defines the HTTP request that is sent to an App Engine app when - * the task is dispatched. - * - * This proto can only be used for tasks in a queue which has - * app_engine_http_target set. - * - * Using AppEngineHttpRequest requires - * [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - * Google IAM permission for the project - * and the following scope: - * - * `https://www.googleapis.com/auth/cloud-platform` - * - * The task will be delivered to the App Engine app which belongs to the same - * project as the queue. For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and how routing is affected by - * [dispatch - * files](https://cloud.google.com/appengine/docs/python/config/dispatchref). - * Traffic is encrypted during transport and never leaves Google datacenters. - * Because this traffic is carried over a communication mechanism internal to - * Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). - * The request to the handler, however, will appear to have used the HTTP - * protocol. - * - * The 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 - * is used for all tasks in the queue, no matter what the setting - * is for the - * task-level app_engine_routing. - * - * - * The `url` that the task will be sent to is: - * - * * `url =` host `+` - * relative_url - * - * Tasks can be dispatched to secure app handlers, unsecure app handlers, and - * URIs restricted with - * [`login: - * admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). - * Because tasks are not run as any user, they cannot be dispatched to URIs - * restricted with - * [`login: - * required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) - * Task dispatches also do not follow redirects. - * - * The task attempt has succeeded if the app's request handler returns an HTTP - * response code in the range [`200` - `299`]. The task attempt has failed if - * the app's handler returns a non-2xx response code or Cloud Tasks does - * not receive response before the deadline. Failed - * tasks will be retried according to the - * retry configuration. `503` (Service Unavailable) is - * considered an App Engine system error instead of an application error and - * will cause Cloud Tasks' traffic congestion control to temporarily throttle - * the queue's dispatches. Unlike other types of task targets, a `429` (Too Many - * Requests) response from an app handler does not cause traffic congestion - * control to throttle the queue. - * - * @property {number} httpMethod - * 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 - * 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). - * - * The number should be among the values of [HttpMethod]{@link google.cloud.tasks.v2beta2.HttpMethod} - * - * @property {Object} appEngineRouting - * Task-level setting for App Engine routing. - * - * If set, - * 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. - * - * This object should have the same structure as [AppEngineRouting]{@link google.cloud.tasks.v2beta2.AppEngineRouting} - * - * @property {string} relativeUrl - * The relative URL. - * - * The relative URL must begin with "/" and must be a valid HTTP relative URL. - * It can contain a path and query string arguments. - * If the relative URL is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * @property {Object.} headers - * HTTP request headers. - * - * This map contains the header field names and values. - * Headers can be set when the - * task is created. - * Repeated headers are not supported but a header value can contain commas. - * - * Cloud Tasks sets some headers to default values: - * - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * - * If the task has a payload, Cloud - * Tasks sets the following headers: - * - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * task is created. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * - * The headers below cannot be set or overridden: - * - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the Task. For more - * information, see the CreateTask documentation. - * - * @property {Buffer} payload - * Payload. - * - * The payload will be sent as the HTTP message body. A message - * body, and thus a payload, is allowed only if the HTTP method is - * POST or PUT. It is an error to set a data payload on a task with - * an incompatible HttpMethod. - * - * @typedef AppEngineHttpRequest - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.AppEngineHttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/target.proto} - */ -const AppEngineHttpRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine Routing. - * - * Defines routing characteristics specific to App Engine - service, version, - * and instance. - * - * For more information about services, versions, and instances see - * [An Overview of App - * Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), - * [Microservices Architecture on Google App - * Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * @property {string} service - * App service. - * - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * - * For some queues or tasks which were created using the App Engine - * Task Queue API, host is not parsable - * into service, - * version, and - * instance. For example, some tasks - * which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * host is not parsable, then - * service, - * version, and - * instance are the empty string. - * - * @property {string} version - * App version. - * - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * - * For some queues or tasks which were created using the App Engine - * Task Queue API, host is not parsable - * into service, - * version, and - * instance. For example, some tasks - * which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * host is not parsable, then - * service, - * version, and - * instance are the empty string. - * - * @property {string} instance - * App instance. - * - * By default, the task is sent to an instance which is available when - * the task is attempted. - * - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * @property {string} host - * Output only. The host that the task is sent to. - * - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * - * The host is constructed as: - * - * - * * `host = [application_domain_name]`
- * `| [service] + '.' + [application_domain_name]`
- * `| [version] + '.' + [application_domain_name]`
- * `| [version_dot_service]+ '.' + [application_domain_name]`
- * `| [instance] + '.' + [application_domain_name]`
- * `| [instance_dot_service] + '.' + [application_domain_name]`
- * `| [instance_dot_version] + '.' + [application_domain_name]`
- * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` - * - * * `application_domain_name` = The domain name of the app, for - * example .appspot.com, which is associated with the - * queue's project ID. Some tasks which were created using the App Engine - * SDK use a custom domain name. - * - * * `service =` service - * - * * `version =` version - * - * * `version_dot_service =` - * version `+ '.' +` - * service - * - * * `instance =` instance - * - * * `instance_dot_service =` - * instance `+ '.' +` - * service - * - * * `instance_dot_version =` - * instance `+ '.' +` - * version - * - * * `instance_dot_version_dot_service =` - * instance `+ '.' +` - * version `+ '.' +` - * service - * - * If service is empty, then the task will be sent - * to the service which is the default service when the task is attempted. - * - * If version is empty, then the task will be sent - * to the version which is the default version when the task is attempted. - * - * If instance is empty, then the task - * will be sent to an instance which is available when the task is - * attempted. - * - * If service, - * version, or - * instance is invalid, then the task - * will be sent to the default version of the default service when - * the task is attempted. - * - * @typedef AppEngineRouting - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.AppEngineRouting definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/target.proto} - */ -const AppEngineRouting = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The HTTP method used to execute the task. - * - * @enum {number} - * @memberof google.cloud.tasks.v2beta2 - */ -const HttpMethod = { - - /** - * HTTP method unspecified - */ - HTTP_METHOD_UNSPECIFIED: 0, - - /** - * HTTP POST - */ - POST: 1, - - /** - * HTTP GET - */ - GET: 2, - - /** - * HTTP HEAD - */ - HEAD: 3, - - /** - * HTTP PUT - */ - PUT: 4, - - /** - * HTTP DELETE - */ - DELETE: 5 -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_task.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_task.js deleted file mode 100644 index 6257615dc87..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_task.js +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A unit of scheduled work. - * - * @property {string} name - * Optionally caller-specified in CreateTask. - * - * The task name. - * - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * ListLocations. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * @property {Object} appEngineHttpRequest - * App Engine HTTP request that is sent to the task's target. Can - * be set only if - * app_engine_http_target is set - * on the queue. - * - * An App Engine task is a task that has AppEngineHttpRequest set. - * - * This object should have the same structure as [AppEngineHttpRequest]{@link google.cloud.tasks.v2beta2.AppEngineHttpRequest} - * - * @property {Object} pullMessage - * LeaseTasks to process the task. Can be - * set only if pull_target is set on the queue. - * - * A pull task is a task that has PullMessage set. - * - * This object should have the same structure as [PullMessage]{@link google.cloud.tasks.v2beta2.PullMessage} - * - * @property {Object} scheduleTime - * The time when the task is scheduled to be attempted. - * - * For App Engine queues, this is when the task will be attempted or retried. - * - * For pull queues, this is the time when the task is available to - * be leased; if a task is currently leased, this is the time when - * the current lease expires, that is, the time that the task was - * leased plus the lease_duration. - * - * `schedule_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} createTime - * Output only. The time that the task was created. - * - * `create_time` will be truncated to the nearest second. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} status - * Output only. The task status. - * - * This object should have the same structure as [TaskStatus]{@link google.cloud.tasks.v2beta2.TaskStatus} - * - * @property {number} view - * Output only. The view specifies which subset of the Task has - * been returned. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta2.View} - * - * @typedef Task - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.Task definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/task.proto} - */ -const Task = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The view specifies a subset of Task data. - * - * When a task is returned in a response, not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * @enum {number} - * @memberof google.cloud.tasks.v2beta2 - */ - View: { - - /** - * Unspecified. Defaults to BASIC. - */ - VIEW_UNSPECIFIED: 0, - - /** - * The basic view omits fields which can be large or can contain - * sensitive data. - * - * This view does not include the - * (payload in AppEngineHttpRequest and - * payload in PullMessage). These payloads are - * desirable to return only when needed, because they can be large - * and because of the sensitivity of the data that you choose to - * store in it. - */ - BASIC: 1, - - /** - * All information is returned. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Queue resource. - */ - FULL: 2 - } -}; - -/** - * Status of the task. - * - * @property {number} attemptDispatchCount - * Output only. The number of attempts dispatched. - * - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * @property {number} attemptResponseCount - * Output only. The number of attempts which have received a response. - * - * This field is not calculated for pull tasks. - * - * @property {Object} firstAttemptStatus - * Output only. The status of the task's first attempt. - * - * Only dispatch_time will be set. - * The other AttemptStatus information is not retained by Cloud Tasks. - * - * This field is not calculated for pull tasks. - * - * This object should have the same structure as [AttemptStatus]{@link google.cloud.tasks.v2beta2.AttemptStatus} - * - * @property {Object} lastAttemptStatus - * Output only. The status of the task's last attempt. - * - * This field is not calculated for pull tasks. - * - * This object should have the same structure as [AttemptStatus]{@link google.cloud.tasks.v2beta2.AttemptStatus} - * - * @typedef TaskStatus - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.TaskStatus definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/task.proto} - */ -const TaskStatus = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The status of a task attempt. - * - * @property {Object} scheduleTime - * Output only. The time that this attempt was scheduled. - * - * `schedule_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} dispatchTime - * Output only. The time that this attempt was dispatched. - * - * `dispatch_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} responseTime - * Output only. The time that this attempt response was received. - * - * `response_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} responseStatus - * Output only. The response from the target for this attempt. - * - * If the task has not been attempted or the task is currently running - * then the response status is unset. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @typedef AttemptStatus - * @memberof google.cloud.tasks.v2beta2 - * @see [google.cloud.tasks.v2beta2.AttemptStatus definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta2/task.proto} - */ -const AttemptStatus = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_iam_policy.js deleted file mode 100644 index 15b6fb823d4..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_iam_policy.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Request message for `SetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * - * @property {Object} policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * - * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} - * - * @typedef SetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.SetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const SetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `GetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * - * @property {Object} options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} - * - * @typedef GetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.GetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const GetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `TestIamPermissions` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * - * @property {string[]} permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * - * @typedef TestIamPermissionsRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for `TestIamPermissions` method. - * - * @property {string[]} permissions - * A subset of `TestPermissionsRequest.permissions` that the caller is - * allowed. - * - * @typedef TestIamPermissionsResponse - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_options.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_options.js deleted file mode 100644 index b725d806cce..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_options.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Encapsulates settings provided to GetIamPolicy. - * - * @property {number} requestedPolicyVersion - * Optional. The policy format version to be returned. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Requests for policies with any conditional bindings must specify version 3. - * Policies without any conditional bindings may specify any valid value or - * leave the field unset. - * - * @typedef GetPolicyOptions - * @memberof google.iam.v1 - * @see [google.iam.v1.GetPolicyOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/options.proto} - */ -const GetPolicyOptions = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_policy.js deleted file mode 100644 index 606cdf98cad..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_policy.js +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Defines an Identity and Access Management (IAM) policy. It is used to - * specify access control policies for Cloud Platform resources. - * - * - * A `Policy` is a collection of `bindings`. A `binding` binds one or more - * `members` to a single `role`. Members can be user accounts, service accounts, - * Google groups, and domains (such as G Suite). A `role` is a named list of - * permissions (defined by IAM or configured by users). A `binding` can - * optionally specify a `condition`, which is a logic expression that further - * constrains the role binding based on attributes about the request and/or - * target resource. - * - * **JSON Example** - * - * { - * "bindings": [ - * { - * "role": "roles/resourcemanager.organizationAdmin", - * "members": [ - * "user:mike@example.com", - * "group:admins@example.com", - * "domain:google.com", - * "serviceAccount:my-project-id@appspot.gserviceaccount.com" - * ] - * }, - * { - * "role": "roles/resourcemanager.organizationViewer", - * "members": ["user:eve@example.com"], - * "condition": { - * "title": "expirable access", - * "description": "Does not grant access after Sep 2020", - * "expression": "request.time < - * timestamp('2020-10-01T00:00:00.000Z')", - * } - * } - * ] - * } - * - * **YAML Example** - * - * bindings: - * - members: - * - user:mike@example.com - * - group:admins@example.com - * - domain:google.com - * - serviceAccount:my-project-id@appspot.gserviceaccount.com - * role: roles/resourcemanager.organizationAdmin - * - members: - * - user:eve@example.com - * role: roles/resourcemanager.organizationViewer - * condition: - * title: expirable access - * description: Does not grant access after Sep 2020 - * expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - * - * For a description of IAM and its features, see the - * [IAM developer's guide](https://cloud.google.com/iam/docs). - * - * @property {number} version - * Specifies the format of the policy. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Operations affecting conditional bindings must specify version 3. This can - * be either setting a conditional policy, modifying a conditional binding, - * or removing a binding (conditional or unconditional) from the stored - * conditional policy. - * Operations on non-conditional policies may specify any valid value or - * leave the field unset. - * - * If no etag is provided in the call to `setIamPolicy`, version compliance - * checks against the stored policy is skipped. - * - * @property {Object[]} bindings - * Associates a list of `members` to a `role`. Optionally may specify a - * `condition` that determines when binding is in effect. - * `bindings` with no members will result in an error. - * - * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} - * - * @property {Buffer} etag - * `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a policy from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform policy updates in order to avoid race - * conditions: An `etag` is returned in the response to `getIamPolicy`, and - * systems are expected to put that etag in the request to `setIamPolicy` to - * ensure that their change will be applied to the same version of the policy. - * - * If no `etag` is provided in the call to `setIamPolicy`, then the existing - * policy is overwritten. Due to blind-set semantics of an etag-less policy, - * 'setIamPolicy' will not fail even if the incoming policy version does not - * meet the requirements for modifying the stored policy. - * - * @typedef Policy - * @memberof google.iam.v1 - * @see [google.iam.v1.Policy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const Policy = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Associates `members` with a `role`. - * - * @property {string} role - * Role that is assigned to `members`. - * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - * - * @property {string[]} members - * Specifies the identities requesting access for a Cloud Platform resource. - * `members` can have the following values: - * - * * `allUsers`: A special identifier that represents anyone who is - * on the internet; with or without a Google account. - * - * * `allAuthenticatedUsers`: A special identifier that represents anyone - * who is authenticated with a Google account or a service account. - * - * * `user:{emailid}`: An email address that represents a specific Google - * account. For example, `alice@example.com` . - * - * - * * `serviceAccount:{emailid}`: An email address that represents a service - * account. For example, `my-other-app@appspot.gserviceaccount.com`. - * - * * `group:{emailid}`: An email address that represents a Google group. - * For example, `admins@example.com`. - * - * - * * `domain:{domain}`: The G Suite domain (primary) that represents all the - * users of that domain. For example, `google.com` or `example.com`. - * - * @property {Object} condition - * The condition that is associated with this binding. - * NOTE: An unsatisfied condition will not allow user access via current - * binding. Different bindings, including their conditions, are examined - * independently. - * - * This object should have the same structure as [Expr]{@link google.type.Expr} - * - * @typedef Binding - * @memberof google.iam.v1 - * @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const Binding = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_any.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_any.js deleted file mode 100644 index cdd2fc80e49..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_any.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * # JSON - * - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message google.protobuf.Duration): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - * - * @property {string} typeUrl - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a google.protobuf.Type - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - * - * @property {Buffer} value - * Must be a valid serialized protocol buffer of the above specified type. - * - * @typedef Any - * @memberof google.protobuf - * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} - */ -const Any = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_duration.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_duration.js deleted file mode 100644 index 1275f8f4d13..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_duration.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - * - * @property {number} seconds - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - * - * @property {number} nanos - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * - * @typedef Duration - * @memberof google.protobuf - * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} - */ -const Duration = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_empty.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 0b446dd9ce4..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_empty.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - * @typedef Empty - * @memberof google.protobuf - * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} - */ -const Empty = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 011207b8626..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_field_mask.js +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `FieldMask` represents a set of symbolic field paths, for example: - * - * paths: "f.a" - * paths: "f.b.d" - * - * Here `f` represents a field in some root message, `a` and `b` - * fields in the message found in `f`, and `d` a field found in the - * message in `f.b`. - * - * Field masks are used to specify a subset of fields that should be - * returned by a get operation or modified by an update operation. - * Field masks also have a custom JSON encoding (see below). - * - * # Field Masks in Projections - * - * When used in the context of a projection, a response message or - * sub-message is filtered by the API to only contain those fields as - * specified in the mask. For example, if the mask in the previous - * example is applied to a response message as follows: - * - * f { - * a : 22 - * b { - * d : 1 - * x : 2 - * } - * y : 13 - * } - * z: 8 - * - * The result will not contain specific values for fields x,y and z - * (their value will be set to the default, and omitted in proto text - * output): - * - * - * f { - * a : 22 - * b { - * d : 1 - * } - * } - * - * A repeated field is not allowed except at the last position of a - * paths string. - * - * If a FieldMask object is not present in a get operation, the - * operation applies to all fields (as if a FieldMask of all fields - * had been specified). - * - * Note that a field mask does not necessarily apply to the - * top-level response message. In case of a REST get operation, the - * field mask applies directly to the response, but in case of a REST - * list operation, the mask instead applies to each individual message - * in the returned resource list. In case of a REST custom method, - * other definitions may be used. Where the mask applies will be - * clearly documented together with its declaration in the API. In - * any case, the effect on the returned resource/resources is required - * behavior for APIs. - * - * # Field Masks in Update Operations - * - * A field mask in update operations specifies which fields of the - * targeted resource are going to be updated. The API is required - * to only change the values of the fields as specified in the mask - * and leave the others untouched. If a resource is passed in to - * describe the updated values, the API ignores the values of all - * fields not covered by the mask. - * - * If a repeated field is specified for an update operation, new values will - * be appended to the existing repeated field in the target resource. Note that - * a repeated field is only allowed in the last position of a `paths` string. - * - * If a sub-message is specified in the last position of the field mask for an - * update operation, then new value will be merged into the existing sub-message - * in the target resource. - * - * For example, given the target message: - * - * f { - * b { - * d: 1 - * x: 2 - * } - * c: [1] - * } - * - * And an update message: - * - * f { - * b { - * d: 10 - * } - * c: [2] - * } - * - * then if the field mask is: - * - * paths: ["f.b", "f.c"] - * - * then the result will be: - * - * f { - * b { - * d: 10 - * x: 2 - * } - * c: [1, 2] - * } - * - * An implementation may provide options to override this default behavior for - * repeated and message fields. - * - * In order to reset a field's value to the default, the field must - * be in the mask and set to the default value in the provided resource. - * Hence, in order to reset all fields of a resource, provide a default - * instance of the resource and set all fields in the mask, or do - * not provide a mask as described below. - * - * If a field mask is not present on update, the operation applies to - * all fields (as if a field mask of all fields has been specified). - * Note that in the presence of schema evolution, this may mean that - * fields the client does not know and has therefore not filled into - * the request will be reset to their default. If this is unwanted - * behavior, a specific service may require a client to always specify - * a field mask, producing an error if not. - * - * As with get operations, the location of the resource which - * describes the updated values in the request message depends on the - * operation kind. In any case, the effect of the field mask is - * required to be honored by the API. - * - * ## Considerations for HTTP REST - * - * The HTTP kind of an update operation which uses a field mask must - * be set to PATCH instead of PUT in order to satisfy HTTP semantics - * (PUT must only be used for full updates). - * - * # JSON Encoding of Field Masks - * - * In JSON, a field mask is encoded as a single string where paths are - * separated by a comma. Fields name in each path are converted - * to/from lower-camel naming conventions. - * - * As an example, consider the following message declarations: - * - * message Profile { - * User user = 1; - * Photo photo = 2; - * } - * message User { - * string display_name = 1; - * string address = 2; - * } - * - * In proto a field mask for `Profile` may look as such: - * - * mask { - * paths: "user.display_name" - * paths: "photo" - * } - * - * In JSON, the same mask is represented as below: - * - * { - * mask: "user.displayName,photo" - * } - * - * # Field Masks and Oneof Fields - * - * Field masks treat fields in oneofs just as regular fields. Consider the - * following message: - * - * message SampleMessage { - * oneof test_oneof { - * string name = 4; - * SubMessage sub_message = 9; - * } - * } - * - * The field mask can be: - * - * mask { - * paths: "name" - * } - * - * Or: - * - * mask { - * paths: "sub_message" - * } - * - * Note that oneof type names ("test_oneof" in this case) cannot be used in - * paths. - * - * ## Field Mask Verification - * - * The implementation of any API method which has a FieldMask type field in the - * request should verify the included field paths, and return an - * `INVALID_ARGUMENT` error if any path is duplicated or unmappable. - * - * @property {string[]} paths - * The set of field mask paths. - * - * @typedef FieldMask - * @memberof google.protobuf - * @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto} - */ -const FieldMask = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index c457acc0c7d..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_timestamp.js +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D) to obtain a formatter capable of generating timestamps in this format. - * - * @property {number} seconds - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * - * @property {number} nanos - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * - * @typedef Timestamp - * @memberof google.protobuf - * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} - */ -const Timestamp = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/rpc/doc_status.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/rpc/doc_status.js deleted file mode 100644 index 432ab6bb928..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/rpc/doc_status.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * The `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). The error model is designed to be: - * - * - Simple to use and understand for most users - * - Flexible enough to meet unexpected needs - * - * # Overview - * - * The `Status` message contains three pieces of data: error code, error - * message, and error details. The error code should be an enum value of - * google.rpc.Code, but it may accept additional error codes - * if needed. The error message should be a developer-facing English message - * that helps developers *understand* and *resolve* the error. If a localized - * user-facing error message is needed, put the localized message in the error - * details or localize it in the client. The optional error details may contain - * arbitrary information about the error. There is a predefined set of error - * detail types in the package `google.rpc` that can be used for common error - * conditions. - * - * # Language mapping - * - * The `Status` message is the logical representation of the error model, but it - * is not necessarily the actual wire format. When the `Status` message is - * exposed in different client libraries and different wire protocols, it can be - * mapped differently. For example, it will likely be mapped to some exceptions - * in Java, but more likely mapped to some error codes in C. - * - * # Other uses - * - * The error model and the `Status` message can be used in a variety of - * environments, either with or without APIs, to provide a - * consistent developer experience across different environments. - * - * Example uses of this error model include: - * - * - Partial errors. If a service needs to return partial errors to the client, - * it may embed the `Status` in the normal response to indicate the partial - * errors. - * - * - Workflow errors. A typical workflow has multiple steps. Each step may - * have a `Status` message for error reporting. - * - * - Batch operations. If a client uses batch request and batch response, the - * `Status` message should be used directly inside batch response, one for - * each error sub-response. - * - * - Asynchronous operations. If an API call embeds asynchronous operation - * results in its response, the status of those operations should be - * represented directly using the `Status` message. - * - * - Logging. If some API errors are stored in logs, the message `Status` could - * be used directly after any stripping needed for security/privacy reasons. - * - * @property {number} code - * The status code, which should be an enum value of - * google.rpc.Code. - * - * @property {string} message - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * google.rpc.Status.details field, or localized - * by the client. - * - * @property {Object[]} details - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Status - * @memberof google.rpc - * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} - */ -const Status = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/type/doc_expr.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/type/doc_expr.js deleted file mode 100644 index 421a7ee9e6a..00000000000 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/type/doc_expr.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Represents an expression text. Example: - * - * title: "User account presence" - * description: "Determines whether the request has a user account" - * expression: "size(request.user) > 0" - * - * @property {string} expression - * Textual representation of an expression in - * Common Expression Language syntax. - * - * The application context of the containing message determines which - * well-known feature set of CEL is supported. - * - * @property {string} title - * An optional title for the expression, i.e. a short string describing - * its purpose. This can be used e.g. in UIs which allow to enter the - * expression. - * - * @property {string} description - * An optional description of the expression. This is a longer text which - * describes the expression, e.g. when hovered over it in a UI. - * - * @property {string} location - * An optional string indicating the location of the expression for error - * reporting, e.g. a file name and a position in the file. - * - * @typedef Expr - * @memberof google.type - * @see [google.type.Expr definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/type/expr.proto} - */ -const Expr = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_cloudtasks.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_cloudtasks.js deleted file mode 100644 index 319b673aca1..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_cloudtasks.js +++ /dev/null @@ -1,446 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Request message for ListQueues. - * - * @property {string} parent - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * @property {string} filter - * `filter` can be used to specify a subset of queues. Any Queue - * field can be used as a filter and several operators as supported. - * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as - * described in - * [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * - * Sample filter "state: PAUSED". - * - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * - * @property {number} pageSize - * Requested page size. - * - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * next_page_token in the - * response to determine if more queues exist. - * - * @property {string} pageToken - * A token identifying the page of results to return. - * - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * next_page_token returned - * from the previous call to ListQueues - * method. It is an error to switch the value of the - * filter while iterating through pages. - * - * @typedef ListQueuesRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.ListQueuesRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const ListQueuesRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for ListQueues. - * - * @property {Object[]} queues - * The list of queues. - * - * This object should have the same structure as [Queue]{@link google.cloud.tasks.v2beta3.Queue} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * - * To return the next page of results, call - * ListQueues with this value as the - * page_token. - * - * If the next_page_token is empty, there are no more results. - * - * The page token is valid for only 2 hours. - * - * @typedef ListQueuesResponse - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.ListQueuesResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const ListQueuesResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for GetQueue. - * - * @property {string} name - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef GetQueueRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.GetQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const GetQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for CreateQueue. - * - * @property {string} parent - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * ListLocations. - * - * @property {Object} queue - * Required. The queue to create. - * - * Queue's name cannot be the same as an existing queue. - * - * This object should have the same structure as [Queue]{@link google.cloud.tasks.v2beta3.Queue} - * - * @typedef CreateQueueRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.CreateQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const CreateQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for UpdateQueue. - * - * @property {Object} queue - * Required. The queue to create or update. - * - * The queue's name must be specified. - * - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's name cannot be changed. - * - * This object should have the same structure as [Queue]{@link google.cloud.tasks.v2beta3.Queue} - * - * @property {Object} updateMask - * A mask used to specify which fields of the queue are being updated. - * - * If empty, then all fields will be updated. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateQueueRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.UpdateQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const UpdateQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for DeleteQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef DeleteQueueRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.DeleteQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const DeleteQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PurgeQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef PurgeQueueRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.PurgeQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const PurgeQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PauseQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef PauseQueueRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.PauseQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const PauseQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for ResumeQueue. - * - * @property {string} name - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * @typedef ResumeQueueRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.ResumeQueueRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const ResumeQueueRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for listing tasks using ListTasks. - * - * @property {string} parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta3.View} - * - * @property {number} pageSize - * Maximum page size. - * - * Fewer tasks than requested might be returned, even if more tasks exist; use - * next_page_token in the response to - * determine if more tasks exist. - * - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * @property {string} pageToken - * A token identifying the page of results to return. - * - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * next_page_token returned - * from the previous call to ListTasks - * method. - * - * The page token is valid for only 2 hours. - * - * @typedef ListTasksRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.ListTasksRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const ListTasksRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for listing tasks using ListTasks. - * - * @property {Object[]} tasks - * The list of tasks. - * - * This object should have the same structure as [Task]{@link google.cloud.tasks.v2beta3.Task} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. - * - * To return the next page of results, call - * ListTasks with this value as the - * page_token. - * - * If the next_page_token is empty, there are no more results. - * - * @typedef ListTasksResponse - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.ListTasksResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const ListTasksResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for getting a task using GetTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta3.View} - * - * @typedef GetTaskRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.GetTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const GetTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for CreateTask. - * - * @property {string} parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * The queue must already exist. - * - * @property {Object} task - * Required. The task to add. - * - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task name. If a - * name is not specified then the system will generate a random - * unique task id, which will be set in the task returned in the - * response. - * - * If schedule_time is not set or is in the - * past then Cloud Tasks will set it to the current time. - * - * Task De-duplication: - * - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with ALREADY_EXISTS. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. - * - * Because there is an extra lookup cost to identify duplicate task - * names, these CreateTask calls have significantly - * increased latency. Using hashed strings for the task id or for - * the prefix of the task id is recommended. Choosing task ids that - * are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * This object should have the same structure as [Task]{@link google.cloud.tasks.v2beta3.Task} - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta3.View} - * - * @typedef CreateTaskRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.CreateTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const CreateTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for deleting a task using - * DeleteTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @typedef DeleteTaskRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.DeleteTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const DeleteTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for forcing a task to run now using - * RunTask. - * - * @property {string} name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * @property {number} responseView - * The response_view specifies which subset of the Task will be - * returned. - * - * By default response_view is BASIC; not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Task resource. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta3.View} - * - * @typedef RunTaskRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.RunTaskRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/cloudtasks.proto} - */ -const RunTaskRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_queue.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_queue.js deleted file mode 100644 index 317dd3a6cba..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_queue.js +++ /dev/null @@ -1,400 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A queue is a container of related tasks. Queues are configured to manage - * how those tasks are dispatched. Configurable properties include rate limits, - * retry options, queue types, and others. - * - * @property {string} name - * Caller-specified and required in CreateQueue, - * after which it becomes output only. - * - * The queue name. - * - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * ListLocations. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * @property {Object} appEngineHttpQueue - * AppEngineHttpQueue settings apply only to - * App Engine tasks in this queue. - * Http tasks are not affected by this proto. - * - * This object should have the same structure as [AppEngineHttpQueue]{@link google.cloud.tasks.v2beta3.AppEngineHttpQueue} - * - * @property {Object} rateLimits - * Rate limits for task dispatches. - * - * rate_limits and retry_config are - * related because they both control task attempts. However they control task - * attempts in different ways: - * - * * rate_limits controls the total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * retry_config controls what happens to - * particular a task after its first attempt fails. That is, - * retry_config controls task retries (the - * second attempt, third attempt, etc). - * - * The queue's actual dispatch rate is the result of: - * - * * Number of tasks in the queue - * * User-specified throttling: rate_limits, - * retry_config, and the - * queue's state. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * - * This object should have the same structure as [RateLimits]{@link google.cloud.tasks.v2beta3.RateLimits} - * - * @property {Object} retryConfig - * Settings that determine the retry behavior. - * - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * This object should have the same structure as [RetryConfig]{@link google.cloud.tasks.v2beta3.RetryConfig} - * - * @property {number} state - * Output only. The state of the queue. - * - * `state` can only be changed by called - * PauseQueue, - * ResumeQueue, or uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * UpdateQueue cannot be used to change `state`. - * - * The number should be among the values of [State]{@link google.cloud.tasks.v2beta3.State} - * - * @property {Object} purgeTime - * Output only. The last time this queue was purged. - * - * All tasks that were created before this time - * were purged. - * - * A queue can be purged using PurgeQueue, the - * [App Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} stackdriverLoggingConfig - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - * field is unset, then no logs are written. - * - * This object should have the same structure as [StackdriverLoggingConfig]{@link google.cloud.tasks.v2beta3.StackdriverLoggingConfig} - * - * @typedef Queue - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.Queue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/queue.proto} - */ -const Queue = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * State of the queue. - * - * @enum {number} - * @memberof google.cloud.tasks.v2beta3 - */ - State: { - - /** - * Unspecified state. - */ - STATE_UNSPECIFIED: 0, - - /** - * The queue is running. Tasks can be dispatched. - * - * If the queue was created using Cloud Tasks and the queue has - * had no activity (method calls or task dispatches) for 30 days, - * the queue may take a few minutes to re-activate. Some method - * calls may return NOT_FOUND and - * tasks may not be dispatched for a few minutes until the queue - * has been re-activated. - */ - RUNNING: 1, - - /** - * Tasks are paused by the user. If the queue is paused then Cloud - * Tasks will stop delivering tasks from it, but more tasks can - * still be added to it by the user. - */ - PAUSED: 2, - - /** - * The queue is disabled. - * - * A queue becomes `DISABLED` when - * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) - * or - * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - * is uploaded which does not contain the queue. You cannot directly disable - * a queue. - * - * When a queue is disabled, tasks can still be added to a queue - * but the tasks are not dispatched. - * - * To permanently delete this queue and all of its tasks, call - * DeleteQueue. - */ - DISABLED: 3 - } -}; - -/** - * Rate limits. - * - * This message determines the maximum rate that tasks can be dispatched by a - * queue, regardless of whether the dispatch is a first task attempt or a retry. - * - * Note: The debugging command, RunTask, will run a task - * even if the queue has reached its RateLimits. - * - * @property {number} maxDispatchesPerSecond - * The maximum rate at which tasks are dispatched from this queue. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * * For App Engine queues, the maximum allowed value - * is 500. - * - * - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * @property {number} maxBurstSize - * Output only. 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 - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * 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_dispatches_per_second. - * - * Cloud Tasks will pick the value of `max_burst_size` based on the - * value of - * max_dispatches_per_second. - * - * 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 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, - * regardless of whether - * max_dispatches_per_second - * is updated. - * - * @property {number} maxConcurrentDispatches - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * The maximum allowed value is 5,000. - * - * - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * @typedef RateLimits - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.RateLimits definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/queue.proto} - */ -const RateLimits = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Retry config. - * - * These settings determine when a failed task attempt is retried. - * - * @property {number} maxAttempts - * Number of attempts per task. - * - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * -1 indicates unlimited attempts. - * - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * @property {Object} maxRetryDuration - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted max_attempts - * times, no further attempts will be made and the task will be - * deleted. - * - * If zero, then the task age is unlimited. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * `max_retry_duration` will be truncated to the nearest second. - * - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} minBackoff - * A task will be scheduled for retry between - * min_backoff and - * max_backoff duration after it fails, - * if the queue's RetryConfig specifies that the task should be - * retried. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * `min_backoff` will be truncated to the nearest second. - * - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} maxBackoff - * A task will be scheduled for retry between - * min_backoff and - * max_backoff duration after it fails, - * if the queue's RetryConfig specifies that the task should be - * retried. - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * `max_backoff` will be truncated to the nearest second. - * - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} maxDoublings - * The time between retries will double `max_doublings` times. - * - * A task's retry interval starts at - * min_backoff, then doubles - * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of - * max_backoff up to - * max_attempts times. - * - * For example, if min_backoff is 10s, - * max_backoff is 300s, and - * `max_doublings` is 3, then the a task will first be retried in - * 10s. The retry interval will double three times, and then - * increase linearly by 2^3 * 10s. Finally, the task will retry at - * intervals of max_backoff until the - * task has been attempted max_attempts - * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, - * 240s, 300s, 300s, .... - * - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * - * - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * @typedef RetryConfig - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.RetryConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/queue.proto} - */ -const RetryConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * - * @property {number} samplingRatio - * Specifies the fraction of operations to write to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * This field may contain any value between 0.0 and 1.0, inclusive. - * 0.0 is the default and means that no operations are logged. - * - * @typedef StackdriverLoggingConfig - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.StackdriverLoggingConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/queue.proto} - */ -const StackdriverLoggingConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_target.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_target.js deleted file mode 100644 index 25e1e928f8c..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_target.js +++ /dev/null @@ -1,507 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * HTTP request. - * - * The task will be pushed to the worker as an HTTP request. If the worker - * or the redirected worker acknowledges the task by returning a successful HTTP - * response code ([`200` - `299`]), the task will removed from the queue. If - * any other HTTP response code is returned or no response is received, the - * task will be retried according to the following: - * - * * User-specified throttling: retry configuration, - * rate limits, and the queue's state. - * - * * System throttling: To prevent the worker from overloading, Cloud Tasks may - * temporarily reduce the queue's effective rate. User-specified settings - * will not be changed. - * - * System throttling happens because: - * - * * Cloud Tasks backs off on all errors. Normally the backoff specified in - * rate limits will be used. But if the worker returns - * `429` (Too Many Requests), `503` (Service Unavailable), or the rate of - * errors is high, Cloud Tasks will use a higher backoff rate. The retry - * specified in the `Retry-After` HTTP response header is considered. - * - * * To prevent traffic spikes and to smooth sudden large traffic spikes, - * dispatches ramp up slowly when the queue is newly created or idle and - * if large numbers of tasks suddenly become available to dispatch (due to - * spikes in create task rates, the queue being unpaused, or many tasks - * that are scheduled at the same time). - * - * @property {string} url - * Required. The full url path that the request will be sent to. - * - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * @property {number} httpMethod - * The HTTP method to use for the request. The default is POST. - * - * The number should be among the values of [HttpMethod]{@link google.cloud.tasks.v2beta3.HttpMethod} - * - * @property {Object.} headers - * HTTP request headers. - * - * This map contains the header field names and values. - * Headers can be set when the - * task is created. - * - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * - * A partial list of headers that will be ignored or replaced is: - * - * * Host: This will be computed by Cloud Tasks and derived from - * HttpRequest.url. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * X-Google-*: Google use only. - * * X-AppEngine-*: Google use only. - * - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * task is created. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * - * The size of the headers must be less than 80KB. - * - * @property {Buffer} body - * HTTP request body. - * - * A request body is allowed only if the - * HTTP method is POST, PUT, or PATCH. It is an - * error to set body on a task with an incompatible HttpMethod. - * - * @property {Object} oauthToken - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * This object should have the same structure as [OAuthToken]{@link google.cloud.tasks.v2beta3.OAuthToken} - * - * @property {Object} oidcToken - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * This object should have the same structure as [OidcToken]{@link google.cloud.tasks.v2beta3.OidcToken} - * - * @typedef HttpRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.HttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/target.proto} - */ -const HttpRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine HTTP queue. - * - * The task will be delivered to the App Engine application hostname - * specified by its AppEngineHttpQueue and AppEngineHttpRequest. - * The documentation for AppEngineHttpRequest explains how the - * task's host URL is constructed. - * - * Using AppEngineHttpQueue requires - * [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - * Google IAM permission for the project - * and the following scope: - * - * `https://www.googleapis.com/auth/cloud-platform` - * - * @property {Object} appEngineRoutingOverride - * Overrides for the - * task-level app_engine_routing. - * - * If set, `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. - * - * This object should have the same structure as [AppEngineRouting]{@link google.cloud.tasks.v2beta3.AppEngineRouting} - * - * @typedef AppEngineHttpQueue - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.AppEngineHttpQueue definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/target.proto} - */ -const AppEngineHttpQueue = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine HTTP request. - * - * The message defines the HTTP request that is sent to an App Engine app when - * the task is dispatched. - * - * Using AppEngineHttpRequest requires - * [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) - * Google IAM permission for the project - * and the following scope: - * - * `https://www.googleapis.com/auth/cloud-platform` - * - * The task will be delivered to the App Engine app which belongs to the same - * project as the queue. For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and how routing is affected by - * [dispatch - * files](https://cloud.google.com/appengine/docs/python/config/dispatchref). - * Traffic is encrypted during transport and never leaves Google datacenters. - * Because this traffic is carried over a communication mechanism internal to - * Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). - * The request to the handler, however, will appear to have used the HTTP - * protocol. - * - * The 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 - * is used for all tasks in the queue, no matter what the setting - * is for the - * task-level app_engine_routing. - * - * - * The `url` that the task will be sent to is: - * - * * `url =` host `+` - * relative_uri - * - * Tasks can be dispatched to secure app handlers, unsecure app handlers, and - * URIs restricted with - * [`login: - * admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). - * Because tasks are not run as any user, they cannot be dispatched to URIs - * restricted with - * [`login: - * required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) - * Task dispatches also do not follow redirects. - * - * The task attempt has succeeded if the app's request handler returns an HTTP - * response code in the range [`200` - `299`]. The task attempt has failed if - * the app's handler returns a non-2xx response code or Cloud Tasks does - * not receive response before the deadline. Failed - * tasks will be retried according to the - * retry configuration. `503` (Service Unavailable) is - * considered an App Engine system error instead of an application error and - * will cause Cloud Tasks' traffic congestion control to temporarily throttle - * the queue's dispatches. Unlike other types of task targets, a `429` (Too Many - * Requests) response from an app handler does not cause traffic congestion - * control to throttle the queue. - * - * @property {number} httpMethod - * 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 - * 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). - * - * The number should be among the values of [HttpMethod]{@link google.cloud.tasks.v2beta3.HttpMethod} - * - * @property {Object} appEngineRouting - * Task-level setting for App Engine routing. - * - * If set, - * 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. - * - * This object should have the same structure as [AppEngineRouting]{@link google.cloud.tasks.v2beta3.AppEngineRouting} - * - * @property {string} relativeUri - * The relative URI. - * - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * @property {Object.} headers - * HTTP request headers. - * - * This map contains the header field names and values. - * Headers can be set when the - * task is created. - * Repeated headers are not supported but a header value can contain commas. - * - * Cloud Tasks sets some headers to default values: - * - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * - * If the task has a body, Cloud - * Tasks sets the following headers: - * - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * task is created. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * - * The headers below cannot be set or overridden: - * - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the Task. For more - * information, see the CreateTask documentation. - * - * @property {Buffer} body - * HTTP request body. - * - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible HttpMethod. - * - * @typedef AppEngineHttpRequest - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.AppEngineHttpRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/target.proto} - */ -const AppEngineHttpRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine Routing. - * - * Defines routing characteristics specific to App Engine - service, version, - * and instance. - * - * For more information about services, versions, and instances see - * [An Overview of App - * Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), - * [Microservices Architecture on Google App - * Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * @property {string} service - * App service. - * - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * - * For some queues or tasks which were created using the App Engine - * Task Queue API, host is not parsable - * into service, - * version, and - * instance. For example, some tasks - * which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * host is not parsable, then - * service, - * version, and - * instance are the empty string. - * - * @property {string} version - * App version. - * - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * - * For some queues or tasks which were created using the App Engine - * Task Queue API, host is not parsable - * into service, - * version, and - * instance. For example, some tasks - * which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * host is not parsable, then - * service, - * version, and - * instance are the empty string. - * - * @property {string} instance - * App instance. - * - * By default, the task is sent to an instance which is available when - * the task is attempted. - * - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * @property {string} host - * Output only. The host that the task is sent to. - * - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * service, version, - * and instance. Tasks which were created using - * the App Engine SDK might have a custom domain name. - * - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * - * @typedef AppEngineRouting - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.AppEngineRouting definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/target.proto} - */ -const AppEngineRouting = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Contains information needed for generating an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2). - * This type of authorization should generally only be used when calling Google - * APIs hosted on *.googleapis.com. - * - * @property {string} serviceAccountEmail - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * @property {string} scope - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * @typedef OAuthToken - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.OAuthToken definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/target.proto} - */ -const OAuthToken = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Contains information needed for generating an - * [OpenID Connect - * token](https://developers.google.com/identity/protocols/OpenIDConnect). - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * @property {string} serviceAccountEmail - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * @property {string} audience - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * @typedef OidcToken - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.OidcToken definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/target.proto} - */ -const OidcToken = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The HTTP method used to execute the task. - * - * @enum {number} - * @memberof google.cloud.tasks.v2beta3 - */ -const HttpMethod = { - - /** - * HTTP method unspecified - */ - HTTP_METHOD_UNSPECIFIED: 0, - - /** - * HTTP POST - */ - POST: 1, - - /** - * HTTP GET - */ - GET: 2, - - /** - * HTTP HEAD - */ - HEAD: 3, - - /** - * HTTP PUT - */ - PUT: 4, - - /** - * HTTP DELETE - */ - DELETE: 5, - - /** - * HTTP PATCH - */ - PATCH: 6, - - /** - * HTTP OPTIONS - */ - OPTIONS: 7 -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_task.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_task.js deleted file mode 100644 index 40ff7da93fe..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_task.js +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A unit of scheduled work. - * - * @property {string} name - * Optionally caller-specified in CreateTask. - * - * The task name. - * - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * ListLocations. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * @property {Object} appEngineHttpRequest - * HTTP request that is sent to the App Engine app handler. - * - * An App Engine task is a task that has AppEngineHttpRequest set. - * - * This object should have the same structure as [AppEngineHttpRequest]{@link google.cloud.tasks.v2beta3.AppEngineHttpRequest} - * - * @property {Object} httpRequest - * HTTP request that is sent to the task's target. - * - * An HTTP task is a task that has HttpRequest set. - * - * This object should have the same structure as [HttpRequest]{@link google.cloud.tasks.v2beta3.HttpRequest} - * - * @property {Object} scheduleTime - * The time when the task is scheduled to be attempted. - * - * For App Engine queues, this is when the task will be attempted or retried. - * - * `schedule_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} createTime - * Output only. The time that the task was created. - * - * `create_time` will be truncated to the nearest second. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} dispatchDeadline - * The deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the RetryConfig. - * - * Note that when the request is cancelled, Cloud Tasks will stop listing for - * the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * - * The default and maximum values depend on the type of request: - * - * * For HTTP tasks, the default is 10 minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * - * * For App Engine tasks, 0 indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} dispatchCount - * Output only. The number of attempts dispatched. - * - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * @property {number} responseCount - * Output only. The number of attempts which have received a response. - * - * @property {Object} firstAttempt - * Output only. The status of the task's first attempt. - * - * Only dispatch_time will be set. - * The other Attempt information is not retained by Cloud Tasks. - * - * This object should have the same structure as [Attempt]{@link google.cloud.tasks.v2beta3.Attempt} - * - * @property {Object} lastAttempt - * Output only. The status of the task's last attempt. - * - * This object should have the same structure as [Attempt]{@link google.cloud.tasks.v2beta3.Attempt} - * - * @property {number} view - * Output only. The view specifies which subset of the Task has - * been returned. - * - * The number should be among the values of [View]{@link google.cloud.tasks.v2beta3.View} - * - * @typedef Task - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.Task definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/task.proto} - */ -const Task = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * The view specifies a subset of Task data. - * - * When a task is returned in a response, not all - * information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * @enum {number} - * @memberof google.cloud.tasks.v2beta3 - */ - View: { - - /** - * Unspecified. Defaults to BASIC. - */ - VIEW_UNSPECIFIED: 0, - - /** - * The basic view omits fields which can be large or can contain - * sensitive data. - * - * This view does not include the - * body in AppEngineHttpRequest. - * Bodies are desirable to return only when needed, because they - * can be large and because of the sensitivity of the data that you - * choose to store in it. - */ - BASIC: 1, - - /** - * All information is returned. - * - * Authorization for FULL requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the Queue resource. - */ - FULL: 2 - } -}; - -/** - * The status of a task attempt. - * - * @property {Object} scheduleTime - * Output only. The time that this attempt was scheduled. - * - * `schedule_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} dispatchTime - * Output only. The time that this attempt was dispatched. - * - * `dispatch_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} responseTime - * Output only. The time that this attempt response was received. - * - * `response_time` will be truncated to the nearest microsecond. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} responseStatus - * Output only. The response from the worker for this attempt. - * - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @typedef Attempt - * @memberof google.cloud.tasks.v2beta3 - * @see [google.cloud.tasks.v2beta3.Attempt definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/tasks/v2beta3/task.proto} - */ -const Attempt = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_iam_policy.js deleted file mode 100644 index 15b6fb823d4..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_iam_policy.js +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Request message for `SetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * - * @property {Object} policy - * REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * - * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} - * - * @typedef SetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.SetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const SetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `GetIamPolicy` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * - * @property {Object} options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} - * - * @typedef GetIamPolicyRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.GetIamPolicyRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const GetIamPolicyRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for `TestIamPermissions` method. - * - * @property {string} resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * - * @property {string[]} permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * - * @typedef TestIamPermissionsRequest - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for `TestIamPermissions` method. - * - * @property {string[]} permissions - * A subset of `TestPermissionsRequest.permissions` that the caller is - * allowed. - * - * @typedef TestIamPermissionsResponse - * @memberof google.iam.v1 - * @see [google.iam.v1.TestIamPermissionsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/iam_policy.proto} - */ -const TestIamPermissionsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_options.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_options.js deleted file mode 100644 index b725d806cce..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_options.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Encapsulates settings provided to GetIamPolicy. - * - * @property {number} requestedPolicyVersion - * Optional. The policy format version to be returned. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Requests for policies with any conditional bindings must specify version 3. - * Policies without any conditional bindings may specify any valid value or - * leave the field unset. - * - * @typedef GetPolicyOptions - * @memberof google.iam.v1 - * @see [google.iam.v1.GetPolicyOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/options.proto} - */ -const GetPolicyOptions = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_policy.js deleted file mode 100644 index 606cdf98cad..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_policy.js +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Defines an Identity and Access Management (IAM) policy. It is used to - * specify access control policies for Cloud Platform resources. - * - * - * A `Policy` is a collection of `bindings`. A `binding` binds one or more - * `members` to a single `role`. Members can be user accounts, service accounts, - * Google groups, and domains (such as G Suite). A `role` is a named list of - * permissions (defined by IAM or configured by users). A `binding` can - * optionally specify a `condition`, which is a logic expression that further - * constrains the role binding based on attributes about the request and/or - * target resource. - * - * **JSON Example** - * - * { - * "bindings": [ - * { - * "role": "roles/resourcemanager.organizationAdmin", - * "members": [ - * "user:mike@example.com", - * "group:admins@example.com", - * "domain:google.com", - * "serviceAccount:my-project-id@appspot.gserviceaccount.com" - * ] - * }, - * { - * "role": "roles/resourcemanager.organizationViewer", - * "members": ["user:eve@example.com"], - * "condition": { - * "title": "expirable access", - * "description": "Does not grant access after Sep 2020", - * "expression": "request.time < - * timestamp('2020-10-01T00:00:00.000Z')", - * } - * } - * ] - * } - * - * **YAML Example** - * - * bindings: - * - members: - * - user:mike@example.com - * - group:admins@example.com - * - domain:google.com - * - serviceAccount:my-project-id@appspot.gserviceaccount.com - * role: roles/resourcemanager.organizationAdmin - * - members: - * - user:eve@example.com - * role: roles/resourcemanager.organizationViewer - * condition: - * title: expirable access - * description: Does not grant access after Sep 2020 - * expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - * - * For a description of IAM and its features, see the - * [IAM developer's guide](https://cloud.google.com/iam/docs). - * - * @property {number} version - * Specifies the format of the policy. - * - * Valid values are 0, 1, and 3. Requests specifying an invalid value will be - * rejected. - * - * Operations affecting conditional bindings must specify version 3. This can - * be either setting a conditional policy, modifying a conditional binding, - * or removing a binding (conditional or unconditional) from the stored - * conditional policy. - * Operations on non-conditional policies may specify any valid value or - * leave the field unset. - * - * If no etag is provided in the call to `setIamPolicy`, version compliance - * checks against the stored policy is skipped. - * - * @property {Object[]} bindings - * Associates a list of `members` to a `role`. Optionally may specify a - * `condition` that determines when binding is in effect. - * `bindings` with no members will result in an error. - * - * This object should have the same structure as [Binding]{@link google.iam.v1.Binding} - * - * @property {Buffer} etag - * `etag` is used for optimistic concurrency control as a way to help - * prevent simultaneous updates of a policy from overwriting each other. - * It is strongly suggested that systems make use of the `etag` in the - * read-modify-write cycle to perform policy updates in order to avoid race - * conditions: An `etag` is returned in the response to `getIamPolicy`, and - * systems are expected to put that etag in the request to `setIamPolicy` to - * ensure that their change will be applied to the same version of the policy. - * - * If no `etag` is provided in the call to `setIamPolicy`, then the existing - * policy is overwritten. Due to blind-set semantics of an etag-less policy, - * 'setIamPolicy' will not fail even if the incoming policy version does not - * meet the requirements for modifying the stored policy. - * - * @typedef Policy - * @memberof google.iam.v1 - * @see [google.iam.v1.Policy definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const Policy = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Associates `members` with a `role`. - * - * @property {string} role - * Role that is assigned to `members`. - * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - * - * @property {string[]} members - * Specifies the identities requesting access for a Cloud Platform resource. - * `members` can have the following values: - * - * * `allUsers`: A special identifier that represents anyone who is - * on the internet; with or without a Google account. - * - * * `allAuthenticatedUsers`: A special identifier that represents anyone - * who is authenticated with a Google account or a service account. - * - * * `user:{emailid}`: An email address that represents a specific Google - * account. For example, `alice@example.com` . - * - * - * * `serviceAccount:{emailid}`: An email address that represents a service - * account. For example, `my-other-app@appspot.gserviceaccount.com`. - * - * * `group:{emailid}`: An email address that represents a Google group. - * For example, `admins@example.com`. - * - * - * * `domain:{domain}`: The G Suite domain (primary) that represents all the - * users of that domain. For example, `google.com` or `example.com`. - * - * @property {Object} condition - * The condition that is associated with this binding. - * NOTE: An unsatisfied condition will not allow user access via current - * binding. Different bindings, including their conditions, are examined - * independently. - * - * This object should have the same structure as [Expr]{@link google.type.Expr} - * - * @typedef Binding - * @memberof google.iam.v1 - * @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto} - */ -const Binding = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_any.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_any.js deleted file mode 100644 index cdd2fc80e49..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_any.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * # JSON - * - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message google.protobuf.Duration): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - * - * @property {string} typeUrl - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a google.protobuf.Type - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - * - * @property {Buffer} value - * Must be a valid serialized protocol buffer of the above specified type. - * - * @typedef Any - * @memberof google.protobuf - * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} - */ -const Any = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_duration.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_duration.js deleted file mode 100644 index 1275f8f4d13..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_duration.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - * - * @property {number} seconds - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - * - * @property {number} nanos - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * - * @typedef Duration - * @memberof google.protobuf - * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} - */ -const Duration = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_empty.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 0b446dd9ce4..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_empty.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - * @typedef Empty - * @memberof google.protobuf - * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} - */ -const Empty = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 011207b8626..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_field_mask.js +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `FieldMask` represents a set of symbolic field paths, for example: - * - * paths: "f.a" - * paths: "f.b.d" - * - * Here `f` represents a field in some root message, `a` and `b` - * fields in the message found in `f`, and `d` a field found in the - * message in `f.b`. - * - * Field masks are used to specify a subset of fields that should be - * returned by a get operation or modified by an update operation. - * Field masks also have a custom JSON encoding (see below). - * - * # Field Masks in Projections - * - * When used in the context of a projection, a response message or - * sub-message is filtered by the API to only contain those fields as - * specified in the mask. For example, if the mask in the previous - * example is applied to a response message as follows: - * - * f { - * a : 22 - * b { - * d : 1 - * x : 2 - * } - * y : 13 - * } - * z: 8 - * - * The result will not contain specific values for fields x,y and z - * (their value will be set to the default, and omitted in proto text - * output): - * - * - * f { - * a : 22 - * b { - * d : 1 - * } - * } - * - * A repeated field is not allowed except at the last position of a - * paths string. - * - * If a FieldMask object is not present in a get operation, the - * operation applies to all fields (as if a FieldMask of all fields - * had been specified). - * - * Note that a field mask does not necessarily apply to the - * top-level response message. In case of a REST get operation, the - * field mask applies directly to the response, but in case of a REST - * list operation, the mask instead applies to each individual message - * in the returned resource list. In case of a REST custom method, - * other definitions may be used. Where the mask applies will be - * clearly documented together with its declaration in the API. In - * any case, the effect on the returned resource/resources is required - * behavior for APIs. - * - * # Field Masks in Update Operations - * - * A field mask in update operations specifies which fields of the - * targeted resource are going to be updated. The API is required - * to only change the values of the fields as specified in the mask - * and leave the others untouched. If a resource is passed in to - * describe the updated values, the API ignores the values of all - * fields not covered by the mask. - * - * If a repeated field is specified for an update operation, new values will - * be appended to the existing repeated field in the target resource. Note that - * a repeated field is only allowed in the last position of a `paths` string. - * - * If a sub-message is specified in the last position of the field mask for an - * update operation, then new value will be merged into the existing sub-message - * in the target resource. - * - * For example, given the target message: - * - * f { - * b { - * d: 1 - * x: 2 - * } - * c: [1] - * } - * - * And an update message: - * - * f { - * b { - * d: 10 - * } - * c: [2] - * } - * - * then if the field mask is: - * - * paths: ["f.b", "f.c"] - * - * then the result will be: - * - * f { - * b { - * d: 10 - * x: 2 - * } - * c: [1, 2] - * } - * - * An implementation may provide options to override this default behavior for - * repeated and message fields. - * - * In order to reset a field's value to the default, the field must - * be in the mask and set to the default value in the provided resource. - * Hence, in order to reset all fields of a resource, provide a default - * instance of the resource and set all fields in the mask, or do - * not provide a mask as described below. - * - * If a field mask is not present on update, the operation applies to - * all fields (as if a field mask of all fields has been specified). - * Note that in the presence of schema evolution, this may mean that - * fields the client does not know and has therefore not filled into - * the request will be reset to their default. If this is unwanted - * behavior, a specific service may require a client to always specify - * a field mask, producing an error if not. - * - * As with get operations, the location of the resource which - * describes the updated values in the request message depends on the - * operation kind. In any case, the effect of the field mask is - * required to be honored by the API. - * - * ## Considerations for HTTP REST - * - * The HTTP kind of an update operation which uses a field mask must - * be set to PATCH instead of PUT in order to satisfy HTTP semantics - * (PUT must only be used for full updates). - * - * # JSON Encoding of Field Masks - * - * In JSON, a field mask is encoded as a single string where paths are - * separated by a comma. Fields name in each path are converted - * to/from lower-camel naming conventions. - * - * As an example, consider the following message declarations: - * - * message Profile { - * User user = 1; - * Photo photo = 2; - * } - * message User { - * string display_name = 1; - * string address = 2; - * } - * - * In proto a field mask for `Profile` may look as such: - * - * mask { - * paths: "user.display_name" - * paths: "photo" - * } - * - * In JSON, the same mask is represented as below: - * - * { - * mask: "user.displayName,photo" - * } - * - * # Field Masks and Oneof Fields - * - * Field masks treat fields in oneofs just as regular fields. Consider the - * following message: - * - * message SampleMessage { - * oneof test_oneof { - * string name = 4; - * SubMessage sub_message = 9; - * } - * } - * - * The field mask can be: - * - * mask { - * paths: "name" - * } - * - * Or: - * - * mask { - * paths: "sub_message" - * } - * - * Note that oneof type names ("test_oneof" in this case) cannot be used in - * paths. - * - * ## Field Mask Verification - * - * The implementation of any API method which has a FieldMask type field in the - * request should verify the included field paths, and return an - * `INVALID_ARGUMENT` error if any path is duplicated or unmappable. - * - * @property {string[]} paths - * The set of field mask paths. - * - * @typedef FieldMask - * @memberof google.protobuf - * @see [google.protobuf.FieldMask definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/field_mask.proto} - */ -const FieldMask = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index c457acc0c7d..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_timestamp.js +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D) to obtain a formatter capable of generating timestamps in this format. - * - * @property {number} seconds - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * - * @property {number} nanos - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * - * @typedef Timestamp - * @memberof google.protobuf - * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} - */ -const Timestamp = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/rpc/doc_status.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/rpc/doc_status.js deleted file mode 100644 index 432ab6bb928..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/rpc/doc_status.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * The `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). The error model is designed to be: - * - * - Simple to use and understand for most users - * - Flexible enough to meet unexpected needs - * - * # Overview - * - * The `Status` message contains three pieces of data: error code, error - * message, and error details. The error code should be an enum value of - * google.rpc.Code, but it may accept additional error codes - * if needed. The error message should be a developer-facing English message - * that helps developers *understand* and *resolve* the error. If a localized - * user-facing error message is needed, put the localized message in the error - * details or localize it in the client. The optional error details may contain - * arbitrary information about the error. There is a predefined set of error - * detail types in the package `google.rpc` that can be used for common error - * conditions. - * - * # Language mapping - * - * The `Status` message is the logical representation of the error model, but it - * is not necessarily the actual wire format. When the `Status` message is - * exposed in different client libraries and different wire protocols, it can be - * mapped differently. For example, it will likely be mapped to some exceptions - * in Java, but more likely mapped to some error codes in C. - * - * # Other uses - * - * The error model and the `Status` message can be used in a variety of - * environments, either with or without APIs, to provide a - * consistent developer experience across different environments. - * - * Example uses of this error model include: - * - * - Partial errors. If a service needs to return partial errors to the client, - * it may embed the `Status` in the normal response to indicate the partial - * errors. - * - * - Workflow errors. A typical workflow has multiple steps. Each step may - * have a `Status` message for error reporting. - * - * - Batch operations. If a client uses batch request and batch response, the - * `Status` message should be used directly inside batch response, one for - * each error sub-response. - * - * - Asynchronous operations. If an API call embeds asynchronous operation - * results in its response, the status of those operations should be - * represented directly using the `Status` message. - * - * - Logging. If some API errors are stored in logs, the message `Status` could - * be used directly after any stripping needed for security/privacy reasons. - * - * @property {number} code - * The status code, which should be an enum value of - * google.rpc.Code. - * - * @property {string} message - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * google.rpc.Status.details field, or localized - * by the client. - * - * @property {Object[]} details - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Status - * @memberof google.rpc - * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} - */ -const Status = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/type/doc_expr.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/type/doc_expr.js deleted file mode 100644 index 421a7ee9e6a..00000000000 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/type/doc_expr.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2019 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. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Represents an expression text. Example: - * - * title: "User account presence" - * description: "Determines whether the request has a user account" - * expression: "size(request.user) > 0" - * - * @property {string} expression - * Textual representation of an expression in - * Common Expression Language syntax. - * - * The application context of the containing message determines which - * well-known feature set of CEL is supported. - * - * @property {string} title - * An optional title for the expression, i.e. a short string describing - * its purpose. This can be used e.g. in UIs which allow to enter the - * expression. - * - * @property {string} description - * An optional description of the expression. This is a longer text which - * describes the expression, e.g. when hovered over it in a UI. - * - * @property {string} location - * An optional string indicating the location of the expression for error - * reporting, e.g. a file name and a position in the file. - * - * @typedef Expr - * @memberof google.type - * @see [google.type.Expr definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/type/expr.proto} - */ -const Expr = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-tasks/synth.metadata b/packages/google-cloud-tasks/synth.metadata index a2c201dee83..28b8dfb91f8 100644 --- a/packages/google-cloud-tasks/synth.metadata +++ b/packages/google-cloud-tasks/synth.metadata @@ -1,19 +1,25 @@ { - "updateTime": "2020-04-11T01:45:48.684943Z", "sources": [ + { + "git": { + "name": ".", + "remote": "git@github.com:googleapis/nodejs-tasks.git", + "sha": "d5179da1598dbb7a3cebd67838825594d266973d" + } + }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1bd77e8ce6f953ac641af7966d0c52646afc16a8", - "internalRef": "305974465" + "sha": "26523a96798ce1a6caa1b3c912119059cfcc98a7", + "internalRef": "306320014" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5" + "sha": "3df869dd6eb546ef13beeb7a9efa6ee0226afafd" } } ], diff --git a/packages/google-cloud-tasks/synth.py b/packages/google-cloud-tasks/synth.py index c0afecfffb4..6f86fd51712 100644 --- a/packages/google-cloud-tasks/synth.py +++ b/packages/google-cloud-tasks/synth.py @@ -23,13 +23,12 @@ AUTOSYNTH_MULTIPLE_COMMITS = True - # Run the gapic generator gapic = gcp.GAPICMicrogenerator() versions = ["v2beta2", "v2beta3", "v2"] for version in versions: library = gapic.typescript_library( - "tasks", version, + "tasks", version, generator_args={ "grpc-service-config": f"google/cloud/tasks/{version}/cloudtasks_grpc_service_config.json", "package-name":f"@google-cloud/tasks", @@ -50,9 +49,9 @@ '"initial_rpc_timeout_millis": 20000') s.replace('**/src/**/cloud_tasks_client_config.json', '"max_rpc_timeout_millis": 60000', - '"max_rpc_timeout_millis": 20000') + '"max_rpc_timeout_millis": 20000') # Node.js specific cleanup subprocess.run(["npm", "install"]) -subprocess.run(["npm", "run", "lint"]) +subprocess.run(["npm", "run", "fix"]) subprocess.run(['npx', 'compileProtos', 'src']) diff --git a/packages/google-cloud-tasks/system-test/.eslintrc.yml b/packages/google-cloud-tasks/system-test/.eslintrc.yml deleted file mode 100644 index 5adab99ca15..00000000000 --- a/packages/google-cloud-tasks/system-test/.eslintrc.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -rules: - node/no-unpublished-require: off - no-console: off diff --git a/packages/google-cloud-tasks/system-test/install.ts b/packages/google-cloud-tasks/system-test/install.ts index c4d80e9c0c8..4c1ba3eb79a 100644 --- a/packages/google-cloud-tasks/system-test/install.ts +++ b/packages/google-cloud-tasks/system-test/install.ts @@ -21,7 +21,7 @@ import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function() { + it('should have correct type signature for typescript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. @@ -35,7 +35,7 @@ describe('typescript consumer tests', () => { await packNTest(options); // will throw upon error. }); - it('should have correct type signature for javascript users', async function() { + it('should have correct type signature for javascript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. diff --git a/packages/google-cloud-tasks/test/.eslintrc.yml b/packages/google-cloud-tasks/test/.eslintrc.yml deleted file mode 100644 index cd088a97818..00000000000 --- a/packages/google-cloud-tasks/test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -rules: - node/no-unpublished-require: off diff --git a/packages/google-cloud-tasks/tslint.json b/packages/google-cloud-tasks/tslint.json deleted file mode 100644 index 617dc975bae..00000000000 --- a/packages/google-cloud-tasks/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "gts/tslint.json" -}