Class v1.TranscoderServiceClient (3.0.3)

Using the Transcoder API, you can queue asynchronous jobs for transcoding media into various output formats. Output formats may include different streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can also customize jobs using advanced features such as Digital Rights Management (DRM), audio equalization, content concatenation, and digital ad-stitch ready content generation. v1

Package

@google-cloud/video-transcoder

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of TranscoderServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new TranscoderServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

transcoderServiceStub

transcoderServiceStub?: Promise<{
        [name: string]: Function;
    }>;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createJob(request, options)

createJob(request?: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.transcoder.v1.IJob,
        protos.google.cloud.video.transcoder.v1.ICreateJobRequest | undefined,
        {} | undefined
    ]>;

Creates a job in the specified region.

Parameters
NameDescription
request ICreateJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.ICreateJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent location to create and process this job.
   *  Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Required. Parameters for creating transcoding job.
   */
  // const job = {}

  // Imports the Transcoder library
  const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1;

  // Instantiates a client
  const transcoderClient = new TranscoderServiceClient();

  async function callCreateJob() {
    // Construct request
    const request = {
      parent,
      job,
    };

    // Run request
    const response = await transcoderClient.createJob(request);
    console.log(response);
  }

  callCreateJob();

createJob(request, options, callback)

createJob(request: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.ICreateJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateJobRequest
options CallOptions
callback Callback<protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.ICreateJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createJob(request, callback)

createJob(request: protos.google.cloud.video.transcoder.v1.ICreateJobRequest, callback: Callback<protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.ICreateJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateJobRequest
callback Callback<protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.ICreateJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createJobTemplate(request, options)

createJobTemplate(request?: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.transcoder.v1.IJobTemplate,
        (protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest | undefined),
        {} | undefined
    ]>;

Creates a job template in the specified region.

Parameters
NameDescription
request ICreateJobTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.transcoder.v1.IJobTemplate, (protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing JobTemplate. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent location to create this job template.
   *  Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  Required. Parameters for creating job template.
   */
  // const jobTemplate = {}
  /**
   *  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 `[a-zA-Z][a-zA-Z0-9_-]*`.
   */
  // const jobTemplateId = 'abc123'

  // Imports the Transcoder library
  const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1;

  // Instantiates a client
  const transcoderClient = new TranscoderServiceClient();

  async function callCreateJobTemplate() {
    // Construct request
    const request = {
      parent,
      jobTemplate,
      jobTemplateId,
    };

    // Run request
    const response = await transcoderClient.createJobTemplate(request);
    console.log(response);
  }

  callCreateJobTemplate();

createJobTemplate(request, options, callback)

createJobTemplate(request: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.transcoder.v1.IJobTemplate, protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateJobTemplateRequest
options CallOptions
callback Callback<protos.google.cloud.video.transcoder.v1.IJobTemplate, protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createJobTemplate(request, callback)

createJobTemplate(request: protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest, callback: Callback<protos.google.cloud.video.transcoder.v1.IJobTemplate, protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateJobTemplateRequest
callback Callback<protos.google.cloud.video.transcoder.v1.IJobTemplate, protos.google.cloud.video.transcoder.v1.ICreateJobTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteJob(request, options)

deleteJob(request?: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.video.transcoder.v1.IDeleteJobRequest | undefined,
        {} | undefined
    ]>;

Deletes a job.

Parameters
NameDescription
request IDeleteJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.video.transcoder.v1.IDeleteJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the job to delete.
   *  Format: `projects/{project}/locations/{location}/jobs/{job}`
   */
  // const name = 'abc123'
  /**
   *  If set to true, and the job is not found, the request will succeed but no
   *  action will be taken on the server.
   */
  // const allowMissing = true

  // Imports the Transcoder library
  const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1;

  // Instantiates a client
  const transcoderClient = new TranscoderServiceClient();

  async function callDeleteJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await transcoderClient.deleteJob(request);
    console.log(response);
  }

  callDeleteJob();

deleteJob(request, options, callback)

deleteJob(request: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.transcoder.v1.IDeleteJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteJobRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.transcoder.v1.IDeleteJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteJob(request, callback)

deleteJob(request: protos.google.cloud.video.transcoder.v1.IDeleteJobRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.transcoder.v1.IDeleteJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteJobRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.transcoder.v1.IDeleteJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteJobTemplate(request, options)

deleteJobTemplate(request?: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest | undefined),
        {} | undefined
    ]>;

Deletes a job template.

Parameters
NameDescription
request IDeleteJobTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the job template to delete.
   *  `projects/{project}/locations/{location}/jobTemplates/{job_template}`
   */
  // const name = 'abc123'
  /**
   *  If set to true, and the job template is not found, the request will succeed
   *  but no action will be taken on the server.
   */
  // const allowMissing = true

  // Imports the Transcoder library
  const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1;

  // Instantiates a client
  const transcoderClient = new TranscoderServiceClient();

  async function callDeleteJobTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await transcoderClient.deleteJobTemplate(request);
    console.log(response);
  }

  callDeleteJobTemplate();

deleteJobTemplate(request, options, callback)

deleteJobTemplate(request: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteJobTemplateRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteJobTemplate(request, callback)

deleteJobTemplate(request: protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteJobTemplateRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.video.transcoder.v1.IDeleteJobTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJob(request, options)

getJob(request?: protos.google.cloud.video.transcoder.v1.IGetJobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.transcoder.v1.IJob,
        protos.google.cloud.video.transcoder.v1.IGetJobRequest | undefined,
        {} | undefined
    ]>;

Returns the job data.

Parameters
NameDescription
request IGetJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.IGetJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the job to retrieve.
   *  Format: `projects/{project}/locations/{location}/jobs/{job}`
   */
  // const name = 'abc123'

  // Imports the Transcoder library
  const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1;

  // Instantiates a client
  const transcoderClient = new TranscoderServiceClient();

  async function callGetJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await transcoderClient.getJob(request);
    console.log(response);
  }

  callGetJob();

getJob(request, options, callback)

getJob(request: protos.google.cloud.video.transcoder.v1.IGetJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.IGetJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetJobRequest
options CallOptions
callback Callback<protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.IGetJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJob(request, callback)

getJob(request: protos.google.cloud.video.transcoder.v1.IGetJobRequest, callback: Callback<protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.IGetJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetJobRequest
callback Callback<protos.google.cloud.video.transcoder.v1.IJob, protos.google.cloud.video.transcoder.v1.IGetJobRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJobTemplate(request, options)

getJobTemplate(request?: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.transcoder.v1.IJobTemplate,
        (protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest | undefined),
        {} | undefined
    ]>;

Returns the job template data.

Parameters
NameDescription
request IGetJobTemplateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.transcoder.v1.IJobTemplate, (protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing JobTemplate. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the job template to retrieve.
   *  Format:
   *  `projects/{project}/locations/{location}/jobTemplates/{job_template}`
   */
  // const name = 'abc123'

  // Imports the Transcoder library
  const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1;

  // Instantiates a client
  const transcoderClient = new TranscoderServiceClient();

  async function callGetJobTemplate() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await transcoderClient.getJobTemplate(request);
    console.log(response);
  }

  callGetJobTemplate();

getJobTemplate(request, options, callback)

getJobTemplate(request: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.transcoder.v1.IJobTemplate, protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetJobTemplateRequest
options CallOptions
callback Callback<protos.google.cloud.video.transcoder.v1.IJobTemplate, protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getJobTemplate(request, callback)

getJobTemplate(request: protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest, callback: Callback<protos.google.cloud.video.transcoder.v1.IJobTemplate, protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetJobTemplateRequest
callback Callback<protos.google.cloud.video.transcoder.v1.IJobTemplate, protos.google.cloud.video.transcoder.v1.IGetJobTemplateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

jobPath(project, location, job)

jobPath(project: string, location: string, job: string): string;

Return a fully-qualified job resource name string.

Parameters
NameDescription
project string
location string
job string
Returns
TypeDescription
string

{string} Resource name string.

jobTemplatePath(project, location, jobTemplate)

jobTemplatePath(project: string, location: string, jobTemplate: string): string;

Return a fully-qualified jobTemplate resource name string.

Parameters
NameDescription
project string
location string
jobTemplate string
Returns
TypeDescription
string

{string} Resource name string.

listJobs(request, options)

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
    ]>;

Lists jobs in the specified region.

Parameters
NameDescription
request IListJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.transcoder.v1.IJob[], protos.google.cloud.video.transcoder.v1.IListJobsRequest | null, protos.google.cloud.video.transcoder.v1.IListJobsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 for more details and examples.

listJobs(request, options, callback)

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;
Parameters
NameDescription
request 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>
Returns
TypeDescription
void

listJobs(request, callback)

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;
Parameters
NameDescription
request 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>
Returns
TypeDescription
void

listJobsAsync(request, options)

listJobsAsync(request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.video.transcoder.v1.IJob>;

Equivalent to listJobs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request IListJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.video.transcoder.v1.IJob>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of items to return.
   */
  // const pageSize = 1234
  /**
   *  The `next_page_token` value returned from a previous List request, if
   *  any.
   */
  // const pageToken = 'abc123'
  /**
   *  The filter expression, following the syntax outlined in
   *  https://google.aip.dev/160.
   */
  // const filter = 'abc123'
  /**
   *  One or more fields to compare and use to sort the output.
   *  See https://google.aip.dev/132#ordering.
   */
  // const orderBy = 'abc123'

  // Imports the Transcoder library
  const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1;

  // Instantiates a client
  const transcoderClient = new TranscoderServiceClient();

  async function callListJobs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await transcoderClient.listJobsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListJobs();

listJobsStream(request, options)

listJobsStream(request?: protos.google.cloud.video.transcoder.v1.IListJobsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. 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 for more details and examples.

listJobTemplates(request, options)

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
    ]>;

Lists job templates in the specified region.

Parameters
NameDescription
request IListJobTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.transcoder.v1.IJobTemplate[], protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest | null, protos.google.cloud.video.transcoder.v1.IListJobTemplatesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of 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 for more details and examples.

listJobTemplates(request, options, callback)

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;
Parameters
NameDescription
request 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>
Returns
TypeDescription
void

listJobTemplates(request, callback)

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;
Parameters
NameDescription
request 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>
Returns
TypeDescription
void

listJobTemplatesAsync(request, options)

listJobTemplatesAsync(request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.video.transcoder.v1.IJobTemplate>;

Equivalent to listJobTemplates, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request IListJobTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.video.transcoder.v1.IJobTemplate>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing JobTemplate. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent location from which to retrieve the collection of job
   *  templates. Format: `projects/{project}/locations/{location}`
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of items to return.
   */
  // const pageSize = 1234
  /**
   *  The `next_page_token` value returned from a previous List request, if
   *  any.
   */
  // const pageToken = 'abc123'
  /**
   *  The filter expression, following the syntax outlined in
   *  https://google.aip.dev/160.
   */
  // const filter = 'abc123'
  /**
   *  One or more fields to compare and use to sort the output.
   *  See https://google.aip.dev/132#ordering.
   */
  // const orderBy = 'abc123'

  // Imports the Transcoder library
  const {TranscoderServiceClient} = require('@google-cloud/video-transcoder').v1;

  // Instantiates a client
  const transcoderClient = new TranscoderServiceClient();

  async function callListJobTemplates() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await transcoderClient.listJobTemplatesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListJobTemplates();

listJobTemplatesStream(request, options)

listJobTemplatesStream(request?: protos.google.cloud.video.transcoder.v1.IListJobTemplatesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request IListJobTemplatesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing JobTemplate on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. 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 for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
NameDescription
project string
location string
Returns
TypeDescription
string

{string} Resource name string.

matchJobFromJobName(jobName)

matchJobFromJobName(jobName: string): string | number;

Parse the job from Job resource.

Parameter
NameDescription
jobName string

A fully-qualified path representing Job resource.

Returns
TypeDescription
string | number

{string} A string representing the job.

matchJobTemplateFromJobTemplateName(jobTemplateName)

matchJobTemplateFromJobTemplateName(jobTemplateName: string): string | number;

Parse the job_template from JobTemplate resource.

Parameter
NameDescription
jobTemplateName string

A fully-qualified path representing JobTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the job_template.

matchLocationFromJobName(jobName)

matchLocationFromJobName(jobName: string): string | number;

Parse the location from Job resource.

Parameter
NameDescription
jobName string

A fully-qualified path representing Job resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromJobTemplateName(jobTemplateName)

matchLocationFromJobTemplateName(jobTemplateName: string): string | number;

Parse the location from JobTemplate resource.

Parameter
NameDescription
jobTemplateName string

A fully-qualified path representing JobTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromJobName(jobName)

matchProjectFromJobName(jobName: string): string | number;

Parse the project from Job resource.

Parameter
NameDescription
jobName string

A fully-qualified path representing Job resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromJobTemplateName(jobTemplateName)

matchProjectFromJobTemplateName(jobTemplateName: string): string | number;

Parse the project from JobTemplate resource.

Parameter
NameDescription
jobTemplateName string

A fully-qualified path representing JobTemplate resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
NameDescription
locationName string

A fully-qualified path representing Location resource.

Returns
TypeDescription
string | number

{string} A string representing the project.