Skip to content

Commit

Permalink
feat: Update Compute Engine API to revision 20250107 (#975) (#8032)
Browse files Browse the repository at this point in the history
* feat: Update Compute Engine API to revision 20250107 (#975)
Source-Link: googleapis/googleapis@256da8c
Source-Link: googleapis/googleapis-gen@523a493
Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiNTIzYTQ5MzI4N2E2ODUyZDg3MTlkNzU5NTI4OWY2MWVkZGZjYzAxMCJ9
  • Loading branch information
gcf-owl-bot[bot] authored Jan 23, 2025
1 parent 33d74cb commit c9f0ba1
Show file tree
Hide file tree
Showing 29 changed files with 1,498 additions and 82 deletions.
Binary file modified Compute/metadata/V1/Compute.php
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php
/*
* Copyright 2025 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 compute_v1_generated_NetworkFirewallPolicies_AggregatedList_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Compute\V1\AggregatedListNetworkFirewallPoliciesRequest;
use Google\Cloud\Compute\V1\Client\NetworkFirewallPoliciesClient;

/**
* Retrieves an aggregated list of network firewall policies, listing network firewall policies from all applicable scopes (global and regional) and grouping the results per scope. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*
* @param string $project Project ID for this request.
*/
function aggregated_list_sample(string $project): void
{
// Create a client.
$networkFirewallPoliciesClient = new NetworkFirewallPoliciesClient();

// Prepare the request message.
$request = (new AggregatedListNetworkFirewallPoliciesRequest())
->setProject($project);

// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $networkFirewallPoliciesClient->aggregatedList($request);

foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* 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 callSample(): void
{
$project = '[PROJECT]';

aggregated_list_sample($project);
}
// [END compute_v1_generated_NetworkFirewallPolicies_AggregatedList_sync]
8 changes: 4 additions & 4 deletions Compute/src/V1/AccessConfig.php

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

388 changes: 388 additions & 0 deletions Compute/src/V1/AggregatedListNetworkFirewallPoliciesRequest.php

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Compute/src/V1/AttachedDiskInitializeParams.php

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

29 changes: 29 additions & 0 deletions Compute/src/V1/Client/NetworkFirewallPoliciesClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
use Google\Auth\FetchAuthTokenInterface;
use Google\Cloud\Compute\V1\AddAssociationNetworkFirewallPolicyRequest;
use Google\Cloud\Compute\V1\AddRuleNetworkFirewallPolicyRequest;
use Google\Cloud\Compute\V1\AggregatedListNetworkFirewallPoliciesRequest;
use Google\Cloud\Compute\V1\CloneRulesNetworkFirewallPolicyRequest;
use Google\Cloud\Compute\V1\DeleteNetworkFirewallPolicyRequest;
use Google\Cloud\Compute\V1\FirewallPolicy;
Expand Down Expand Up @@ -66,6 +67,7 @@
*
* @method PromiseInterface<OperationResponse> addAssociationAsync(AddAssociationNetworkFirewallPolicyRequest $request, array $optionalArgs = [])
* @method PromiseInterface<OperationResponse> addRuleAsync(AddRuleNetworkFirewallPolicyRequest $request, array $optionalArgs = [])
* @method PromiseInterface<PagedListResponse> aggregatedListAsync(AggregatedListNetworkFirewallPoliciesRequest $request, array $optionalArgs = [])
* @method PromiseInterface<OperationResponse> cloneRulesAsync(CloneRulesNetworkFirewallPolicyRequest $request, array $optionalArgs = [])
* @method PromiseInterface<OperationResponse> deleteAsync(DeleteNetworkFirewallPolicyRequest $request, array $optionalArgs = [])
* @method PromiseInterface<FirewallPolicy> getAsync(GetNetworkFirewallPolicyRequest $request, array $optionalArgs = [])
Expand Down Expand Up @@ -321,6 +323,33 @@ public function addRule(AddRuleNetworkFirewallPolicyRequest $request, array $cal
return $this->startApiCall('AddRule', $request, $callOptions)->wait();
}

/**
* Retrieves an aggregated list of network firewall policies, listing network firewall policies from all applicable scopes (global and regional) and grouping the results per scope. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*
* The async variant is {@see NetworkFirewallPoliciesClient::aggregatedListAsync()}
* .
*
* @example samples/V1/NetworkFirewallPoliciesClient/aggregated_list.php
*
* @param AggregatedListNetworkFirewallPoliciesRequest $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 PagedListResponse
*
* @throws ApiException Thrown if the API call fails.
*/
public function aggregatedList(AggregatedListNetworkFirewallPoliciesRequest $request, array $callOptions = []): PagedListResponse
{
return $this->startApiCall('AggregatedList', $request, $callOptions);
}

/**
* Copies rules to the specified firewall policy.
*
Expand Down
2 changes: 2 additions & 0 deletions Compute/src/V1/Enums/InterconnectAttachment/Bandwidth.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Bandwidth
{
const UNDEFINED_BANDWIDTH = 'UNDEFINED_BANDWIDTH';

const BPS_100G = 'BPS_100G';

const BPS_100M = 'BPS_100M';

const BPS_10G = 'BPS_10G';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/*
* Copyright 2025 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
* Generated by gapic-generator-php from the file
* https://github.com/googleapis/googleapis/blob/master/google/cloud/compute/v1/compute.proto
* Updates to the above are reflected here through a refresh process.
*/

namespace Google\Cloud\Compute\V1\Enums\NetworkRoutingConfig;

/**
* EffectiveBgpInterRegionCost contains string constants that represent the names
* of each value in the
* google.cloud.compute.v1.NetworkRoutingConfig.EffectiveBgpInterRegionCost
* descriptor.
*/
class EffectiveBgpInterRegionCost
{
const UNDEFINED_EFFECTIVE_BGP_INTER_REGION_COST = 'UNDEFINED_EFFECTIVE_BGP_INTER_REGION_COST';
}
8 changes: 4 additions & 4 deletions Compute/src/V1/ErrorInfo.php

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

Loading

0 comments on commit c9f0ba1

Please sign in to comment.