Reference documentation and code samples for the Google Cloud Financial Services V1 Client class AMLClient.
Service Description: The AML (Anti Money Laundering) service allows users to perform REST operations on aml.
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 \ FinancialServices \ V1 \ ClientMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
options |
array
Optional. Options for configuring the service API wrapper. |
↳ apiEndpoint |
string
The address of the API remote host. May optionally include the port, formatted as "
|
↳ credentials |
string|array|FetchAuthTokenInterface|CredentialsWrapper
The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage: In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored. Important: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud Platform, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information https://cloud.google.com/docs/authentication/external/externally-sourced-credentials |
↳ 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 |
createBacktestResult
Create a BacktestResult.
The async variant is AMLClient::createBacktestResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateBacktestResultRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\BacktestResult;
use Google\Cloud\FinancialServices\V1\BacktestResult\PerformanceTarget;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\CreateBacktestResultRequest;
use Google\Protobuf\Timestamp;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent of the BacktestResult is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
* @param string $backtestResultId The resource id of the BacktestResult
* @param string $formattedBacktestResultDataset The resource name of the Dataset to backtest on
* Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}`
* Please see {@see AMLClient::datasetName()} for help formatting this field.
* @param string $formattedBacktestResultModel The resource name of the Model to use or to backtest.
* Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}`
* Please see {@see AMLClient::modelName()} for help formatting this field.
* @param int $backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint A number that gives the tuner a hint on the number of parties
* from this data that will be investigated per period (monthly). This is
* used to control how the model is evaluated. For example, when trying AML
* AI for the first time, we recommend setting this to the number of parties
* investigated in an average month, based on alerts from your existing
* automated alerting system.
*/
function create_backtest_result_sample(
string $formattedParent,
string $backtestResultId,
string $formattedBacktestResultDataset,
string $formattedBacktestResultModel,
int $backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$backtestResultEndTime = new Timestamp();
$backtestResultPerformanceTarget = (new PerformanceTarget())
->setPartyInvestigationsPerPeriodHint(
$backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint
);
$backtestResult = (new BacktestResult())
->setDataset($formattedBacktestResultDataset)
->setModel($formattedBacktestResultModel)
->setEndTime($backtestResultEndTime)
->setPerformanceTarget($backtestResultPerformanceTarget);
$request = (new CreateBacktestResultRequest())
->setParent($formattedParent)
->setBacktestResultId($backtestResultId)
->setBacktestResult($backtestResult);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->createBacktestResult($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var BacktestResult $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
$backtestResultId = '[BACKTEST_RESULT_ID]';
$formattedBacktestResultDataset = AMLClient::datasetName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[DATASET]'
);
$formattedBacktestResultModel = AMLClient::modelName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[MODEL]'
);
$backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint = 0;
create_backtest_result_sample(
$formattedParent,
$backtestResultId,
$formattedBacktestResultDataset,
$formattedBacktestResultModel,
$backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint
);
}
createDataset
Creates a dataset.
The async variant is AMLClient::createDatasetAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateDatasetRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\CreateDatasetRequest;
use Google\Cloud\FinancialServices\V1\Dataset;
use Google\Rpc\Status;
use Google\Type\Interval;
/**
* @param string $formattedParent The parent of the Dataset is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
* @param string $datasetId The resource id of the dataset
*/
function create_dataset_sample(string $formattedParent, string $datasetId): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$datasetTableSpecs = [];
$datasetDateRange = new Interval();
$dataset = (new Dataset())
->setTableSpecs($datasetTableSpecs)
->setDateRange($datasetDateRange);
$request = (new CreateDatasetRequest())
->setParent($formattedParent)
->setDatasetId($datasetId)
->setDataset($dataset);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->createDataset($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Dataset $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
$datasetId = '[DATASET_ID]';
create_dataset_sample($formattedParent, $datasetId);
}
createEngineConfig
Creates an engine config.
The async variant is AMLClient::createEngineConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateEngineConfigRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\CreateEngineConfigRequest;
use Google\Cloud\FinancialServices\V1\EngineConfig;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent of the EngineConfig is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
* @param string $engineConfigId The resource id of the EngineConfig
* @param string $formattedEngineConfigEngineVersion The resource name of the EngineVersion used in this model tuning.
* format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}`
* Please see {@see AMLClient::engineVersionName()} for help formatting this field.
*/
function create_engine_config_sample(
string $formattedParent,
string $engineConfigId,
string $formattedEngineConfigEngineVersion
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$engineConfig = (new EngineConfig())
->setEngineVersion($formattedEngineConfigEngineVersion);
$request = (new CreateEngineConfigRequest())
->setParent($formattedParent)
->setEngineConfigId($engineConfigId)
->setEngineConfig($engineConfig);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->createEngineConfig($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var EngineConfig $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
$engineConfigId = '[ENGINE_CONFIG_ID]';
$formattedEngineConfigEngineVersion = AMLClient::engineVersionName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[ENGINE_VERSION]'
);
create_engine_config_sample($formattedParent, $engineConfigId, $formattedEngineConfigEngineVersion);
}
createInstance
Creates an instance.
The async variant is AMLClient::createInstanceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateInstanceRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\CreateInstanceRequest;
use Google\Cloud\FinancialServices\V1\Instance;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent of the Instance is the location for that Instance.
* Every location has exactly one instance. Please see
* {@see AMLClient::locationName()} for help formatting this field.
* @param string $instanceId The resource id of the instance.
* @param string $instanceKmsKey The KMS key name used for CMEK (encryption-at-rest).
* format:
* `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}`
* VPC-SC restrictions apply.
*/
function create_instance_sample(
string $formattedParent,
string $instanceId,
string $instanceKmsKey
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$instance = (new Instance())
->setKmsKey($instanceKmsKey);
$request = (new CreateInstanceRequest())
->setParent($formattedParent)
->setInstanceId($instanceId)
->setInstance($instance);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->createInstance($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Instance $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 = AMLClient::locationName('[PROJECT]', '[LOCATION]');
$instanceId = '[INSTANCE_ID]';
$instanceKmsKey = '[KMS_KEY]';
create_instance_sample($formattedParent, $instanceId, $instanceKmsKey);
}
createModel
Creates a model.
The async variant is AMLClient::createModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateModelRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\CreateModelRequest;
use Google\Cloud\FinancialServices\V1\Model;
use Google\Protobuf\Timestamp;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent of the Model is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
* @param string $modelId The resource id of the Model
* @param string $formattedModelEngineConfig The resource name of the EngineConfig the model training will be
* based on. Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engineConfig}`
* Please see {@see AMLClient::engineConfigName()} for help formatting this field.
* @param string $formattedModelPrimaryDataset The resource name of the Primary Dataset used in this model
* training. For information about how primary and auxiliary datasets are
* used, refer to the engine version's documentation. Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}`
* Please see {@see AMLClient::datasetName()} for help formatting this field.
*/
function create_model_sample(
string $formattedParent,
string $modelId,
string $formattedModelEngineConfig,
string $formattedModelPrimaryDataset
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$modelEndTime = new Timestamp();
$model = (new Model())
->setEngineConfig($formattedModelEngineConfig)
->setPrimaryDataset($formattedModelPrimaryDataset)
->setEndTime($modelEndTime);
$request = (new CreateModelRequest())
->setParent($formattedParent)
->setModelId($modelId)
->setModel($model);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->createModel($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Model $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
$modelId = '[MODEL_ID]';
$formattedModelEngineConfig = AMLClient::engineConfigName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[ENGINE_CONFIG]'
);
$formattedModelPrimaryDataset = AMLClient::datasetName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[DATASET]'
);
create_model_sample(
$formattedParent,
$modelId,
$formattedModelEngineConfig,
$formattedModelPrimaryDataset
);
}
createPredictionResult
Create a PredictionResult.
The async variant is AMLClient::createPredictionResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreatePredictionResultRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\BigQueryDestination;
use Google\Cloud\FinancialServices\V1\BigQueryDestination\WriteDisposition;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\CreatePredictionResultRequest;
use Google\Cloud\FinancialServices\V1\PredictionResult;
use Google\Cloud\FinancialServices\V1\PredictionResult\Outputs;
use Google\Protobuf\Timestamp;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent of the PredictionResult is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
* @param string $predictionResultId The resource id of the PredictionResult
* @param string $formattedPredictionResultDataset The resource name of the Dataset to do predictions on
* Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/dataset/{dataset_id}`
* Please see {@see AMLClient::datasetName()} for help formatting this field.
* @param string $formattedPredictionResultModel The resource name of the Model to use to use to make predictions
* Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}`
* Please see {@see AMLClient::modelName()} for help formatting this field.
* @param int $predictionResultOutputsPredictionDestinationWriteDisposition Whether or not to overwrite the destination table. By default the
* table won't be overwritten and an error will be returned if the table
* exists and contains data.
*/
function create_prediction_result_sample(
string $formattedParent,
string $predictionResultId,
string $formattedPredictionResultDataset,
string $formattedPredictionResultModel,
int $predictionResultOutputsPredictionDestinationWriteDisposition
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$predictionResultEndTime = new Timestamp();
$predictionResultOutputsPredictionDestination = (new BigQueryDestination())
->setWriteDisposition($predictionResultOutputsPredictionDestinationWriteDisposition);
$predictionResultOutputs = (new Outputs())
->setPredictionDestination($predictionResultOutputsPredictionDestination);
$predictionResult = (new PredictionResult())
->setDataset($formattedPredictionResultDataset)
->setModel($formattedPredictionResultModel)
->setEndTime($predictionResultEndTime)
->setOutputs($predictionResultOutputs);
$request = (new CreatePredictionResultRequest())
->setParent($formattedParent)
->setPredictionResultId($predictionResultId)
->setPredictionResult($predictionResult);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->createPredictionResult($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var PredictionResult $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
$predictionResultId = '[PREDICTION_RESULT_ID]';
$formattedPredictionResultDataset = AMLClient::datasetName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[DATASET]'
);
$formattedPredictionResultModel = AMLClient::modelName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[MODEL]'
);
$predictionResultOutputsPredictionDestinationWriteDisposition = WriteDisposition::WRITE_DISPOSITION_UNSPECIFIED;
create_prediction_result_sample(
$formattedParent,
$predictionResultId,
$formattedPredictionResultDataset,
$formattedPredictionResultModel,
$predictionResultOutputsPredictionDestinationWriteDisposition
);
}
deleteBacktestResult
Deletes a BacktestResult.
The async variant is AMLClient::deleteBacktestResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteBacktestResultRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\DeleteBacktestResultRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The resource name of the BacktestResult. Please see
* {@see AMLClient::backtestResultName()} for help formatting this field.
*/
function delete_backtest_result_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new DeleteBacktestResultRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->deleteBacktestResult($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 = AMLClient::backtestResultName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[BACKTEST_RESULT]'
);
delete_backtest_result_sample($formattedName);
}
deleteDataset
Deletes a dataset.
The async variant is AMLClient::deleteDatasetAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteDatasetRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\DeleteDatasetRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The resource name of the Dataset. Please see
* {@see AMLClient::datasetName()} for help formatting this field.
*/
function delete_dataset_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new DeleteDatasetRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->deleteDataset($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 = AMLClient::datasetName('[PROJECT_NUM]', '[LOCATION]', '[INSTANCE]', '[DATASET]');
delete_dataset_sample($formattedName);
}
deleteEngineConfig
Deletes an engine config.
The async variant is AMLClient::deleteEngineConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteEngineConfigRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\DeleteEngineConfigRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The resource name of the EngineConfig. Please see
* {@see AMLClient::engineConfigName()} for help formatting this field.
*/
function delete_engine_config_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new DeleteEngineConfigRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->deleteEngineConfig($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 = AMLClient::engineConfigName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[ENGINE_CONFIG]'
);
delete_engine_config_sample($formattedName);
}
deleteInstance
Deletes an instance.
The async variant is AMLClient::deleteInstanceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteInstanceRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\DeleteInstanceRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The resource name of the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
*/
function delete_instance_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new DeleteInstanceRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->deleteInstance($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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
delete_instance_sample($formattedName);
}
deleteModel
Deletes a model.
The async variant is AMLClient::deleteModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteModelRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\DeleteModelRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The resource name of the Model. Please see
* {@see AMLClient::modelName()} for help formatting this field.
*/
function delete_model_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new DeleteModelRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->deleteModel($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 = AMLClient::modelName('[PROJECT_NUM]', '[LOCATION]', '[INSTANCE]', '[MODEL]');
delete_model_sample($formattedName);
}
deletePredictionResult
Deletes a PredictionResult.
The async variant is AMLClient::deletePredictionResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeletePredictionResultRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\DeletePredictionResultRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The resource name of the PredictionResult. Please see
* {@see AMLClient::predictionResultName()} for help formatting this field.
*/
function delete_prediction_result_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new DeletePredictionResultRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->deletePredictionResult($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 = AMLClient::predictionResultName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[PREDICTION_RESULT]'
);
delete_prediction_result_sample($formattedName);
}
exportBacktestResultMetadata
Export governance information for a BacktestResult resource. For information on the exported fields, see AML output data model.
The async variant is AMLClient::exportBacktestResultMetadataAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportBacktestResultMetadataRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\BigQueryDestination;
use Google\Cloud\FinancialServices\V1\BigQueryDestination\WriteDisposition;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\ExportBacktestResultMetadataRequest;
use Google\Cloud\FinancialServices\V1\ExportBacktestResultMetadataResponse;
use Google\Rpc\Status;
/**
* @param string $formattedBacktestResult The resource name of the BacktestResult. Please see
* {@see AMLClient::backtestResultName()} for help formatting this field.
* @param int $structuredMetadataDestinationWriteDisposition Whether or not to overwrite the destination table. By default the
* table won't be overwritten and an error will be returned if the table
* exists and contains data.
*/
function export_backtest_result_metadata_sample(
string $formattedBacktestResult,
int $structuredMetadataDestinationWriteDisposition
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$structuredMetadataDestination = (new BigQueryDestination())
->setWriteDisposition($structuredMetadataDestinationWriteDisposition);
$request = (new ExportBacktestResultMetadataRequest())
->setBacktestResult($formattedBacktestResult)
->setStructuredMetadataDestination($structuredMetadataDestination);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->exportBacktestResultMetadata($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ExportBacktestResultMetadataResponse $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
{
$formattedBacktestResult = AMLClient::backtestResultName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[BACKTEST_RESULT]'
);
$structuredMetadataDestinationWriteDisposition = WriteDisposition::WRITE_DISPOSITION_UNSPECIFIED;
export_backtest_result_metadata_sample(
$formattedBacktestResult,
$structuredMetadataDestinationWriteDisposition
);
}
exportEngineConfigMetadata
Export governance information for an EngineConfig resource. For information on the exported fields, see AML output data model.
The async variant is AMLClient::exportEngineConfigMetadataAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportEngineConfigMetadataRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\BigQueryDestination;
use Google\Cloud\FinancialServices\V1\BigQueryDestination\WriteDisposition;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\ExportEngineConfigMetadataRequest;
use Google\Cloud\FinancialServices\V1\ExportEngineConfigMetadataResponse;
use Google\Rpc\Status;
/**
* @param string $formattedEngineConfig The resource name of the EngineConfig. Please see
* {@see AMLClient::engineConfigName()} for help formatting this field.
* @param int $structuredMetadataDestinationWriteDisposition Whether or not to overwrite the destination table. By default the
* table won't be overwritten and an error will be returned if the table
* exists and contains data.
*/
function export_engine_config_metadata_sample(
string $formattedEngineConfig,
int $structuredMetadataDestinationWriteDisposition
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$structuredMetadataDestination = (new BigQueryDestination())
->setWriteDisposition($structuredMetadataDestinationWriteDisposition);
$request = (new ExportEngineConfigMetadataRequest())
->setEngineConfig($formattedEngineConfig)
->setStructuredMetadataDestination($structuredMetadataDestination);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->exportEngineConfigMetadata($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ExportEngineConfigMetadataResponse $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
{
$formattedEngineConfig = AMLClient::engineConfigName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[ENGINE_CONFIG]'
);
$structuredMetadataDestinationWriteDisposition = WriteDisposition::WRITE_DISPOSITION_UNSPECIFIED;
export_engine_config_metadata_sample(
$formattedEngineConfig,
$structuredMetadataDestinationWriteDisposition
);
}
exportModelMetadata
Export governance information for a Model resource. For information on the exported fields, see AML output data model.
The async variant is AMLClient::exportModelMetadataAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportModelMetadataRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\BigQueryDestination;
use Google\Cloud\FinancialServices\V1\BigQueryDestination\WriteDisposition;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\ExportModelMetadataRequest;
use Google\Cloud\FinancialServices\V1\ExportModelMetadataResponse;
use Google\Rpc\Status;
/**
* @param string $formattedModel The resource name of the Model. Please see
* {@see AMLClient::modelName()} for help formatting this field.
* @param int $structuredMetadataDestinationWriteDisposition Whether or not to overwrite the destination table. By default the
* table won't be overwritten and an error will be returned if the table
* exists and contains data.
*/
function export_model_metadata_sample(
string $formattedModel,
int $structuredMetadataDestinationWriteDisposition
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$structuredMetadataDestination = (new BigQueryDestination())
->setWriteDisposition($structuredMetadataDestinationWriteDisposition);
$request = (new ExportModelMetadataRequest())
->setModel($formattedModel)
->setStructuredMetadataDestination($structuredMetadataDestination);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->exportModelMetadata($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ExportModelMetadataResponse $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
{
$formattedModel = AMLClient::modelName('[PROJECT_NUM]', '[LOCATION]', '[INSTANCE]', '[MODEL]');
$structuredMetadataDestinationWriteDisposition = WriteDisposition::WRITE_DISPOSITION_UNSPECIFIED;
export_model_metadata_sample($formattedModel, $structuredMetadataDestinationWriteDisposition);
}
exportPredictionResultMetadata
Export governance information for a PredictionResult resource. For information on the exported fields, see AML output data model.
The async variant is AMLClient::exportPredictionResultMetadataAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportPredictionResultMetadataRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\BigQueryDestination;
use Google\Cloud\FinancialServices\V1\BigQueryDestination\WriteDisposition;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\ExportPredictionResultMetadataRequest;
use Google\Cloud\FinancialServices\V1\ExportPredictionResultMetadataResponse;
use Google\Rpc\Status;
/**
* @param string $formattedPredictionResult The resource name of the PredictionResult. Please see
* {@see AMLClient::predictionResultName()} for help formatting this field.
* @param int $structuredMetadataDestinationWriteDisposition Whether or not to overwrite the destination table. By default the
* table won't be overwritten and an error will be returned if the table
* exists and contains data.
*/
function export_prediction_result_metadata_sample(
string $formattedPredictionResult,
int $structuredMetadataDestinationWriteDisposition
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$structuredMetadataDestination = (new BigQueryDestination())
->setWriteDisposition($structuredMetadataDestinationWriteDisposition);
$request = (new ExportPredictionResultMetadataRequest())
->setPredictionResult($formattedPredictionResult)
->setStructuredMetadataDestination($structuredMetadataDestination);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->exportPredictionResultMetadata($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ExportPredictionResultMetadataResponse $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
{
$formattedPredictionResult = AMLClient::predictionResultName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[PREDICTION_RESULT]'
);
$structuredMetadataDestinationWriteDisposition = WriteDisposition::WRITE_DISPOSITION_UNSPECIFIED;
export_prediction_result_metadata_sample(
$formattedPredictionResult,
$structuredMetadataDestinationWriteDisposition
);
}
exportRegisteredParties
Exports the list of registered parties. See Create and manage instances for information on the output schema for this method.
The async variant is AMLClient::exportRegisteredPartiesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportRegisteredPartiesRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\BigQueryDestination;
use Google\Cloud\FinancialServices\V1\BigQueryDestination\WriteDisposition;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\ExportRegisteredPartiesRequest;
use Google\Cloud\FinancialServices\V1\ExportRegisteredPartiesResponse;
use Google\Cloud\FinancialServices\V1\LineOfBusiness;
use Google\Rpc\Status;
/**
* @param string $formattedName The full path to the Instance resource in this API.
* format: `projects/{project}/locations/{location}/instances/{instance}`
* Please see {@see AMLClient::instanceName()} for help formatting this field.
* @param int $datasetWriteDisposition Whether or not to overwrite the destination table. By default the
* table won't be overwritten and an error will be returned if the table
* exists and contains data.
* @param int $lineOfBusiness LineOfBusiness to get RegisteredParties from.
*/
function export_registered_parties_sample(
string $formattedName,
int $datasetWriteDisposition,
int $lineOfBusiness
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$dataset = (new BigQueryDestination())
->setWriteDisposition($datasetWriteDisposition);
$request = (new ExportRegisteredPartiesRequest())
->setName($formattedName)
->setDataset($dataset)
->setLineOfBusiness($lineOfBusiness);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->exportRegisteredParties($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ExportRegisteredPartiesResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
$datasetWriteDisposition = WriteDisposition::WRITE_DISPOSITION_UNSPECIFIED;
$lineOfBusiness = LineOfBusiness::LINE_OF_BUSINESS_UNSPECIFIED;
export_registered_parties_sample($formattedName, $datasetWriteDisposition, $lineOfBusiness);
}
getBacktestResult
Gets a BacktestResult.
The async variant is AMLClient::getBacktestResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetBacktestResultRequest
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\FinancialServices\V1\BacktestResult |
use Google\ApiCore\ApiException;
use Google\Cloud\FinancialServices\V1\BacktestResult;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\GetBacktestResultRequest;
/**
* @param string $formattedName The resource name of the BacktestResult
* Please see {@see AMLClient::backtestResultName()} for help formatting this field.
*/
function get_backtest_result_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new GetBacktestResultRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var BacktestResult $response */
$response = $aMLClient->getBacktestResult($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 = AMLClient::backtestResultName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[BACKTEST_RESULT]'
);
get_backtest_result_sample($formattedName);
}
getDataset
Gets a dataset.
The async variant is AMLClient::getDatasetAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetDatasetRequest
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\FinancialServices\V1\Dataset |
use Google\ApiCore\ApiException;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\Dataset;
use Google\Cloud\FinancialServices\V1\GetDatasetRequest;
/**
* @param string $formattedName The resource name of the Dataset
* Please see {@see AMLClient::datasetName()} for help formatting this field.
*/
function get_dataset_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new GetDatasetRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Dataset $response */
$response = $aMLClient->getDataset($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 = AMLClient::datasetName('[PROJECT_NUM]', '[LOCATION]', '[INSTANCE]', '[DATASET]');
get_dataset_sample($formattedName);
}
getEngineConfig
Gets an engine config.
The async variant is AMLClient::getEngineConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetEngineConfigRequest
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\FinancialServices\V1\EngineConfig |
use Google\ApiCore\ApiException;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\EngineConfig;
use Google\Cloud\FinancialServices\V1\GetEngineConfigRequest;
/**
* @param string $formattedName The resource name of the EngineConfig
* Please see {@see AMLClient::engineConfigName()} for help formatting this field.
*/
function get_engine_config_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new GetEngineConfigRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var EngineConfig $response */
$response = $aMLClient->getEngineConfig($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 = AMLClient::engineConfigName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[ENGINE_CONFIG]'
);
get_engine_config_sample($formattedName);
}
getEngineVersion
Gets a single EngineVersion.
The async variant is AMLClient::getEngineVersionAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetEngineVersionRequest
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\FinancialServices\V1\EngineVersion |
use Google\ApiCore\ApiException;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\EngineVersion;
use Google\Cloud\FinancialServices\V1\GetEngineVersionRequest;
/**
* @param string $formattedName The resource name of the EngineVersion
* Please see {@see AMLClient::engineVersionName()} for help formatting this field.
*/
function get_engine_version_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new GetEngineVersionRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var EngineVersion $response */
$response = $aMLClient->getEngineVersion($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 = AMLClient::engineVersionName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[ENGINE_VERSION]'
);
get_engine_version_sample($formattedName);
}
getInstance
Gets an instance.
The async variant is AMLClient::getInstanceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetInstanceRequest
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\FinancialServices\V1\Instance |
use Google\ApiCore\ApiException;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\GetInstanceRequest;
use Google\Cloud\FinancialServices\V1\Instance;
/**
* @param string $formattedName The resource name of the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
*/
function get_instance_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new GetInstanceRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Instance $response */
$response = $aMLClient->getInstance($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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
get_instance_sample($formattedName);
}
getModel
Gets a model.
The async variant is AMLClient::getModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetModelRequest
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\FinancialServices\V1\Model |
use Google\ApiCore\ApiException;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\GetModelRequest;
use Google\Cloud\FinancialServices\V1\Model;
/**
* @param string $formattedName The resource name of the Model
* Please see {@see AMLClient::modelName()} for help formatting this field.
*/
function get_model_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new GetModelRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Model $response */
$response = $aMLClient->getModel($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 = AMLClient::modelName('[PROJECT_NUM]', '[LOCATION]', '[INSTANCE]', '[MODEL]');
get_model_sample($formattedName);
}
getPredictionResult
Gets a PredictionResult.
The async variant is AMLClient::getPredictionResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetPredictionResultRequest
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\FinancialServices\V1\PredictionResult |
use Google\ApiCore\ApiException;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\GetPredictionResultRequest;
use Google\Cloud\FinancialServices\V1\PredictionResult;
/**
* @param string $formattedName The resource name of the PredictionResult
* Please see {@see AMLClient::predictionResultName()} for help formatting this field.
*/
function get_prediction_result_sample(string $formattedName): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new GetPredictionResultRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var PredictionResult $response */
$response = $aMLClient->getPredictionResult($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 = AMLClient::predictionResultName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[PREDICTION_RESULT]'
);
get_prediction_result_sample($formattedName);
}
importRegisteredParties
Imports the list of registered parties. See Create and manage instances for information on the input schema and response for this method.
The async variant is AMLClient::importRegisteredPartiesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ImportRegisteredPartiesRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\ImportRegisteredPartiesRequest;
use Google\Cloud\FinancialServices\V1\ImportRegisteredPartiesRequest\UpdateMode;
use Google\Cloud\FinancialServices\V1\ImportRegisteredPartiesResponse;
use Google\Cloud\FinancialServices\V1\LineOfBusiness;
use Google\Rpc\Status;
/**
* @param string $formattedName The full path to the Instance resource in this API.
* format: `projects/{project}/locations/{location}/instances/{instance}`
* Please see {@see AMLClient::instanceName()} for help formatting this field.
* @param int $mode Mode of the request.
* @param int $lineOfBusiness LineOfBusiness for the specified registered parties.
*/
function import_registered_parties_sample(
string $formattedName,
int $mode,
int $lineOfBusiness
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new ImportRegisteredPartiesRequest())
->setName($formattedName)
->setMode($mode)
->setLineOfBusiness($lineOfBusiness);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->importRegisteredParties($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ImportRegisteredPartiesResponse $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
$mode = UpdateMode::UPDATE_MODE_UNSPECIFIED;
$lineOfBusiness = LineOfBusiness::LINE_OF_BUSINESS_UNSPECIFIED;
import_registered_parties_sample($formattedName, $mode, $lineOfBusiness);
}
listBacktestResults
List BacktestResults.
The async variant is AMLClient::listBacktestResultsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListBacktestResultsRequest
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\FinancialServices\V1\BacktestResult;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\ListBacktestResultsRequest;
/**
* @param string $formattedParent The parent of the BacktestResult is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
*/
function list_backtest_results_sample(string $formattedParent): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new ListBacktestResultsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $aMLClient->listBacktestResults($request);
/** @var BacktestResult $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
list_backtest_results_sample($formattedParent);
}
listDatasets
Lists datasets.
The async variant is AMLClient::listDatasetsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListDatasetsRequest
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\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\Dataset;
use Google\Cloud\FinancialServices\V1\ListDatasetsRequest;
/**
* @param string $formattedParent The parent of the Dataset is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
*/
function list_datasets_sample(string $formattedParent): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new ListDatasetsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $aMLClient->listDatasets($request);
/** @var Dataset $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
list_datasets_sample($formattedParent);
}
listEngineConfigs
Lists engine configs.
The async variant is AMLClient::listEngineConfigsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListEngineConfigsRequest
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\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\EngineConfig;
use Google\Cloud\FinancialServices\V1\ListEngineConfigsRequest;
/**
* @param string $formattedParent The parent of the EngineConfig is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
*/
function list_engine_configs_sample(string $formattedParent): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new ListEngineConfigsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $aMLClient->listEngineConfigs($request);
/** @var EngineConfig $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
list_engine_configs_sample($formattedParent);
}
listEngineVersions
Lists EngineVersions for given location.
The async variant is AMLClient::listEngineVersionsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListEngineVersionsRequest
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\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\EngineVersion;
use Google\Cloud\FinancialServices\V1\ListEngineVersionsRequest;
/**
* @param string $formattedParent The parent of the EngineVersion is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
*/
function list_engine_versions_sample(string $formattedParent): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new ListEngineVersionsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $aMLClient->listEngineVersions($request);
/** @var EngineVersion $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
list_engine_versions_sample($formattedParent);
}
listInstances
Lists instances.
The async variant is AMLClient::listInstancesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListInstancesRequest
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\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\Instance;
use Google\Cloud\FinancialServices\V1\ListInstancesRequest;
/**
* @param string $formattedParent The parent of the Instance is the location for that Instance.
* Every location has exactly one instance. Please see
* {@see AMLClient::locationName()} for help formatting this field.
*/
function list_instances_sample(string $formattedParent): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new ListInstancesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $aMLClient->listInstances($request);
/** @var Instance $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 = AMLClient::locationName('[PROJECT]', '[LOCATION]');
list_instances_sample($formattedParent);
}
listModels
Lists models.
The async variant is AMLClient::listModelsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListModelsRequest
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\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\ListModelsRequest;
use Google\Cloud\FinancialServices\V1\Model;
/**
* @param string $formattedParent The parent of the Model is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
*/
function list_models_sample(string $formattedParent): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new ListModelsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $aMLClient->listModels($request);
/** @var Model $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
list_models_sample($formattedParent);
}
listPredictionResults
List PredictionResults.
The async variant is AMLClient::listPredictionResultsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListPredictionResultsRequest
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\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\ListPredictionResultsRequest;
use Google\Cloud\FinancialServices\V1\PredictionResult;
/**
* @param string $formattedParent The parent of the PredictionResult is the Instance. Please see
* {@see AMLClient::instanceName()} for help formatting this field.
*/
function list_prediction_results_sample(string $formattedParent): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = (new ListPredictionResultsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $aMLClient->listPredictionResults($request);
/** @var PredictionResult $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 = AMLClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]');
list_prediction_results_sample($formattedParent);
}
updateBacktestResult
Updates the parameters of a single BacktestResult.
The async variant is AMLClient::updateBacktestResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateBacktestResultRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\BacktestResult;
use Google\Cloud\FinancialServices\V1\BacktestResult\PerformanceTarget;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\UpdateBacktestResultRequest;
use Google\Protobuf\Timestamp;
use Google\Rpc\Status;
/**
* @param string $formattedBacktestResultDataset The resource name of the Dataset to backtest on
* Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}`
* Please see {@see AMLClient::datasetName()} for help formatting this field.
* @param string $formattedBacktestResultModel The resource name of the Model to use or to backtest.
* Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}`
* Please see {@see AMLClient::modelName()} for help formatting this field.
* @param int $backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint A number that gives the tuner a hint on the number of parties
* from this data that will be investigated per period (monthly). This is
* used to control how the model is evaluated. For example, when trying AML
* AI for the first time, we recommend setting this to the number of parties
* investigated in an average month, based on alerts from your existing
* automated alerting system.
*/
function update_backtest_result_sample(
string $formattedBacktestResultDataset,
string $formattedBacktestResultModel,
int $backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$backtestResultEndTime = new Timestamp();
$backtestResultPerformanceTarget = (new PerformanceTarget())
->setPartyInvestigationsPerPeriodHint(
$backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint
);
$backtestResult = (new BacktestResult())
->setDataset($formattedBacktestResultDataset)
->setModel($formattedBacktestResultModel)
->setEndTime($backtestResultEndTime)
->setPerformanceTarget($backtestResultPerformanceTarget);
$request = (new UpdateBacktestResultRequest())
->setBacktestResult($backtestResult);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->updateBacktestResult($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var BacktestResult $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
{
$formattedBacktestResultDataset = AMLClient::datasetName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[DATASET]'
);
$formattedBacktestResultModel = AMLClient::modelName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[MODEL]'
);
$backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint = 0;
update_backtest_result_sample(
$formattedBacktestResultDataset,
$formattedBacktestResultModel,
$backtestResultPerformanceTargetPartyInvestigationsPerPeriodHint
);
}
updateDataset
Updates the parameters of a single Dataset.
The async variant is AMLClient::updateDatasetAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateDatasetRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\Dataset;
use Google\Cloud\FinancialServices\V1\UpdateDatasetRequest;
use Google\Rpc\Status;
use Google\Type\Interval;
/**
* 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_dataset_sample(): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$datasetTableSpecs = [];
$datasetDateRange = new Interval();
$dataset = (new Dataset())
->setTableSpecs($datasetTableSpecs)
->setDateRange($datasetDateRange);
$request = (new UpdateDatasetRequest())
->setDataset($dataset);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->updateDataset($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Dataset $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());
}
}
updateEngineConfig
Updates the parameters of a single EngineConfig.
The async variant is AMLClient::updateEngineConfigAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateEngineConfigRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\EngineConfig;
use Google\Cloud\FinancialServices\V1\UpdateEngineConfigRequest;
use Google\Rpc\Status;
/**
* @param string $formattedEngineConfigEngineVersion The resource name of the EngineVersion used in this model tuning.
* format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}`
* Please see {@see AMLClient::engineVersionName()} for help formatting this field.
*/
function update_engine_config_sample(string $formattedEngineConfigEngineVersion): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$engineConfig = (new EngineConfig())
->setEngineVersion($formattedEngineConfigEngineVersion);
$request = (new UpdateEngineConfigRequest())
->setEngineConfig($engineConfig);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->updateEngineConfig($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var EngineConfig $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
{
$formattedEngineConfigEngineVersion = AMLClient::engineVersionName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[ENGINE_VERSION]'
);
update_engine_config_sample($formattedEngineConfigEngineVersion);
}
updateInstance
Updates the parameters of a single Instance.
The async variant is AMLClient::updateInstanceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateInstanceRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\Instance;
use Google\Cloud\FinancialServices\V1\UpdateInstanceRequest;
use Google\Rpc\Status;
/**
* @param string $instanceKmsKey The KMS key name used for CMEK (encryption-at-rest).
* format:
* `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}`
* VPC-SC restrictions apply.
*/
function update_instance_sample(string $instanceKmsKey): void
{
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$instance = (new Instance())
->setKmsKey($instanceKmsKey);
$request = (new UpdateInstanceRequest())
->setInstance($instance);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->updateInstance($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Instance $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
{
$instanceKmsKey = '[KMS_KEY]';
update_instance_sample($instanceKmsKey);
}
updateModel
Updates the parameters of a single Model.
The async variant is AMLClient::updateModelAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateModelRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\Model;
use Google\Cloud\FinancialServices\V1\UpdateModelRequest;
use Google\Protobuf\Timestamp;
use Google\Rpc\Status;
/**
* @param string $formattedModelEngineConfig The resource name of the EngineConfig the model training will be
* based on. Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engineConfig}`
* Please see {@see AMLClient::engineConfigName()} for help formatting this field.
* @param string $formattedModelPrimaryDataset The resource name of the Primary Dataset used in this model
* training. For information about how primary and auxiliary datasets are
* used, refer to the engine version's documentation. Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}`
* Please see {@see AMLClient::datasetName()} for help formatting this field.
*/
function update_model_sample(
string $formattedModelEngineConfig,
string $formattedModelPrimaryDataset
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$modelEndTime = new Timestamp();
$model = (new Model())
->setEngineConfig($formattedModelEngineConfig)
->setPrimaryDataset($formattedModelPrimaryDataset)
->setEndTime($modelEndTime);
$request = (new UpdateModelRequest())
->setModel($model);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->updateModel($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var Model $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
{
$formattedModelEngineConfig = AMLClient::engineConfigName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[ENGINE_CONFIG]'
);
$formattedModelPrimaryDataset = AMLClient::datasetName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[DATASET]'
);
update_model_sample($formattedModelEngineConfig, $formattedModelPrimaryDataset);
}
updatePredictionResult
Updates the parameters of a single PredictionResult.
The async variant is AMLClient::updatePredictionResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdatePredictionResultRequest
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 |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\FinancialServices\V1\BigQueryDestination;
use Google\Cloud\FinancialServices\V1\BigQueryDestination\WriteDisposition;
use Google\Cloud\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\FinancialServices\V1\PredictionResult;
use Google\Cloud\FinancialServices\V1\PredictionResult\Outputs;
use Google\Cloud\FinancialServices\V1\UpdatePredictionResultRequest;
use Google\Protobuf\Timestamp;
use Google\Rpc\Status;
/**
* @param string $formattedPredictionResultDataset The resource name of the Dataset to do predictions on
* Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/dataset/{dataset_id}`
* Please see {@see AMLClient::datasetName()} for help formatting this field.
* @param string $formattedPredictionResultModel The resource name of the Model to use to use to make predictions
* Format:
* `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}`
* Please see {@see AMLClient::modelName()} for help formatting this field.
* @param int $predictionResultOutputsPredictionDestinationWriteDisposition Whether or not to overwrite the destination table. By default the
* table won't be overwritten and an error will be returned if the table
* exists and contains data.
*/
function update_prediction_result_sample(
string $formattedPredictionResultDataset,
string $formattedPredictionResultModel,
int $predictionResultOutputsPredictionDestinationWriteDisposition
): void {
// Create a client.
$aMLClient = new AMLClient();
// Prepare the request message.
$predictionResultEndTime = new Timestamp();
$predictionResultOutputsPredictionDestination = (new BigQueryDestination())
->setWriteDisposition($predictionResultOutputsPredictionDestinationWriteDisposition);
$predictionResultOutputs = (new Outputs())
->setPredictionDestination($predictionResultOutputsPredictionDestination);
$predictionResult = (new PredictionResult())
->setDataset($formattedPredictionResultDataset)
->setModel($formattedPredictionResultModel)
->setEndTime($predictionResultEndTime)
->setOutputs($predictionResultOutputs);
$request = (new UpdatePredictionResultRequest())
->setPredictionResult($predictionResult);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $aMLClient->updatePredictionResult($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var PredictionResult $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
{
$formattedPredictionResultDataset = AMLClient::datasetName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[DATASET]'
);
$formattedPredictionResultModel = AMLClient::modelName(
'[PROJECT_NUM]',
'[LOCATION]',
'[INSTANCE]',
'[MODEL]'
);
$predictionResultOutputsPredictionDestinationWriteDisposition = WriteDisposition::WRITE_DISPOSITION_UNSPECIFIED;
update_prediction_result_sample(
$formattedPredictionResultDataset,
$formattedPredictionResultModel,
$predictionResultOutputsPredictionDestinationWriteDisposition
);
}
getLocation
Gets information about a location.
The async variant is AMLClient::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\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
/**
* 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.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = new GetLocationRequest();
// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $aMLClient->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 AMLClient::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\FinancialServices\V1\Client\AMLClient;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
/**
* 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.
$aMLClient = new AMLClient();
// Prepare the request message.
$request = new ListLocationsRequest();
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $aMLClient->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());
}
}
createBacktestResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateBacktestResultRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createDatasetAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateDatasetRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createEngineConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateEngineConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createInstanceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateInstanceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreateModelRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createPredictionResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\CreatePredictionResultRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deleteBacktestResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteBacktestResultRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deleteDatasetAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteDatasetRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deleteEngineConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteEngineConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deleteInstanceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteInstanceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deleteModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeleteModelRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deletePredictionResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\DeletePredictionResultRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
exportBacktestResultMetadataAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportBacktestResultMetadataRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
exportEngineConfigMetadataAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportEngineConfigMetadataRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
exportModelMetadataAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportModelMetadataRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
exportPredictionResultMetadataAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportPredictionResultMetadataRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
exportRegisteredPartiesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ExportRegisteredPartiesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
getBacktestResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetBacktestResultRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\FinancialServices\V1\BacktestResult> |
getDatasetAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetDatasetRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\FinancialServices\V1\Dataset> |
getEngineConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetEngineConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\FinancialServices\V1\EngineConfig> |
getEngineVersionAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetEngineVersionRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\FinancialServices\V1\EngineVersion> |
getInstanceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetInstanceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\FinancialServices\V1\Instance> |
getModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetModelRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\FinancialServices\V1\Model> |
getPredictionResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\GetPredictionResultRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\FinancialServices\V1\PredictionResult> |
importRegisteredPartiesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ImportRegisteredPartiesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
listBacktestResultsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListBacktestResultsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listDatasetsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListDatasetsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEngineConfigsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListEngineConfigsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listEngineVersionsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListEngineVersionsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listInstancesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListInstancesRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listModelsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListModelsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listPredictionResultsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\ListPredictionResultsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
updateBacktestResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateBacktestResultRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
updateDatasetAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateDatasetRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
updateEngineConfigAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateEngineConfigRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
updateInstanceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateInstanceRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
updateModelAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdateModelRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
updatePredictionResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\FinancialServices\V1\UpdatePredictionResultRequest
|
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::backtestResultName
Formats a string containing the fully-qualified path to represent a backtest_result resource.
Parameters | |
---|---|
Name | Description |
projectNum |
string
|
location |
string
|
instance |
string
|
backtestResult |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted backtest_result resource. |
static::datasetName
Formats a string containing the fully-qualified path to represent a dataset resource.
Parameters | |
---|---|
Name | Description |
projectNum |
string
|
location |
string
|
instance |
string
|
dataset |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted dataset resource. |
static::engineConfigName
Formats a string containing the fully-qualified path to represent a engine_config resource.
Parameters | |
---|---|
Name | Description |
projectNum |
string
|
location |
string
|
instance |
string
|
engineConfig |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted engine_config resource. |
static::engineVersionName
Formats a string containing the fully-qualified path to represent a engine_version resource.
Parameters | |
---|---|
Name | Description |
projectNum |
string
|
location |
string
|
instance |
string
|
engineVersion |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted engine_version resource. |
static::instanceName
Formats a string containing the fully-qualified path to represent a instance resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
instance |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted instance 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::modelName
Formats a string containing the fully-qualified path to represent a model resource.
Parameters | |
---|---|
Name | Description |
projectNum |
string
|
location |
string
|
instance |
string
|
model |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted model resource. |
static::predictionResultName
Formats a string containing the fully-qualified path to represent a prediction_result resource.
Parameters | |
---|---|
Name | Description |
projectNum |
string
|
location |
string
|
instance |
string
|
predictionResult |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted prediction_result 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
- backtestResult: projects/{project_num}/locations/{location}/instances/{instance}/backtestResults/{backtest_result}
- dataset: projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}
- engineConfig: projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engine_config}
- engineVersion: projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}
- instance: projects/{project}/locations/{location}/instances/{instance}
- location: projects/{project}/locations/{location}
- model: projects/{project_num}/locations/{location}/instances/{instance}/models/{model}
- predictionResult: projects/{project_num}/locations/{location}/instances/{instance}/predictionResults/{prediction_result}
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. |