Skip to content

Commit 204f20f

Browse files
feat: [Compute] [DIREGAPIC] Update v1 API definitions to revision 20251202 (#8806)
* feat: [DIREGAPIC] Update v1 API definitions to revision 20251202 Source-Link: googleapis/googleapis@840758a Source-Link: googleapis/googleapis-gen@c6b688c Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiYzZiNjg4YzA2YmMyMDdiYjU3YWM0Y2Q3NjBiOTI0MDNiYzdmOTA2YyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 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 1e5edb3 commit 204f20f

472 files changed

Lines changed: 8911 additions & 5067 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.

Compute/metadata/V1/Compute.php

5.58 KB
Binary file not shown.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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 compute_v1_generated_Advice_CalendarMode_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\Compute\V1\CalendarModeAdviceRequest;
28+
use Google\Cloud\Compute\V1\CalendarModeAdviceResponse;
29+
use Google\Cloud\Compute\V1\CalendarModeAdviceRpcRequest;
30+
use Google\Cloud\Compute\V1\Client\AdviceClient;
31+
32+
/**
33+
* Advise how, where and when to create the requested amount of instances
34+
* with specified accelerators, within the specified time and location limits.
35+
* The method recommends creating future reservations for the requested
36+
* resources.
37+
*
38+
* @param string $project Project ID for this request.
39+
* @param string $region Name of the region for this request.
40+
*/
41+
function calendar_mode_sample(string $project, string $region): void
42+
{
43+
// Create a client.
44+
$adviceClient = new AdviceClient();
45+
46+
// Prepare the request message.
47+
$calendarModeAdviceRequestResource = new CalendarModeAdviceRequest();
48+
$request = (new CalendarModeAdviceRpcRequest())
49+
->setCalendarModeAdviceRequestResource($calendarModeAdviceRequestResource)
50+
->setProject($project)
51+
->setRegion($region);
52+
53+
// Call the API and handle any network failures.
54+
try {
55+
/** @var CalendarModeAdviceResponse $response */
56+
$response = $adviceClient->calendarMode($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+
$project = '[PROJECT]';
75+
$region = '[REGION]';
76+
77+
calendar_mode_sample($project, $region);
78+
}
79+
// [END compute_v1_generated_Advice_CalendarMode_sync]

Compute/src/V1/AcceleratorTopologiesInfoAcceleratorTopologyInfoInfoPerTopologyState/State.php

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

Compute/src/V1/AcceleratorType.php

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

Compute/src/V1/AcceleratorTypeAggregatedList.php

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

Compute/src/V1/AcceleratorTypeList.php

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

Compute/src/V1/AccessConfig.php

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

0 commit comments

Comments
 (0)