diff --git a/README.md b/README.md index 9701ca56..ff831829 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. diff --git a/protos/protos.json b/protos/protos.json index db88f551..cace2dad 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -29,7 +29,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/jobs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetJob": { "requestType": "GetJobRequest", @@ -37,7 +47,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/locations/*/jobs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateJob": { "requestType": "CreateJobRequest", @@ -46,7 +66,18 @@ "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/jobs", "(google.api.http).body": "job", "(google.api.method_signature)": "parent,job" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/jobs", + "body": "job" + } + }, + { + "(google.api.method_signature)": "parent,job" + } + ] }, "UpdateJob": { "requestType": "UpdateJobRequest", @@ -55,7 +86,18 @@ "(google.api.http).patch": "/v1/{job.name=projects/*/locations/*/jobs/*}", "(google.api.http).body": "job", "(google.api.method_signature)": "job,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{job.name=projects/*/locations/*/jobs/*}", + "body": "job" + } + }, + { + "(google.api.method_signature)": "job,update_mask" + } + ] }, "DeleteJob": { "requestType": "DeleteJobRequest", @@ -63,7 +105,17 @@ "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/jobs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "PauseJob": { "requestType": "PauseJobRequest", @@ -72,7 +124,18 @@ "(google.api.http).post": "/v1/{name=projects/*/locations/*/jobs/*}:pause", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/jobs/*}:pause", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ResumeJob": { "requestType": "ResumeJobRequest", @@ -81,7 +144,18 @@ "(google.api.http).post": "/v1/{name=projects/*/locations/*/jobs/*}:resume", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/jobs/*}:resume", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "RunJob": { "requestType": "RunJobRequest", @@ -90,7 +164,18 @@ "(google.api.http).post": "/v1/{name=projects/*/locations/*/jobs/*}:run", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/jobs/*}:run", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -495,7 +580,17 @@ "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/jobs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/jobs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetJob": { "requestType": "GetJobRequest", @@ -503,7 +598,17 @@ "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/jobs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateJob": { "requestType": "CreateJobRequest", @@ -512,7 +617,18 @@ "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/jobs", "(google.api.http).body": "job", "(google.api.method_signature)": "parent,job" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/jobs", + "body": "job" + } + }, + { + "(google.api.method_signature)": "parent,job" + } + ] }, "UpdateJob": { "requestType": "UpdateJobRequest", @@ -521,7 +637,18 @@ "(google.api.http).patch": "/v1beta1/{job.name=projects/*/locations/*/jobs/*}", "(google.api.http).body": "job", "(google.api.method_signature)": "job,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{job.name=projects/*/locations/*/jobs/*}", + "body": "job" + } + }, + { + "(google.api.method_signature)": "job,update_mask" + } + ] }, "DeleteJob": { "requestType": "DeleteJobRequest", @@ -529,7 +656,17 @@ "options": { "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/jobs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/jobs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "PauseJob": { "requestType": "PauseJobRequest", @@ -538,7 +675,18 @@ "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/jobs/*}:pause", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ResumeJob": { "requestType": "ResumeJobRequest", @@ -547,7 +695,18 @@ "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/jobs/*}:resume", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "RunJob": { "requestType": "RunJobRequest", @@ -556,7 +715,18 @@ "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/jobs/*}:run", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/jobs/*}:run", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, diff --git a/src/v1/cloud_scheduler_client.ts b/src/v1/cloud_scheduler_client.ts index 454d3d4c..5703b0f4 100644 --- a/src/v1/cloud_scheduler_client.ts +++ b/src/v1/cloud_scheduler_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/cloud_scheduler_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './cloud_scheduler_client_config.json'; const version = require('../../../package.json').version; @@ -84,9 +90,9 @@ export class CloudSchedulerClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -99,7 +105,9 @@ export class CloudSchedulerClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -318,7 +326,7 @@ export class CloudSchedulerClient { // ------------------- getJob( request: protos.google.cloud.scheduler.v1.IGetJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1.IJob, @@ -328,7 +336,7 @@ export class CloudSchedulerClient { >; getJob( request: protos.google.cloud.scheduler.v1.IGetJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IGetJobRequest | null | undefined, @@ -364,7 +372,7 @@ export class CloudSchedulerClient { getJob( request: protos.google.cloud.scheduler.v1.IGetJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IGetJobRequest | null | undefined, @@ -383,12 +391,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -403,7 +411,7 @@ export class CloudSchedulerClient { } createJob( request: protos.google.cloud.scheduler.v1.ICreateJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1.IJob, @@ -413,7 +421,7 @@ export class CloudSchedulerClient { >; createJob( request: protos.google.cloud.scheduler.v1.ICreateJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.ICreateJobRequest | null | undefined, @@ -455,7 +463,7 @@ export class CloudSchedulerClient { createJob( request: protos.google.cloud.scheduler.v1.ICreateJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.ICreateJobRequest | null | undefined, @@ -474,12 +482,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -494,7 +502,7 @@ export class CloudSchedulerClient { } updateJob( request: protos.google.cloud.scheduler.v1.IUpdateJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1.IJob, @@ -504,7 +512,7 @@ export class CloudSchedulerClient { >; updateJob( request: protos.google.cloud.scheduler.v1.IUpdateJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IUpdateJobRequest | null | undefined, @@ -552,7 +560,7 @@ export class CloudSchedulerClient { updateJob( request: protos.google.cloud.scheduler.v1.IUpdateJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IUpdateJobRequest | null | undefined, @@ -571,12 +579,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -591,7 +599,7 @@ export class CloudSchedulerClient { } deleteJob( request: protos.google.cloud.scheduler.v1.IDeleteJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -601,7 +609,7 @@ export class CloudSchedulerClient { >; deleteJob( request: protos.google.cloud.scheduler.v1.IDeleteJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.cloud.scheduler.v1.IDeleteJobRequest | null | undefined, @@ -637,7 +645,7 @@ export class CloudSchedulerClient { deleteJob( request: protos.google.cloud.scheduler.v1.IDeleteJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.google.cloud.scheduler.v1.IDeleteJobRequest | null | undefined, @@ -656,12 +664,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -676,7 +684,7 @@ export class CloudSchedulerClient { } pauseJob( request: protos.google.cloud.scheduler.v1.IPauseJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1.IJob, @@ -686,7 +694,7 @@ export class CloudSchedulerClient { >; pauseJob( request: protos.google.cloud.scheduler.v1.IPauseJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IPauseJobRequest | null | undefined, @@ -728,7 +736,7 @@ export class CloudSchedulerClient { pauseJob( request: protos.google.cloud.scheduler.v1.IPauseJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IPauseJobRequest | null | undefined, @@ -747,12 +755,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -767,7 +775,7 @@ export class CloudSchedulerClient { } resumeJob( request: protos.google.cloud.scheduler.v1.IResumeJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1.IJob, @@ -777,7 +785,7 @@ export class CloudSchedulerClient { >; resumeJob( request: protos.google.cloud.scheduler.v1.IResumeJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IResumeJobRequest | null | undefined, @@ -818,7 +826,7 @@ export class CloudSchedulerClient { resumeJob( request: protos.google.cloud.scheduler.v1.IResumeJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IResumeJobRequest | null | undefined, @@ -837,12 +845,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -857,7 +865,7 @@ export class CloudSchedulerClient { } runJob( request: protos.google.cloud.scheduler.v1.IRunJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1.IJob, @@ -867,7 +875,7 @@ export class CloudSchedulerClient { >; runJob( request: protos.google.cloud.scheduler.v1.IRunJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IRunJobRequest | null | undefined, @@ -906,7 +914,7 @@ export class CloudSchedulerClient { runJob( request: protos.google.cloud.scheduler.v1.IRunJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1.IJob, protos.google.cloud.scheduler.v1.IRunJobRequest | null | undefined, @@ -925,12 +933,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -946,7 +954,7 @@ export class CloudSchedulerClient { listJobs( request: protos.google.cloud.scheduler.v1.IListJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1.IJob[], @@ -956,7 +964,7 @@ export class CloudSchedulerClient { >; listJobs( request: protos.google.cloud.scheduler.v1.IListJobsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.scheduler.v1.IListJobsRequest, protos.google.cloud.scheduler.v1.IListJobsResponse | null | undefined, @@ -1010,7 +1018,7 @@ export class CloudSchedulerClient { listJobs( request: protos.google.cloud.scheduler.v1.IListJobsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.scheduler.v1.IListJobsRequest, protos.google.cloud.scheduler.v1.IListJobsResponse | null | undefined, @@ -1029,12 +1037,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1084,7 +1092,7 @@ export class CloudSchedulerClient { */ listJobsStream( request?: protos.google.cloud.scheduler.v1.IListJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1146,7 +1154,7 @@ export class CloudSchedulerClient { */ listJobsAsync( request?: protos.google.cloud.scheduler.v1.IListJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/src/v1beta1/cloud_scheduler_client.ts b/src/v1beta1/cloud_scheduler_client.ts index 52678922..a836cd12 100644 --- a/src/v1beta1/cloud_scheduler_client.ts +++ b/src/v1beta1/cloud_scheduler_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/cloud_scheduler_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './cloud_scheduler_client_config.json'; const version = require('../../../package.json').version; @@ -84,9 +90,9 @@ export class CloudSchedulerClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -99,7 +105,9 @@ export class CloudSchedulerClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -318,7 +326,7 @@ export class CloudSchedulerClient { // ------------------- getJob( request: protos.google.cloud.scheduler.v1beta1.IGetJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1beta1.IJob, @@ -328,7 +336,7 @@ export class CloudSchedulerClient { >; getJob( request: protos.google.cloud.scheduler.v1beta1.IGetJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1beta1.IJob, protos.google.cloud.scheduler.v1beta1.IGetJobRequest | null | undefined, @@ -364,7 +372,7 @@ export class CloudSchedulerClient { getJob( request: protos.google.cloud.scheduler.v1beta1.IGetJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1beta1.IJob, | protos.google.cloud.scheduler.v1beta1.IGetJobRequest @@ -385,12 +393,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -405,7 +413,7 @@ export class CloudSchedulerClient { } createJob( request: protos.google.cloud.scheduler.v1beta1.ICreateJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1beta1.IJob, @@ -415,7 +423,7 @@ export class CloudSchedulerClient { >; createJob( request: protos.google.cloud.scheduler.v1beta1.ICreateJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1beta1.IJob, | protos.google.cloud.scheduler.v1beta1.ICreateJobRequest @@ -461,7 +469,7 @@ export class CloudSchedulerClient { createJob( request: protos.google.cloud.scheduler.v1beta1.ICreateJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1beta1.IJob, | protos.google.cloud.scheduler.v1beta1.ICreateJobRequest @@ -484,12 +492,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -504,7 +512,7 @@ export class CloudSchedulerClient { } updateJob( request: protos.google.cloud.scheduler.v1beta1.IUpdateJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1beta1.IJob, @@ -514,7 +522,7 @@ export class CloudSchedulerClient { >; updateJob( request: protos.google.cloud.scheduler.v1beta1.IUpdateJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1beta1.IJob, | protos.google.cloud.scheduler.v1beta1.IUpdateJobRequest @@ -566,7 +574,7 @@ export class CloudSchedulerClient { updateJob( request: protos.google.cloud.scheduler.v1beta1.IUpdateJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1beta1.IJob, | protos.google.cloud.scheduler.v1beta1.IUpdateJobRequest @@ -589,12 +597,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -609,7 +617,7 @@ export class CloudSchedulerClient { } deleteJob( request: protos.google.cloud.scheduler.v1beta1.IDeleteJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -619,7 +627,7 @@ export class CloudSchedulerClient { >; deleteJob( request: protos.google.cloud.scheduler.v1beta1.IDeleteJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.scheduler.v1beta1.IDeleteJobRequest @@ -659,7 +667,7 @@ export class CloudSchedulerClient { deleteJob( request: protos.google.cloud.scheduler.v1beta1.IDeleteJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.scheduler.v1beta1.IDeleteJobRequest @@ -682,12 +690,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -702,7 +710,7 @@ export class CloudSchedulerClient { } pauseJob( request: protos.google.cloud.scheduler.v1beta1.IPauseJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1beta1.IJob, @@ -712,7 +720,7 @@ export class CloudSchedulerClient { >; pauseJob( request: protos.google.cloud.scheduler.v1beta1.IPauseJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1beta1.IJob, protos.google.cloud.scheduler.v1beta1.IPauseJobRequest | null | undefined, @@ -754,7 +762,7 @@ export class CloudSchedulerClient { pauseJob( request: protos.google.cloud.scheduler.v1beta1.IPauseJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1beta1.IJob, | protos.google.cloud.scheduler.v1beta1.IPauseJobRequest @@ -775,12 +783,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -795,7 +803,7 @@ export class CloudSchedulerClient { } resumeJob( request: protos.google.cloud.scheduler.v1beta1.IResumeJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1beta1.IJob, @@ -805,7 +813,7 @@ export class CloudSchedulerClient { >; resumeJob( request: protos.google.cloud.scheduler.v1beta1.IResumeJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1beta1.IJob, | protos.google.cloud.scheduler.v1beta1.IResumeJobRequest @@ -850,7 +858,7 @@ export class CloudSchedulerClient { resumeJob( request: protos.google.cloud.scheduler.v1beta1.IResumeJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1beta1.IJob, | protos.google.cloud.scheduler.v1beta1.IResumeJobRequest @@ -873,12 +881,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -893,7 +901,7 @@ export class CloudSchedulerClient { } runJob( request: protos.google.cloud.scheduler.v1beta1.IRunJobRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1beta1.IJob, @@ -903,7 +911,7 @@ export class CloudSchedulerClient { >; runJob( request: protos.google.cloud.scheduler.v1beta1.IRunJobRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.scheduler.v1beta1.IJob, protos.google.cloud.scheduler.v1beta1.IRunJobRequest | null | undefined, @@ -942,7 +950,7 @@ export class CloudSchedulerClient { runJob( request: protos.google.cloud.scheduler.v1beta1.IRunJobRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.scheduler.v1beta1.IJob, | protos.google.cloud.scheduler.v1beta1.IRunJobRequest @@ -963,12 +971,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -984,7 +992,7 @@ export class CloudSchedulerClient { listJobs( request: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.scheduler.v1beta1.IJob[], @@ -994,7 +1002,7 @@ export class CloudSchedulerClient { >; listJobs( request: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.scheduler.v1beta1.IListJobsRequest, | protos.google.cloud.scheduler.v1beta1.IListJobsResponse @@ -1052,7 +1060,7 @@ export class CloudSchedulerClient { listJobs( request: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.scheduler.v1beta1.IListJobsRequest, | protos.google.cloud.scheduler.v1beta1.IListJobsResponse @@ -1075,12 +1083,12 @@ export class CloudSchedulerClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1130,7 +1138,7 @@ export class CloudSchedulerClient { */ listJobsStream( request?: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1192,7 +1200,7 @@ export class CloudSchedulerClient { */ listJobsAsync( request?: protos.google.cloud.scheduler.v1beta1.IListJobsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/synth.metadata b/synth.metadata index 65c3089d..505b7d15 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-scheduler.git", - "sha": "55217ba4a8de447875a55e2d7b94a910f5773871" + "remote": "https://github.com/googleapis/nodejs-scheduler.git", + "sha": "34902a52789338ffda04479c599ba1822c4b461d" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "ebdbe9ab534486cf900700add1e129dff780b481", + "internalRef": "344172074" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], @@ -34,88 +42,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/lint.cfg", - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/continuous/node12/system-test.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", - ".kokoro/presubmit/node12/system-test.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "package-lock.json.1975481685", - "protos/google/cloud/scheduler/v1/cloudscheduler.proto", - "protos/google/cloud/scheduler/v1/job.proto", - "protos/google/cloud/scheduler/v1/target.proto", - "protos/google/cloud/scheduler/v1beta1/cloudscheduler.proto", - "protos/google/cloud/scheduler/v1beta1/job.proto", - "protos/google/cloud/scheduler/v1beta1/target.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "samples/package-lock.json.3211560438", - "src/index.ts", - "src/v1/cloud_scheduler_client.ts", - "src/v1/cloud_scheduler_client_config.json", - "src/v1/cloud_scheduler_proto_list.json", - "src/v1/index.ts", - "src/v1beta1/cloud_scheduler_client.ts", - "src/v1beta1/cloud_scheduler_client_config.json", - "src/v1beta1/cloud_scheduler_proto_list.json", - "src/v1beta1/index.ts", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_cloud_scheduler_v1.ts", - "test/gapic_cloud_scheduler_v1beta1.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file