Reference documentation and code samples for the Google Cloud Dataform V1beta1 Client class DataformClient.
Service Description: Dataform is a service to develop, create, document, test, and update curated tables in BigQuery.
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.
This class is currently experimental and may be subject to changes.
Namespace
Google \ Cloud \ Dataform \ V1beta1 \ 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. |
↳ 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. |
cancelWorkflowInvocation
Requests cancellation of a running WorkflowInvocation.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::cancelWorkflowInvocationAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CancelWorkflowInvocationRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\CancelWorkflowInvocationRequest;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
/**
* @param string $formattedName The workflow invocation resource's name. Please see
* {@see DataformClient::workflowInvocationName()} for help formatting this field.
*/
function cancel_workflow_invocation_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new CancelWorkflowInvocationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$dataformClient->cancelWorkflowInvocation($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::workflowInvocationName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKFLOW_INVOCATION]'
);
cancel_workflow_invocation_sample($formattedName);
}
commitWorkspaceChanges
Applies a Git commit for uncommitted files in a Workspace.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::commitWorkspaceChangesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CommitWorkspaceChangesRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\CommitAuthor;
use Google\Cloud\Dataform\V1beta1\CommitWorkspaceChangesRequest;
/**
* @param string $formattedName The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $authorName The commit author's name.
* @param string $authorEmailAddress The commit author's email address.
*/
function commit_workspace_changes_sample(
string $formattedName,
string $authorName,
string $authorEmailAddress
): void {
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$author = (new CommitAuthor())
->setName($authorName)
->setEmailAddress($authorEmailAddress);
$request = (new CommitWorkspaceChangesRequest())
->setName($formattedName)
->setAuthor($author);
// Call the API and handle any network failures.
try {
$dataformClient->commitWorkspaceChanges($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$authorName = '[NAME]';
$authorEmailAddress = '[EMAIL_ADDRESS]';
commit_workspace_changes_sample($formattedName, $authorName, $authorEmailAddress);
}
createCompilationResult
Creates a new CompilationResult in a given project and location.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::createCompilationResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CreateCompilationResultRequest
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\Dataform\V1beta1\CompilationResult |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\CompilationResult;
use Google\Cloud\Dataform\V1beta1\CreateCompilationResultRequest;
/**
* @param string $formattedParent The repository in which to create the compilation result. Must be in the
* format `projects/*/locations/*/repositories/*`. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
*/
function create_compilation_result_sample(string $formattedParent): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$compilationResult = new CompilationResult();
$request = (new CreateCompilationResultRequest())
->setParent($formattedParent)
->setCompilationResult($compilationResult);
// Call the API and handle any network failures.
try {
/** @var CompilationResult $response */
$response = $dataformClient->createCompilationResult($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');
create_compilation_result_sample($formattedParent);
}
createRepository
Creates a new Repository in a given project and location.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::createRepositoryAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CreateRepositoryRequest
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\Dataform\V1beta1\Repository |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\CreateRepositoryRequest;
use Google\Cloud\Dataform\V1beta1\Repository;
/**
* @param string $formattedParent The location in which to create the repository. Must be in the format
* `projects/*/locations/*`. Please see
* {@see DataformClient::locationName()} for help formatting this field.
* @param string $repositoryId The ID to use for the repository, which will become the final component of
* the repository's resource name.
*/
function create_repository_sample(string $formattedParent, string $repositoryId): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$repository = new Repository();
$request = (new CreateRepositoryRequest())
->setParent($formattedParent)
->setRepository($repository)
->setRepositoryId($repositoryId);
// Call the API and handle any network failures.
try {
/** @var Repository $response */
$response = $dataformClient->createRepository($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DataformClient::locationName('[PROJECT]', '[LOCATION]');
$repositoryId = '[REPOSITORY_ID]';
create_repository_sample($formattedParent, $repositoryId);
}
createWorkflowInvocation
Creates a new WorkflowInvocation in a given Repository.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::createWorkflowInvocationAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CreateWorkflowInvocationRequest
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\Dataform\V1beta1\WorkflowInvocation |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\CreateWorkflowInvocationRequest;
use Google\Cloud\Dataform\V1beta1\WorkflowInvocation;
/**
* @param string $formattedParent The repository in which to create the workflow invocation. Must be in the
* format `projects/*/locations/*/repositories/*`. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
*/
function create_workflow_invocation_sample(string $formattedParent): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$workflowInvocation = new WorkflowInvocation();
$request = (new CreateWorkflowInvocationRequest())
->setParent($formattedParent)
->setWorkflowInvocation($workflowInvocation);
// Call the API and handle any network failures.
try {
/** @var WorkflowInvocation $response */
$response = $dataformClient->createWorkflowInvocation($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');
create_workflow_invocation_sample($formattedParent);
}
createWorkspace
Creates a new Workspace in a given Repository.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::createWorkspaceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CreateWorkspaceRequest
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\Dataform\V1beta1\Workspace |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\CreateWorkspaceRequest;
use Google\Cloud\Dataform\V1beta1\Workspace;
/**
* @param string $formattedParent The repository in which to create the workspace. Must be in the format
* `projects/*/locations/*/repositories/*`. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
* @param string $workspaceId The ID to use for the workspace, which will become the final component of
* the workspace's resource name.
*/
function create_workspace_sample(string $formattedParent, string $workspaceId): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$workspace = new Workspace();
$request = (new CreateWorkspaceRequest())
->setParent($formattedParent)
->setWorkspace($workspace)
->setWorkspaceId($workspaceId);
// Call the API and handle any network failures.
try {
/** @var Workspace $response */
$response = $dataformClient->createWorkspace($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');
$workspaceId = '[WORKSPACE_ID]';
create_workspace_sample($formattedParent, $workspaceId);
}
deleteRepository
Deletes a single Repository.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::deleteRepositoryAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\DeleteRepositoryRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\DeleteRepositoryRequest;
/**
* @param string $formattedName The repository's name. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
*/
function delete_repository_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new DeleteRepositoryRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$dataformClient->deleteRepository($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');
delete_repository_sample($formattedName);
}
deleteWorkflowInvocation
Deletes a single WorkflowInvocation.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::deleteWorkflowInvocationAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\DeleteWorkflowInvocationRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\DeleteWorkflowInvocationRequest;
/**
* @param string $formattedName The workflow invocation resource's name. Please see
* {@see DataformClient::workflowInvocationName()} for help formatting this field.
*/
function delete_workflow_invocation_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new DeleteWorkflowInvocationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$dataformClient->deleteWorkflowInvocation($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::workflowInvocationName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKFLOW_INVOCATION]'
);
delete_workflow_invocation_sample($formattedName);
}
deleteWorkspace
Deletes a single Workspace.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::deleteWorkspaceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\DeleteWorkspaceRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\DeleteWorkspaceRequest;
/**
* @param string $formattedName The workspace resource's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
*/
function delete_workspace_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new DeleteWorkspaceRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$dataformClient->deleteWorkspace($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
delete_workspace_sample($formattedName);
}
fetchFileDiff
Fetches Git diff for an uncommitted file in a Workspace.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::fetchFileDiffAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\FetchFileDiffRequest
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\Dataform\V1beta1\FetchFileDiffResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\FetchFileDiffRequest;
use Google\Cloud\Dataform\V1beta1\FetchFileDiffResponse;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $path The file's full path including filename, relative to the workspace root.
*/
function fetch_file_diff_sample(string $formattedWorkspace, string $path): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new FetchFileDiffRequest())
->setWorkspace($formattedWorkspace)
->setPath($path);
// Call the API and handle any network failures.
try {
/** @var FetchFileDiffResponse $response */
$response = $dataformClient->fetchFileDiff($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
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$path = '[PATH]';
fetch_file_diff_sample($formattedWorkspace, $path);
}
fetchFileGitStatuses
Fetches Git statuses for the files in a Workspace.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::fetchFileGitStatusesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\FetchFileGitStatusesRequest
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\Dataform\V1beta1\FetchFileGitStatusesResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\FetchFileGitStatusesRequest;
use Google\Cloud\Dataform\V1beta1\FetchFileGitStatusesResponse;
/**
* @param string $formattedName The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
*/
function fetch_file_git_statuses_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new FetchFileGitStatusesRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var FetchFileGitStatusesResponse $response */
$response = $dataformClient->fetchFileGitStatuses($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 = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
fetch_file_git_statuses_sample($formattedName);
}
fetchGitAheadBehind
Fetches Git ahead/behind against a remote branch.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::fetchGitAheadBehindAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\FetchGitAheadBehindRequest
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\Dataform\V1beta1\FetchGitAheadBehindResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\FetchGitAheadBehindRequest;
use Google\Cloud\Dataform\V1beta1\FetchGitAheadBehindResponse;
/**
* @param string $formattedName The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
*/
function fetch_git_ahead_behind_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new FetchGitAheadBehindRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var FetchGitAheadBehindResponse $response */
$response = $dataformClient->fetchGitAheadBehind($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 = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
fetch_git_ahead_behind_sample($formattedName);
}
fetchRemoteBranches
Fetches a Repository's remote branches.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::fetchRemoteBranchesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\FetchRemoteBranchesRequest
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\Dataform\V1beta1\FetchRemoteBranchesResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\FetchRemoteBranchesRequest;
use Google\Cloud\Dataform\V1beta1\FetchRemoteBranchesResponse;
/**
* @param string $formattedName The repository's name. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
*/
function fetch_remote_branches_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new FetchRemoteBranchesRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var FetchRemoteBranchesResponse $response */
$response = $dataformClient->fetchRemoteBranches($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 = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');
fetch_remote_branches_sample($formattedName);
}
getCompilationResult
Fetches a single CompilationResult.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::getCompilationResultAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\GetCompilationResultRequest
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\Dataform\V1beta1\CompilationResult |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\CompilationResult;
use Google\Cloud\Dataform\V1beta1\GetCompilationResultRequest;
/**
* @param string $formattedName The compilation result's name. Please see
* {@see DataformClient::compilationResultName()} for help formatting this field.
*/
function get_compilation_result_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new GetCompilationResultRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var CompilationResult $response */
$response = $dataformClient->getCompilationResult($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 = DataformClient::compilationResultName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[COMPILATION_RESULT]'
);
get_compilation_result_sample($formattedName);
}
getRepository
Fetches a single Repository.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::getRepositoryAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\GetRepositoryRequest
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\Dataform\V1beta1\Repository |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\GetRepositoryRequest;
use Google\Cloud\Dataform\V1beta1\Repository;
/**
* @param string $formattedName The repository's name. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
*/
function get_repository_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new GetRepositoryRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Repository $response */
$response = $dataformClient->getRepository($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 = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');
get_repository_sample($formattedName);
}
getWorkflowInvocation
Fetches a single WorkflowInvocation.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::getWorkflowInvocationAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\GetWorkflowInvocationRequest
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\Dataform\V1beta1\WorkflowInvocation |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\GetWorkflowInvocationRequest;
use Google\Cloud\Dataform\V1beta1\WorkflowInvocation;
/**
* @param string $formattedName The workflow invocation resource's name. Please see
* {@see DataformClient::workflowInvocationName()} for help formatting this field.
*/
function get_workflow_invocation_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new GetWorkflowInvocationRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var WorkflowInvocation $response */
$response = $dataformClient->getWorkflowInvocation($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 = DataformClient::workflowInvocationName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKFLOW_INVOCATION]'
);
get_workflow_invocation_sample($formattedName);
}
getWorkspace
Fetches a single Workspace.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::getWorkspaceAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\GetWorkspaceRequest
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\Dataform\V1beta1\Workspace |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\GetWorkspaceRequest;
use Google\Cloud\Dataform\V1beta1\Workspace;
/**
* @param string $formattedName The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
*/
function get_workspace_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new GetWorkspaceRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Workspace $response */
$response = $dataformClient->getWorkspace($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 = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
get_workspace_sample($formattedName);
}
installNpmPackages
Installs dependency NPM packages (inside a Workspace).
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::installNpmPackagesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\InstallNpmPackagesRequest
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\Dataform\V1beta1\InstallNpmPackagesResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\InstallNpmPackagesRequest;
use Google\Cloud\Dataform\V1beta1\InstallNpmPackagesResponse;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
*/
function install_npm_packages_sample(string $formattedWorkspace): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new InstallNpmPackagesRequest())
->setWorkspace($formattedWorkspace);
// Call the API and handle any network failures.
try {
/** @var InstallNpmPackagesResponse $response */
$response = $dataformClient->installNpmPackages($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
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
install_npm_packages_sample($formattedWorkspace);
}
listCompilationResults
Lists CompilationResults in a given Repository.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::listCompilationResultsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ListCompilationResultsRequest
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\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\CompilationResult;
use Google\Cloud\Dataform\V1beta1\ListCompilationResultsRequest;
/**
* @param string $formattedParent The repository in which to list compilation results. Must be in the
* format `projects/*/locations/*/repositories/*`. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
*/
function list_compilation_results_sample(string $formattedParent): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new ListCompilationResultsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $dataformClient->listCompilationResults($request);
/** @var CompilationResult $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 = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');
list_compilation_results_sample($formattedParent);
}
listRepositories
Lists Repositories in a given project and location.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::listRepositoriesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ListRepositoriesRequest
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\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\ListRepositoriesRequest;
use Google\Cloud\Dataform\V1beta1\Repository;
/**
* @param string $formattedParent The location in which to list repositories. Must be in the format
* `projects/*/locations/*`. Please see
* {@see DataformClient::locationName()} for help formatting this field.
*/
function list_repositories_sample(string $formattedParent): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new ListRepositoriesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $dataformClient->listRepositories($request);
/** @var Repository $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 = DataformClient::locationName('[PROJECT]', '[LOCATION]');
list_repositories_sample($formattedParent);
}
listWorkflowInvocations
Lists WorkflowInvocations in a given Repository.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::listWorkflowInvocationsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ListWorkflowInvocationsRequest
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\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\ListWorkflowInvocationsRequest;
use Google\Cloud\Dataform\V1beta1\WorkflowInvocation;
/**
* @param string $formattedParent The parent resource of the WorkflowInvocation type. Must be in the
* format `projects/*/locations/*/repositories/*`. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
*/
function list_workflow_invocations_sample(string $formattedParent): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new ListWorkflowInvocationsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $dataformClient->listWorkflowInvocations($request);
/** @var WorkflowInvocation $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 = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');
list_workflow_invocations_sample($formattedParent);
}
listWorkspaces
Lists Workspaces in a given Repository.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::listWorkspacesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ListWorkspacesRequest
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\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\ListWorkspacesRequest;
use Google\Cloud\Dataform\V1beta1\Workspace;
/**
* @param string $formattedParent The repository in which to list workspaces. Must be in the
* format `projects/*/locations/*/repositories/*`. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
*/
function list_workspaces_sample(string $formattedParent): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new ListWorkspacesRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $dataformClient->listWorkspaces($request);
/** @var Workspace $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 = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');
list_workspaces_sample($formattedParent);
}
makeDirectory
Creates a directory inside a Workspace.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::makeDirectoryAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\MakeDirectoryRequest
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\Dataform\V1beta1\MakeDirectoryResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\MakeDirectoryRequest;
use Google\Cloud\Dataform\V1beta1\MakeDirectoryResponse;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $path The directory's full path including directory name, relative to the
* workspace root.
*/
function make_directory_sample(string $formattedWorkspace, string $path): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new MakeDirectoryRequest())
->setWorkspace($formattedWorkspace)
->setPath($path);
// Call the API and handle any network failures.
try {
/** @var MakeDirectoryResponse $response */
$response = $dataformClient->makeDirectory($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
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$path = '[PATH]';
make_directory_sample($formattedWorkspace, $path);
}
moveDirectory
Moves a directory (inside a Workspace), and all of its contents, to a new location.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::moveDirectoryAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\MoveDirectoryRequest
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\Dataform\V1beta1\MoveDirectoryResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\MoveDirectoryRequest;
use Google\Cloud\Dataform\V1beta1\MoveDirectoryResponse;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $path The directory's full path including directory name, relative to the
* workspace root.
* @param string $newPath The new path for the directory including directory name, rooted at
* workspace root.
*/
function move_directory_sample(string $formattedWorkspace, string $path, string $newPath): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new MoveDirectoryRequest())
->setWorkspace($formattedWorkspace)
->setPath($path)
->setNewPath($newPath);
// Call the API and handle any network failures.
try {
/** @var MoveDirectoryResponse $response */
$response = $dataformClient->moveDirectory($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
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$path = '[PATH]';
$newPath = '[NEW_PATH]';
move_directory_sample($formattedWorkspace, $path, $newPath);
}
moveFile
Moves a file (inside a Workspace) to a new location.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::moveFileAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\MoveFileRequest
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\Dataform\V1beta1\MoveFileResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\MoveFileRequest;
use Google\Cloud\Dataform\V1beta1\MoveFileResponse;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $path The file's full path including filename, relative to the workspace root.
* @param string $newPath The file's new path including filename, relative to the workspace root.
*/
function move_file_sample(string $formattedWorkspace, string $path, string $newPath): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new MoveFileRequest())
->setWorkspace($formattedWorkspace)
->setPath($path)
->setNewPath($newPath);
// Call the API and handle any network failures.
try {
/** @var MoveFileResponse $response */
$response = $dataformClient->moveFile($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
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$path = '[PATH]';
$newPath = '[NEW_PATH]';
move_file_sample($formattedWorkspace, $path, $newPath);
}
pullGitCommits
Pulls Git commits from the Repository's remote into a Workspace.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::pullGitCommitsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\PullGitCommitsRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\CommitAuthor;
use Google\Cloud\Dataform\V1beta1\PullGitCommitsRequest;
/**
* @param string $formattedName The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $authorName The commit author's name.
* @param string $authorEmailAddress The commit author's email address.
*/
function pull_git_commits_sample(
string $formattedName,
string $authorName,
string $authorEmailAddress
): void {
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$author = (new CommitAuthor())
->setName($authorName)
->setEmailAddress($authorEmailAddress);
$request = (new PullGitCommitsRequest())
->setName($formattedName)
->setAuthor($author);
// Call the API and handle any network failures.
try {
$dataformClient->pullGitCommits($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$authorName = '[NAME]';
$authorEmailAddress = '[EMAIL_ADDRESS]';
pull_git_commits_sample($formattedName, $authorName, $authorEmailAddress);
}
pushGitCommits
Pushes Git commits from a Workspace to the Repository's remote.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::pushGitCommitsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\PushGitCommitsRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\PushGitCommitsRequest;
/**
* @param string $formattedName The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
*/
function push_git_commits_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new PushGitCommitsRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$dataformClient->pushGitCommits($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
push_git_commits_sample($formattedName);
}
queryCompilationResultActions
Returns CompilationResultActions in a given CompilationResult.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::queryCompilationResultActionsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\QueryCompilationResultActionsRequest
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\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\CompilationResultAction;
use Google\Cloud\Dataform\V1beta1\QueryCompilationResultActionsRequest;
/**
* @param string $formattedName The compilation result's name. Please see
* {@see DataformClient::compilationResultName()} for help formatting this field.
*/
function query_compilation_result_actions_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new QueryCompilationResultActionsRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $dataformClient->queryCompilationResultActions($request);
/** @var CompilationResultAction $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
{
$formattedName = DataformClient::compilationResultName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[COMPILATION_RESULT]'
);
query_compilation_result_actions_sample($formattedName);
}
queryDirectoryContents
Returns the contents of a given Workspace directory.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::queryDirectoryContentsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\QueryDirectoryContentsRequest
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\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\QueryDirectoryContentsRequest;
use Google\Cloud\Dataform\V1beta1\QueryDirectoryContentsResponse\DirectoryEntry;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
*/
function query_directory_contents_sample(string $formattedWorkspace): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new QueryDirectoryContentsRequest())
->setWorkspace($formattedWorkspace);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $dataformClient->queryDirectoryContents($request);
/** @var DirectoryEntry $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
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
query_directory_contents_sample($formattedWorkspace);
}
queryWorkflowInvocationActions
Returns WorkflowInvocationActions in a given WorkflowInvocation.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::queryWorkflowInvocationActionsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\QueryWorkflowInvocationActionsRequest
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\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\QueryWorkflowInvocationActionsRequest;
use Google\Cloud\Dataform\V1beta1\WorkflowInvocationAction;
/**
* @param string $formattedName The workflow invocation's name. Please see
* {@see DataformClient::workflowInvocationName()} for help formatting this field.
*/
function query_workflow_invocation_actions_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new QueryWorkflowInvocationActionsRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $dataformClient->queryWorkflowInvocationActions($request);
/** @var WorkflowInvocationAction $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
{
$formattedName = DataformClient::workflowInvocationName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKFLOW_INVOCATION]'
);
query_workflow_invocation_actions_sample($formattedName);
}
readFile
Returns the contents of a file (inside a Workspace).
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::readFileAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ReadFileRequest
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\Dataform\V1beta1\ReadFileResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\ReadFileRequest;
use Google\Cloud\Dataform\V1beta1\ReadFileResponse;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $path The file's full path including filename, relative to the workspace root.
*/
function read_file_sample(string $formattedWorkspace, string $path): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new ReadFileRequest())
->setWorkspace($formattedWorkspace)
->setPath($path);
// Call the API and handle any network failures.
try {
/** @var ReadFileResponse $response */
$response = $dataformClient->readFile($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
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$path = '[PATH]';
read_file_sample($formattedWorkspace, $path);
}
removeDirectory
Deletes a directory (inside a Workspace) and all of its contents.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::removeDirectoryAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\RemoveDirectoryRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\RemoveDirectoryRequest;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $path The directory's full path including directory name, relative to the
* workspace root.
*/
function remove_directory_sample(string $formattedWorkspace, string $path): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new RemoveDirectoryRequest())
->setWorkspace($formattedWorkspace)
->setPath($path);
// Call the API and handle any network failures.
try {
$dataformClient->removeDirectory($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$path = '[PATH]';
remove_directory_sample($formattedWorkspace, $path);
}
removeFile
Deletes a file (inside a Workspace).
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::removeFileAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\RemoveFileRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\RemoveFileRequest;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $path The file's full path including filename, relative to the workspace root.
*/
function remove_file_sample(string $formattedWorkspace, string $path): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new RemoveFileRequest())
->setWorkspace($formattedWorkspace)
->setPath($path);
// Call the API and handle any network failures.
try {
$dataformClient->removeFile($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$path = '[PATH]';
remove_file_sample($formattedWorkspace, $path);
}
resetWorkspaceChanges
Performs a Git reset for uncommitted files in a Workspace.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::resetWorkspaceChangesAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ResetWorkspaceChangesRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\ResetWorkspaceChangesRequest;
/**
* @param string $formattedName The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
*/
function reset_workspace_changes_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new ResetWorkspaceChangesRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$dataformClient->resetWorkspaceChanges($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
reset_workspace_changes_sample($formattedName);
}
updateRepository
Updates a single Repository.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::updateRepositoryAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\UpdateRepositoryRequest
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\Dataform\V1beta1\Repository |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\Repository;
use Google\Cloud\Dataform\V1beta1\UpdateRepositoryRequest;
/**
* 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_repository_sample(): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$repository = new Repository();
$request = (new UpdateRepositoryRequest())
->setRepository($repository);
// Call the API and handle any network failures.
try {
/** @var Repository $response */
$response = $dataformClient->updateRepository($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
writeFile
Writes to a file (inside a Workspace).
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::writeFileAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\WriteFileRequest
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\Dataform\V1beta1\WriteFileResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\WriteFileRequest;
use Google\Cloud\Dataform\V1beta1\WriteFileResponse;
/**
* @param string $formattedWorkspace The workspace's name. Please see
* {@see DataformClient::workspaceName()} for help formatting this field.
* @param string $path The file.
* @param string $contents The file's contents.
*/
function write_file_sample(string $formattedWorkspace, string $path, string $contents): void
{
// Create a client.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = (new WriteFileRequest())
->setWorkspace($formattedWorkspace)
->setPath($path)
->setContents($contents);
// Call the API and handle any network failures.
try {
/** @var WriteFileResponse $response */
$response = $dataformClient->writeFile($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
{
$formattedWorkspace = DataformClient::workspaceName(
'[PROJECT]',
'[LOCATION]',
'[REPOSITORY]',
'[WORKSPACE]'
);
$path = '[PATH]';
$contents = '...';
write_file_sample($formattedWorkspace, $path, $contents);
}
getLocation
Gets information about a location.
The async variant is Google\Cloud\Dataform\V1beta1\Client\DataformClient::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\Dataform\V1beta1\Client\DataformClient;
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.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = new GetLocationRequest();
// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $dataformClient->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 Google\Cloud\Dataform\V1beta1\Client\DataformClient::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\Dataform\V1beta1\Client\DataformClient;
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.
$dataformClient = new DataformClient();
// Prepare the request message.
$request = new ListLocationsRequest();
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $dataformClient->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());
}
}
cancelWorkflowInvocationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CancelWorkflowInvocationRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
commitWorkspaceChangesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CommitWorkspaceChangesRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
createCompilationResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CreateCompilationResultRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
createRepositoryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CreateRepositoryRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
createWorkflowInvocationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CreateWorkflowInvocationRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
createWorkspaceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\CreateWorkspaceRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
deleteRepositoryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\DeleteRepositoryRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
deleteWorkflowInvocationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\DeleteWorkflowInvocationRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
deleteWorkspaceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\DeleteWorkspaceRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
fetchFileDiffAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\FetchFileDiffRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
fetchFileGitStatusesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\FetchFileGitStatusesRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
fetchGitAheadBehindAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\FetchGitAheadBehindRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
fetchRemoteBranchesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\FetchRemoteBranchesRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getCompilationResultAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\GetCompilationResultRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getRepositoryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\GetRepositoryRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getWorkflowInvocationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\GetWorkflowInvocationRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getWorkspaceAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\GetWorkspaceRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
installNpmPackagesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\InstallNpmPackagesRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
listCompilationResultsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ListCompilationResultsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
listRepositoriesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ListRepositoriesRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
listWorkflowInvocationsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ListWorkflowInvocationsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
listWorkspacesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ListWorkspacesRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
makeDirectoryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\MakeDirectoryRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
moveDirectoryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\MoveDirectoryRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
moveFileAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\MoveFileRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
pullGitCommitsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\PullGitCommitsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
pushGitCommitsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\PushGitCommitsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
queryCompilationResultActionsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\QueryCompilationResultActionsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
queryDirectoryContentsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\QueryDirectoryContentsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
queryWorkflowInvocationActionsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\QueryWorkflowInvocationActionsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
readFileAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ReadFileRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
removeDirectoryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\RemoveDirectoryRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
removeFileAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\RemoveFileRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
resetWorkspaceChangesAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\ResetWorkspaceChangesRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
updateRepositoryAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\UpdateRepositoryRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
writeFileAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Dataform\V1beta1\WriteFileRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
getLocationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
listLocationsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
|
optionalArgs = [] |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface |
static::compilationResultName
Formats a string containing the fully-qualified path to represent a compilation_result resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
repository |
string
|
compilationResult |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted compilation_result 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::repositoryName
Formats a string containing the fully-qualified path to represent a repository resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
repository |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted repository resource. |
static::secretVersionName
Formats a string containing the fully-qualified path to represent a secret_version resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
secret |
string
|
version |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted secret_version resource. |
static::workflowInvocationName
Formats a string containing the fully-qualified path to represent a workflow_invocation resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
repository |
string
|
workflowInvocation |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted workflow_invocation resource. |
static::workspaceName
Formats a string containing the fully-qualified path to represent a workspace resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
repository |
string
|
workspace |
string
|
Returns | |
---|---|
Type | Description |
string | The formatted workspace 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
- compilationResult: projects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}
- location: projects/{project}/locations/{location}
- repository: projects/{project}/locations/{location}/repositories/{repository}
- secretVersion: projects/{project}/secrets/{secret}/versions/{version}
- workflowInvocation: projects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}
- workspace: projects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}
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. |