Google Cloud Video Stitcher V1 Client - Class VideoStitcherServiceClient (0.3.4)

Reference documentation and code samples for the Google Cloud Video Stitcher V1 Client class VideoStitcherServiceClient.

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

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:

$videoStitcherServiceClient = new VideoStitcherServiceClient();
try {
    $formattedParent = $videoStitcherServiceClient->locationName('[PROJECT]', '[LOCATION]');
    $cdnKey = new CdnKey();
    $cdnKeyId = 'cdn_key_id';
    $response = $videoStitcherServiceClient->createCdnKey($formattedParent, $cdnKey, $cdnKeyId);
} finally {
    $videoStitcherServiceClient->close();
}

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.

Methods

cdnKeyName

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

Parameters
NameDescription
project string
location string
cdnKey string
Returns
TypeDescription
stringThe formatted cdn_key resource.

liveAdTagDetailName

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

Parameters
NameDescription
project string
location string
liveSession string
liveAdTagDetail string
Returns
TypeDescription
stringThe formatted live_ad_tag_detail resource.

liveSessionName

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

Parameters
NameDescription
project string
location string
liveSession string
Returns
TypeDescription
stringThe formatted live_session resource.

locationName

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

Parameters
NameDescription
project string
location string
Returns
TypeDescription
stringThe formatted location resource.

slateName

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

Parameters
NameDescription
project string
location string
slate string
Returns
TypeDescription
stringThe formatted slate resource.

vodAdTagDetailName

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

Parameters
NameDescription
project string
location string
vodSession string
vodAdTagDetail string
Returns
TypeDescription
stringThe formatted vod_ad_tag_detail resource.

vodSessionName

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

Parameters
NameDescription
project string
location string
vodSession string
Returns
TypeDescription
stringThe formatted vod_session resource.

vodStitchDetailName

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

Parameters
NameDescription
project string
location string
vodSession string
vodStitchDetail string
Returns
TypeDescription
stringThe formatted vod_stitch_detail resource.

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

  • cdnKey: projects/{project}/locations/{location}/cdnKeys/{cdn_key}
  • liveAdTagDetail: projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}
  • liveSession: projects/{project}/locations/{location}/liveSessions/{live_session}
  • location: projects/{project}/locations/{location}
  • slate: projects/{project}/locations/{location}/slates/{slate}
  • vodAdTagDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}
  • vodSession: projects/{project}/locations/{location}/vodSessions/{vod_session}
  • vodStitchDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}

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
NameDescription
formattedName string

The formatted name string

template string

Optional name of template to match

Returns
TypeDescription
arrayAn associative array from name component IDs to component values.

__construct

Constructor.

Parameters
NameDescription
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.

createCdnKey

Creates a new CDN key.

Parameters
NameDescription
parent string

Required. The project in which the CDN key should be created, in the form of projects/{project_number}/locations/{location}.

cdnKey Google\Cloud\Video\Stitcher\V1\CdnKey

Required. The CDN key resource to create.

cdnKeyId string

Required. The ID to use for the CDN key, which will become the final component of the CDN key's resource name.

This value should conform to RFC-1034, which restricts to lower-case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\CdnKey
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\CdnKey;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedParent The project in which the CDN key should be created, in the form of
 *                                `projects/{project_number}/locations/{location}`. Please see
 *                                {@see VideoStitcherServiceClient::locationName()} for help formatting this field.
 * @param string $cdnKeyId        The ID to use for the CDN key, which will become the final component of
 *                                the CDN key's resource name.
 *
 *                                This value should conform to RFC-1034, which restricts to
 *                                lower-case letters, numbers, and hyphen, with the first character a
 *                                letter, the last a letter or a number, and a 63 character maximum.
 */
function create_cdn_key_sample(string $formattedParent, string $cdnKeyId): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

    // Prepare any non-scalar elements to be passed along with the request.
    $cdnKey = new CdnKey();

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

/**
 * 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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $cdnKeyId = '[CDN_KEY_ID]';

    create_cdn_key_sample($formattedParent, $cdnKeyId);
}

createLiveSession

Creates a new live session.

Parameters
NameDescription
parent string

Required. The project and location in which the live session should be created, in the form of projects/{project_number}/locations/{location}.

liveSession Google\Cloud\Video\Stitcher\V1\LiveSession

Required. Parameters for creating a live session.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\LiveSession
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\LiveSession;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedParent The project and location in which the live session should be created,
 *                                in the form of `projects/{project_number}/locations/{location}`. Please see
 *                                {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field.
 */
function create_live_session_sample(string $formattedParent): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

    // Prepare any non-scalar elements to be passed along with the request.
    $liveSession = new LiveSession();

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

/**
 * 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 = VideoStitcherServiceClient::liveSessionName(
        '[PROJECT]',
        '[LOCATION]',
        '[LIVE_SESSION]'
    );

    create_live_session_sample($formattedParent);
}

createSlate

Creates a slate.

Parameters
NameDescription
parent string

Required. The project in which the slate should be created, in the form of projects/{project_number}.

slateId string

Required. The unique identifier for the slate. This value should conform to RFC-1034, which restricts to lower-case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.

slate Google\Cloud\Video\Stitcher\V1\Slate

Required. The slate to create.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\Slate
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\Slate;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedParent The project in which the slate should be created, in the form of
 *                                `projects/{project_number}`. Please see
 *                                {@see VideoStitcherServiceClient::locationName()} for help formatting this field.
 * @param string $slateId         The unique identifier for the slate.
 *                                This value should conform to RFC-1034, which restricts to
 *                                lower-case letters, numbers, and hyphen, with the first character a
 *                                letter, the last a letter or a number, and a 63 character maximum.
 */
function create_slate_sample(string $formattedParent, string $slateId): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

    // Prepare any non-scalar elements to be passed along with the request.
    $slate = new Slate();

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

/**
 * 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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $slateId = '[SLATE_ID]';

    create_slate_sample($formattedParent, $slateId);
}

createVodSession

Creates a client side playback VOD session and returns the full tracking and playback metadata of the session.

Parameters
NameDescription
parent string

Required. The project and location in which the VOD session should be created, in the form of projects/{project_number}/locations/{location}.

vodSession Google\Cloud\Video\Stitcher\V1\VodSession

Required. Parameters for creating a session.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\VodSession
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\VodSession;

/**
 * @param string $formattedParent     The project and location in which the VOD session should be created, in the
 *                                    form of `projects/{project_number}/locations/{location}`. Please see
 *                                    {@see VideoStitcherServiceClient::locationName()} for help formatting this field.
 * @param string $vodSessionSourceUri URI of the media to stitch.
 * @param string $vodSessionAdTagUri  Ad tag URI.
 */
function create_vod_session_sample(
    string $formattedParent,
    string $vodSessionSourceUri,
    string $vodSessionAdTagUri
): void {
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

    // Prepare any non-scalar elements to be passed along with the request.
    $vodSession = (new VodSession())
        ->setSourceUri($vodSessionSourceUri)
        ->setAdTagUri($vodSessionAdTagUri);

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

/**
 * 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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]');
    $vodSessionSourceUri = '[SOURCE_URI]';
    $vodSessionAdTagUri = '[AD_TAG_URI]';

    create_vod_session_sample($formattedParent, $vodSessionSourceUri, $vodSessionAdTagUri);
}

deleteCdnKey

Deletes the specified CDN key.

Parameters
NameDescription
name string

Required. The name of the CDN key to be deleted, in the form of projects/{project_number}/locations/{location}/cdnKeys/{id}.

optionalArgs 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\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedName The name of the CDN key to be deleted, in the form of
 *                              `projects/{project_number}/locations/{location}/cdnKeys/{id}`. Please see
 *                              {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field.
 */
function delete_cdn_key_sample(string $formattedName): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

/**
 * 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 = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]');

    delete_cdn_key_sample($formattedName);
}

deleteSlate

Deletes the specified slate.

Parameters
NameDescription
name string

Required. The name of the slate to be deleted, in the form of projects/{project_number}/locations/{location}/slates/{id}.

optionalArgs 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\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedName The name of the slate to be deleted, in the form of
 *                              `projects/{project_number}/locations/{location}/slates/{id}`. Please see
 *                              {@see VideoStitcherServiceClient::slateName()} for help formatting this field.
 */
function delete_slate_sample(string $formattedName): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

/**
 * 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 = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]');

    delete_slate_sample($formattedName);
}

getCdnKey

Returns the specified CDN key.

Parameters
NameDescription
name string

Required. The name of the CDN key to be retrieved, in the form of projects/{project}/locations/{location}/cdnKeys/{id}.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\CdnKey
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\CdnKey;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedName The name of the CDN key to be retrieved, in the form of
 *                              `projects/{project}/locations/{location}/cdnKeys/{id}`. Please see
 *                              {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field.
 */
function get_cdn_key_sample(string $formattedName): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

/**
 * 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 = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]');

    get_cdn_key_sample($formattedName);
}

getLiveAdTagDetail

Returns the specified ad tag detail for the specified live session.

Parameters
NameDescription
name string

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

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedName The resource name in the form of
 *                              `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. Please see
 *                              {@see VideoStitcherServiceClient::liveAdTagDetailName()} for help formatting this field.
 */
function get_live_ad_tag_detail_sample(string $formattedName): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

/**
 * 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 = VideoStitcherServiceClient::liveAdTagDetailName(
        '[PROJECT]',
        '[LOCATION]',
        '[LIVE_SESSION]',
        '[LIVE_AD_TAG_DETAIL]'
    );

    get_live_ad_tag_detail_sample($formattedName);
}

getLiveSession

Returns the details for the specified live session.

Parameters
NameDescription
name string

Required. The name of the live session, in the form of projects/{project_number}/locations/{location}/liveSessions/{id}.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\LiveSession
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\LiveSession;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedName The name of the live session, in the form of
 *                              `projects/{project_number}/locations/{location}/liveSessions/{id}`. Please see
 *                              {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field.
 */
function get_live_session_sample(string $formattedName): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

/**
 * 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 = VideoStitcherServiceClient::liveSessionName(
        '[PROJECT]',
        '[LOCATION]',
        '[LIVE_SESSION]'
    );

    get_live_session_sample($formattedName);
}

getSlate

Returns the specified slate.

Parameters
NameDescription
name string

Required. The name of the slate to be retrieved, of the slate, in the form of projects/{project_number}/locations/{location}/slates/{id}.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\Slate
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\Slate;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedName The name of the slate to be retrieved, of the slate, in the form of
 *                              `projects/{project_number}/locations/{location}/slates/{id}`. Please see
 *                              {@see VideoStitcherServiceClient::slateName()} for help formatting this field.
 */
function get_slate_sample(string $formattedName): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

/**
 * 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 = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]');

    get_slate_sample($formattedName);
}

getVodAdTagDetail

Returns the specified ad tag detail for the specified VOD session.

Parameters
NameDescription
name string

Required. The name of the ad tag detail for the specified VOD session, in the form of projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\VodAdTagDetail
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\VodAdTagDetail;

/**
 * @param string $formattedName The name of the ad tag detail for the specified VOD session, in the form of
 *                              `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. Please see
 *                              {@see VideoStitcherServiceClient::vodAdTagDetailName()} for help formatting this field.
 */
function get_vod_ad_tag_detail_sample(string $formattedName): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

/**
 * 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 = VideoStitcherServiceClient::vodAdTagDetailName(
        '[PROJECT]',
        '[LOCATION]',
        '[VOD_SESSION]',
        '[VOD_AD_TAG_DETAIL]'
    );

    get_vod_ad_tag_detail_sample($formattedName);
}

getVodSession

Returns the full tracking, playback metadata, and relevant ad-ops logs for the specified VOD session.

Parameters
NameDescription
name string

Required. The name of the VOD session to be retrieved, in the form of projects/{project_number}/locations/{location}/vodSessions/{id}.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\VodSession
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\VodSession;

/**
 * @param string $formattedName The name of the VOD session to be retrieved, in the form of
 *                              `projects/{project_number}/locations/{location}/vodSessions/{id}`. Please see
 *                              {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field.
 */
function get_vod_session_sample(string $formattedName): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

/**
 * 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 = VideoStitcherServiceClient::vodSessionName(
        '[PROJECT]',
        '[LOCATION]',
        '[VOD_SESSION]'
    );

    get_vod_session_sample($formattedName);
}

getVodStitchDetail

Returns the specified stitching information for the specified VOD session.

Parameters
NameDescription
name string

Required. The name of the stitch detail in the specified VOD session, in the form of projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\VodStitchDetail
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\VodStitchDetail;

/**
 * @param string $formattedName The name of the stitch detail in the specified VOD session, in the form of
 *                              `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. Please see
 *                              {@see VideoStitcherServiceClient::vodStitchDetailName()} for help formatting this field.
 */
function get_vod_stitch_detail_sample(string $formattedName): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

/**
 * 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 = VideoStitcherServiceClient::vodStitchDetailName(
        '[PROJECT]',
        '[LOCATION]',
        '[VOD_SESSION]',
        '[VOD_STITCH_DETAIL]'
    );

    get_vod_stitch_detail_sample($formattedName);
}

listCdnKeys

Lists all CDN keys in the specified project and location.

Parameters
NameDescription
parent string

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

optionalArgs array

Optional.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ filter string

Filtering results

↳ orderBy string

Hint for how to order the results

↳ 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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\Stitcher\V1\CdnKey;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedParent The project that contains the list of CDN keys, in the form of
 *                                `projects/{project_number}/locations/{location}`. Please see
 *                                {@see VideoStitcherServiceClient::locationName()} for help formatting this field.
 */
function list_cdn_keys_sample(string $formattedParent): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

        /** @var CdnKey $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());
    }
}

/**
 * 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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]');

    list_cdn_keys_sample($formattedParent);
}

listLiveAdTagDetails

Return the list of ad tag details for the specified live session.

Parameters
NameDescription
parent string

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

optionalArgs array

Optional.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ 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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedParent The resource parent in the form of
 *                                `projects/{project}/locations/{location}/liveSessions/{live_session}`. Please see
 *                                {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field.
 */
function list_live_ad_tag_details_sample(string $formattedParent): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

        /** @var LiveAdTagDetail $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());
    }
}

/**
 * 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 = VideoStitcherServiceClient::liveSessionName(
        '[PROJECT]',
        '[LOCATION]',
        '[LIVE_SESSION]'
    );

    list_live_ad_tag_details_sample($formattedParent);
}

listSlates

Lists all slates in the specified project and location.

Parameters
NameDescription
parent string

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

optionalArgs array

Optional.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ filter string

Filtering results

↳ orderBy string

Hint for how to order the results

↳ 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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\Stitcher\V1\Slate;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;

/**
 * @param string $formattedParent The project to list slates, in the form of `projects/{project_number}`. Please see
 *                                {@see VideoStitcherServiceClient::locationName()} for help formatting this field.
 */
function list_slates_sample(string $formattedParent): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

        /** @var Slate $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());
    }
}

/**
 * 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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]');

    list_slates_sample($formattedParent);
}

listVodAdTagDetails

Return the list of ad tag details for the specified VOD session.

Parameters
NameDescription
parent string

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

optionalArgs array

Optional.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ 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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\VodAdTagDetail;

/**
 * @param string $formattedParent The VOD session which the ad tag details belong to, in the form of
 *                                `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. Please see
 *                                {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field.
 */
function list_vod_ad_tag_details_sample(string $formattedParent): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

        /** @var VodAdTagDetail $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());
    }
}

/**
 * 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 = VideoStitcherServiceClient::vodSessionName(
        '[PROJECT]',
        '[LOCATION]',
        '[VOD_SESSION]'
    );

    list_vod_ad_tag_details_sample($formattedParent);
}

listVodStitchDetails

Returns a list of detailed stitching information of the specified VOD session.

Parameters
NameDescription
parent string

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

optionalArgs array

Optional.

↳ pageSize int

The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.

↳ pageToken string

A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.

↳ 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
TypeDescription
Google\ApiCore\PagedListResponse
Example
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;
use Google\Cloud\Video\Stitcher\V1\VodStitchDetail;

/**
 * @param string $formattedParent The VOD session where the stitch details belong to, in the form of
 *                                `projects/{project}/locations/{location}/vodSessions/{id}`. Please see
 *                                {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field.
 */
function list_vod_stitch_details_sample(string $formattedParent): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

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

        /** @var VodStitchDetail $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());
    }
}

/**
 * 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 = VideoStitcherServiceClient::vodSessionName(
        '[PROJECT]',
        '[LOCATION]',
        '[VOD_SESSION]'
    );

    list_vod_stitch_details_sample($formattedParent);
}

updateCdnKey

Updates the specified CDN key. Only update fields specified in the call method body.

Parameters
NameDescription
cdnKey Google\Cloud\Video\Stitcher\V1\CdnKey

Required. The CDN key resource which replaces the resource on the server.

updateMask Google\Protobuf\FieldMask

Required. The update mask applies to the resource. For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\CdnKey
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\CdnKey;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;
use Google\Protobuf\FieldMask;

/**
 * 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_cdn_key_sample(): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

    // Prepare any non-scalar elements to be passed along with the request.
    $cdnKey = new CdnKey();
    $updateMask = new FieldMask();

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

updateSlate

Updates the specified slate.

Parameters
NameDescription
slate Google\Cloud\Video\Stitcher\V1\Slate

Required. The resource with updated fields.

updateMask Google\Protobuf\FieldMask

Required. The update mask which specifies fields which should be updated.

optionalArgs 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
TypeDescription
Google\Cloud\Video\Stitcher\V1\Slate
Example
use Google\ApiCore\ApiException;
use Google\Cloud\Video\Stitcher\V1\Slate;
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;
use Google\Protobuf\FieldMask;

/**
 * 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_slate_sample(): void
{
    // Create a client.
    $videoStitcherServiceClient = new VideoStitcherServiceClient();

    // Prepare any non-scalar elements to be passed along with the request.
    $slate = new Slate();
    $updateMask = new FieldMask();

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

Constants

SERVICE_NAME

Value: 'google.cloud.video.stitcher.v1.VideoStitcherService'

The name of the service.

SERVICE_ADDRESS

Value: 'videostitcher.googleapis.com'

The default address of the service.

DEFAULT_SERVICE_PORT

Value: 443

The default port of the service.

CODEGEN_NAME

Value: 'gapic'

The name of the code generator, to be included in the agent header.