Class v1.LivestreamServiceClient (0.3.3)

Stay organized with collections Save and categorize content based on your preferences.

Using Live Stream API, you can generate live streams in the various renditions and streaming formats. The streaming format include HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send a source stream in the various ways, including Real-Time Messaging Protocol (RTMP) and Secure Reliable Transport (SRT). v1

Package

@google-cloud/livestream

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of LivestreamServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.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 LivestreamServiceClient({fallback: 'rest'}, 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;
    };

livestreamServiceStub

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

operationsClient

operationsClient: gax.OperationsClient;

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.

warn

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

Methods

channelPath(project, location, channel)

channelPath(project: string, location: string, channel: string): string;

Return a fully-qualified channel resource name string.

Parameters
NameDescription
project string
location string
channel string
Returns
TypeDescription
string

{string} Resource name string.

checkCreateChannelProgress(name)

checkCreateChannelProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.Channel, protos.google.cloud.video.livestream.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.video.livestream.v1.Channel, protos.google.cloud.video.livestream.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 for the resource, in the form of:
   *  `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The channel resource to be created.
   */
  // const channel = {}
  /**
   *  Required. The ID of the channel resource to be created.
   *  This value must be 1-63 characters, begin and end with `[a-z0-9]`,
   *  could contain dashes (-) in between.
   */
  // const channelId = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

  async function callCreateChannel() {
    // Construct request
    const request = {
      parent,
      channel,
      channelId,
    };

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

  callCreateChannel();

checkCreateInputProgress(name)

checkCreateInputProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.Input, protos.google.cloud.video.livestream.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.video.livestream.v1.Input, protos.google.cloud.video.livestream.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 for the resource, in the form of:
   *  `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The input resource to be created.
   */
  // const input = {}
  /**
   *  Required. The ID of the input resource to be created.
   *  This value must be 1-63 characters, begin and end with `[a-z0-9]`,
   *  could contain dashes (-) in between.
   */
  // const inputId = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

  async function callCreateInput() {
    // Construct request
    const request = {
      parent,
      input,
      inputId,
    };

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

  callCreateInput();

checkDeleteChannelProgress(name)

checkDeleteChannelProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.video.livestream.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.video.livestream.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 channel resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}`.
   */
  // const name = 'abc123'
  /**
   *  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 after 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'
  /**
   *  If the `force` field is set to the default value of `false`, you must
   *  delete all of a channel's events before you can delete the channel itself.
   *  If the field is set to `true`, requests to delete a channel also delete
   *  associated channel events.
   */
  // const force = true

  // Imports the Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callDeleteChannel();

checkDeleteInputProgress(name)

checkDeleteInputProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.video.livestream.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.video.livestream.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 input resource, in the form of:
   *  `projects/{project}/locations/{location}/inputs/{inputId}`.
   */
  // const name = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callDeleteInput();

checkStartChannelProgress(name)

checkStartChannelProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.ChannelOperationResponse, protos.google.cloud.video.livestream.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.video.livestream.v1.ChannelOperationResponse, protos.google.cloud.video.livestream.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 channel resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}`.
   */
  // const name = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callStartChannel();

checkStopChannelProgress(name)

checkStopChannelProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.ChannelOperationResponse, protos.google.cloud.video.livestream.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.video.livestream.v1.ChannelOperationResponse, protos.google.cloud.video.livestream.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 channel resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}`.
   */
  // const name = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callStopChannel();

checkUpdateChannelProgress(name)

checkUpdateChannelProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.Channel, protos.google.cloud.video.livestream.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.video.livestream.v1.Channel, protos.google.cloud.video.livestream.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the Channel
   *  resource by the update. You can only update the following fields:
   *  * `inputAttachments` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment)
   *  * `output` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output)
   *  * `elementaryStreams` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#ElementaryStream)
   *  * `muxStreams` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream)
   *  * `manifests` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#Manifest)
   *  * `spritesheets` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet)
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   */
  // const updateMask = {}
  /**
   *  Required. The channel resource to be updated.
   */
  // const channel = {}
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

  async function callUpdateChannel() {
    // Construct request
    const request = {
      channel,
    };

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

  callUpdateChannel();

checkUpdateInputProgress(name)

checkUpdateInputProgress(name: string): Promise<LROperation<protos.google.cloud.video.livestream.v1.Input, protos.google.cloud.video.livestream.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.video.livestream.v1.Input, protos.google.cloud.video.livestream.v1.OperationMetadata>>

{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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the Input
   *  resource by the update. You can only update the following fields:
   *  * `preprocessingConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig)
   *  * `securityRules` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule)
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   */
  // const updateMask = {}
  /**
   *  Required. The input resource to be updated.
   */
  // const input = {}
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

  async function callUpdateInput() {
    // Construct request
    const request = {
      input,
    };

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

  callUpdateInput();

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.

createChannel(request, options)

createChannel(request?: protos.google.cloud.video.livestream.v1.ICreateChannelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a channel with the provided unique ID in the specified region.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.ICreateChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 for the resource, in the form of:
   *  `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The channel resource to be created.
   */
  // const channel = {}
  /**
   *  Required. The ID of the channel resource to be created.
   *  This value must be 1-63 characters, begin and end with `[a-z0-9]`,
   *  could contain dashes (-) in between.
   */
  // const channelId = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

  async function callCreateChannel() {
    // Construct request
    const request = {
      parent,
      channel,
      channelId,
    };

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

  callCreateChannel();

createChannel(request, options, callback)

createChannel(request: protos.google.cloud.video.livestream.v1.ICreateChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.ICreateChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createChannel(request, callback)

createChannel(request: protos.google.cloud.video.livestream.v1.ICreateChannelRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.ICreateChannelRequest
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEvent(request, options)

createEvent(request?: protos.google.cloud.video.livestream.v1.ICreateEventRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.livestream.v1.IEvent,
        protos.google.cloud.video.livestream.v1.ICreateEventRequest | undefined,
        {} | undefined
    ]>;

Creates an event with the provided unique ID in the specified channel.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.ICreateEventRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.ICreateEventRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Event]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 channel for the resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The event resource to be created.
   */
  // const event = {}
  /**
   *  Required. The ID of the event resource to be created.
   *  This value must be 1-63 characters, begin and end with `[a-z0-9]`,
   *  could contain dashes (-) in between.
   */
  // const eventId = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

  async function callCreateEvent() {
    // Construct request
    const request = {
      parent,
      event,
      eventId,
    };

    // Run request
    const response = await livestreamClient.createEvent(request);
    console.log(response);
  }

  callCreateEvent();

createEvent(request, options, callback)

createEvent(request: protos.google.cloud.video.livestream.v1.ICreateEventRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.ICreateEventRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.ICreateEventRequest
options CallOptions
callback Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.ICreateEventRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEvent(request, callback)

createEvent(request: protos.google.cloud.video.livestream.v1.ICreateEventRequest, callback: Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.ICreateEventRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.ICreateEventRequest
callback Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.ICreateEventRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createInput(request, options)

createInput(request?: protos.google.cloud.video.livestream.v1.ICreateInputRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates an input with the provided unique ID in the specified region.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.ICreateInputRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 for the resource, in the form of:
   *  `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  Required. The input resource to be created.
   */
  // const input = {}
  /**
   *  Required. The ID of the input resource to be created.
   *  This value must be 1-63 characters, begin and end with `[a-z0-9]`,
   *  could contain dashes (-) in between.
   */
  // const inputId = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

  async function callCreateInput() {
    // Construct request
    const request = {
      parent,
      input,
      inputId,
    };

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

  callCreateInput();

createInput(request, options, callback)

createInput(request: protos.google.cloud.video.livestream.v1.ICreateInputRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.ICreateInputRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createInput(request, callback)

createInput(request: protos.google.cloud.video.livestream.v1.ICreateInputRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.ICreateInputRequest
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteChannel(request, options)

deleteChannel(request?: protos.google.cloud.video.livestream.v1.IDeleteChannelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes the specified channel.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IDeleteChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 channel resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}`.
   */
  // const name = 'abc123'
  /**
   *  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 after 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'
  /**
   *  If the `force` field is set to the default value of `false`, you must
   *  delete all of a channel's events before you can delete the channel itself.
   *  If the field is set to `true`, requests to delete a channel also delete
   *  associated channel events.
   */
  // const force = true

  // Imports the Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callDeleteChannel();

deleteChannel(request, options, callback)

deleteChannel(request: protos.google.cloud.video.livestream.v1.IDeleteChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IDeleteChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteChannel(request, callback)

deleteChannel(request: protos.google.cloud.video.livestream.v1.IDeleteChannelRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IDeleteChannelRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteEvent(request, options)

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

Deletes the specified event.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IDeleteEventRequest

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.livestream.v1.IDeleteEventRequest | 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 event resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
   */
  // const name = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

    // Run request
    const response = await livestreamClient.deleteEvent(request);
    console.log(response);
  }

  callDeleteEvent();

deleteEvent(request, options, callback)

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

deleteEvent(request, callback)

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

deleteInput(request, options)

deleteInput(request?: protos.google.cloud.video.livestream.v1.IDeleteInputRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes the specified input.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IDeleteInputRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 input resource, in the form of:
   *  `projects/{project}/locations/{location}/inputs/{inputId}`.
   */
  // const name = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callDeleteInput();

deleteInput(request, options, callback)

deleteInput(request: protos.google.cloud.video.livestream.v1.IDeleteInputRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IDeleteInputRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteInput(request, callback)

deleteInput(request: protos.google.cloud.video.livestream.v1.IDeleteInputRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IDeleteInputRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

eventPath(project, location, channel, event)

eventPath(project: string, location: string, channel: string, event: string): string;

Return a fully-qualified event resource name string.

Parameters
NameDescription
project string
location string
channel string
event string
Returns
TypeDescription
string

{string} Resource name string.

getChannel(request, options)

getChannel(request?: protos.google.cloud.video.livestream.v1.IGetChannelRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.livestream.v1.IChannel,
        protos.google.cloud.video.livestream.v1.IGetChannelRequest | undefined,
        {} | undefined
    ]>;

Returns the specified channel.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IGetChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IGetChannelRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Channel]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 channel resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}`.
   */
  // const name = 'abc123'

  // Imports the Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

    // Run request
    const response = await livestreamClient.getChannel(request);
    console.log(response);
  }

  callGetChannel();

getChannel(request, options, callback)

getChannel(request: protos.google.cloud.video.livestream.v1.IGetChannelRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IGetChannelRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IGetChannelRequest
options CallOptions
callback Callback<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IGetChannelRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getChannel(request, callback)

getChannel(request: protos.google.cloud.video.livestream.v1.IGetChannelRequest, callback: Callback<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IGetChannelRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IGetChannelRequest
callback Callback<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IGetChannelRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEvent(request, options)

getEvent(request?: protos.google.cloud.video.livestream.v1.IGetEventRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.livestream.v1.IEvent,
        protos.google.cloud.video.livestream.v1.IGetEventRequest | undefined,
        {} | undefined
    ]>;

Returns the specified event.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IGetEventRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.IGetEventRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Event]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 event resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`.
   */
  // const name = 'abc123'

  // Imports the Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

    // Run request
    const response = await livestreamClient.getEvent(request);
    console.log(response);
  }

  callGetEvent();

getEvent(request, options, callback)

getEvent(request: protos.google.cloud.video.livestream.v1.IGetEventRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.IGetEventRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IGetEventRequest
options CallOptions
callback Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.IGetEventRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEvent(request, callback)

getEvent(request: protos.google.cloud.video.livestream.v1.IGetEventRequest, callback: Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.IGetEventRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IGetEventRequest
callback Callback<protos.google.cloud.video.livestream.v1.IEvent, protos.google.cloud.video.livestream.v1.IGetEventRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getInput(request, options)

getInput(request?: protos.google.cloud.video.livestream.v1.IGetInputRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.livestream.v1.IInput,
        protos.google.cloud.video.livestream.v1.IGetInputRequest | undefined,
        {} | undefined
    ]>;

Returns the specified input.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IGetInputRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IGetInputRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Input]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 input resource, in the form of:
   *  `projects/{project}/locations/{location}/inputs/{inputId}`.
   */
  // const name = 'abc123'

  // Imports the Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

    // Run request
    const response = await livestreamClient.getInput(request);
    console.log(response);
  }

  callGetInput();

getInput(request, options, callback)

getInput(request: protos.google.cloud.video.livestream.v1.IGetInputRequest, options: CallOptions, callback: Callback<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IGetInputRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IGetInputRequest
options CallOptions
callback Callback<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IGetInputRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getInput(request, callback)

getInput(request: protos.google.cloud.video.livestream.v1.IGetInputRequest, callback: Callback<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IGetInputRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IGetInputRequest
callback Callback<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IGetInputRequest | 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.

inputPath(project, location, input)

inputPath(project: string, location: string, input: string): string;

Return a fully-qualified input resource name string.

Parameters
NameDescription
project string
location string
input string
Returns
TypeDescription
string

{string} Resource name string.

listChannels(request, options)

listChannels(request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.livestream.v1.IChannel[],
        protos.google.cloud.video.livestream.v1.IListChannelsRequest | null,
        protos.google.cloud.video.livestream.v1.IListChannelsResponse
    ]>;

Returns a list of all channels in the specified region.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListChannelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.livestream.v1.IChannel[], protos.google.cloud.video.livestream.v1.IListChannelsRequest | null, protos.google.cloud.video.livestream.v1.IListChannelsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Channel]. 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 listChannelsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listChannels(request, options, callback)

listChannels(request: protos.google.cloud.video.livestream.v1.IListChannelsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListChannelsRequest, protos.google.cloud.video.livestream.v1.IListChannelsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IChannel>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListChannelsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.video.livestream.v1.IListChannelsRequest, protos.google.cloud.video.livestream.v1.IListChannelsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IChannel>
Returns
TypeDescription
void

listChannels(request, callback)

listChannels(request: protos.google.cloud.video.livestream.v1.IListChannelsRequest, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListChannelsRequest, protos.google.cloud.video.livestream.v1.IListChannelsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IChannel>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListChannelsRequest
callback PaginationCallback<protos.google.cloud.video.livestream.v1.IListChannelsRequest, protos.google.cloud.video.livestream.v1.IListChannelsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IChannel>
Returns
TypeDescription
void

listChannelsAsync(request, options)

listChannelsAsync(request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.video.livestream.v1.IChannel>;

Equivalent to listChannels, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListChannelsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.video.livestream.v1.IChannel>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Channel]. 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 for the resource, in the form of:
   *  `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of items to return. If unspecified, server
   *  will pick an appropriate default. Server may return fewer items than
   *  requested. A caller should only rely on response's
   *  next_page_token google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token  to
   *  determine if there are more items left to be queried.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous List request, if any.
   */
  // const pageToken = 'abc123'
  /**
   *  The filter to apply to list results.
   */
  // const filter = 'abc123'
  /**
   *  Specifies the ordering of results following syntax at
   *  https://cloud.google.com/apis/design/design_patterns#sorting_order.
   */
  // const orderBy = 'abc123'

  // Imports the Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callListChannels();

listChannelsStream(request, options)

listChannelsStream(request?: protos.google.cloud.video.livestream.v1.IListChannelsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListChannelsRequest

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 [Channel] 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 listChannelsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listEvents(request, options)

listEvents(request?: protos.google.cloud.video.livestream.v1.IListEventsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.livestream.v1.IEvent[],
        protos.google.cloud.video.livestream.v1.IListEventsRequest | null,
        protos.google.cloud.video.livestream.v1.IListEventsResponse
    ]>;

Returns a list of all events in the specified channel.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListEventsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.livestream.v1.IEvent[], protos.google.cloud.video.livestream.v1.IListEventsRequest | null, protos.google.cloud.video.livestream.v1.IListEventsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Event]. 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 listEventsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listEvents(request, options, callback)

listEvents(request: protos.google.cloud.video.livestream.v1.IListEventsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListEventsRequest, protos.google.cloud.video.livestream.v1.IListEventsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IEvent>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListEventsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.video.livestream.v1.IListEventsRequest, protos.google.cloud.video.livestream.v1.IListEventsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IEvent>
Returns
TypeDescription
void

listEvents(request, callback)

listEvents(request: protos.google.cloud.video.livestream.v1.IListEventsRequest, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListEventsRequest, protos.google.cloud.video.livestream.v1.IListEventsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IEvent>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListEventsRequest
callback PaginationCallback<protos.google.cloud.video.livestream.v1.IListEventsRequest, protos.google.cloud.video.livestream.v1.IListEventsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IEvent>
Returns
TypeDescription
void

listEventsAsync(request, options)

listEventsAsync(request?: protos.google.cloud.video.livestream.v1.IListEventsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.video.livestream.v1.IEvent>;

Equivalent to listEvents, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListEventsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.video.livestream.v1.IEvent>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Event]. 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 channel for the resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of items to return. If unspecified, server
   *  will pick an appropriate default. Server may return fewer items than
   *  requested. A caller should only rely on response's
   *  next_page_token google.cloud.video.livestream.v1.ListEventsResponse.next_page_token  to
   *  determine if there are more items left to be queried.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous List request, if any.
   */
  // const pageToken = 'abc123'
  /**
   *  The filter to apply to list results.
   */
  // const filter = 'abc123'
  /**
   *  Specifies the ordering of results following syntax at
   *  https://cloud.google.com/apis/design/design_patterns#sorting_order.
   */
  // const orderBy = 'abc123'

  // Imports the Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callListEvents();

listEventsStream(request, options)

listEventsStream(request?: protos.google.cloud.video.livestream.v1.IListEventsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListEventsRequest

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 [Event] 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 listEventsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listInputs(request, options)

listInputs(request?: protos.google.cloud.video.livestream.v1.IListInputsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.video.livestream.v1.IInput[],
        protos.google.cloud.video.livestream.v1.IListInputsRequest | null,
        protos.google.cloud.video.livestream.v1.IListInputsResponse
    ]>;

Returns a list of all inputs in the specified region.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListInputsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.video.livestream.v1.IInput[], protos.google.cloud.video.livestream.v1.IListInputsRequest | null, protos.google.cloud.video.livestream.v1.IListInputsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Input]. 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 listInputsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listInputs(request, options, callback)

listInputs(request: protos.google.cloud.video.livestream.v1.IListInputsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListInputsRequest, protos.google.cloud.video.livestream.v1.IListInputsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IInput>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListInputsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.video.livestream.v1.IListInputsRequest, protos.google.cloud.video.livestream.v1.IListInputsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IInput>
Returns
TypeDescription
void

listInputs(request, callback)

listInputs(request: protos.google.cloud.video.livestream.v1.IListInputsRequest, callback: PaginationCallback<protos.google.cloud.video.livestream.v1.IListInputsRequest, protos.google.cloud.video.livestream.v1.IListInputsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IInput>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListInputsRequest
callback PaginationCallback<protos.google.cloud.video.livestream.v1.IListInputsRequest, protos.google.cloud.video.livestream.v1.IListInputsResponse | null | undefined, protos.google.cloud.video.livestream.v1.IInput>
Returns
TypeDescription
void

listInputsAsync(request, options)

listInputsAsync(request?: protos.google.cloud.video.livestream.v1.IListInputsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.video.livestream.v1.IInput>;

Equivalent to listInputs, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListInputsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.video.livestream.v1.IInput>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Input]. 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 for the resource, in the form of:
   *  `projects/{project}/locations/{location}`.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of items to return. If unspecified, server
   *  will pick an appropriate default. Server may return fewer items than
   *  requested. A caller should only rely on response's
   *  next_page_token google.cloud.video.livestream.v1.ListInputsResponse.next_page_token  to
   *  determine if there are more items left to be queried.
   */
  // const pageSize = 1234
  /**
   *  The next_page_token value returned from a previous List request, if any.
   */
  // const pageToken = 'abc123'
  /**
   *  The filter to apply to list results.
   */
  // const filter = 'abc123'
  /**
   *  Specifies the ordering of results following syntax at Sorting
   *  Order (https://cloud.google.com/apis/design/design_patterns#sorting_order).
   */
  // const orderBy = 'abc123'

  // Imports the Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callListInputs();

listInputsStream(request, options)

listInputsStream(request?: protos.google.cloud.video.livestream.v1.IListInputsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IListInputsRequest

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 [Input] 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 listInputsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

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.

matchChannelFromChannelName(channelName)

matchChannelFromChannelName(channelName: string): string | number;

Parse the channel from Channel resource.

Parameter
NameDescription
channelName string

A fully-qualified path representing Channel resource.

Returns
TypeDescription
string | number

{string} A string representing the channel.

matchChannelFromEventName(eventName)

matchChannelFromEventName(eventName: string): string | number;

Parse the channel from Event resource.

Parameter
NameDescription
eventName string

A fully-qualified path representing Event resource.

Returns
TypeDescription
string | number

{string} A string representing the channel.

matchEventFromEventName(eventName)

matchEventFromEventName(eventName: string): string | number;

Parse the event from Event resource.

Parameter
NameDescription
eventName string

A fully-qualified path representing Event resource.

Returns
TypeDescription
string | number

{string} A string representing the event.

matchInputFromInputName(inputName)

matchInputFromInputName(inputName: string): string | number;

Parse the input from Input resource.

Parameter
NameDescription
inputName string

A fully-qualified path representing Input resource.

Returns
TypeDescription
string | number

{string} A string representing the input.

matchLocationFromChannelName(channelName)

matchLocationFromChannelName(channelName: string): string | number;

Parse the location from Channel resource.

Parameter
NameDescription
channelName string

A fully-qualified path representing Channel resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromEventName(eventName)

matchLocationFromEventName(eventName: string): string | number;

Parse the location from Event resource.

Parameter
NameDescription
eventName string

A fully-qualified path representing Event resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromInputName(inputName)

matchLocationFromInputName(inputName: string): string | number;

Parse the location from Input resource.

Parameter
NameDescription
inputName string

A fully-qualified path representing Input 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.

matchProjectFromChannelName(channelName)

matchProjectFromChannelName(channelName: string): string | number;

Parse the project from Channel resource.

Parameter
NameDescription
channelName string

A fully-qualified path representing Channel resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromEventName(eventName)

matchProjectFromEventName(eventName: string): string | number;

Parse the project from Event resource.

Parameter
NameDescription
eventName string

A fully-qualified path representing Event resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromInputName(inputName)

matchProjectFromInputName(inputName: string): string | number;

Parse the project from Input resource.

Parameter
NameDescription
inputName string

A fully-qualified path representing Input 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.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
NameDescription
projectName string

A fully-qualified path representing Project resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
NameDescription
project string
Returns
TypeDescription
string

{string} Resource name string.

startChannel(request, options)

startChannel(request?: protos.google.cloud.video.livestream.v1.IStartChannelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IStartChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 channel resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}`.
   */
  // const name = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callStartChannel();

startChannel(request, options, callback)

startChannel(request: protos.google.cloud.video.livestream.v1.IStartChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IStartChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startChannel(request, callback)

startChannel(request: protos.google.cloud.video.livestream.v1.IStartChannelRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IStartChannelRequest
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopChannel(request, options)

stopChannel(request?: protos.google.cloud.video.livestream.v1.IStopChannelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IStopChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 channel resource, in the form of:
   *  `projects/{project}/locations/{location}/channels/{channelId}`.
   */
  // const name = 'abc123'
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

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

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

  callStopChannel();

stopChannel(request, options, callback)

stopChannel(request: protos.google.cloud.video.livestream.v1.IStopChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IStopChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

stopChannel(request, callback)

stopChannel(request: protos.google.cloud.video.livestream.v1.IStopChannelRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IStopChannelRequest
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannelOperationResponse, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateChannel(request, options)

updateChannel(request?: protos.google.cloud.video.livestream.v1.IUpdateChannelRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the specified channel.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IUpdateChannelRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the Channel
   *  resource by the update. You can only update the following fields:
   *  * `inputAttachments` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment)
   *  * `output` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output)
   *  * `elementaryStreams` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#ElementaryStream)
   *  * `muxStreams` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream)
   *  * `manifests` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#Manifest)
   *  * `spritesheets` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet)
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   */
  // const updateMask = {}
  /**
   *  Required. The channel resource to be updated.
   */
  // const channel = {}
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

  async function callUpdateChannel() {
    // Construct request
    const request = {
      channel,
    };

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

  callUpdateChannel();

updateChannel(request, options, callback)

updateChannel(request: protos.google.cloud.video.livestream.v1.IUpdateChannelRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IUpdateChannelRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateChannel(request, callback)

updateChannel(request: protos.google.cloud.video.livestream.v1.IUpdateChannelRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IUpdateChannelRequest
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IChannel, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateInput(request, options)

updateInput(request?: protos.google.cloud.video.livestream.v1.IUpdateInputRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the specified input.

Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IUpdateInputRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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.
   */
  /**
   *  Field mask is used to specify the fields to be overwritten in the Input
   *  resource by the update. You can only update the following fields:
   *  * `preprocessingConfig` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig)
   *  * `securityRules` (https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule)
   *  The fields specified in the update_mask are relative to the resource, not
   *  the full request. A field will be overwritten if it is in the mask.
   */
  // const updateMask = {}
  /**
   *  Required. The input resource to be updated.
   */
  // const input = {}
  /**
   *  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 Livestream library
  const {LivestreamServiceClient} = require('@google-cloud/livestream').v1;

  // Instantiates a client
  const livestreamClient = new LivestreamServiceClient();

  async function callUpdateInput() {
    // Construct request
    const request = {
      input,
    };

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

  callUpdateInput();

updateInput(request, options, callback)

updateInput(request: protos.google.cloud.video.livestream.v1.IUpdateInputRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IUpdateInputRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateInput(request, callback)

updateInput(request: protos.google.cloud.video.livestream.v1.IUpdateInputRequest, callback: Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.video.livestream.v1.IUpdateInputRequest
callback Callback<LROperation<protos.google.cloud.video.livestream.v1.IInput, protos.google.cloud.video.livestream.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void