Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: [Kms] Pagination feature is introduced for method ListKeyHandles in service Autokey #7681

Merged
merged 2 commits into from
Sep 23, 2024
Merged
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
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 @@
* {@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

Check failure on line 425 in Kms/src/V1/Client/AutokeyClient.php

View workflow job for this annotation

GitHub Actions / backwards-compatibility-check

The return type of Google\Cloud\Kms\V1\Client\AutokeyClient#listKeyHandles() changed from Google\Cloud\Kms\V1\ListKeyHandlesResponse to the non-covariant Google\ApiCore\PagedListResponse

Check failure on line 425 in Kms/src/V1/Client/AutokeyClient.php

View workflow job for this annotation

GitHub Actions / backwards-compatibility-check

The return type of Google\Cloud\Kms\V1\Client\AutokeyClient#listKeyHandles() changed from Google\Cloud\Kms\V1\ListKeyHandlesResponse to the non-covariant Google\ApiCore\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
Loading