Skip to content

Commit

Permalink
fix!: Pagination feature is introduced for method ListKeyHandles in…
Browse files Browse the repository at this point in the history
… service `Autokey` (#7681)

feat: Adding a state field for AutokeyConfig

docs: Field service_resolvers in message .google.cloud.kms.v1.EkmConnection is Explicitly is marked as to have field behavior of Optional

docs: A comment for field `destroy_scheduled_duration` in message `.google.cloud.kms.v1.CryptoKey` is updated for the default duration
PiperOrigin-RevId: 676068244
Source-Link: googleapis/googleapis@42492c9
Source-Link: googleapis/googleapis-gen@4743218
Copy-Tag: eyJwIjoiS21zLy5Pd2xCb3QueWFtbCIsImgiOiI0NzQzMjE4MGJkZmJhODc5ZmM3ZjgyYzRjNDUxMTgxNzAyZjI1MDA5In0=
  • Loading branch information
gcf-owl-bot[bot] authored Sep 23, 2024
1 parent 96c41ea commit 0538022
Show file tree
Hide file tree
Showing 14 changed files with 300 additions and 27 deletions.
14 changes: 9 additions & 5 deletions Kms/metadata/V1/Autokey.php

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

Binary file modified Kms/metadata/V1/AutokeyAdmin.php
Binary file not shown.
Binary file modified Kms/metadata/V1/EkmService.php
Binary file not shown.
11 changes: 8 additions & 3 deletions Kms/samples/V1/AutokeyClient/list_key_handles.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@

// [START cloudkms_v1_generated_Autokey_ListKeyHandles_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Kms\V1\Client\AutokeyClient;
use Google\Cloud\Kms\V1\KeyHandle;
use Google\Cloud\Kms\V1\ListKeyHandlesRequest;
use Google\Cloud\Kms\V1\ListKeyHandlesResponse;

/**
* Lists [KeyHandles][google.cloud.kms.v1.KeyHandle].
Expand All @@ -47,9 +48,13 @@ function list_key_handles_sample(string $formattedParent): void

// Call the API and handle any network failures.
try {
/** @var ListKeyHandlesResponse $response */
/** @var PagedListResponse $response */
$response = $autokeyClient->listKeyHandles($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());

/** @var KeyHandle $element */
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());
}
Expand Down
34 changes: 34 additions & 0 deletions Kms/src/V1/AutokeyConfig.php

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

71 changes: 71 additions & 0 deletions Kms/src/V1/AutokeyConfig/State.php

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

3 changes: 2 additions & 1 deletion Kms/src/V1/Client/AutokeyAdminClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
use GuzzleHttp\Promise\PromiseInterface;

/**
* Service Description: Provides interfaces for managing Cloud KMS Autokey folder-level
* Service Description: Provides interfaces for managing [Cloud KMS
* Autokey](https://cloud.google.com/kms/help/autokey) folder-level
* configurations. A configuration is inherited by all descendent projects. A
* configuration at one folder overrides any other configurations in its
* ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS
Expand Down
10 changes: 5 additions & 5 deletions Kms/src/V1/Client/AutokeyClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
use Google\Cloud\Kms\V1\GetKeyHandleRequest;
use Google\Cloud\Kms\V1\KeyHandle;
use Google\Cloud\Kms\V1\ListKeyHandlesRequest;
use Google\Cloud\Kms\V1\ListKeyHandlesResponse;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
Expand All @@ -52,7 +51,8 @@
use GuzzleHttp\Promise\PromiseInterface;

/**
* Service Description: Provides interfaces for using Cloud KMS Autokey to provision new
* Service Description: Provides interfaces for using [Cloud KMS
* Autokey](https://cloud.google.com/kms/help/autokey) to provision new
* [CryptoKeys][google.cloud.kms.v1.CryptoKey], ready for Customer Managed
* Encryption Key (CMEK) use, on-demand. To support certain client tooling, this
* feature is modeled around a [KeyHandle][google.cloud.kms.v1.KeyHandle]
Expand Down Expand Up @@ -418,13 +418,13 @@ public function getKeyHandle(GetKeyHandleRequest $request, array $callOptions =
* {@see RetrySettings} for example usage.
* }
*
* @return ListKeyHandlesResponse
* @return PagedListResponse
*
* @throws ApiException Thrown if the API call fails.
*/
public function listKeyHandles(ListKeyHandlesRequest $request, array $callOptions = []): ListKeyHandlesResponse
public function listKeyHandles(ListKeyHandlesRequest $request, array $callOptions = []): PagedListResponse
{
return $this->startApiCall('ListKeyHandles', $request, $callOptions)->wait();
return $this->startApiCall('ListKeyHandles', $request, $callOptions);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions Kms/src/V1/CryptoKey.php

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

14 changes: 7 additions & 7 deletions Kms/src/V1/EkmConnection.php

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

Loading

0 comments on commit 0538022

Please sign in to comment.