VideoStitcherServiceClient

VideoStitcherServiceClient

Video-On-Demand content stitching API allows you to insert ads into (VoD) video on demand files. You will be able to render custom scrubber bars with highlighted ads, enforce ad policies, allow seamless playback and tracking on native players and monetize content with any standard VMAP compliant ad server.

Constructor

new VideoStitcherServiceClient(optionsopt, gaxInstanceopt)

Construct an instance of VideoStitcherServiceClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

Client configuration override. Follows the structure of gapicConfig.

fallback boolean <optional>

Use HTTP/1.1 REST mode. For more information, please check the documentation.

gaxInstance gax <optional>

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 VideoStitcherServiceClient({fallback: true}, gax);

Members

apiEndpoint

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

port

The port for this API service.

scopes

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

servicePath

The DNS address for this API service.

Methods

cancelOperation(request, optionsopt, callbackopt) → {Promise}

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

The name of the operation resource to be cancelled.

options Object <optional>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback function <optional>

The function which will be called with the result of the API call.

Returns:
Type Description
Promise
  • The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.
Example
```
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
```

cdnKeyPath(project, location, cdn_key) → {string}

Return a fully-qualified cdnKey resource name string.

Parameters:
Name Type Description
project string
location string
cdn_key string
Returns:
Type Description
string

Resource name string.

(async) checkCreateCdnKeyProgress(name) → {Promise}

Check the status of the long running operation returned by createCdnKey().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. 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 project in which the CDN key should be created, in the form
   *  of `projects/{project_number}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The CDN key resource to create.
   */
  // const cdnKey = {}
  /**
   *  Required. The ID to use for the CDN key, which will become the final
   *  component of the CDN key's resource name.
   *  This value should conform to RFC-1034, which restricts to
   *  lower-case letters, numbers, and hyphen, with the first character a
   *  letter, the last a letter or a number, and a 63 character maximum.
   */
  // const cdnKeyId = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

  async function callCreateCdnKey() {
    // Construct request
    const request = {
      parent,
      cdnKey,
      cdnKeyId,
    };

    // Run request
    const [operation] = await stitcherClient.createCdnKey(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateCdnKey();

(async) checkCreateLiveConfigProgress(name) → {Promise}

Check the status of the long running operation returned by createLiveConfig().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. 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 project in which the live config should be created, in
   *  the form of `projects/{project_number}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The unique identifier ID to use for the live config.
   */
  // const liveConfigId = 'abc123'
  /**
   *  Required. The live config resource to create.
   */
  // const liveConfig = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported `(00000000-0000-0000-0000-000000000000)`.
   */
  // const requestId = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

  async function callCreateLiveConfig() {
    // Construct request
    const request = {
      parent,
      liveConfigId,
      liveConfig,
    };

    // Run request
    const [operation] = await stitcherClient.createLiveConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateLiveConfig();

(async) checkCreateSlateProgress(name) → {Promise}

Check the status of the long running operation returned by createSlate().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. 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 project in which the slate should be created, in the form of
   *  `projects/{project_number}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The unique identifier for the slate.
   *  This value should conform to RFC-1034, which restricts to
   *  lower-case letters, numbers, and hyphen, with the first character a
   *  letter, the last a letter or a number, and a 63 character maximum.
   */
  // const slateId = 'abc123'
  /**
   *  Required. The slate to create.
   */
  // const slate = {}
  /**
   *  A request ID to identify requests. Specify a unique request ID
   *  so that if you must retry your request, the server will know to ignore
   *  the request if it has already been completed. The server will guarantee
   *  that for at least 60 minutes since the first request.
   *  For example, consider a situation where you make an initial request and the
   *  request times out. If you make the request again with the same request ID,
   *  the server can check if original operation with the same request ID was
   *  received, and if so, will ignore the second request. This prevents clients
   *  from accidentally creating duplicate commitments.
   *  The request ID must be a valid UUID with the exception that zero UUID is
   *  not supported `(00000000-0000-0000-0000-000000000000)`.
   */
  // const requestId = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

  async function callCreateSlate() {
    // Construct request
    const request = {
      parent,
      slateId,
      slate,
    };

    // Run request
    const [operation] = await stitcherClient.createSlate(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateSlate();

(async) checkDeleteCdnKeyProgress(name) → {Promise}

Check the status of the long running operation returned by deleteCdnKey().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. 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 CDN key to be deleted, in the form of
   *  `projects/{project_number}/locations/{location}/cdnKeys/{id}`.
   */
  // const name = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

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

    // Run request
    const [operation] = await stitcherClient.deleteCdnKey(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteCdnKey();

(async) checkDeleteLiveConfigProgress(name) → {Promise}

Check the status of the long running operation returned by deleteLiveConfig().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. 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 live config to be deleted, in the form of
   *  `projects/{project_number}/locations/{location}/liveConfigs/{id}`.
   */
  // const name = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

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

    // Run request
    const [operation] = await stitcherClient.deleteLiveConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteLiveConfig();

(async) checkDeleteSlateProgress(name) → {Promise}

Check the status of the long running operation returned by deleteSlate().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. 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 slate to be deleted, in the form of
   *  `projects/{project_number}/locations/{location}/slates/{id}`.
   */
  // const name = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

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

    // Run request
    const [operation] = await stitcherClient.deleteSlate(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteSlate();

(async) checkUpdateCdnKeyProgress(name) → {Promise}

Check the status of the long running operation returned by updateCdnKey().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. 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 CDN key resource which replaces the resource on the server.
   */
  // const cdnKey = {}
  /**
   *  Required. The update mask applies to the resource.
   *  For the `FieldMask` definition, see
   *  https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
   */
  // const updateMask = {}

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

  async function callUpdateCdnKey() {
    // Construct request
    const request = {
      cdnKey,
      updateMask,
    };

    // Run request
    const [operation] = await stitcherClient.updateCdnKey(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateCdnKey();

(async) checkUpdateSlateProgress(name) → {Promise}

Check the status of the long running operation returned by updateSlate().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. 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 resource with updated fields.
   */
  // const slate = {}
  /**
   *  Required. The update mask which specifies fields which should be updated.
   */
  // const updateMask = {}

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

  async function callUpdateSlate() {
    // Construct request
    const request = {
      slate,
      updateMask,
    };

    // Run request
    const [operation] = await stitcherClient.updateSlate(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateSlate();

close() → {Promise}

Terminate the gRPC channel and close the client.

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

Returns:
Type Description
Promise

A promise that resolves when the client is closed.

deleteOperation(request, optionsopt, callbackopt) → {Promise}

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

The name of the operation resource to be deleted.

options Object <optional>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback function <optional>

The function which will be called with the result of the API call.

Returns:
Type Description
Promise
  • The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.
Example
```
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
```

getOperation(request, optionsopt, callbackopt) → {Promise}

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

The name of the operation resource.

options Object <optional>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback function <optional>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing google.longrunning.Operation.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing google.longrunning.Operation. The promise has a method named "cancel" which cancels the ongoing API call.
Example
```
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
```

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

initialize() → {Promise}

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:
Type Description
Promise

A promise that resolves to an authenticated service stub.

listCdnKeysAsync(request, optionsopt) → {Object}

Equivalent to listCdnKeys, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The project that contains the list of CDN keys, in the form of projects/{project_number}/locations/{location}.

pageSize number

Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

pageToken string

A token identifying a page of results the server should return.

filter string

Filtering results

orderBy string

Hint for how to order the results

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing CdnKey. 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
  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The project that contains the list of CDN keys, in the form of
   *  `projects/{project_number}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results
   */
  // const filter = 'abc123'
  /**
   *  Hint for how to order the results
   */
  // const orderBy = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} =
    require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

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

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

  callListCdnKeys();

listCdnKeysStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The project that contains the list of CDN keys, in the form of projects/{project_number}/locations/{location}.

pageSize number

Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

pageToken string

A token identifying a page of results the server should return.

filter string

Filtering results

orderBy string

Hint for how to order the results

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing CdnKey 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 listCdnKeysAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listLiveAdTagDetailsAsync(request, optionsopt) → {Object}

Equivalent to listLiveAdTagDetails, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource parent in the form of projects/{project}/locations/{location}/liveSessions/{live_session}.

pageSize number

The maximum number of items to return.

pageToken string

The pagination token returned from a previous List request.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing LiveAdTagDetail. 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 resource parent in the form of
   *  `projects/{project}/locations/{location}/liveSessions/{live_session}`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of items to return.
   */
  // const pageSize = 1234
  /**
   *  The pagination token returned from a previous List request.
   */
  // const pageToken = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

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

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

  callListLiveAdTagDetails();

listLiveAdTagDetailsStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource parent in the form of projects/{project}/locations/{location}/liveSessions/{live_session}.

pageSize number

The maximum number of items to return.

pageToken string

The pagination token returned from a previous List request.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing LiveAdTagDetail 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 listLiveAdTagDetailsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listLiveConfigsAsync(request, optionsopt) → {Object}

Equivalent to listLiveConfigs, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The project that contains the list of live configs, in the form of projects/{project_number}/locations/{location}.

pageSize number

The maximum number of items to return.

pageToken string

The next_page_token value returned from a previous List request, if any.

filter string <optional>

Optional. The filter to apply to list results (see Filtering).

orderBy string <optional>

Optional. Specifies the ordering of results following Cloud API syntax.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing LiveConfig. 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 project that contains the list of live configs, in the
   *  form of `projects/{project_number}/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'
  /**
   *  Optional. The filter to apply to list results (see
   *  Filtering (https://google.aip.dev/160)).
   */
  // const filter = 'abc123'
  /**
   *  Optional. Specifies the ordering of results following
   *  Cloud API
   *  syntax (https://cloud.google.com/apis/design/design_patterns#sorting_order).
   */
  // const orderBy = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

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

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

  callListLiveConfigs();

listLiveConfigsStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The project that contains the list of live configs, in the form of projects/{project_number}/locations/{location}.

pageSize number

The maximum number of items to return.

pageToken string

The next_page_token value returned from a previous List request, if any.

filter string <optional>

Optional. The filter to apply to list results (see Filtering).

orderBy string <optional>

Optional. Specifies the ordering of results following Cloud API syntax.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing LiveConfig 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 listLiveConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listOperationsAsync(request, optionsopt) → {Object}

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

The name of the operation collection.

filter string

The standard list filter.

pageSize number <optional>

The maximum number of resources contained in the underlying API response. If page streaming is performed per-resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.

options Object <optional>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns:
Type Description
Object

An iterable Object that conforms to iteration protocols.

Example
```
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
```

listSlatesAsync(request, optionsopt) → {Object}

Equivalent to listSlates, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The project to list slates, in the form of projects/{project_number}/locations/{location}.

pageSize number

Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

pageToken string

A token identifying a page of results the server should return.

filter string

Filtering results

orderBy string

Hint for how to order the results

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Slate. 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 project to list slates, in the form of
   *  `projects/{project_number}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results
   */
  // const filter = 'abc123'
  /**
   *  Hint for how to order the results
   */
  // const orderBy = 'abc123'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

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

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

  callListSlates();

listSlatesStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The project to list slates, in the form of projects/{project_number}/locations/{location}.

pageSize number

Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

pageToken string

A token identifying a page of results the server should return.

filter string

Filtering results

orderBy string

Hint for how to order the results

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Slate 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 listSlatesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listVodAdTagDetailsAsync(request, optionsopt) → {Object}

Equivalent to listVodAdTagDetails, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The VOD session which the ad tag details belong to, in the form of projects/{project}/locations/{location}/vodSessions/{vod_session_id}.

pageSize number

The maximum number of items to return.

pageToken string

The next_page_token value returned from a previous List request, if any.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing VodAdTagDetail. 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 VOD session which the ad tag details belong to, in the form
   *  of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`.
   */
  // 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'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

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

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

  callListVodAdTagDetails();

listVodAdTagDetailsStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The VOD session which the ad tag details belong to, in the form of projects/{project}/locations/{location}/vodSessions/{vod_session_id}.

pageSize number

The maximum number of items to return.

pageToken string

The next_page_token value returned from a previous List request, if any.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing VodAdTagDetail 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 listVodAdTagDetailsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listVodStitchDetailsAsync(request, optionsopt) → {Object}

Equivalent to listVodStitchDetails, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The VOD session where the stitch details belong to, in the form of projects/{project}/locations/{location}/vodSessions/{id}.

pageSize number

The maximum number of items to return.

pageToken string

The next_page_token value returned from a previous List request, if any.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing VodStitchDetail. 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 VOD session where the stitch details belong to, in the form
   *  of `projects/{project}/locations/{location}/vodSessions/{id}`.
   */
  // 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'

  // Imports the Stitcher library
  const {VideoStitcherServiceClient} = require('@google-cloud/video-stitcher').v1;

  // Instantiates a client
  const stitcherClient = new VideoStitcherServiceClient();

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

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

  callListVodStitchDetails();

listVodStitchDetailsStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The VOD session where the stitch details belong to, in the form of projects/{project}/locations/{location}/vodSessions/{id}.

pageSize number

The maximum number of items to return.

pageToken string

The next_page_token value returned from a previous List request, if any.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing VodStitchDetail 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 listVodStitchDetailsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

liveAdTagDetailPath(project, location, live_session, live_ad_tag_detail) → {string}

Return a fully-qualified liveAdTagDetail resource name string.

Parameters:
Name Type Description
project string
location string
live_session string
live_ad_tag_detail string
Returns:
Type Description
string

Resource name string.

liveConfigPath(project, location, live_config) → {string}

Return a fully-qualified liveConfig resource name string.

Parameters:
Name Type Description
project string
location string
live_config string
Returns:
Type Description
string

Resource name string.

liveSessionPath(project, location, live_session) → {string}

Return a fully-qualified liveSession resource name string.

Parameters:
Name Type Description
project string
location string
live_session string
Returns:
Type Description
string

Resource name string.

locationPath(project, location) → {string}

Return a fully-qualified location resource name string.

Parameters:
Name Type Description
project string
location string
Returns:
Type Description
string

Resource name string.

matchCdnKeyFromCdnKeyName(cdnKeyName) → {string}

Parse the cdn_key from CdnKey resource.

Parameters:
Name Type Description
cdnKeyName string

A fully-qualified path representing CdnKey resource.

Returns:
Type Description
string

A string representing the cdn_key.

matchLiveAdTagDetailFromLiveAdTagDetailName(liveAdTagDetailName) → {string}

Parse the live_ad_tag_detail from LiveAdTagDetail resource.

Parameters:
Name Type Description
liveAdTagDetailName string

A fully-qualified path representing LiveAdTagDetail resource.

Returns:
Type Description
string

A string representing the live_ad_tag_detail.

matchLiveConfigFromLiveConfigName(liveConfigName) → {string}

Parse the live_config from LiveConfig resource.

Parameters:
Name Type Description
liveConfigName string

A fully-qualified path representing LiveConfig resource.

Returns:
Type Description
string

A string representing the live_config.

matchLiveSessionFromLiveAdTagDetailName(liveAdTagDetailName) → {string}

Parse the live_session from LiveAdTagDetail resource.

Parameters:
Name Type Description
liveAdTagDetailName string

A fully-qualified path representing LiveAdTagDetail resource.

Returns:
Type Description
string

A string representing the live_session.

matchLiveSessionFromLiveSessionName(liveSessionName) → {string}

Parse the live_session from LiveSession resource.

Parameters:
Name Type Description
liveSessionName string

A fully-qualified path representing LiveSession resource.

Returns:
Type Description
string

A string representing the live_session.

matchLocationFromCdnKeyName(cdnKeyName) → {string}

Parse the location from CdnKey resource.

Parameters:
Name Type Description
cdnKeyName string

A fully-qualified path representing CdnKey resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromLiveAdTagDetailName(liveAdTagDetailName) → {string}

Parse the location from LiveAdTagDetail resource.

Parameters:
Name Type Description
liveAdTagDetailName string

A fully-qualified path representing LiveAdTagDetail resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromLiveConfigName(liveConfigName) → {string}

Parse the location from LiveConfig resource.

Parameters:
Name Type Description
liveConfigName string

A fully-qualified path representing LiveConfig resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromLiveSessionName(liveSessionName) → {string}

Parse the location from LiveSession resource.

Parameters:
Name Type Description
liveSessionName string

A fully-qualified path representing LiveSession resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromLocationName(locationName) → {string}

Parse the location from Location resource.

Parameters:
Name Type Description
locationName string

A fully-qualified path representing Location resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromSlateName(slateName) → {string}

Parse the location from Slate resource.

Parameters:
Name Type Description
slateName string

A fully-qualified path representing Slate resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromVodAdTagDetailName(vodAdTagDetailName) → {string}

Parse the location from VodAdTagDetail resource.

Parameters:
Name Type Description
vodAdTagDetailName string

A fully-qualified path representing VodAdTagDetail resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromVodSessionName(vodSessionName) → {string}

Parse the location from VodSession resource.

Parameters:
Name Type Description
vodSessionName string

A fully-qualified path representing VodSession resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromVodStitchDetailName(vodStitchDetailName) → {string}

Parse the location from VodStitchDetail resource.

Parameters:
Name Type Description
vodStitchDetailName string

A fully-qualified path representing VodStitchDetail resource.

Returns:
Type Description
string

A string representing the location.

matchProjectFromCdnKeyName(cdnKeyName) → {string}

Parse the project from CdnKey resource.

Parameters:
Name Type Description
cdnKeyName string

A fully-qualified path representing CdnKey resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromLiveAdTagDetailName(liveAdTagDetailName) → {string}

Parse the project from LiveAdTagDetail resource.

Parameters:
Name Type Description
liveAdTagDetailName string

A fully-qualified path representing LiveAdTagDetail resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromLiveConfigName(liveConfigName) → {string}

Parse the project from LiveConfig resource.

Parameters:
Name Type Description
liveConfigName string

A fully-qualified path representing LiveConfig resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromLiveSessionName(liveSessionName) → {string}

Parse the project from LiveSession resource.

Parameters:
Name Type Description
liveSessionName string

A fully-qualified path representing LiveSession resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromLocationName(locationName) → {string}

Parse the project from Location resource.

Parameters:
Name Type Description
locationName string

A fully-qualified path representing Location resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromProjectName(projectName) → {string}

Parse the project from Project resource.

Parameters:
Name Type Description
projectName string

A fully-qualified path representing Project resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromSlateName(slateName) → {string}

Parse the project from Slate resource.

Parameters:
Name Type Description
slateName string

A fully-qualified path representing Slate resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromVodAdTagDetailName(vodAdTagDetailName) → {string}

Parse the project from VodAdTagDetail resource.

Parameters:
Name Type Description
vodAdTagDetailName string

A fully-qualified path representing VodAdTagDetail resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromVodSessionName(vodSessionName) → {string}

Parse the project from VodSession resource.

Parameters:
Name Type Description
vodSessionName string

A fully-qualified path representing VodSession resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromVodStitchDetailName(vodStitchDetailName) → {string}

Parse the project from VodStitchDetail resource.

Parameters:
Name Type Description
vodStitchDetailName string

A fully-qualified path representing VodStitchDetail resource.

Returns:
Type Description
string

A string representing the project.

matchSlateFromSlateName(slateName) → {string}

Parse the slate from Slate resource.

Parameters:
Name Type Description
slateName string

A fully-qualified path representing Slate resource.

Returns:
Type Description
string

A string representing the slate.

matchVodAdTagDetailFromVodAdTagDetailName(vodAdTagDetailName) → {string}

Parse the vod_ad_tag_detail from VodAdTagDetail resource.

Parameters:
Name Type Description
vodAdTagDetailName string

A fully-qualified path representing VodAdTagDetail resource.

Returns:
Type Description
string

A string representing the vod_ad_tag_detail.

matchVodSessionFromVodAdTagDetailName(vodAdTagDetailName) → {string}

Parse the vod_session from VodAdTagDetail resource.

Parameters:
Name Type Description
vodAdTagDetailName string

A fully-qualified path representing VodAdTagDetail resource.

Returns:
Type Description
string

A string representing the vod_session.

matchVodSessionFromVodSessionName(vodSessionName) → {string}

Parse the vod_session from VodSession resource.

Parameters:
Name Type Description
vodSessionName string

A fully-qualified path representing VodSession resource.

Returns:
Type Description
string

A string representing the vod_session.

matchVodSessionFromVodStitchDetailName(vodStitchDetailName) → {string}

Parse the vod_session from VodStitchDetail resource.

Parameters:
Name Type Description
vodStitchDetailName string

A fully-qualified path representing VodStitchDetail resource.

Returns:
Type Description
string

A string representing the vod_session.

matchVodStitchDetailFromVodStitchDetailName(vodStitchDetailName) → {string}

Parse the vod_stitch_detail from VodStitchDetail resource.

Parameters:
Name Type Description
vodStitchDetailName string

A fully-qualified path representing VodStitchDetail resource.

Returns:
Type Description
string

A string representing the vod_stitch_detail.

projectPath(project) → {string}

Return a fully-qualified project resource name string.

Parameters:
Name Type Description
project string
Returns:
Type Description
string

Resource name string.

slatePath(project, location, slate) → {string}

Return a fully-qualified slate resource name string.

Parameters:
Name Type Description
project string
location string
slate string
Returns:
Type Description
string

Resource name string.

vodAdTagDetailPath(project, location, vod_session, vod_ad_tag_detail) → {string}

Return a fully-qualified vodAdTagDetail resource name string.

Parameters:
Name Type Description
project string
location string
vod_session string
vod_ad_tag_detail string
Returns:
Type Description
string

Resource name string.

vodSessionPath(project, location, vod_session) → {string}

Return a fully-qualified vodSession resource name string.

Parameters:
Name Type Description
project string
location string
vod_session string
Returns:
Type Description
string

Resource name string.

vodStitchDetailPath(project, location, vod_session, vod_stitch_detail) → {string}

Return a fully-qualified vodStitchDetail resource name string.

Parameters:
Name Type Description
project string
location string
vod_session string
vod_stitch_detail string
Returns:
Type Description
string

Resource name string.