Skip to content

Commit 36b874d

Browse files
feat: [DatabaseCenter] Adding Method AggregateFleet of Database Center API v1beta (#8828)
* feat: Adding Method QueryDatabaseResourceGroups of Database Center API v1beta This release includes: - `DatabaseCenter` service with `QueryDatabaseResourceGroups` method. - `All related enums. PiperOrigin-RevId: 850334121 Source-Link: googleapis/googleapis@b607ece Source-Link: googleapis/googleapis-gen@f1aa0f6 Copy-Tag: eyJwIjoiRGF0YWJhc2VDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6ImYxYWEwZjY0YTRhYzJlNjk5OTI2MWIzYThlZTExZTg4YzYyZjJiZmEifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add custom prompt config in the request and return prompt in the response feat: update min_speaker_count and max_speaker_count to be optional docs: Clarify that min_speaker_count and max_speaker_count in SpeakerDiarizationConfig are not currently used docs: Update guidance on how to enable speaker diarization; to enable, set the diarization_config field to an empty SpeakerDiarizationConfig message PiperOrigin-RevId: 852383212 Source-Link: googleapis/googleapis@1a14153 Source-Link: googleapis/googleapis-gen@c84243c Copy-Tag: eyJwIjoiRGF0YWJhc2VDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Adding Method AggregateFleet of Database Center API v1beta This release includes: - `DatabaseCenter` service with `AggregateFleet` method. - `All related enums. PiperOrigin-RevId: 853112628 Source-Link: googleapis/googleapis@5f9683c Source-Link: googleapis/googleapis-gen@7588645 Copy-Tag: eyJwIjoiRGF0YWJhc2VDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6Ijc1ODg2NDVhYWRjZTEwNWYzNTJlMWQwZWQ0NDY2ODIxYzlkMzRmOTcifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 291e98f commit 36b874d

65 files changed

Lines changed: 10403 additions & 9 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1.11 KB
Binary file not shown.
1.9 KB
Binary file not shown.
2.14 KB
Binary file not shown.
1.12 KB
Binary file not shown.
5.1 KB
Binary file not shown.
10.3 KB
Binary file not shown.
1.16 KB
Binary file not shown.
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?php
2+
/*
3+
* Copyright 2026 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START databasecenter_v1beta_generated_DatabaseCenter_AggregateFleet_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\PagedListResponse;
28+
use Google\Cloud\DatabaseCenter\V1beta\AggregateFleetRequest;
29+
use Google\Cloud\DatabaseCenter\V1beta\AggregateFleetRow;
30+
use Google\Cloud\DatabaseCenter\V1beta\Client\DatabaseCenterClient;
31+
32+
/**
33+
* AggregateFleet provides statistics about the fleet grouped by various
34+
* fields.
35+
*
36+
* @param string $parent Parent can be a project, a folder, or an organization. The search
37+
* is limited to the resources within the `scope`.
38+
*
39+
* The allowed values are:
40+
*
41+
* * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
42+
* * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
43+
* * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
44+
* * organizations/{ORGANIZATION_NUMBER} (e.g.,
45+
* "organizations/123456")
46+
*/
47+
function aggregate_fleet_sample(string $parent): void
48+
{
49+
// Create a client.
50+
$databaseCenterClient = new DatabaseCenterClient();
51+
52+
// Prepare the request message.
53+
$request = (new AggregateFleetRequest())
54+
->setParent($parent);
55+
56+
// Call the API and handle any network failures.
57+
try {
58+
/** @var PagedListResponse $response */
59+
$response = $databaseCenterClient->aggregateFleet($request);
60+
61+
/** @var AggregateFleetRow $element */
62+
foreach ($response as $element) {
63+
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
64+
}
65+
} catch (ApiException $ex) {
66+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
67+
}
68+
}
69+
70+
/**
71+
* Helper to execute the sample.
72+
*
73+
* This sample has been automatically generated and should be regarded as a code
74+
* template only. It will require modifications to work:
75+
* - It may require correct/in-range values for request initialization.
76+
* - It may require specifying regional endpoints when creating the service client,
77+
* please see the apiEndpoint client configuration option for more details.
78+
*/
79+
function callSample(): void
80+
{
81+
$parent = '[PARENT]';
82+
83+
aggregate_fleet_sample($parent);
84+
}
85+
// [END databasecenter_v1beta_generated_DatabaseCenter_AggregateFleet_sync]
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?php
2+
/*
3+
* Copyright 2025 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START databasecenter_v1beta_generated_DatabaseCenter_QueryDatabaseResourceGroups_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\PagedListResponse;
28+
use Google\Cloud\DatabaseCenter\V1beta\Client\DatabaseCenterClient;
29+
use Google\Cloud\DatabaseCenter\V1beta\DatabaseResourceGroup;
30+
use Google\Cloud\DatabaseCenter\V1beta\QueryDatabaseResourceGroupsRequest;
31+
32+
/**
33+
* QueryDatabaseResourceGroups returns paginated results of database groups.
34+
*
35+
* @param string $parent Parent can be a project, a folder, or an organization. The search
36+
* is limited to the resources within the `scope`.
37+
*
38+
* The allowed values are:
39+
*
40+
* * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
41+
* * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
42+
* * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
43+
* * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
44+
*/
45+
function query_database_resource_groups_sample(string $parent): void
46+
{
47+
// Create a client.
48+
$databaseCenterClient = new DatabaseCenterClient();
49+
50+
// Prepare the request message.
51+
$request = (new QueryDatabaseResourceGroupsRequest())
52+
->setParent($parent);
53+
54+
// Call the API and handle any network failures.
55+
try {
56+
/** @var PagedListResponse $response */
57+
$response = $databaseCenterClient->queryDatabaseResourceGroups($request);
58+
59+
/** @var DatabaseResourceGroup $element */
60+
foreach ($response as $element) {
61+
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
62+
}
63+
} catch (ApiException $ex) {
64+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
65+
}
66+
}
67+
68+
/**
69+
* Helper to execute the sample.
70+
*
71+
* This sample has been automatically generated and should be regarded as a code
72+
* template only. It will require modifications to work:
73+
* - It may require correct/in-range values for request initialization.
74+
* - It may require specifying regional endpoints when creating the service client,
75+
* please see the apiEndpoint client configuration option for more details.
76+
*/
77+
function callSample(): void
78+
{
79+
$parent = '[PARENT]';
80+
81+
query_database_resource_groups_sample($parent);
82+
}
83+
// [END databasecenter_v1beta_generated_DatabaseCenter_QueryDatabaseResourceGroups_sync]

0 commit comments

Comments
 (0)