From 0f2f1a857c154a944521ea230c4295b379450e7f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 14:57:18 -0500 Subject: [PATCH] feat(samples): add example tags to generated samples (#128) PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 Co-authored-by: Owl Bot --- linkinator.config.json | 2 +- .../v1/transcoder_service.create_job.js | 6 +- .../transcoder_service.create_job_template.js | 6 +- .../v1/transcoder_service.delete_job.js | 4 +- .../transcoder_service.delete_job_template.js | 4 +- .../v1/transcoder_service.get_job.js | 4 +- .../v1/transcoder_service.get_job_template.js | 4 +- .../transcoder_service.list_job_templates.js | 4 +- .../v1/transcoder_service.list_jobs.js | 4 +- .../v1beta1/transcoder_service.create_job.js | 6 +- .../transcoder_service.create_job_template.js | 6 +- .../v1beta1/transcoder_service.delete_job.js | 4 +- .../transcoder_service.delete_job_template.js | 4 +- .../v1beta1/transcoder_service.get_job.js | 4 +- .../transcoder_service.get_job_template.js | 4 +- .../transcoder_service.list_job_templates.js | 4 +- .../v1beta1/transcoder_service.list_jobs.js | 4 +- src/v1/transcoder_service_client.ts | 390 +++++++++--------- src/v1beta1/transcoder_service_client.ts | 356 ++++++++-------- 19 files changed, 402 insertions(+), 418 deletions(-) diff --git a/linkinator.config.json b/linkinator.config.json index 29a223b..0121dfa 100644 --- a/linkinator.config.json +++ b/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/samples/generated/v1/transcoder_service.create_job.js b/samples/generated/v1/transcoder_service.create_job.js index 48f0670..311d348 100644 --- a/samples/generated/v1/transcoder_service.create_job.js +++ b/samples/generated/v1/transcoder_service.create_job.js @@ -27,7 +27,7 @@ function main(parent, job) { /** * Required. Parameters for creating transcoding job. */ - // const job = '' + // const job = {} // Imports the Transcoder library const {TranscoderServiceClient} = @@ -36,7 +36,7 @@ function main(parent, job) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function createJob() { + async function callCreateJob() { // Construct request const request = { parent, @@ -48,7 +48,7 @@ function main(parent, job) { console.log(response); } - createJob(); + callCreateJob(); // [END transcoder_v1_generated_TranscoderService_CreateJob_async] } diff --git a/samples/generated/v1/transcoder_service.create_job_template.js b/samples/generated/v1/transcoder_service.create_job_template.js index d97099c..f86b9f9 100644 --- a/samples/generated/v1/transcoder_service.create_job_template.js +++ b/samples/generated/v1/transcoder_service.create_job_template.js @@ -27,7 +27,7 @@ function main(parent, jobTemplate, jobTemplateId) { /** * Required. Parameters for creating job template. */ - // const jobTemplate = '' + // const jobTemplate = {} /** * Required. The ID to use for the job template, which will become the final component * of the job template's resource name. @@ -43,7 +43,7 @@ function main(parent, jobTemplate, jobTemplateId) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function createJobTemplate() { + async function callCreateJobTemplate() { // Construct request const request = { parent, @@ -56,7 +56,7 @@ function main(parent, jobTemplate, jobTemplateId) { console.log(response); } - createJobTemplate(); + callCreateJobTemplate(); // [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_async] } diff --git a/samples/generated/v1/transcoder_service.delete_job.js b/samples/generated/v1/transcoder_service.delete_job.js index 785d4a3..c0d9b6a 100644 --- a/samples/generated/v1/transcoder_service.delete_job.js +++ b/samples/generated/v1/transcoder_service.delete_job.js @@ -37,7 +37,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function deleteJob() { + async function callDeleteJob() { // Construct request const request = { name, @@ -48,7 +48,7 @@ function main(name) { console.log(response); } - deleteJob(); + callDeleteJob(); // [END transcoder_v1_generated_TranscoderService_DeleteJob_async] } diff --git a/samples/generated/v1/transcoder_service.delete_job_template.js b/samples/generated/v1/transcoder_service.delete_job_template.js index 821bd80..112941c 100644 --- a/samples/generated/v1/transcoder_service.delete_job_template.js +++ b/samples/generated/v1/transcoder_service.delete_job_template.js @@ -37,7 +37,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function deleteJobTemplate() { + async function callDeleteJobTemplate() { // Construct request const request = { name, @@ -48,7 +48,7 @@ function main(name) { console.log(response); } - deleteJobTemplate(); + callDeleteJobTemplate(); // [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async] } diff --git a/samples/generated/v1/transcoder_service.get_job.js b/samples/generated/v1/transcoder_service.get_job.js index 5961db3..91e6e65 100644 --- a/samples/generated/v1/transcoder_service.get_job.js +++ b/samples/generated/v1/transcoder_service.get_job.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function getJob() { + async function callGetJob() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getJob(); + callGetJob(); // [END transcoder_v1_generated_TranscoderService_GetJob_async] } diff --git a/samples/generated/v1/transcoder_service.get_job_template.js b/samples/generated/v1/transcoder_service.get_job_template.js index fcef2c4..adc3dda 100644 --- a/samples/generated/v1/transcoder_service.get_job_template.js +++ b/samples/generated/v1/transcoder_service.get_job_template.js @@ -33,7 +33,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function getJobTemplate() { + async function callGetJobTemplate() { // Construct request const request = { name, @@ -44,7 +44,7 @@ function main(name) { console.log(response); } - getJobTemplate(); + callGetJobTemplate(); // [END transcoder_v1_generated_TranscoderService_GetJobTemplate_async] } diff --git a/samples/generated/v1/transcoder_service.list_job_templates.js b/samples/generated/v1/transcoder_service.list_job_templates.js index e28b6f5..ec112c0 100644 --- a/samples/generated/v1/transcoder_service.list_job_templates.js +++ b/samples/generated/v1/transcoder_service.list_job_templates.js @@ -51,7 +51,7 @@ function main(parent) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function listJobTemplates() { + async function callListJobTemplates() { // Construct request const request = { parent, @@ -64,7 +64,7 @@ function main(parent) { } } - listJobTemplates(); + callListJobTemplates(); // [END transcoder_v1_generated_TranscoderService_ListJobTemplates_async] } diff --git a/samples/generated/v1/transcoder_service.list_jobs.js b/samples/generated/v1/transcoder_service.list_jobs.js index 924e9aa..fd673c0 100644 --- a/samples/generated/v1/transcoder_service.list_jobs.js +++ b/samples/generated/v1/transcoder_service.list_jobs.js @@ -50,7 +50,7 @@ function main(parent) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function listJobs() { + async function callListJobs() { // Construct request const request = { parent, @@ -63,7 +63,7 @@ function main(parent) { } } - listJobs(); + callListJobs(); // [END transcoder_v1_generated_TranscoderService_ListJobs_async] } diff --git a/samples/generated/v1beta1/transcoder_service.create_job.js b/samples/generated/v1beta1/transcoder_service.create_job.js index f213057..709befa 100644 --- a/samples/generated/v1beta1/transcoder_service.create_job.js +++ b/samples/generated/v1beta1/transcoder_service.create_job.js @@ -27,7 +27,7 @@ function main(parent, job) { /** * Required. Parameters for creating transcoding job. */ - // const job = '' + // const job = {} // Imports the Transcoder library const {TranscoderServiceClient} = @@ -36,7 +36,7 @@ function main(parent, job) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function createJob() { + async function callCreateJob() { // Construct request const request = { parent, @@ -48,7 +48,7 @@ function main(parent, job) { console.log(response); } - createJob(); + callCreateJob(); // [END transcoder_v1beta1_generated_TranscoderService_CreateJob_async] } diff --git a/samples/generated/v1beta1/transcoder_service.create_job_template.js b/samples/generated/v1beta1/transcoder_service.create_job_template.js index e136fcd..a24738e 100644 --- a/samples/generated/v1beta1/transcoder_service.create_job_template.js +++ b/samples/generated/v1beta1/transcoder_service.create_job_template.js @@ -27,7 +27,7 @@ function main(parent, jobTemplate, jobTemplateId) { /** * Required. Parameters for creating job template. */ - // const jobTemplate = '' + // const jobTemplate = {} /** * Required. The ID to use for the job template, which will become the final component * of the job template's resource name. @@ -43,7 +43,7 @@ function main(parent, jobTemplate, jobTemplateId) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function createJobTemplate() { + async function callCreateJobTemplate() { // Construct request const request = { parent, @@ -56,7 +56,7 @@ function main(parent, jobTemplate, jobTemplateId) { console.log(response); } - createJobTemplate(); + callCreateJobTemplate(); // [END transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_async] } diff --git a/samples/generated/v1beta1/transcoder_service.delete_job.js b/samples/generated/v1beta1/transcoder_service.delete_job.js index 5adb2a0..d475d20 100644 --- a/samples/generated/v1beta1/transcoder_service.delete_job.js +++ b/samples/generated/v1beta1/transcoder_service.delete_job.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function deleteJob() { + async function callDeleteJob() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteJob(); + callDeleteJob(); // [END transcoder_v1beta1_generated_TranscoderService_DeleteJob_async] } diff --git a/samples/generated/v1beta1/transcoder_service.delete_job_template.js b/samples/generated/v1beta1/transcoder_service.delete_job_template.js index 029c7da..bde347d 100644 --- a/samples/generated/v1beta1/transcoder_service.delete_job_template.js +++ b/samples/generated/v1beta1/transcoder_service.delete_job_template.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function deleteJobTemplate() { + async function callDeleteJobTemplate() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - deleteJobTemplate(); + callDeleteJobTemplate(); // [END transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_async] } diff --git a/samples/generated/v1beta1/transcoder_service.get_job.js b/samples/generated/v1beta1/transcoder_service.get_job.js index c78f10d..9300f39 100644 --- a/samples/generated/v1beta1/transcoder_service.get_job.js +++ b/samples/generated/v1beta1/transcoder_service.get_job.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function getJob() { + async function callGetJob() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getJob(); + callGetJob(); // [END transcoder_v1beta1_generated_TranscoderService_GetJob_async] } diff --git a/samples/generated/v1beta1/transcoder_service.get_job_template.js b/samples/generated/v1beta1/transcoder_service.get_job_template.js index 0e0fe66..638c637 100644 --- a/samples/generated/v1beta1/transcoder_service.get_job_template.js +++ b/samples/generated/v1beta1/transcoder_service.get_job_template.js @@ -33,7 +33,7 @@ function main(name) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function getJobTemplate() { + async function callGetJobTemplate() { // Construct request const request = { name, @@ -44,7 +44,7 @@ function main(name) { console.log(response); } - getJobTemplate(); + callGetJobTemplate(); // [END transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_async] } diff --git a/samples/generated/v1beta1/transcoder_service.list_job_templates.js b/samples/generated/v1beta1/transcoder_service.list_job_templates.js index 7ecc4fc..990b6a0 100644 --- a/samples/generated/v1beta1/transcoder_service.list_job_templates.js +++ b/samples/generated/v1beta1/transcoder_service.list_job_templates.js @@ -41,7 +41,7 @@ function main(parent) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function listJobTemplates() { + async function callListJobTemplates() { // Construct request const request = { parent, @@ -54,7 +54,7 @@ function main(parent) { } } - listJobTemplates(); + callListJobTemplates(); // [END transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_async] } diff --git a/samples/generated/v1beta1/transcoder_service.list_jobs.js b/samples/generated/v1beta1/transcoder_service.list_jobs.js index 067afbe..d0b8976 100644 --- a/samples/generated/v1beta1/transcoder_service.list_jobs.js +++ b/samples/generated/v1beta1/transcoder_service.list_jobs.js @@ -40,7 +40,7 @@ function main(parent) { // Instantiates a client const transcoderClient = new TranscoderServiceClient(); - async function listJobs() { + async function callListJobs() { // Construct request const request = { parent, @@ -53,7 +53,7 @@ function main(parent) { } } - listJobs(); + callListJobs(); // [END transcoder_v1beta1_generated_TranscoderService_ListJobs_async] } diff --git a/src/v1/transcoder_service_client.ts b/src/v1/transcoder_service_client.ts index bd69963..e257217 100644 --- a/src/v1/transcoder_service_client.ts +++ b/src/v1/transcoder_service_client.ts @@ -337,6 +337,26 @@ export class TranscoderServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Creates a job in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1.Job} request.job + * Required. Parameters for creating transcoding job. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Job]{@link google.cloud.video.transcoder.v1.Job}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/transcoder_service.create_job.js + * region_tag:transcoder_v1_generated_TranscoderService_CreateJob_async + */ createJob( request?: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, options?: CallOptions @@ -368,26 +388,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Creates a job in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1.Job} request.job - * Required. Parameters for creating transcoding job. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Job]{@link google.cloud.video.transcoder.v1.Job}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createJob(request); - */ createJob( request?: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, optionsOrCallback?: @@ -431,6 +431,24 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.createJob(request, options, callback); } + /** + * Returns the job data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Job]{@link google.cloud.video.transcoder.v1.Job}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/transcoder_service.get_job.js + * region_tag:transcoder_v1_generated_TranscoderService_GetJob_async + */ getJob( request?: protos.google.cloud.video.transcoder.v1.IGetJobRequest, options?: CallOptions @@ -458,24 +476,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Returns the job data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Job]{@link google.cloud.video.transcoder.v1.Job}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getJob(request); - */ getJob( request?: protos.google.cloud.video.transcoder.v1.IGetJobRequest, optionsOrCallback?: @@ -517,6 +517,27 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.getJob(request, options, callback); } + /** + * Deletes a job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @param {boolean} request.allowMissing + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/transcoder_service.delete_job.js + * region_tag:transcoder_v1_generated_TranscoderService_DeleteJob_async + */ deleteJob( request?: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, options?: CallOptions @@ -548,27 +569,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Deletes a job. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @param {boolean} request.allowMissing - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteJob(request); - */ deleteJob( request?: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, optionsOrCallback?: @@ -612,6 +612,32 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.deleteJob(request, options, callback); } + /** + * Creates a job template in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1.JobTemplate} request.jobTemplate + * Required. Parameters for creating job template. + * @param {string} request.jobTemplateId + * Required. The ID to use for the job template, which will become the final component + * of the job template's resource name. + * + * This value should be 4-63 characters, and valid characters must match the + * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/transcoder_service.create_job_template.js + * region_tag:transcoder_v1_generated_TranscoderService_CreateJobTemplate_async + */ createJobTemplate( request?: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, options?: CallOptions @@ -646,32 +672,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Creates a job template in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1.JobTemplate} request.jobTemplate - * Required. Parameters for creating job template. - * @param {string} request.jobTemplateId - * Required. The ID to use for the job template, which will become the final component - * of the job template's resource name. - * - * This value should be 4-63 characters, and valid characters must match the - * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createJobTemplate(request); - */ createJobTemplate( request?: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, optionsOrCallback?: @@ -718,6 +718,25 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.createJobTemplate(request, options, callback); } + /** + * Returns the job template data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/transcoder_service.get_job_template.js + * region_tag:transcoder_v1_generated_TranscoderService_GetJobTemplate_async + */ getJobTemplate( request?: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, options?: CallOptions @@ -752,25 +771,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Returns the job template data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [JobTemplate]{@link google.cloud.video.transcoder.v1.JobTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getJobTemplate(request); - */ getJobTemplate( request?: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, optionsOrCallback?: @@ -817,6 +817,27 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.getJobTemplate(request, options, callback); } + /** + * Deletes a job template. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @param {boolean} request.allowMissing + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/transcoder_service.delete_job_template.js + * region_tag:transcoder_v1_generated_TranscoderService_DeleteJobTemplate_async + */ deleteJobTemplate( request?: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, options?: CallOptions @@ -851,27 +872,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Deletes a job template. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @param {boolean} request.allowMissing - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteJobTemplate(request); - */ deleteJobTemplate( request?: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, optionsOrCallback?: @@ -919,37 +919,6 @@ export class TranscoderServiceClient { return this.innerApiCalls.deleteJobTemplate(request, options, callback); } - listJobs( - request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1.IJob[], - protos.google.cloud.video.transcoder.v1.IListJobsRequest | null, - protos.google.cloud.video.transcoder.v1.IListJobsResponse - ] - >; - listJobs( - request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1.IListJobsRequest, - | protos.google.cloud.video.transcoder.v1.IListJobsResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1.IJob - > - ): void; - listJobs( - request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1.IListJobsRequest, - | protos.google.cloud.video.transcoder.v1.IListJobsResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1.IJob - > - ): void; /** * Lists jobs in the specified region. * @@ -981,6 +950,37 @@ export class TranscoderServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listJobs( + request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJob[], + protos.google.cloud.video.transcoder.v1.IListJobsRequest | null, + protos.google.cloud.video.transcoder.v1.IListJobsResponse + ] + >; + listJobs( + request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJob + > + ): void; + listJobs( + request: protos.google.cloud.video.transcoder.v1.IListJobsRequest, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobsRequest, + | protos.google.cloud.video.transcoder.v1.IListJobsResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJob + > + ): void; listJobs( request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, optionsOrCallback?: @@ -1105,11 +1105,8 @@ export class TranscoderServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listJobsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/transcoder_service.list_jobs.js + * region_tag:transcoder_v1_generated_TranscoderService_ListJobs_async */ listJobsAsync( request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, @@ -1123,7 +1120,6 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1133,37 +1129,6 @@ export class TranscoderServiceClient { callSettings ) as AsyncIterable; } - listJobTemplates( - request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.video.transcoder.v1.IJobTemplate[], - protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest | null, - protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse - ] - >; - listJobTemplates( - request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1.IJobTemplate - > - ): void; - listJobTemplates( - request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - callback: PaginationCallback< - protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, - | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse - | null - | undefined, - protos.google.cloud.video.transcoder.v1.IJobTemplate - > - ): void; /** * Lists job templates in the specified region. * @@ -1196,6 +1161,37 @@ export class TranscoderServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listJobTemplates( + request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.video.transcoder.v1.IJobTemplate[], + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest | null, + protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + ] + >; + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJobTemplate + > + ): void; + listJobTemplates( + request: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + callback: PaginationCallback< + protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, + | protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse + | null + | undefined, + protos.google.cloud.video.transcoder.v1.IJobTemplate + > + ): void; listJobTemplates( request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, optionsOrCallback?: @@ -1322,11 +1318,8 @@ export class TranscoderServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listJobTemplatesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/transcoder_service.list_job_templates.js + * region_tag:transcoder_v1_generated_TranscoderService_ListJobTemplates_async */ listJobTemplatesAsync( request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, @@ -1340,7 +1333,6 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listJobTemplates']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/src/v1beta1/transcoder_service_client.ts b/src/v1beta1/transcoder_service_client.ts index 2a03892..3e5b3e7 100644 --- a/src/v1beta1/transcoder_service_client.ts +++ b/src/v1beta1/transcoder_service_client.ts @@ -348,6 +348,26 @@ export class TranscoderServiceClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Creates a job in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1beta1.Job} request.job + * Required. Parameters for creating transcoding job. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/transcoder_service.create_job.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_CreateJob_async + */ createJob( request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, options?: CallOptions @@ -382,26 +402,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Creates a job in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1beta1.Job} request.job - * Required. Parameters for creating transcoding job. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createJob(request); - */ createJob( request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobRequest, optionsOrCallback?: @@ -448,6 +448,24 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.createJob(request, options, callback); } + /** + * Returns the job data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/transcoder_service.get_job.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_GetJob_async + */ getJob( request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, options?: CallOptions @@ -479,24 +497,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Returns the job data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getJob(request); - */ getJob( request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobRequest, optionsOrCallback?: @@ -540,6 +540,24 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.getJob(request, options, callback); } + /** + * Deletes a job. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/transcoder_service.delete_job.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_DeleteJob_async + */ deleteJob( request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, options?: CallOptions @@ -574,24 +592,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Deletes a job. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteJob(request); - */ deleteJob( request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobRequest, optionsOrCallback?: @@ -638,6 +638,32 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.deleteJob(request, options, callback); } + /** + * Creates a job template in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} request.jobTemplate + * Required. Parameters for creating job template. + * @param {string} request.jobTemplateId + * Required. The ID to use for the job template, which will become the final component + * of the job template's resource name. + * + * This value should be 4-63 characters, and valid characters must match the + * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/transcoder_service.create_job_template.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_async + */ createJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, options?: CallOptions @@ -672,32 +698,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Creates a job template in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * @param {google.cloud.video.transcoder.v1beta1.JobTemplate} request.jobTemplate - * Required. Parameters for creating job template. - * @param {string} request.jobTemplateId - * Required. The ID to use for the job template, which will become the final component - * of the job template's resource name. - * - * This value should be 4-63 characters, and valid characters must match the - * regular expression `{@link a-zA-Z0-9_-|a-zA-Z}*`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createJobTemplate(request); - */ createJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.ICreateJobTemplateRequest, optionsOrCallback?: @@ -744,6 +744,25 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.createJobTemplate(request, options, callback); } + /** + * Returns the job template data. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/transcoder_service.get_job_template.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_async + */ getJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, options?: CallOptions @@ -778,25 +797,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Returns the job template data. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getJobTemplate(request); - */ getJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.IGetJobTemplateRequest, optionsOrCallback?: @@ -843,6 +843,24 @@ export class TranscoderServiceClient { this.initialize(); return this.innerApiCalls.getJobTemplate(request, options, callback); } + /** + * Deletes a job template. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/transcoder_service.delete_job_template.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_async + */ deleteJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, options?: CallOptions @@ -877,24 +895,6 @@ export class TranscoderServiceClient { {} | null | undefined > ): void; - /** - * Deletes a job template. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteJobTemplate(request); - */ deleteJobTemplate( request?: protos.google.cloud.video.transcoder.v1beta1.IDeleteJobTemplateRequest, optionsOrCallback?: @@ -942,6 +942,31 @@ export class TranscoderServiceClient { return this.innerApiCalls.deleteJobTemplate(request, options, callback); } + /** + * Lists jobs in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: `projects/{project}/locations/{location}` + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The `next_page_token` value returned from a previous List request, if + * any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listJobs( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, options?: CallOptions @@ -973,31 +998,6 @@ export class TranscoderServiceClient { protos.google.cloud.video.transcoder.v1beta1.IJob > ): void; - /** - * Lists jobs in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Format: `projects/{project}/locations/{location}` - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The `next_page_token` value returned from a previous List request, if - * any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Job]{@link google.cloud.video.transcoder.v1beta1.Job}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listJobsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listJobs( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, optionsOrCallback?: @@ -1110,11 +1110,8 @@ export class TranscoderServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listJobsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/transcoder_service.list_jobs.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_ListJobs_async */ listJobsAsync( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobsRequest, @@ -1128,7 +1125,6 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listJobs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1138,6 +1134,32 @@ export class TranscoderServiceClient { callSettings ) as AsyncIterable; } + /** + * Lists job templates in the specified region. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent location from which to retrieve the collection of job templates. + * Format: `projects/{project}/locations/{location}` + * @param {number} request.pageSize + * The maximum number of items to return. + * @param {string} request.pageToken + * The `next_page_token` value returned from a previous List request, if + * any. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listJobTemplatesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listJobTemplates( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, options?: CallOptions @@ -1169,32 +1191,6 @@ export class TranscoderServiceClient { protos.google.cloud.video.transcoder.v1beta1.IJobTemplate > ): void; - /** - * Lists job templates in the specified region. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent location from which to retrieve the collection of job templates. - * Format: `projects/{project}/locations/{location}` - * @param {number} request.pageSize - * The maximum number of items to return. - * @param {string} request.pageToken - * The `next_page_token` value returned from a previous List request, if - * any. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [JobTemplate]{@link google.cloud.video.transcoder.v1beta1.JobTemplate}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listJobTemplatesAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listJobTemplates( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, optionsOrCallback?: @@ -1309,11 +1305,8 @@ export class TranscoderServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listJobTemplatesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/transcoder_service.list_job_templates.js + * region_tag:transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_async */ listJobTemplatesAsync( request?: protos.google.cloud.video.transcoder.v1beta1.IListJobTemplatesRequest, @@ -1327,7 +1320,6 @@ export class TranscoderServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listJobTemplates']; const callSettings = defaultCallSettings.merge(options); this.initialize();