Skip to content

Commit eaad63b

Browse files
feat: [DatabaseCenter] Adding Method AggregateIssueStats of Database Center API v1beta (#8865)
* feat: Adding Method AggregateIssueStats of Database Center API v1beta This release includes: - `DatabaseCenter` service with `AggregateIssueStats` method. - All related enums. PiperOrigin-RevId: 856484579 Source-Link: googleapis/googleapis@615bb9a Source-Link: googleapis/googleapis-gen@6428854 Copy-Tag: eyJwIjoiRGF0YWJhc2VDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6IjY0Mjg4NTQ1ZGVlZmVhM2IyOWRkY2I1ZThmZGJhZTYxZjQ3N2QxNmUifQ== * 🦉 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 62fdb19 commit eaad63b

13 files changed

Lines changed: 1100 additions & 1 deletion
1.15 KB
Binary file not shown.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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_AggregateIssueStats_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\DatabaseCenter\V1beta\AggregateIssueStatsRequest;
28+
use Google\Cloud\DatabaseCenter\V1beta\AggregateIssueStatsResponse;
29+
use Google\Cloud\DatabaseCenter\V1beta\Client\DatabaseCenterClient;
30+
31+
/**
32+
* AggregateIssueStats provides database resource issues statistics.
33+
*
34+
* @param string $parent Parent can be a project, a folder, or an organization. The search
35+
* is limited to the resources within the `scope`.
36+
*
37+
* The allowed values are:
38+
*
39+
* * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
40+
* * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
41+
* * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
42+
* * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
43+
*/
44+
function aggregate_issue_stats_sample(string $parent): void
45+
{
46+
// Create a client.
47+
$databaseCenterClient = new DatabaseCenterClient();
48+
49+
// Prepare the request message.
50+
$request = (new AggregateIssueStatsRequest())
51+
->setParent($parent);
52+
53+
// Call the API and handle any network failures.
54+
try {
55+
/** @var AggregateIssueStatsResponse $response */
56+
$response = $databaseCenterClient->aggregateIssueStats($request);
57+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
58+
} catch (ApiException $ex) {
59+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
60+
}
61+
}
62+
63+
/**
64+
* Helper to execute the sample.
65+
*
66+
* This sample has been automatically generated and should be regarded as a code
67+
* template only. It will require modifications to work:
68+
* - It may require correct/in-range values for request initialization.
69+
* - It may require specifying regional endpoints when creating the service client,
70+
* please see the apiEndpoint client configuration option for more details.
71+
*/
72+
function callSample(): void
73+
{
74+
$parent = '[PARENT]';
75+
76+
aggregate_issue_stats_sample($parent);
77+
}
78+
// [END databasecenter_v1beta_generated_DatabaseCenter_AggregateIssueStats_sync]

DatabaseCenter/src/V1beta/AggregateIssueStatsRequest.php

Lines changed: 260 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)