Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dataform/metadata/V1Beta1/Dataform.php

Large diffs are not rendered by default.

82 changes: 82 additions & 0 deletions Dataform/samples/V1beta1/DataformClient/delete_folder_tree.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START dataform_v1beta1_generated_Dataform_DeleteFolderTree_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\DeleteFolderTreeRequest;
use Google\Rpc\Status;

/**
* Deletes a Folder with its contents (Folders, Repositories, Workspaces,
* ReleaseConfigs, and WorkflowConfigs).
*
* @param string $formattedName The Folder's name.
* Format: projects/{project}/locations/{location}/folders/{folder}
* Please see {@see DataformClient::folderName()} for help formatting this field.
*/
function delete_folder_tree_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();

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

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

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

/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::folderName('[PROJECT]', '[LOCATION]', '[FOLDER]');

delete_folder_tree_sample($formattedName);
}
// [END dataform_v1beta1_generated_Dataform_DeleteFolderTree_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?php
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START dataform_v1beta1_generated_Dataform_DeleteRepositoryLongRunning_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\DeleteRepositoryLongRunningRequest;
use Google\Cloud\Dataform\V1beta1\DeleteRepositoryLongRunningResponse;
use Google\Rpc\Status;

/**
* Deletes a single repository asynchronously.
*
* @param string $formattedName The repository's name. Please see
* {@see DataformClient::repositoryName()} for help formatting this field.
*/
function delete_repository_long_running_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();

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

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

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

/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]');

delete_repository_long_running_sample($formattedName);
}
// [END dataform_v1beta1_generated_Dataform_DeleteRepositoryLongRunning_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START dataform_v1beta1_generated_Dataform_DeleteTeamFolderTree_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Dataform\V1beta1\Client\DataformClient;
use Google\Cloud\Dataform\V1beta1\DeleteTeamFolderTreeRequest;
use Google\Rpc\Status;

/**
* Deletes a TeamFolder with its contents (Folders, Repositories, Workspaces,
* ReleaseConfigs, and WorkflowConfigs).
*
* @param string $formattedName The TeamFolder's name.
* Format: projects/{project}/locations/{location}/teamFolders/{team_folder}
* Please see {@see DataformClient::teamFolderName()} for help formatting this field.
*/
function delete_team_folder_tree_sample(string $formattedName): void
{
// Create a client.
$dataformClient = new DataformClient();

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

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

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

/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = DataformClient::teamFolderName('[PROJECT]', '[LOCATION]', '[TEAM_FOLDER]');

delete_team_folder_tree_sample($formattedName);
}
// [END dataform_v1beta1_generated_Dataform_DeleteTeamFolderTree_sync]
20 changes: 14 additions & 6 deletions Dataform/samples/V1beta1/DataformClient/list_locations.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,21 @@

/**
* Lists information about the supported locations for this service.
* This method can be called in two ways:
*
* * **List all public locations:** Use the path `GET /v1/locations`.
* * **List project-visible locations:** Use the path
* `GET /v1/projects/{project_id}/locations`. This may include public
* locations as well as private or other locations specifically visible
* to the project.
* This method lists locations based on the resource scope provided in
* the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: *
* **Global locations**: If `name` is empty, the method lists the
* public locations available to all projects. * **Project-specific
* locations**: If `name` follows the format
* `projects/{project}`, the method lists locations visible to that
* specific project. This includes public, private, or other
* project-specific locations enabled for the project.
*
* For gRPC and client library implementations, the resource name is
* passed as the `name` field. For direct service calls, the resource
* name is
* incorporated into the request path based on the specific service
* implementation and version.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/**
* Returns the contents of a given Folder.
*
* @param string $formattedFolder Name of the folder whose contents to list.
* @param string $formattedFolder Resource name of the Folder to list contents for.
* Format: projects/&#42;/locations/&#42;/folders/*
* Please see {@see DataformClient::folderName()} for help formatting this field.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/**
* Returns the contents of a given TeamFolder.
*
* @param string $formattedTeamFolder Name of the team_folder whose contents to list.
* @param string $formattedTeamFolder Resource name of the TeamFolder to list contents for.
* Format: `projects/&#42;/locations/&#42;/teamFolders/*`. Please see
* {@see DataformClient::teamFolderName()} for help formatting this field.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* The root folder contains all resources that are created by the user and not
* contained in any other folder.
*
* @param string $formattedLocation Location of the user root folder whose contents to list.
* @param string $formattedLocation Location of the user root folder to list contents for.
* Format: projects/&#42;/locations/*
* Please see {@see DataformClient::locationName()} for help formatting this field.
*/
Expand Down
Loading
Loading