Skip to content

Commit

Permalink
fix: An existing resource pattern value `projects/{project}/buckets/{…
Browse files Browse the repository at this point in the history
…bucket}/managedFolders/{managedFolder=**}` to resource definition `storage.googleapis.com/ManagedFolder` is removed (#7286)

feat: A new resource pattern value `projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**}` added to the resource definition `storage.googleapis.com/ManagedFolder`
PiperOrigin-RevId: 630439820
Source-Link: googleapis/googleapis@d9a3161
Source-Link: googleapis/googleapis-gen@d39d37f
Copy-Tag: eyJwIjoiU3RvcmFnZUNvbnRyb2wvLk93bEJvdC55YW1sIiwiaCI6ImQzOWQzN2Y0YmFkOTc1ZGEwZmIwYmIyNzdkZDRlMThmYmViYTI0ZDUifQ==
  • Loading branch information
gcf-owl-bot[bot] authored May 6, 2024
1 parent c6f645f commit 5cd68b2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Binary file modified StorageControl/metadata/V2/StorageControl.php
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function callSample(): void
$formattedName = StorageControlClient::managedFolderName(
'[PROJECT]',
'[BUCKET]',
'[MANAGEDFOLDER]'
'[MANAGED_FOLDER]'
);

delete_managed_folder_sample($formattedName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function callSample(): void
$formattedName = StorageControlClient::managedFolderName(
'[PROJECT]',
'[BUCKET]',
'[MANAGEDFOLDER]'
'[MANAGED_FOLDER]'
);

get_managed_folder_sample($formattedName);
Expand Down
4 changes: 2 additions & 2 deletions StorageControl/src/V2/Client/StorageControlClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public static function managedFolderName(string $project, string $bucket, string
return self::getPathTemplate('managedFolder')->render([
'project' => $project,
'bucket' => $bucket,
'managedFolder' => $managedFolder,
'managed_folder' => $managedFolder,
]);
}

Expand All @@ -237,7 +237,7 @@ public static function storageLayoutName(string $project, string $bucket): strin
* Template: Pattern
* - bucket: projects/{project}/buckets/{bucket}
* - folder: projects/{project}/buckets/{bucket}/folders/{folder=**}
* - managedFolder: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder=**}
* - managedFolder: projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**}
* - storageLayout: projects/{project}/buckets/{bucket}/storageLayout
*
* The optional $template argument can be supplied to specify a particular pattern,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
'templateMap' => [
'bucket' => 'projects/{project}/buckets/{bucket}',
'folder' => 'projects/{project}/buckets/{bucket}/folders/{folder=**}',
'managedFolder' => 'projects/{project}/buckets/{bucket}/managedFolders/{managedFolder=**}',
'managedFolder' => 'projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**}',
'storageLayout' => 'projects/{project}/buckets/{bucket}/storageLayout',
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public function deleteManagedFolderTest()
$expectedResponse = new GPBEmpty();
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGEDFOLDER]');
$formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]');
$request = (new DeleteManagedFolderRequest())->setName($formattedName);
$gapicClient->deleteManagedFolder($request);
$actualRequests = $transport->popReceivedCalls();
Expand Down Expand Up @@ -351,7 +351,7 @@ public function deleteManagedFolderExceptionTest()
);
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGEDFOLDER]');
$formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]');
$request = (new DeleteManagedFolderRequest())->setName($formattedName);
try {
$gapicClient->deleteManagedFolder($request);
Expand Down Expand Up @@ -449,7 +449,7 @@ public function getManagedFolderTest()
$expectedResponse->setMetageneration($metageneration);
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGEDFOLDER]');
$formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]');
$request = (new GetManagedFolderRequest())->setName($formattedName);
$response = $gapicClient->getManagedFolder($request);
$this->assertEquals($expectedResponse, $response);
Expand Down Expand Up @@ -485,7 +485,7 @@ public function getManagedFolderExceptionTest()
);
$transport->addResponse(null, $status);
// Mock request
$formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGEDFOLDER]');
$formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]');
$request = (new GetManagedFolderRequest())->setName($formattedName);
try {
$gapicClient->getManagedFolder($request);
Expand Down

0 comments on commit 5cd68b2

Please sign in to comment.