diff --git a/packages/google-cloud-scheduler/.eslintignore b/packages/google-cloud-scheduler/.eslintignore index 09b31fe735a..9340ad9b86d 100644 --- a/packages/google-cloud-scheduler/.eslintignore +++ b/packages/google-cloud-scheduler/.eslintignore @@ -1,5 +1,6 @@ **/node_modules -src/**/doc/* +**/coverage +test/fixtures build/ docs/ protos/ diff --git a/packages/google-cloud-scheduler/.prettierignore b/packages/google-cloud-scheduler/.prettierignore index f6fac98b0a8..9340ad9b86d 100644 --- a/packages/google-cloud-scheduler/.prettierignore +++ b/packages/google-cloud-scheduler/.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-scheduler/package.json b/packages/google-cloud-scheduler/package.json index 2522e99de51..8df8a705dda 100644 --- a/packages/google-cloud-scheduler/package.json +++ b/packages/google-cloud-scheduler/package.json @@ -56,7 +56,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-scheduler/samples/.eslintrc.yml b/packages/google-cloud-scheduler/samples/.eslintrc.yml index 8ed0e67e479..282535f55f6 100644 --- a/packages/google-cloud-scheduler/samples/.eslintrc.yml +++ b/packages/google-cloud-scheduler/samples/.eslintrc.yml @@ -1,5 +1,3 @@ --- rules: no-console: off - node/no-missing-require: off - no-warning-comments: off diff --git a/packages/google-cloud-scheduler/src/v1/doc/google/cloud/scheduler/v1/doc_cloudscheduler.js b/packages/google-cloud-scheduler/src/v1/doc/google/cloud/scheduler/v1/doc_cloudscheduler.js deleted file mode 100644 index 8daf46e637a..00000000000 --- a/packages/google-cloud-scheduler/src/v1/doc/google/cloud/scheduler/v1/doc_cloudscheduler.js +++ /dev/null @@ -1,198 +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 listing jobs using ListJobs. - * - * @property {string} parent - * Required. The location name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID`. - * - * @property {number} pageSize - * Requested page size. - * - * The maximum page size is 500. If unspecified, the page size will - * be the maximum. Fewer jobs than requested might be returned, - * even if more jobs exist; use next_page_token to determine if more - * jobs exist. - * - * @property {string} pageToken - * A token identifying a page of results the server will 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 ListJobs. It is an error to - * switch the value of filter or - * order_by while iterating through pages. - * - * @typedef ListJobsRequest - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.ListJobsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto} - */ -const ListJobsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for listing jobs using ListJobs. - * - * @property {Object[]} jobs - * The list of jobs. - * - * This object should have the same structure as [Job]{@link google.cloud.scheduler.v1.Job} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. Pass this value in the - * page_token field in the subsequent call to - * ListJobs to retrieve the next page of results. - * If this is empty it indicates that there are no more results - * through which to paginate. - * - * The page token is valid for only 2 hours. - * - * @typedef ListJobsResponse - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.ListJobsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto} - */ -const ListJobsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for GetJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef GetJobRequest - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.GetJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto} - */ -const GetJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for CreateJob. - * - * @property {string} parent - * Required. The location name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID`. - * - * @property {Object} job - * Required. The job to add. The user can optionally specify a name for the - * job in name. name cannot be the same as an - * existing job. If a name is not specified then the system will - * generate a random unique name that will be returned - * (name) in the response. - * - * This object should have the same structure as [Job]{@link google.cloud.scheduler.v1.Job} - * - * @typedef CreateJobRequest - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.CreateJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto} - */ -const CreateJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for UpdateJob. - * - * @property {Object} job - * Required. The new job properties. name must be specified. - * - * Output only fields cannot be modified using UpdateJob. - * Any value specified for an output only field will be ignored. - * - * This object should have the same structure as [Job]{@link google.cloud.scheduler.v1.Job} - * - * @property {Object} updateMask - * A mask used to specify which fields of the job are being updated. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateJobRequest - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.UpdateJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto} - */ -const UpdateJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for deleting a job using - * DeleteJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef DeleteJobRequest - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.DeleteJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto} - */ -const DeleteJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PauseJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef PauseJobRequest - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.PauseJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto} - */ -const PauseJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for ResumeJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef ResumeJobRequest - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.ResumeJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto} - */ -const ResumeJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for forcing a job to run now using - * RunJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef RunJobRequest - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.RunJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/cloudscheduler.proto} - */ -const RunJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-scheduler/src/v1/doc/google/cloud/scheduler/v1/doc_job.js b/packages/google-cloud-scheduler/src/v1/doc/google/cloud/scheduler/v1/doc_job.js deleted file mode 100644 index 401694abd20..00000000000 --- a/packages/google-cloud-scheduler/src/v1/doc/google/cloud/scheduler/v1/doc_job.js +++ /dev/null @@ -1,271 +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. - -/** - * Configuration for a job. - * The maximum allowed size for a job is 100KB. - * - * @property {string} name - * Optionally caller-specified in CreateJob, after - * which it becomes output only. - * - * The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_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 job's location. - * The list of available locations can be obtained by calling - * ListLocations. - * For more information, see https://cloud.google.com/about/locations/. - * * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * @property {string} description - * Optionally caller-specified in CreateJob or - * UpdateJob. - * - * A human-readable description for the job. This string must not contain - * more than 500 characters. - * - * @property {Object} pubsubTarget - * Pub/Sub target. - * - * This object should have the same structure as [PubsubTarget]{@link google.cloud.scheduler.v1.PubsubTarget} - * - * @property {Object} appEngineHttpTarget - * App Engine HTTP target. - * - * This object should have the same structure as [AppEngineHttpTarget]{@link google.cloud.scheduler.v1.AppEngineHttpTarget} - * - * @property {Object} httpTarget - * HTTP target. - * - * This object should have the same structure as [HttpTarget]{@link google.cloud.scheduler.v1.HttpTarget} - * - * @property {string} schedule - * Required, except when used with UpdateJob. - * - * Describes the schedule on which the job will be executed. - * - * The schedule can be either of the following types: - * - * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) - * * English-like - * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) - * - * As a general rule, execution `n + 1` of a job will not begin - * until execution `n` has finished. Cloud Scheduler will never - * allow two simultaneously outstanding executions. For example, - * this implies that if the `n+1`th execution is scheduled to run at - * 16:00 but the `n`th execution takes until 16:15, the `n+1`th - * execution will not start until `16:15`. - * A scheduled start time will be delayed if the previous - * execution has not ended when its scheduled time occurs. - * - * If retry_count > 0 and a job attempt fails, - * the job will be tried a total of retry_count - * times, with exponential backoff, until the next scheduled start - * time. - * - * @property {string} timeZone - * Specifies the time zone to be used in interpreting - * schedule. The value of this field must be a time - * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). - * - * Note that some time zones include a provision for - * daylight savings time. The rules for daylight saving time are - * determined by the chosen tz. For UTC use the string "utc". If a - * time zone is not specified, the default will be in UTC (also known - * as GMT). - * - * @property {Object} userUpdateTime - * Output only. The creation time of the job. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} state - * Output only. State of the job. - * - * The number should be among the values of [State]{@link google.cloud.scheduler.v1.State} - * - * @property {Object} status - * Output only. The response from the target for the last attempted execution. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @property {Object} scheduleTime - * Output only. The next time the job is scheduled. Note that this may be a - * retry of a previously failed attempt or the next execution time - * according to the schedule. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} lastAttemptTime - * Output only. The time the last job attempt started. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} retryConfig - * Settings that determine the retry behavior. - * - * This object should have the same structure as [RetryConfig]{@link google.cloud.scheduler.v1.RetryConfig} - * - * @property {Object} attemptDeadline - * The deadline for job attempts. If the request handler does not respond by - * this deadline then the request is cancelled and the attempt is marked as a - * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in - * execution logs. Cloud Scheduler will retry the job according - * to the RetryConfig. - * - * The allowed duration for this deadline is: - * * For HTTP targets, between 15 seconds and 30 minutes. - * * For App Engine HTTP targets, between 15 - * seconds and 24 hours. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @typedef Job - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.Job definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/job.proto} - */ -const Job = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * State of the job. - * - * @enum {number} - * @memberof google.cloud.scheduler.v1 - */ - State: { - - /** - * Unspecified state. - */ - STATE_UNSPECIFIED: 0, - - /** - * The job is executing normally. - */ - ENABLED: 1, - - /** - * The job is paused by the user. It will not execute. A user can - * intentionally pause the job using - * PauseJobRequest. - */ - PAUSED: 2, - - /** - * The job is disabled by the system due to error. The user - * cannot directly set a job to be disabled. - */ - DISABLED: 3, - - /** - * The job state resulting from a failed CloudScheduler.UpdateJob - * operation. To recover a job from this state, retry - * CloudScheduler.UpdateJob until a successful response is received. - */ - UPDATE_FAILED: 4 - } -}; - -/** - * Settings that determine the retry behavior. - * - * By default, if a job does not complete successfully (meaning that - * an acknowledgement is not received from the handler, then it will be retried - * with exponential backoff according to the settings in RetryConfig. - * - * @property {number} retryCount - * The number of attempts that the system will make to run a job using the - * exponential backoff procedure described by - * max_doublings. - * - * The default value of retry_count is zero. - * - * If retry_count is zero, a job attempt will *not* be retried if - * it fails. Instead the Cloud Scheduler system will wait for the - * next scheduled execution time. - * - * If retry_count is set to a non-zero number then Cloud Scheduler - * will retry failed attempts, using exponential backoff, - * retry_count times, or until the next scheduled execution time, - * whichever comes first. - * - * Values greater than 5 and negative values are not allowed. - * - * @property {Object} maxRetryDuration - * The time limit for retrying a failed job, measured from time when an - * execution was first attempted. If specified with - * retry_count, the job will be retried until both - * limits are reached. - * - * The default value for max_retry_duration is zero, which means retry - * duration is unlimited. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} minBackoffDuration - * The minimum amount of time to wait before retrying a job after - * it fails. - * - * The default value of this field is 5 seconds. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} maxBackoffDuration - * The maximum amount of time to wait before retrying a job after - * it fails. - * - * The default value of this field is 1 hour. - * - * 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 job's retry interval starts at - * min_backoff_duration, then doubles - * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of - * max_backoff_duration up to - * retry_count times. - * - * For example, if min_backoff_duration is - * 10s, max_backoff_duration is 300s, and - * `max_doublings` is 3, then the a job will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by - * 2^3 * 10s. Finally, the job will retry at intervals of - * max_backoff_duration until the job has - * been attempted retry_count times. Thus, the - * requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... - * - * The default value of this field is 5. - * - * @typedef RetryConfig - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.RetryConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/job.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-scheduler/src/v1/doc/google/cloud/scheduler/v1/doc_target.js b/packages/google-cloud-scheduler/src/v1/doc/google/cloud/scheduler/v1/doc_target.js deleted file mode 100644 index e740b2d83fd..00000000000 --- a/packages/google-cloud-scheduler/src/v1/doc/google/cloud/scheduler/v1/doc_target.js +++ /dev/null @@ -1,410 +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 target. The job will be pushed to the job handler by means of - * an HTTP request via an http_method such as HTTP - * POST, HTTP GET, etc. The job is acknowledged by means of an HTTP - * response code in the range [200 - 299]. A failure to receive a response - * constitutes a failed execution. For a redirected request, the response - * returned by the redirected request is considered. - * - * @property {string} uri - * Required. The full URI path that the request will be sent to. This string - * must begin with either "http://" or "https://". Some examples of - * valid values for uri are: - * `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * - * @property {number} httpMethod - * Which HTTP method to use for the request. - * - * The number should be among the values of [HttpMethod]{@link google.cloud.scheduler.v1.HttpMethod} - * - * @property {Object.} headers - * The user can specify HTTP request headers to send with the job's - * HTTP request. This map contains the header field names and - * values. Repeated headers are not supported, but a header value can - * contain commas. These headers represent a subset of the headers - * that will accompany the job's HTTP request. Some HTTP request - * headers will be ignored or replaced. A partial list of headers that - * will be ignored or replaced is below: - * - Host: This will be computed by Cloud Scheduler and derived from - * uri. - * * `Content-Length`: This will be computed by Cloud Scheduler. - * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. - * * `X-Google-*`: Google internal use only. - * * `X-AppEngine-*`: Google internal use only. - * - * The total size of 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 job 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.scheduler.v1.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.scheduler.v1.OidcToken} - * - * @typedef HttpTarget - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.HttpTarget definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/target.proto} - */ -const HttpTarget = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine target. The job will be pushed to a job handler by means - * of an HTTP request via an http_method such - * as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an - * HTTP response code in the range [200 - 299]. Error 503 is - * considered an App Engine system error instead of an application - * error. Requests returning error 503 will be retried regardless of - * retry configuration and not counted against retry counts. Any other - * response code, or a failure to receive a response before the - * deadline, constitutes a failed attempt. - * - * @property {number} httpMethod - * The HTTP method to use for the request. PATCH and OPTIONS are not - * permitted. - * - * The number should be among the values of [HttpMethod]{@link google.cloud.scheduler.v1.HttpMethod} - * - * @property {Object} appEngineRouting - * App Engine Routing setting for the job. - * - * This object should have the same structure as [AppEngineRouting]{@link google.cloud.scheduler.v1.AppEngineRouting} - * - * @property {string} relativeUri - * The relative URI. - * - * The relative URL must begin with "/" and must be a valid HTTP relative URL. - * It can contain a path, query string arguments, and `#` fragments. - * 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 job is created. - * - * Cloud Scheduler 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 Scheduler will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * * `X-CloudScheduler`: This header will be set to true. - * - * If the job has an body, Cloud Scheduler sets - * the following headers: - * - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explictly - * setting `Content-Type` to a particular media type when the job is - * created. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Scheduler. This value is - * output only. It cannot be changed. - * - * The headers below are output only. They cannot be set or overridden: - * - * * `X-Google-*`: For Google internal use only. - * * `X-AppEngine-*`: For Google internal use only. - * - * In addition, some App Engine headers, which contain - * job-specific information, are also be sent to the job handler. - * - * @property {Buffer} body - * Body. - * - * HTTP request body. A request body is allowed only if the HTTP method is - * POST or PUT. It will result in invalid argument error to set a body on a - * job with an incompatible HttpMethod. - * - * @typedef AppEngineHttpTarget - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.AppEngineHttpTarget definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/target.proto} - */ -const AppEngineHttpTarget = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Pub/Sub target. The job will be delivered by publishing a message to - * the given Pub/Sub topic. - * - * @property {string} topicName - * Required. The name of the Cloud Pub/Sub topic to which messages will - * be published when a job is delivered. The topic name must be in the - * same format as required by PubSub's - * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), - * for example `projects/PROJECT_ID/topics/TOPIC_ID`. - * - * The topic must be in the same project as the Cloud Scheduler job. - * - * @property {Buffer} data - * The message payload for PubsubMessage. - * - * Pubsub message must contain either non-empty data, or at least one - * attribute. - * - * @property {Object.} attributes - * Attributes for PubsubMessage. - * - * Pubsub message must contain either non-empty data, or at least one - * attribute. - * - * @typedef PubsubTarget - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.PubsubTarget definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/target.proto} - */ -const PubsubTarget = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine Routing. - * - * 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 job is sent to the service which is the default - * service when the job is attempted. - * - * @property {string} version - * App version. - * - * By default, the job is sent to the version which is the default - * version when the job is attempted. - * - * @property {string} instance - * App instance. - * - * By default, the job is sent to an instance which is available when - * the job 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 job is sent to. - * - * For more information about how App Engine requests are routed, see - * [here](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 - * job's project ID. - * - * * `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 job will be sent - * to the service which is the default service when the job is attempted. - * - * If version is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * - * If instance is empty, then the job will be - * sent to an instance which is available when the job is attempted. - * - * If service, - * version, or - * instance is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. - * - * @typedef AppEngineRouting - * @memberof google.cloud.scheduler.v1 - * @see [google.cloud.scheduler.v1.AppEngineRouting definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/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 job. 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.scheduler.v1 - * @see [google.cloud.scheduler.v1.OAuthToken definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/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 job. 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.scheduler.v1 - * @see [google.cloud.scheduler.v1.OidcToken definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1/target.proto} - */ -const OidcToken = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The HTTP method used to execute the job. - * - * @enum {number} - * @memberof google.cloud.scheduler.v1 - */ -const HttpMethod = { - - /** - * HTTP method unspecified. Defaults to POST. - */ - 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-scheduler/src/v1/doc/google/protobuf/doc_any.js b/packages/google-cloud-scheduler/src/v1/doc/google/protobuf/doc_any.js deleted file mode 100644 index cdd2fc80e49..00000000000 --- a/packages/google-cloud-scheduler/src/v1/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-scheduler/src/v1/doc/google/protobuf/doc_duration.js b/packages/google-cloud-scheduler/src/v1/doc/google/protobuf/doc_duration.js deleted file mode 100644 index 1275f8f4d13..00000000000 --- a/packages/google-cloud-scheduler/src/v1/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-scheduler/src/v1/doc/google/protobuf/doc_empty.js b/packages/google-cloud-scheduler/src/v1/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 0b446dd9ce4..00000000000 --- a/packages/google-cloud-scheduler/src/v1/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-scheduler/src/v1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-scheduler/src/v1/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 011207b8626..00000000000 --- a/packages/google-cloud-scheduler/src/v1/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-scheduler/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-scheduler/src/v1/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index c457acc0c7d..00000000000 --- a/packages/google-cloud-scheduler/src/v1/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-scheduler/src/v1/doc/google/rpc/doc_status.js b/packages/google-cloud-scheduler/src/v1/doc/google/rpc/doc_status.js deleted file mode 100644 index 432ab6bb928..00000000000 --- a/packages/google-cloud-scheduler/src/v1/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-scheduler/src/v1beta1/doc/google/cloud/scheduler/v1beta1/doc_cloudscheduler.js b/packages/google-cloud-scheduler/src/v1beta1/doc/google/cloud/scheduler/v1beta1/doc_cloudscheduler.js deleted file mode 100644 index 1266872709d..00000000000 --- a/packages/google-cloud-scheduler/src/v1beta1/doc/google/cloud/scheduler/v1beta1/doc_cloudscheduler.js +++ /dev/null @@ -1,198 +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 listing jobs using ListJobs. - * - * @property {string} parent - * Required. The location name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID`. - * - * @property {number} pageSize - * Requested page size. - * - * The maximum page size is 500. If unspecified, the page size will - * be the maximum. Fewer jobs than requested might be returned, - * even if more jobs exist; use next_page_token to determine if more - * jobs exist. - * - * @property {string} pageToken - * A token identifying a page of results the server will 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 ListJobs. It is an error to - * switch the value of filter or - * order_by while iterating through pages. - * - * @typedef ListJobsRequest - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.ListJobsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto} - */ -const ListJobsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response message for listing jobs using ListJobs. - * - * @property {Object[]} jobs - * The list of jobs. - * - * This object should have the same structure as [Job]{@link google.cloud.scheduler.v1beta1.Job} - * - * @property {string} nextPageToken - * A token to retrieve next page of results. Pass this value in the - * page_token field in the subsequent call to - * ListJobs to retrieve the next page of results. - * If this is empty it indicates that there are no more results - * through which to paginate. - * - * The page token is valid for only 2 hours. - * - * @typedef ListJobsResponse - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.ListJobsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto} - */ -const ListJobsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for GetJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef GetJobRequest - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.GetJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto} - */ -const GetJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for CreateJob. - * - * @property {string} parent - * Required. The location name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID`. - * - * @property {Object} job - * Required. The job to add. The user can optionally specify a name for the - * job in name. name cannot be the same as an - * existing job. If a name is not specified then the system will - * generate a random unique name that will be returned - * (name) in the response. - * - * This object should have the same structure as [Job]{@link google.cloud.scheduler.v1beta1.Job} - * - * @typedef CreateJobRequest - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.CreateJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto} - */ -const CreateJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for UpdateJob. - * - * @property {Object} job - * Required. The new job properties. name must be specified. - * - * Output only fields cannot be modified using UpdateJob. - * Any value specified for an output only field will be ignored. - * - * This object should have the same structure as [Job]{@link google.cloud.scheduler.v1beta1.Job} - * - * @property {Object} updateMask - * A mask used to specify which fields of the job are being updated. - * - * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} - * - * @typedef UpdateJobRequest - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.UpdateJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto} - */ -const UpdateJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for deleting a job using - * DeleteJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef DeleteJobRequest - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.DeleteJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto} - */ -const DeleteJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for PauseJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef PauseJobRequest - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.PauseJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto} - */ -const PauseJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for ResumeJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef ResumeJobRequest - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.ResumeJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto} - */ -const ResumeJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request message for forcing a job to run now using - * RunJob. - * - * @property {string} name - * Required. The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`. - * - * @typedef RunJobRequest - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.RunJobRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/cloudscheduler.proto} - */ -const RunJobRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-cloud-scheduler/src/v1beta1/doc/google/cloud/scheduler/v1beta1/doc_job.js b/packages/google-cloud-scheduler/src/v1beta1/doc/google/cloud/scheduler/v1beta1/doc_job.js deleted file mode 100644 index c45b8faca09..00000000000 --- a/packages/google-cloud-scheduler/src/v1beta1/doc/google/cloud/scheduler/v1beta1/doc_job.js +++ /dev/null @@ -1,273 +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. - -/** - * Configuration for a job. - * The maximum allowed size for a job is 100KB. - * - * @property {string} name - * Optionally caller-specified in CreateJob, after - * which it becomes output only. - * - * The job name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_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 job's location. - * The list of available locations can be obtained by calling - * ListLocations. - * For more information, see https://cloud.google.com/about/locations/. - * * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * @property {string} description - * Optionally caller-specified in CreateJob or - * UpdateJob. - * - * A human-readable description for the job. This string must not contain - * more than 500 characters. - * - * @property {Object} pubsubTarget - * Pub/Sub target. - * - * This object should have the same structure as [PubsubTarget]{@link google.cloud.scheduler.v1beta1.PubsubTarget} - * - * @property {Object} appEngineHttpTarget - * App Engine HTTP target. - * - * This object should have the same structure as [AppEngineHttpTarget]{@link google.cloud.scheduler.v1beta1.AppEngineHttpTarget} - * - * @property {Object} httpTarget - * HTTP target. - * - * This object should have the same structure as [HttpTarget]{@link google.cloud.scheduler.v1beta1.HttpTarget} - * - * @property {string} schedule - * Required, except when used with UpdateJob. - * - * Describes the schedule on which the job will be executed. - * - * The schedule can be either of the following types: - * - * * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview) - * * English-like - * [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) - * - * As a general rule, execution `n + 1` of a job will not begin - * until execution `n` has finished. Cloud Scheduler will never - * allow two simultaneously outstanding executions. For example, - * this implies that if the `n+1`th execution is scheduled to run at - * 16:00 but the `n`th execution takes until 16:15, the `n+1`th - * execution will not start until `16:15`. - * A scheduled start time will be delayed if the previous - * execution has not ended when its scheduled time occurs. - * - * If retry_count > 0 and a job attempt fails, - * the job will be tried a total of retry_count - * times, with exponential backoff, until the next scheduled start - * time. - * - * @property {string} timeZone - * Specifies the time zone to be used in interpreting - * schedule. The value of this field must be a time - * zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database). - * - * Note that some time zones include a provision for - * daylight savings time. The rules for daylight saving time are - * determined by the chosen tz. For UTC use the string "utc". If a - * time zone is not specified, the default will be in UTC (also known - * as GMT). - * - * @property {Object} userUpdateTime - * Output only. The creation time of the job. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} state - * Output only. State of the job. - * - * The number should be among the values of [State]{@link google.cloud.scheduler.v1beta1.State} - * - * @property {Object} status - * Output only. The response from the target for the last attempted execution. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @property {Object} scheduleTime - * Output only. The next time the job is scheduled. Note that this may be a - * retry of a previously failed attempt or the next execution time - * according to the schedule. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} lastAttemptTime - * Output only. The time the last job attempt started. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} retryConfig - * Settings that determine the retry behavior. - * - * This object should have the same structure as [RetryConfig]{@link google.cloud.scheduler.v1beta1.RetryConfig} - * - * @property {Object} attemptDeadline - * The deadline for job attempts. If the request handler does not respond by - * this deadline then the request is cancelled and the attempt is marked as a - * `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in - * execution logs. Cloud Scheduler will retry the job according - * to the RetryConfig. - * - * The allowed duration for this deadline is: - * - * * For HTTP targets, between 15 seconds and 30 minutes. - * * For App Engine HTTP targets, between 15 - * seconds and 24 hours. - * * For PubSub targets, this field is ignored. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @typedef Job - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.Job definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/job.proto} - */ -const Job = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * State of the job. - * - * @enum {number} - * @memberof google.cloud.scheduler.v1beta1 - */ - State: { - - /** - * Unspecified state. - */ - STATE_UNSPECIFIED: 0, - - /** - * The job is executing normally. - */ - ENABLED: 1, - - /** - * The job is paused by the user. It will not execute. A user can - * intentionally pause the job using - * PauseJobRequest. - */ - PAUSED: 2, - - /** - * The job is disabled by the system due to error. The user - * cannot directly set a job to be disabled. - */ - DISABLED: 3, - - /** - * The job state resulting from a failed CloudScheduler.UpdateJob - * operation. To recover a job from this state, retry - * CloudScheduler.UpdateJob until a successful response is received. - */ - UPDATE_FAILED: 4 - } -}; - -/** - * Settings that determine the retry behavior. - * - * By default, if a job does not complete successfully (meaning that - * an acknowledgement is not received from the handler, then it will be retried - * with exponential backoff according to the settings in RetryConfig. - * - * @property {number} retryCount - * The number of attempts that the system will make to run a job using the - * exponential backoff procedure described by - * max_doublings. - * - * The default value of retry_count is zero. - * - * If retry_count is zero, a job attempt will *not* be retried if - * it fails. Instead the Cloud Scheduler system will wait for the - * next scheduled execution time. - * - * If retry_count is set to a non-zero number then Cloud Scheduler - * will retry failed attempts, using exponential backoff, - * retry_count times, or until the next scheduled execution time, - * whichever comes first. - * - * Values greater than 5 and negative values are not allowed. - * - * @property {Object} maxRetryDuration - * The time limit for retrying a failed job, measured from time when an - * execution was first attempted. If specified with - * retry_count, the job will be retried until both - * limits are reached. - * - * The default value for max_retry_duration is zero, which means retry - * duration is unlimited. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} minBackoffDuration - * The minimum amount of time to wait before retrying a job after - * it fails. - * - * The default value of this field is 5 seconds. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {Object} maxBackoffDuration - * The maximum amount of time to wait before retrying a job after - * it fails. - * - * The default value of this field is 1 hour. - * - * 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 job's retry interval starts at - * min_backoff_duration, then doubles - * `max_doublings` times, then increases linearly, and finally - * retries retries at intervals of - * max_backoff_duration up to - * retry_count times. - * - * For example, if min_backoff_duration is - * 10s, max_backoff_duration is 300s, and - * `max_doublings` is 3, then the a job will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by - * 2^3 * 10s. Finally, the job will retry at intervals of - * max_backoff_duration until the job has - * been attempted retry_count times. Thus, the - * requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... - * - * The default value of this field is 5. - * - * @typedef RetryConfig - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.RetryConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/job.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-scheduler/src/v1beta1/doc/google/cloud/scheduler/v1beta1/doc_target.js b/packages/google-cloud-scheduler/src/v1beta1/doc/google/cloud/scheduler/v1beta1/doc_target.js deleted file mode 100644 index 65ffcc6f6a0..00000000000 --- a/packages/google-cloud-scheduler/src/v1beta1/doc/google/cloud/scheduler/v1beta1/doc_target.js +++ /dev/null @@ -1,410 +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 target. The job will be pushed to the job handler by means of - * an HTTP request via an http_method such as HTTP - * POST, HTTP GET, etc. The job is acknowledged by means of an HTTP - * response code in the range [200 - 299]. A failure to receive a response - * constitutes a failed execution. For a redirected request, the response - * returned by the redirected request is considered. - * - * @property {string} uri - * Required. The full URI path that the request will be sent to. This string - * must begin with either "http://" or "https://". Some examples of - * valid values for uri are: - * `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * - * @property {number} httpMethod - * Which HTTP method to use for the request. - * - * The number should be among the values of [HttpMethod]{@link google.cloud.scheduler.v1beta1.HttpMethod} - * - * @property {Object.} headers - * The user can specify HTTP request headers to send with the job's - * HTTP request. This map contains the header field names and - * values. Repeated headers are not supported, but a header value can - * contain commas. These headers represent a subset of the headers - * that will accompany the job's HTTP request. Some HTTP request - * headers will be ignored or replaced. A partial list of headers that - * will be ignored or replaced is below: - * - Host: This will be computed by Cloud Scheduler and derived from - * uri. - * * `Content-Length`: This will be computed by Cloud Scheduler. - * * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. - * * `X-Google-*`: Google internal use only. - * * `X-AppEngine-*`: Google internal use only. - * - * The total size of 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 job 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.scheduler.v1beta1.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.scheduler.v1beta1.OidcToken} - * - * @typedef HttpTarget - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.HttpTarget definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/target.proto} - */ -const HttpTarget = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine target. The job will be pushed to a job handler by means - * of an HTTP request via an http_method such - * as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an - * HTTP response code in the range [200 - 299]. Error 503 is - * considered an App Engine system error instead of an application - * error. Requests returning error 503 will be retried regardless of - * retry configuration and not counted against retry counts. Any other - * response code, or a failure to receive a response before the - * deadline, constitutes a failed attempt. - * - * @property {number} httpMethod - * The HTTP method to use for the request. PATCH and OPTIONS are not - * permitted. - * - * The number should be among the values of [HttpMethod]{@link google.cloud.scheduler.v1beta1.HttpMethod} - * - * @property {Object} appEngineRouting - * App Engine Routing setting for the job. - * - * This object should have the same structure as [AppEngineRouting]{@link google.cloud.scheduler.v1beta1.AppEngineRouting} - * - * @property {string} relativeUri - * The relative URI. - * - * The relative URL must begin with "/" and must be a valid HTTP relative URL. - * It can contain a path, query string arguments, and `#` fragments. - * 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 job is created. - * - * Cloud Scheduler 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 Scheduler will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * * `X-CloudScheduler`: This header will be set to true. - * - * If the job has an body, Cloud Scheduler sets - * the following headers: - * - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explictly - * setting `Content-Type` to a particular media type when the job is - * created. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Scheduler. This value is - * output only. It cannot be changed. - * - * The headers below are output only. They cannot be set or overridden: - * - * * `X-Google-*`: For Google internal use only. - * * `X-AppEngine-*`: For Google internal use only. - * - * In addition, some App Engine headers, which contain - * job-specific information, are also be sent to the job handler. - * - * @property {Buffer} body - * Body. - * - * HTTP request body. A request body is allowed only if the HTTP method is - * POST or PUT. It will result in invalid argument error to set a body on a - * job with an incompatible HttpMethod. - * - * @typedef AppEngineHttpTarget - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.AppEngineHttpTarget definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/target.proto} - */ -const AppEngineHttpTarget = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Pub/Sub target. The job will be delivered by publishing a message to - * the given Pub/Sub topic. - * - * @property {string} topicName - * Required. The name of the Cloud Pub/Sub topic to which messages will - * be published when a job is delivered. The topic name must be in the - * same format as required by PubSub's - * [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), - * for example `projects/PROJECT_ID/topics/TOPIC_ID`. - * - * The topic must be in the same project as the Cloud Scheduler job. - * - * @property {Buffer} data - * The message payload for PubsubMessage. - * - * Pubsub message must contain either non-empty data, or at least one - * attribute. - * - * @property {Object.} attributes - * Attributes for PubsubMessage. - * - * Pubsub message must contain either non-empty data, or at least one - * attribute. - * - * @typedef PubsubTarget - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.PubsubTarget definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/target.proto} - */ -const PubsubTarget = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * App Engine Routing. - * - * 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 job is sent to the service which is the default - * service when the job is attempted. - * - * @property {string} version - * App version. - * - * By default, the job is sent to the version which is the default - * version when the job is attempted. - * - * @property {string} instance - * App instance. - * - * By default, the job is sent to an instance which is available when - * the job 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 job is sent to. - * - * For more information about how App Engine requests are routed, see - * [here](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 - * job's project ID. - * - * * `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 job will be sent - * to the service which is the default service when the job is attempted. - * - * If version is empty, then the job will be sent - * to the version which is the default version when the job is attempted. - * - * If instance is empty, then the job will be - * sent to an instance which is available when the job is attempted. - * - * If service, - * version, or - * instance is invalid, then the job will be sent - * to the default version of the default service when the job is attempted. - * - * @typedef AppEngineRouting - * @memberof google.cloud.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.AppEngineRouting definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/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 job. 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.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.OAuthToken definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/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 job. 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.scheduler.v1beta1 - * @see [google.cloud.scheduler.v1beta1.OidcToken definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/scheduler/v1beta1/target.proto} - */ -const OidcToken = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * The HTTP method used to execute the job. - * - * @enum {number} - * @memberof google.cloud.scheduler.v1beta1 - */ -const HttpMethod = { - - /** - * HTTP method unspecified. Defaults to POST. - */ - 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-scheduler/src/v1beta1/doc/google/protobuf/doc_any.js b/packages/google-cloud-scheduler/src/v1beta1/doc/google/protobuf/doc_any.js deleted file mode 100644 index cdd2fc80e49..00000000000 --- a/packages/google-cloud-scheduler/src/v1beta1/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-scheduler/src/v1beta1/doc/google/protobuf/doc_duration.js b/packages/google-cloud-scheduler/src/v1beta1/doc/google/protobuf/doc_duration.js deleted file mode 100644 index 1275f8f4d13..00000000000 --- a/packages/google-cloud-scheduler/src/v1beta1/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-scheduler/src/v1beta1/doc/google/protobuf/doc_empty.js b/packages/google-cloud-scheduler/src/v1beta1/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 0b446dd9ce4..00000000000 --- a/packages/google-cloud-scheduler/src/v1beta1/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-scheduler/src/v1beta1/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-scheduler/src/v1beta1/doc/google/protobuf/doc_field_mask.js deleted file mode 100644 index 011207b8626..00000000000 --- a/packages/google-cloud-scheduler/src/v1beta1/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-scheduler/src/v1beta1/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-scheduler/src/v1beta1/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index c457acc0c7d..00000000000 --- a/packages/google-cloud-scheduler/src/v1beta1/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-scheduler/src/v1beta1/doc/google/rpc/doc_status.js b/packages/google-cloud-scheduler/src/v1beta1/doc/google/rpc/doc_status.js deleted file mode 100644 index 432ab6bb928..00000000000 --- a/packages/google-cloud-scheduler/src/v1beta1/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-scheduler/synth.metadata b/packages/google-cloud-scheduler/synth.metadata index 6dbe457776e..71dcc0b79b6 100644 --- a/packages/google-cloud-scheduler/synth.metadata +++ b/packages/google-cloud-scheduler/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-scheduler.git", - "sha": "ecda16434c53cda59f87e2919eab64efb1ad8375" + "remote": "git@github.com:googleapis/nodejs-scheduler.git", + "sha": "001e17ab1c044a5e29d1d5b49fce773c6abee06c" } }, { "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": "52638600f387deb98efb5f9c85fec39e82aa9052" } } ], diff --git a/packages/google-cloud-scheduler/synth.py b/packages/google-cloud-scheduler/synth.py index 8c93ff46359..adb7c12b53b 100644 --- a/packages/google-cloud-scheduler/synth.py +++ b/packages/google-cloud-scheduler/synth.py @@ -21,7 +21,6 @@ AUTOSYNTH_MULTIPLE_COMMITS = True - # Run the gapic generator gapic = gcp.GAPICMicrogenerator() versions = ['v1beta1', 'v1'] @@ -45,5 +44,5 @@ # 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-scheduler/system-test/install.ts b/packages/google-cloud-scheduler/system-test/install.ts index c4d80e9c0c8..4c1ba3eb79a 100644 --- a/packages/google-cloud-scheduler/system-test/install.ts +++ b/packages/google-cloud-scheduler/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-scheduler/test/.eslintrc.yml b/packages/google-cloud-scheduler/test/.eslintrc.yml deleted file mode 100644 index cd088a97818..00000000000 --- a/packages/google-cloud-scheduler/test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -rules: - node/no-unpublished-require: off diff --git a/packages/google-cloud-scheduler/tslint.json b/packages/google-cloud-scheduler/tslint.json deleted file mode 100644 index 617dc975bae..00000000000 --- a/packages/google-cloud-scheduler/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "gts/tslint.json" -}