Google Cloud Video Live Stream V1 Client - Class LivestreamServiceClient (1.1.1)

Reference documentation and code samples for the Google Cloud Video Live Stream V1 Client class LivestreamServiceClient.

Service Description: 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).

This class provides the ability to make remote calls to the backing service through method calls that map to API methods.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parseName method to extract the individual identifiers contained within formatted names that are returned by the API.

Namespace

Google \ Cloud \ Video \ LiveStream \ V1 \ Client

Methods

__construct

Constructor.

Parameters
Name Description
options array

Optional. Options for configuring the service API wrapper.

↳ apiEndpoint string

The address of the API remote host. May optionally include the port, formatted as "

↳ credentials string|array|FetchAuthTokenInterface|CredentialsWrapper

The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored.

↳ credentialsConfig array

Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() .

↳ disableRetries bool

Determines whether or not retries defined by the client configuration should be disabled. Defaults to false.

↳ clientConfig string|array

Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder.

↳ transport string|TransportInterface

The transport used for executing network requests. May be either the string rest or grpc. Defaults to grpc if gRPC support is detected on the system. Advanced usage: Additionally, it is possible to pass in an already instantiated Google\ApiCore\Transport\TransportInterface object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored.

↳ transportConfig array

Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options.

↳ clientCertSource callable

A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS.

createAsset

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

The async variant is LivestreamServiceClient::createAssetAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateAssetRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Asset;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\CreateAssetRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedParent The parent location for the resource, in the form of:
 *                                `projects/{project}/locations/{location}`. Please see
 *                                {@see LivestreamServiceClient::locationName()} for help formatting this field.
 * @param string $assetId         The ID of the asset resource to be created.
 *                                This value must be 1-63 characters, begin and end with `[a-z0-9]`,
 *                                could contain dashes (-) in between.
 */
function create_asset_sample(string $formattedParent, string $assetId): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $asset = new Asset();
    $request = (new CreateAssetRequest())
        ->setParent($formattedParent)
        ->setAsset($asset)
        ->setAssetId($assetId);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->createAsset($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Asset $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $assetId = '[ASSET_ID]';

    create_asset_sample($formattedParent, $assetId);
}

createChannel

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

The async variant is LivestreamServiceClient::createChannelAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateChannelRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Channel;
use Google\Cloud\Video\LiveStream\V1\Channel\Output;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\CreateChannelRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedParent The parent location for the resource, in the form of:
 *                                `projects/{project}/locations/{location}`. Please see
 *                                {@see LivestreamServiceClient::locationName()} for help formatting this field.
 * @param string $channelId       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.
 */
function create_channel_sample(string $formattedParent, string $channelId): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $channelOutput = new Output();
    $channel = (new Channel())
        ->setOutput($channelOutput);
    $request = (new CreateChannelRequest())
        ->setParent($formattedParent)
        ->setChannel($channel)
        ->setChannelId($channelId);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->createChannel($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Channel $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $channelId = '[CHANNEL_ID]';

    create_channel_sample($formattedParent, $channelId);
}

createClip

Creates a clip with the provided clip ID in the specified channel.

The async variant is LivestreamServiceClient::createClipAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateClipRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\Clip;
use Google\Cloud\Video\LiveStream\V1\Clip\ClipManifest;
use Google\Cloud\Video\LiveStream\V1\CreateClipRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedParent              The parent resource name, in the following form:
 *                                             `projects/{project}/locations/{location}/channels/{channel}`. Please see
 *                                             {@see LivestreamServiceClient::channelName()} for help formatting this field.
 * @param string $clipId                       Id of the requesting object in the following form:
 *
 *                                             1. 1 character minimum, 63 characters maximum
 *                                             2. Only contains letters, digits, underscores, and hyphens
 * @param string $clipClipManifestsManifestKey A unique key that identifies a manifest config in the parent
 *                                             channel. This key is the same as `channel.manifests.key` for the selected
 *                                             manifest.
 */
function create_clip_sample(
    string $formattedParent,
    string $clipId,
    string $clipClipManifestsManifestKey
): void {
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $clipManifest = (new ClipManifest())
        ->setManifestKey($clipClipManifestsManifestKey);
    $clipClipManifests = [$clipManifest,];
    $clip = (new Clip())
        ->setClipManifests($clipClipManifests);
    $request = (new CreateClipRequest())
        ->setParent($formattedParent)
        ->setClipId($clipId)
        ->setClip($clip);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->createClip($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Clip $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
    $clipId = '[CLIP_ID]';
    $clipClipManifestsManifestKey = '[MANIFEST_KEY]';

    create_clip_sample($formattedParent, $clipId, $clipClipManifestsManifestKey);
}

createEvent

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

The async variant is LivestreamServiceClient::createEventAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateEventRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\Cloud\Video\LiveStream\V1\Event
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\CreateEventRequest;
use Google\Cloud\Video\LiveStream\V1\Event;

/**
 * @param string $formattedParent The parent channel for the resource, in the form of:
 *                                `projects/{project}/locations/{location}/channels/{channelId}`. Please see
 *                                {@see LivestreamServiceClient::channelName()} for help formatting this field.
 * @param string $eventId         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.
 */
function create_event_sample(string $formattedParent, string $eventId): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $event = new Event();
    $request = (new CreateEventRequest())
        ->setParent($formattedParent)
        ->setEvent($event)
        ->setEventId($eventId);

    // Call the API and handle any network failures.
    try {
        /** @var Event $response */
        $response = $livestreamServiceClient->createEvent($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');
    $eventId = '[EVENT_ID]';

    create_event_sample($formattedParent, $eventId);
}

createInput

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

The async variant is LivestreamServiceClient::createInputAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateInputRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\CreateInputRequest;
use Google\Cloud\Video\LiveStream\V1\Input;
use Google\Rpc\Status;

/**
 * @param string $formattedParent The parent location for the resource, in the form of:
 *                                `projects/{project}/locations/{location}`. Please see
 *                                {@see LivestreamServiceClient::locationName()} for help formatting this field.
 * @param string $inputId         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.
 */
function create_input_sample(string $formattedParent, string $inputId): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $input = new Input();
    $request = (new CreateInputRequest())
        ->setParent($formattedParent)
        ->setInput($input)
        ->setInputId($inputId);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->createInput($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Input $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $inputId = '[INPUT_ID]';

    create_input_sample($formattedParent, $inputId);
}

deleteAsset

Deletes the specified asset if it is not used.

The async variant is LivestreamServiceClient::deleteAssetAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteAssetRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\DeleteAssetRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The name of the asset resource, in the form of:
 *                              `projects/{project}/locations/{location}/assets/{assetId}`. Please see
 *                              {@see LivestreamServiceClient::assetName()} for help formatting this field.
 */
function delete_asset_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new DeleteAssetRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->deleteAsset($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]');

    delete_asset_sample($formattedName);
}

deleteChannel

Deletes the specified channel.

The async variant is LivestreamServiceClient::deleteChannelAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The name of the channel resource, in the form of:
 *                              `projects/{project}/locations/{location}/channels/{channelId}`. Please see
 *                              {@see LivestreamServiceClient::channelName()} for help formatting this field.
 */
function delete_channel_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new DeleteChannelRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->deleteChannel($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');

    delete_channel_sample($formattedName);
}

deleteClip

Deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in the GCS.

The async variant is LivestreamServiceClient::deleteClipAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteClipRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\DeleteClipRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The name of the clip resource, in the form of:
 *                              `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. Please see
 *                              {@see LivestreamServiceClient::clipName()} for help formatting this field.
 */
function delete_clip_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new DeleteClipRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->deleteClip($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::clipName(
        '[PROJECT]',
        '[LOCATION]',
        '[CHANNEL]',
        '[CLIP]'
    );

    delete_clip_sample($formattedName);
}

deleteEvent

Deletes the specified event.

The async variant is LivestreamServiceClient::deleteEventAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteEventRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\DeleteEventRequest;

/**
 * @param string $formattedName The name of the event resource, in the form of:
 *                              `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see
 *                              {@see LivestreamServiceClient::eventName()} for help formatting this field.
 */
function delete_event_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new DeleteEventRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        $livestreamServiceClient->deleteEvent($request);
        printf('Call completed successfully.' . PHP_EOL);
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::eventName(
        '[PROJECT]',
        '[LOCATION]',
        '[CHANNEL]',
        '[EVENT]'
    );

    delete_event_sample($formattedName);
}

deleteInput

Deletes the specified input.

The async variant is LivestreamServiceClient::deleteInputAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteInputRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\DeleteInputRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The name of the input resource, in the form of:
 *                              `projects/{project}/locations/{location}/inputs/{inputId}`. Please see
 *                              {@see LivestreamServiceClient::inputName()} for help formatting this field.
 */
function delete_input_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new DeleteInputRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->deleteInput($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            printf('Operation completed successfully.' . PHP_EOL);
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]');

    delete_input_sample($formattedName);
}

getAsset

Returns the specified asset.

The async variant is LivestreamServiceClient::getAssetAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetAssetRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\Cloud\Video\LiveStream\V1\Asset
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\LiveStream\V1\Asset;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\GetAssetRequest;

/**
 * @param string $formattedName Name of the resource, in the following form:
 *                              `projects/{project}/locations/{location}/assets/{asset}`. Please see
 *                              {@see LivestreamServiceClient::assetName()} for help formatting this field.
 */
function get_asset_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new GetAssetRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var Asset $response */
        $response = $livestreamServiceClient->getAsset($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]');

    get_asset_sample($formattedName);
}

getChannel

Returns the specified channel.

The async variant is LivestreamServiceClient::getChannelAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetChannelRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\Cloud\Video\LiveStream\V1\Channel
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\LiveStream\V1\Channel;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\GetChannelRequest;

/**
 * @param string $formattedName The name of the channel resource, in the form of:
 *                              `projects/{project}/locations/{location}/channels/{channelId}`. Please see
 *                              {@see LivestreamServiceClient::channelName()} for help formatting this field.
 */
function get_channel_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new GetChannelRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var Channel $response */
        $response = $livestreamServiceClient->getChannel($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');

    get_channel_sample($formattedName);
}

getClip

Returns the specified clip.

The async variant is LivestreamServiceClient::getClipAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetClipRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\Cloud\Video\LiveStream\V1\Clip
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\Clip;
use Google\Cloud\Video\LiveStream\V1\GetClipRequest;

/**
 * @param string $formattedName Name of the resource, in the following form:
 *                              `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. Please see
 *                              {@see LivestreamServiceClient::clipName()} for help formatting this field.
 */
function get_clip_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new GetClipRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var Clip $response */
        $response = $livestreamServiceClient->getClip($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::clipName(
        '[PROJECT]',
        '[LOCATION]',
        '[CHANNEL]',
        '[CLIP]'
    );

    get_clip_sample($formattedName);
}

getEvent

Returns the specified event.

The async variant is LivestreamServiceClient::getEventAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetEventRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\Cloud\Video\LiveStream\V1\Event
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\Event;
use Google\Cloud\Video\LiveStream\V1\GetEventRequest;

/**
 * @param string $formattedName The name of the event resource, in the form of:
 *                              `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see
 *                              {@see LivestreamServiceClient::eventName()} for help formatting this field.
 */
function get_event_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new GetEventRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var Event $response */
        $response = $livestreamServiceClient->getEvent($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::eventName(
        '[PROJECT]',
        '[LOCATION]',
        '[CHANNEL]',
        '[EVENT]'
    );

    get_event_sample($formattedName);
}

getInput

Returns the specified input.

The async variant is LivestreamServiceClient::getInputAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetInputRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\Cloud\Video\LiveStream\V1\Input
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\GetInputRequest;
use Google\Cloud\Video\LiveStream\V1\Input;

/**
 * @param string $formattedName The name of the input resource, in the form of:
 *                              `projects/{project}/locations/{location}/inputs/{inputId}`. Please see
 *                              {@see LivestreamServiceClient::inputName()} for help formatting this field.
 */
function get_input_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new GetInputRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var Input $response */
        $response = $livestreamServiceClient->getInput($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]');

    get_input_sample($formattedName);
}

getPool

Returns the specified pool.

The async variant is LivestreamServiceClient::getPoolAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetPoolRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\Cloud\Video\LiveStream\V1\Pool
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\GetPoolRequest;
use Google\Cloud\Video\LiveStream\V1\Pool;

/**
 * @param string $formattedName The name of the pool resource, in the form of:
 *                              `projects/{project}/locations/{location}/pools/{poolId}`. Please see
 *                              {@see LivestreamServiceClient::poolName()} for help formatting this field.
 */
function get_pool_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new GetPoolRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var Pool $response */
        $response = $livestreamServiceClient->getPool($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::poolName('[PROJECT]', '[LOCATION]', '[POOL]');

    get_pool_sample($formattedName);
}

listAssets

Returns a list of all assets in the specified region.

The async variant is LivestreamServiceClient::listAssetsAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListAssetsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\LiveStream\V1\Asset;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\ListAssetsRequest;

/**
 * @param string $formattedParent The parent location for the resource, in the form of:
 *                                `projects/{project}/locations/{location}`. Please see
 *                                {@see LivestreamServiceClient::locationName()} for help formatting this field.
 */
function list_assets_sample(string $formattedParent): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new ListAssetsRequest())
        ->setParent($formattedParent);

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $livestreamServiceClient->listAssets($request);

        /** @var Asset $element */
        foreach ($response as $element) {
            printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]');

    list_assets_sample($formattedParent);
}

listChannels

Returns a list of all channels in the specified region.

The async variant is LivestreamServiceClient::listChannelsAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListChannelsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\LiveStream\V1\Channel;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\ListChannelsRequest;

/**
 * @param string $formattedParent The parent location for the resource, in the form of:
 *                                `projects/{project}/locations/{location}`. Please see
 *                                {@see LivestreamServiceClient::locationName()} for help formatting this field.
 */
function list_channels_sample(string $formattedParent): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new ListChannelsRequest())
        ->setParent($formattedParent);

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $livestreamServiceClient->listChannels($request);

        /** @var Channel $element */
        foreach ($response as $element) {
            printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]');

    list_channels_sample($formattedParent);
}

listClips

Returns a list of all clips in the specified channel.

The async variant is LivestreamServiceClient::listClipsAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListClipsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\Clip;
use Google\Cloud\Video\LiveStream\V1\ListClipsRequest;

/**
 * @param string $formattedParent Parent value for ListClipsRequest
 *                                Please see {@see LivestreamServiceClient::channelName()} for help formatting this field.
 */
function list_clips_sample(string $formattedParent): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new ListClipsRequest())
        ->setParent($formattedParent);

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $livestreamServiceClient->listClips($request);

        /** @var Clip $element */
        foreach ($response as $element) {
            printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');

    list_clips_sample($formattedParent);
}

listEvents

Returns a list of all events in the specified channel.

The async variant is LivestreamServiceClient::listEventsAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListEventsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\Event;
use Google\Cloud\Video\LiveStream\V1\ListEventsRequest;

/**
 * @param string $formattedParent The parent channel for the resource, in the form of:
 *                                `projects/{project}/locations/{location}/channels/{channelId}`. Please see
 *                                {@see LivestreamServiceClient::channelName()} for help formatting this field.
 */
function list_events_sample(string $formattedParent): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new ListEventsRequest())
        ->setParent($formattedParent);

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $livestreamServiceClient->listEvents($request);

        /** @var Event $element */
        foreach ($response as $element) {
            printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');

    list_events_sample($formattedParent);
}

listInputs

Returns a list of all inputs in the specified region.

The async variant is LivestreamServiceClient::listInputsAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListInputsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\Input;
use Google\Cloud\Video\LiveStream\V1\ListInputsRequest;

/**
 * @param string $formattedParent The parent location for the resource, in the form of:
 *                                `projects/{project}/locations/{location}`. Please see
 *                                {@see LivestreamServiceClient::locationName()} for help formatting this field.
 */
function list_inputs_sample(string $formattedParent): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new ListInputsRequest())
        ->setParent($formattedParent);

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $livestreamServiceClient->listInputs($request);

        /** @var Input $element */
        foreach ($response as $element) {
            printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedParent = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]');

    list_inputs_sample($formattedParent);
}

startChannel

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

The async variant is LivestreamServiceClient::startChannelAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\StartChannelRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\StartChannelRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The name of the channel resource, in the form of:
 *                              `projects/{project}/locations/{location}/channels/{channelId}`. Please see
 *                              {@see LivestreamServiceClient::channelName()} for help formatting this field.
 */
function start_channel_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new StartChannelRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->startChannel($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var ChannelOperationResponse $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');

    start_channel_sample($formattedName);
}

stopChannel

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

The async variant is LivestreamServiceClient::stopChannelAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\StopChannelRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\StopChannelRequest;
use Google\Rpc\Status;

/**
 * @param string $formattedName The name of the channel resource, in the form of:
 *                              `projects/{project}/locations/{location}/channels/{channelId}`. Please see
 *                              {@see LivestreamServiceClient::channelName()} for help formatting this field.
 */
function stop_channel_sample(string $formattedName): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = (new StopChannelRequest())
        ->setName($formattedName);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->stopChannel($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var ChannelOperationResponse $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

/**
 * Helper to execute the sample.
 *
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function callSample(): void
{
    $formattedName = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]');

    stop_channel_sample($formattedName);
}

updateChannel

Updates the specified channel.

The async variant is LivestreamServiceClient::updateChannelAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Channel;
use Google\Cloud\Video\LiveStream\V1\Channel\Output;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest;
use Google\Rpc\Status;

/**
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function update_channel_sample(): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $channelOutput = new Output();
    $channel = (new Channel())
        ->setOutput($channelOutput);
    $request = (new UpdateChannelRequest())
        ->setChannel($channel);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->updateChannel($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Channel $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

updateInput

Updates the specified input.

The async variant is LivestreamServiceClient::updateInputAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\UpdateInputRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\Input;
use Google\Cloud\Video\LiveStream\V1\UpdateInputRequest;
use Google\Rpc\Status;

/**
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function update_input_sample(): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $input = new Input();
    $request = (new UpdateInputRequest())
        ->setInput($input);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->updateInput($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Input $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

updatePool

Updates the specified pool.

The async variant is LivestreamServiceClient::updatePoolAsync() .

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\UpdatePoolRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\OperationResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
use Google\Cloud\Video\LiveStream\V1\Pool;
use Google\Cloud\Video\LiveStream\V1\UpdatePoolRequest;
use Google\Rpc\Status;

/**
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function update_pool_sample(): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $pool = new Pool();
    $request = (new UpdatePoolRequest())
        ->setPool($pool);

    // Call the API and handle any network failures.
    try {
        /** @var OperationResponse $response */
        $response = $livestreamServiceClient->updatePool($request);
        $response->pollUntilComplete();

        if ($response->operationSucceeded()) {
            /** @var Pool $result */
            $result = $response->getResult();
            printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
        } else {
            /** @var Status $error */
            $error = $response->getError();
            printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

getLocation

Gets information about a location.

The async variant is LivestreamServiceClient::getLocationAsync() .

Parameters
Name Description
request Google\Cloud\Location\GetLocationRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\Cloud\Location\Location
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;

/**
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function get_location_sample(): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = new GetLocationRequest();

    // Call the API and handle any network failures.
    try {
        /** @var Location $response */
        $response = $livestreamServiceClient->getLocation($request);
        printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

listLocations

Lists information about the supported locations for this service.

The async variant is LivestreamServiceClient::listLocationsAsync() .

Parameters
Name Description
request Google\Cloud\Location\ListLocationsRequest

A request to house fields associated with the call.

callOptions array

Optional.

↳ retrySettings RetrySettings|array

Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.

Returns
Type Description
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;

/**
 * This sample 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.
 *  - It may require specifying regional endpoints when creating the service client,
 *    please see the apiEndpoint client configuration option for more details.
 */
function list_locations_sample(): void
{
    // Create a client.
    $livestreamServiceClient = new LivestreamServiceClient();

    // Prepare the request message.
    $request = new ListLocationsRequest();

    // Call the API and handle any network failures.
    try {
        /** @var PagedListResponse $response */
        $response = $livestreamServiceClient->listLocations($request);

        /** @var Location $element */
        foreach ($response as $element) {
            printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
        }
    } catch (ApiException $ex) {
        printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
    }
}

createAssetAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateAssetRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createChannelAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateChannelRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createClipAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateClipRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

createEventAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateEventRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Video\LiveStream\V1\Event>

createInputAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\CreateInputRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteAssetAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteAssetRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteChannelAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteClipAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteClipRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

deleteEventAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteEventRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<void>

deleteInputAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\DeleteInputRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

getAssetAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetAssetRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Video\LiveStream\V1\Asset>

getChannelAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetChannelRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Video\LiveStream\V1\Channel>

getClipAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetClipRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Video\LiveStream\V1\Clip>

getEventAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetEventRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Video\LiveStream\V1\Event>

getInputAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetInputRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Video\LiveStream\V1\Input>

getPoolAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\GetPoolRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Video\LiveStream\V1\Pool>

listAssetsAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListAssetsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listChannelsAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListChannelsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listClipsAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListClipsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listEventsAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListEventsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

listInputsAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\ListInputsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

startChannelAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\StartChannelRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

stopChannelAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\StopChannelRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateChannelAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updateInputAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\UpdateInputRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

updatePoolAsync

Parameters
Name Description
request Google\Cloud\Video\LiveStream\V1\UpdatePoolRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse>

getLocationAsync

Parameters
Name Description
request Google\Cloud\Location\GetLocationRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Location\Location>

listLocationsAsync

Parameters
Name Description
request Google\Cloud\Location\ListLocationsRequest
optionalArgs array
Returns
Type Description
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse>

getOperationsClient

Return an OperationsClient object with the same endpoint as $this.

Returns
Type Description
Google\LongRunning\Client\OperationsClient

resumeOperation

Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.

Parameters
Name Description
operationName string

The name of the long running operation

methodName string

The name of the method used to start the operation

Returns
Type Description
Google\ApiCore\OperationResponse

static::assetName

Formats a string containing the fully-qualified path to represent a asset resource.

Parameters
Name Description
project string
location string
asset string
Returns
Type Description
string The formatted asset resource.

static::channelName

Formats a string containing the fully-qualified path to represent a channel resource.

Parameters
Name Description
project string
location string
channel string
Returns
Type Description
string The formatted channel resource.

static::clipName

Formats a string containing the fully-qualified path to represent a clip resource.

Parameters
Name Description
project string
location string
channel string
clip string
Returns
Type Description
string The formatted clip resource.

static::eventName

Formats a string containing the fully-qualified path to represent a event resource.

Parameters
Name Description
project string
location string
channel string
event string
Returns
Type Description
string The formatted event resource.

static::inputName

Formats a string containing the fully-qualified path to represent a input resource.

Parameters
Name Description
project string
location string
input string
Returns
Type Description
string The formatted input resource.

static::locationName

Formats a string containing the fully-qualified path to represent a location resource.

Parameters
Name Description
project string
location string
Returns
Type Description
string The formatted location resource.

static::networkName

Formats a string containing the fully-qualified path to represent a network resource.

Parameters
Name Description
project string
network string
Returns
Type Description
string The formatted network resource.

static::poolName

Formats a string containing the fully-qualified path to represent a pool resource.

Parameters
Name Description
project string
location string
pool string
Returns
Type Description
string The formatted pool resource.

static::secretVersionName

Formats a string containing the fully-qualified path to represent a secret_version resource.

Parameters
Name Description
project string
secret string
version string
Returns
Type Description
string The formatted secret_version resource.

static::parseName

Parses a formatted name string and returns an associative array of the components in the name.

The following name formats are supported: Template: Pattern

  • asset: projects/{project}/locations/{location}/assets/{asset}
  • channel: projects/{project}/locations/{location}/channels/{channel}
  • clip: projects/{project}/locations/{location}/channels/{channel}/clips/{clip}
  • event: projects/{project}/locations/{location}/channels/{channel}/events/{event}
  • input: projects/{project}/locations/{location}/inputs/{input}
  • location: projects/{project}/locations/{location}
  • network: projects/{project}/global/networks/{network}
  • pool: projects/{project}/locations/{location}/pools/{pool}
  • secretVersion: projects/{project}/secrets/{secret}/versions/{version}

The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.

Parameters
Name Description
formattedName string

The formatted name string

template string

Optional name of template to match

Returns
Type Description
array An associative array from name component IDs to component values.