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 BigQueryReservation/metadata/V1/Reservation.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?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 bigqueryreservation_v1_generated_ReservationService_UpdateReservationGroup_sync]
use Google\ApiCore\ApiException;
use Google\Cloud\BigQuery\Reservation\V1\Client\ReservationServiceClient;
use Google\Cloud\BigQuery\Reservation\V1\ReservationGroup;
use Google\Cloud\BigQuery\Reservation\V1\UpdateReservationGroupRequest;

/**
* Updates an existing reservation group resource.
*
* 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 update_reservation_group_sample(): void
{
// Create a client.
$reservationServiceClient = new ReservationServiceClient();

// Prepare the request message.
$reservationGroup = new ReservationGroup();
$request = (new UpdateReservationGroupRequest())
->setReservationGroup($reservationGroup);

// Call the API and handle any network failures.
try {
/** @var ReservationGroup $response */
$response = $reservationServiceClient->updateReservationGroup($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
// [END bigqueryreservation_v1_generated_ReservationService_UpdateReservationGroup_sync]
9 changes: 9 additions & 0 deletions BigQueryReservation/src/V1/Assignment/JobType.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions BigQueryReservation/src/V1/Client/ReservationServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
use Google\Cloud\BigQuery\Reservation\V1\UpdateAssignmentRequest;
use Google\Cloud\BigQuery\Reservation\V1\UpdateBiReservationRequest;
use Google\Cloud\BigQuery\Reservation\V1\UpdateCapacityCommitmentRequest;
use Google\Cloud\BigQuery\Reservation\V1\UpdateReservationGroupRequest;
use Google\Cloud\BigQuery\Reservation\V1\UpdateReservationRequest;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
Expand Down Expand Up @@ -128,6 +129,7 @@
* @method PromiseInterface<BiReservation> updateBiReservationAsync(UpdateBiReservationRequest $request, array $optionalArgs = [])
* @method PromiseInterface<CapacityCommitment> updateCapacityCommitmentAsync(UpdateCapacityCommitmentRequest $request, array $optionalArgs = [])
* @method PromiseInterface<Reservation> updateReservationAsync(UpdateReservationRequest $request, array $optionalArgs = [])
* @method PromiseInterface<ReservationGroup> updateReservationGroupAsync(UpdateReservationGroupRequest $request, array $optionalArgs = [])
*/
final class ReservationServiceClient
{
Expand Down Expand Up @@ -1374,4 +1376,33 @@ public function updateReservation(UpdateReservationRequest $request, array $call
{
return $this->startApiCall('UpdateReservation', $request, $callOptions)->wait();
}

/**
* Updates an existing reservation group resource.
*
* The async variant is
* {@see ReservationServiceClient::updateReservationGroupAsync()} .
*
* @example samples/V1/ReservationServiceClient/update_reservation_group.php
*
* @param UpdateReservationGroupRequest $request A request to house fields associated with the call.
* @param array $callOptions {
* Optional.
*
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return ReservationGroup
*
* @throws ApiException Thrown if the API call fails.
*/
public function updateReservationGroup(
UpdateReservationGroupRequest $request,
array $callOptions = []
): ReservationGroup {
return $this->startApiCall('UpdateReservationGroup', $request, $callOptions)->wait();
}
}
50 changes: 50 additions & 0 deletions BigQueryReservation/src/V1/Reservation.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

146 changes: 146 additions & 0 deletions BigQueryReservation/src/V1/ReservationGroup.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading