Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class LiveVideoAnalyticsClient.
Service Description: Service describing handlers for resources. The service enables clients to run Live Video Analytics (LVA) on the streaming inputs.
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 \ VisionAI \ V1 \ ClientMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
options |
array|Google\ApiCore\Options\ClientOptions
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 |
FetchAuthTokenInterface|CredentialsWrapper
This option should only be used with a pre-constructed Google\Auth\FetchAuthTokenInterface or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. Important: If you are providing a path to a credentials file, or a decoded credentials file as a PHP array, this usage is now DEPRECATED. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. It is recommended to create the credentials explicitly |
↳ 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 |
↳ 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 |
↳ 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. |
↳ logger |
false|LoggerInterface
A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
↳ universeDomain |
string
The service domain for the client. Defaults to 'googleapis.com'. |
batchRunProcess
Run all of the processes to "completion". Max time for each process is the LRO time limit.
The async variant is LiveVideoAnalyticsClient::batchRunProcessAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\BatchRunProcessRequest
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<Google\Cloud\VisionAI\V1\BatchRunProcessResponse> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\BatchRunProcessRequest;
use Google\Cloud\VisionAI\V1\BatchRunProcessResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\CreateProcessRequest;
use Google\Cloud\VisionAI\V1\Process;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent resource shared by all processes being created. Please see
* {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field.
* @param string $formattedRequestsParent Value for parent. Please see
* {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field.
* @param string $requestsProcessId Id of the requesting object.
* @param string $formattedRequestsProcessAnalysis Reference to an existing Analysis resource. Please see
* {@see LiveVideoAnalyticsClient::analysisName()} for help formatting this field.
*/
function batch_run_process_sample(
string $formattedParent,
string $formattedRequestsParent,
string $requestsProcessId,
string $formattedRequestsProcessAnalysis
): void {
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$requestsProcess = (new Process())
->setAnalysis($formattedRequestsProcessAnalysis);
$createProcessRequest = (new CreateProcessRequest())
->setParent($formattedRequestsParent)
->setProcessId($requestsProcessId)
->setProcess($requestsProcess);
$requests = [$createProcessRequest,];
$request = (new BatchRunProcessRequest())
->setParent($formattedParent)
->setRequests($requests);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->batchRunProcess($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var BatchRunProcessResponse $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]');
$formattedRequestsParent = LiveVideoAnalyticsClient::clusterName(
'[PROJECT]',
'[LOCATION]',
'[CLUSTER]'
);
$requestsProcessId = '[PROCESS_ID]';
$formattedRequestsProcessAnalysis = LiveVideoAnalyticsClient::analysisName(
'[PROJECT]',
'[LOCATION]',
'[CLUSTER]',
'[ANALYSIS]'
);
batch_run_process_sample(
$formattedParent,
$formattedRequestsParent,
$requestsProcessId,
$formattedRequestsProcessAnalysis
);
}
createAnalysis
Creates a new Analysis in a given project and location.
The async variant is LiveVideoAnalyticsClient::createAnalysisAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\CreateAnalysisRequest
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<Google\Cloud\VisionAI\V1\Analysis> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\Analysis;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\CreateAnalysisRequest;
use Google\Rpc\Status;
/**
* @param string $formattedParent Value for parent. Please see
* {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field.
* @param string $analysisId Id of the requesting object.
*/
function create_analysis_sample(string $formattedParent, string $analysisId): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$analysis = new Analysis();
$request = (new CreateAnalysisRequest())
->setParent($formattedParent)
->setAnalysisId($analysisId)
->setAnalysis($analysis);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->createAnalysis($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Analysis $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]');
$analysisId = '[ANALYSIS_ID]';
create_analysis_sample($formattedParent, $analysisId);
}
createOperator
Creates a new Operator in a given project and location.
The async variant is LiveVideoAnalyticsClient::createOperatorAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\CreateOperatorRequest
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<Google\Cloud\VisionAI\V1\Operator> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\CreateOperatorRequest;
use Google\Cloud\VisionAI\V1\Operator;
use Google\Rpc\Status;
/**
* @param string $formattedParent Value for parent. Please see
* {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field.
* @param string $operatorId Id of the requesting object.
*/
function create_operator_sample(string $formattedParent, string $operatorId): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$operator = new Operator();
$request = (new CreateOperatorRequest())
->setParent($formattedParent)
->setOperatorId($operatorId)
->setOperator($operator);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->createOperator($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Operator $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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]');
$operatorId = '[OPERATOR_ID]';
create_operator_sample($formattedParent, $operatorId);
}
createProcess
Creates a new Process in a given project and location.
The async variant is LiveVideoAnalyticsClient::createProcessAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\CreateProcessRequest
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<Google\Cloud\VisionAI\V1\Process> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\CreateProcessRequest;
use Google\Cloud\VisionAI\V1\Process;
use Google\Rpc\Status;
/**
* @param string $formattedParent Value for parent. Please see
* {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field.
* @param string $processId Id of the requesting object.
* @param string $formattedProcessAnalysis Reference to an existing Analysis resource. Please see
* {@see LiveVideoAnalyticsClient::analysisName()} for help formatting this field.
*/
function create_process_sample(
string $formattedParent,
string $processId,
string $formattedProcessAnalysis
): void {
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$process = (new Process())
->setAnalysis($formattedProcessAnalysis);
$request = (new CreateProcessRequest())
->setParent($formattedParent)
->setProcessId($processId)
->setProcess($process);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->createProcess($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Process $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]');
$processId = '[PROCESS_ID]';
$formattedProcessAnalysis = LiveVideoAnalyticsClient::analysisName(
'[PROJECT]',
'[LOCATION]',
'[CLUSTER]',
'[ANALYSIS]'
);
create_process_sample($formattedParent, $processId, $formattedProcessAnalysis);
}
deleteAnalysis
Deletes a single Analysis.
The async variant is LiveVideoAnalyticsClient::deleteAnalysisAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\DeleteAnalysisRequest
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<null> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\DeleteAnalysisRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName Name of the resource. Please see
* {@see LiveVideoAnalyticsClient::analysisName()} for help formatting this field.
*/
function delete_analysis_sample(string $formattedName): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new DeleteAnalysisRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->deleteAnalysis($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 = LiveVideoAnalyticsClient::analysisName(
'[PROJECT]',
'[LOCATION]',
'[CLUSTER]',
'[ANALYSIS]'
);
delete_analysis_sample($formattedName);
}
deleteOperator
Deletes a single Operator.
The async variant is LiveVideoAnalyticsClient::deleteOperatorAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\DeleteOperatorRequest
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<null> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\DeleteOperatorRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName Name of the resource
* Please see {@see LiveVideoAnalyticsClient::operatorName()} for help formatting this field.
*/
function delete_operator_sample(string $formattedName): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new DeleteOperatorRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->deleteOperator($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 = LiveVideoAnalyticsClient::operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]');
delete_operator_sample($formattedName);
}
deleteProcess
Deletes a single Process.
The async variant is LiveVideoAnalyticsClient::deleteProcessAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\DeleteProcessRequest
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<null> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\DeleteProcessRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName Name of the resource. Please see
* {@see LiveVideoAnalyticsClient::processName()} for help formatting this field.
*/
function delete_process_sample(string $formattedName): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new DeleteProcessRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->deleteProcess($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 = LiveVideoAnalyticsClient::processName(
'[PROJECT]',
'[LOCATION]',
'[CLUSTER]',
'[PROCESS]'
);
delete_process_sample($formattedName);
}
getAnalysis
Gets details of a single Analysis.
The async variant is LiveVideoAnalyticsClient::getAnalysisAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\GetAnalysisRequest
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\VisionAI\V1\Analysis |
|
use Google\ApiCore\ApiException;
use Google\Cloud\VisionAI\V1\Analysis;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\GetAnalysisRequest;
/**
* @param string $formattedName Name of the resource. Please see
* {@see LiveVideoAnalyticsClient::analysisName()} for help formatting this field.
*/
function get_analysis_sample(string $formattedName): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new GetAnalysisRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Analysis $response */
$response = $liveVideoAnalyticsClient->getAnalysis($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 = LiveVideoAnalyticsClient::analysisName(
'[PROJECT]',
'[LOCATION]',
'[CLUSTER]',
'[ANALYSIS]'
);
get_analysis_sample($formattedName);
}
getOperator
Gets details of a single Operator.
The async variant is LiveVideoAnalyticsClient::getOperatorAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\GetOperatorRequest
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\VisionAI\V1\Operator |
|
use Google\ApiCore\ApiException;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\GetOperatorRequest;
use Google\Cloud\VisionAI\V1\Operator;
/**
* @param string $formattedName Name of the resource. Please see
* {@see LiveVideoAnalyticsClient::operatorName()} for help formatting this field.
*/
function get_operator_sample(string $formattedName): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new GetOperatorRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Operator $response */
$response = $liveVideoAnalyticsClient->getOperator($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 = LiveVideoAnalyticsClient::operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]');
get_operator_sample($formattedName);
}
getProcess
Gets details of a single Process.
The async variant is LiveVideoAnalyticsClient::getProcessAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\GetProcessRequest
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\VisionAI\V1\Process |
|
use Google\ApiCore\ApiException;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\GetProcessRequest;
use Google\Cloud\VisionAI\V1\Process;
/**
* @param string $formattedName Name of the resource. Please see
* {@see LiveVideoAnalyticsClient::processName()} for help formatting this field.
*/
function get_process_sample(string $formattedName): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new GetProcessRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Process $response */
$response = $liveVideoAnalyticsClient->getProcess($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 = LiveVideoAnalyticsClient::processName(
'[PROJECT]',
'[LOCATION]',
'[CLUSTER]',
'[PROCESS]'
);
get_process_sample($formattedName);
}
listAnalyses
Lists Analyses in a given project and location.
The async variant is LiveVideoAnalyticsClient::listAnalysesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ListAnalysesRequest
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 |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\VisionAI\V1\Analysis;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\ListAnalysesRequest;
/**
* @param string $formattedParent Parent value for ListAnalysesRequest
* Please see {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field.
*/
function list_analyses_sample(string $formattedParent): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new ListAnalysesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $liveVideoAnalyticsClient->listAnalyses($request);
/** @var Analysis $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]');
list_analyses_sample($formattedParent);
}
listOperators
Lists Operators in a given project and location.
The async variant is LiveVideoAnalyticsClient::listOperatorsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ListOperatorsRequest
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 |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\ListOperatorsRequest;
use Google\Cloud\VisionAI\V1\Operator;
/**
* @param string $formattedParent Parent value for ListOperatorsRequest. Please see
* {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field.
*/
function list_operators_sample(string $formattedParent): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new ListOperatorsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $liveVideoAnalyticsClient->listOperators($request);
/** @var Operator $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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]');
list_operators_sample($formattedParent);
}
listProcesses
Lists Processes in a given project and location.
The async variant is LiveVideoAnalyticsClient::listProcessesAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ListProcessesRequest
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 |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\ListProcessesRequest;
use Google\Cloud\VisionAI\V1\Process;
/**
* @param string $formattedParent Parent value for ListProcessesRequest. Please see
* {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field.
*/
function list_processes_sample(string $formattedParent): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new ListProcessesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $liveVideoAnalyticsClient->listProcesses($request);
/** @var Process $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]');
list_processes_sample($formattedParent);
}
listPublicOperators
ListPublicOperators returns all the operators in public registry.
The async variant is LiveVideoAnalyticsClient::listPublicOperatorsAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ListPublicOperatorsRequest
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 |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\ListPublicOperatorsRequest;
use Google\Cloud\VisionAI\V1\Operator;
/**
* @param string $formattedParent Parent value for ListPublicOperatorsRequest. Please see
* {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field.
*/
function list_public_operators_sample(string $formattedParent): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = (new ListPublicOperatorsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $liveVideoAnalyticsClient->listPublicOperators($request);
/** @var Operator $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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]');
list_public_operators_sample($formattedParent);
}
resolveOperatorInfo
ResolveOperatorInfo returns the operator information based on the request.
The async variant is LiveVideoAnalyticsClient::resolveOperatorInfoAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ResolveOperatorInfoRequest
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\VisionAI\V1\ResolveOperatorInfoResponse |
|
use Google\ApiCore\ApiException;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\OperatorQuery;
use Google\Cloud\VisionAI\V1\ResolveOperatorInfoRequest;
use Google\Cloud\VisionAI\V1\ResolveOperatorInfoResponse;
/**
* @param string $formattedParent Parent value for ResolveOperatorInfoRequest. Please see
* {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field.
* @param string $queriesOperator The canonical Name of the operator. e.g. OccupancyCounting.
*/
function resolve_operator_info_sample(string $formattedParent, string $queriesOperator): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$operatorQuery = (new OperatorQuery())
->setOperator($queriesOperator);
$queries = [$operatorQuery,];
$request = (new ResolveOperatorInfoRequest())
->setParent($formattedParent)
->setQueries($queries);
// Call the API and handle any network failures.
try {
/** @var ResolveOperatorInfoResponse $response */
$response = $liveVideoAnalyticsClient->resolveOperatorInfo($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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]');
$queriesOperator = '[OPERATOR]';
resolve_operator_info_sample($formattedParent, $queriesOperator);
}
updateAnalysis
Updates the parameters of a single Analysis.
The async variant is LiveVideoAnalyticsClient::updateAnalysisAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\UpdateAnalysisRequest
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<Google\Cloud\VisionAI\V1\Analysis> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\Analysis;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\UpdateAnalysisRequest;
use Google\Protobuf\FieldMask;
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_analysis_sample(): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$updateMask = new FieldMask();
$analysis = new Analysis();
$request = (new UpdateAnalysisRequest())
->setUpdateMask($updateMask)
->setAnalysis($analysis);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->updateAnalysis($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Analysis $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());
}
}
updateOperator
Updates the parameters of a single Operator.
The async variant is LiveVideoAnalyticsClient::updateOperatorAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\UpdateOperatorRequest
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<Google\Cloud\VisionAI\V1\Operator> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\Operator;
use Google\Cloud\VisionAI\V1\UpdateOperatorRequest;
use Google\Protobuf\FieldMask;
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_operator_sample(): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$updateMask = new FieldMask();
$operator = new Operator();
$request = (new UpdateOperatorRequest())
->setUpdateMask($updateMask)
->setOperator($operator);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->updateOperator($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Operator $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());
}
}
updateProcess
Updates the parameters of a single Process.
The async variant is LiveVideoAnalyticsClient::updateProcessAsync() .
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\UpdateProcessRequest
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<Google\Cloud\VisionAI\V1\Process> |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
use Google\Cloud\VisionAI\V1\Process;
use Google\Cloud\VisionAI\V1\UpdateProcessRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;
/**
* @param string $formattedProcessAnalysis Reference to an existing Analysis resource. Please see
* {@see LiveVideoAnalyticsClient::analysisName()} for help formatting this field.
*/
function update_process_sample(string $formattedProcessAnalysis): void
{
// Create a client.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$updateMask = new FieldMask();
$process = (new Process())
->setAnalysis($formattedProcessAnalysis);
$request = (new UpdateProcessRequest())
->setUpdateMask($updateMask)
->setProcess($process);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $liveVideoAnalyticsClient->updateProcess($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Process $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
{
$formattedProcessAnalysis = LiveVideoAnalyticsClient::analysisName(
'[PROJECT]',
'[LOCATION]',
'[CLUSTER]',
'[ANALYSIS]'
);
update_process_sample($formattedProcessAnalysis);
}
getLocation
Gets information about a location.
The async variant is LiveVideoAnalyticsClient::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 |
|
use Google\ApiCore\ApiException;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
/**
* 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.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = new GetLocationRequest();
// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $liveVideoAnalyticsClient->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 LiveVideoAnalyticsClient::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 |
|
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\VisionAI\V1\Client\LiveVideoAnalyticsClient;
/**
* 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.
$liveVideoAnalyticsClient = new LiveVideoAnalyticsClient();
// Prepare the request message.
$request = new ListLocationsRequest();
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $liveVideoAnalyticsClient->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());
}
}
batchRunProcessAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\BatchRunProcessRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
createAnalysisAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\CreateAnalysisRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
createOperatorAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\CreateOperatorRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
createProcessAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\CreateProcessRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteAnalysisAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\DeleteAnalysisRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteOperatorAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\DeleteOperatorRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
deleteProcessAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\DeleteProcessRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
getAnalysisAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\GetAnalysisRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\VisionAI\V1\Analysis> |
|
getOperatorAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\GetOperatorRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\VisionAI\V1\Operator> |
|
getProcessAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\GetProcessRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\VisionAI\V1\Process> |
|
listAnalysesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ListAnalysesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listOperatorsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ListOperatorsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listProcessesAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ListProcessesRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
listPublicOperatorsAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ListPublicOperatorsRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
|
resolveOperatorInfoAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\ResolveOperatorInfoRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\VisionAI\V1\ResolveOperatorInfoResponse> |
|
updateAnalysisAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\UpdateAnalysisRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
updateOperatorAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\UpdateOperatorRequest
|
optionalArgs |
array
|
| Returns | |
|---|---|
| Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
|
updateProcessAsync
| Parameters | |
|---|---|
| Name | Description |
request |
Google\Cloud\VisionAI\V1\UpdateProcessRequest
|
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::analysisName
Formats a string containing the fully-qualified path to represent a analysis resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
analysis |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted analysis resource. |
static::clusterName
Formats a string containing the fully-qualified path to represent a cluster resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted cluster 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::operatorName
Formats a string containing the fully-qualified path to represent a operator resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
operator |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted operator resource. |
static::processName
Formats a string containing the fully-qualified path to represent a process resource.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
process |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
The formatted process 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
- analysis: projects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis}
- cluster: projects/{project}/locations/{location}/clusters/{cluster}
- location: projects/{project}/locations/{location}
- operator: projects/{project}/locations/{location}/operators/{operator}
- process: projects/{project}/locations/{location}/clusters/{cluster}/processes/{process}
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. |