Skip to content

Commit c9c851a

Browse files
feat: [Many APIs] usage deprecation of credentials client option (#8600)
* feat: support ClientOptions in client constructor docs: document universeDomain client option docs: add "generic" phpdocs for OperationResponse and ServerStream fix: Update pagination rules for compute clients deps: Update dependency google/protobuf to v4 PiperOrigin-RevId: 807444648 Source-Link: googleapis/googleapis@6288882 Source-Link: googleapis/googleapis-gen@577eee9 Copy-Tag: eyJwIjoiRXNzZW50aWFsQ29udGFjdHMvLk93bEJvdC55YW1sIiwiaCI6IjU3N2VlZTkzMWI3M2U5MTBmZmFlMWIxNzBmNmY5ZjhiZDc5NzVhMzYifQ== Copy-Tag: eyJwIjoiRXZlbnRhcmNQdWJsaXNoaW5nLy5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiRmlsZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiRmluYW5jaWFsU2VydmljZXMvLk93bEJvdC55YW1sIiwiaCI6IjU3N2VlZTkzMWI3M2U5MTBmZmFlMWIxNzBmNmY5ZjhiZDc5NzVhMzYifQ== Copy-Tag: eyJwIjoiRmlyZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiRnVuY3Rpb25zLy5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiR1N1aXRlQWRkT25zLy5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiR2Vt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b3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiS21zLy5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiS21zSW52ZW50b3J5Ly5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiTGFuZ3VhZ2UvLk93bEJvdC55YW1sIiwiaCI6IjU3N2VlZTkzMWI3M2U5MTBmZmFlMWIxNzBmNmY5ZjhiZDc5NzVhMzYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: usage deprecation of credentials client option PiperOrigin-RevId: 809097824 Source-Link: googleapis/googleapis@e8ed6b4 Source-Link: googleapis/googleapis-gen@96cfee1 Copy-Tag: eyJwIjoiRXNzZW50aWFsQ29udGFjdHMvLk93bEJvdC55YW1sIiwiaCI6Ijk2Y2ZlZTE2MzkzNjhlMzRhOGQxZjc2NWNlZGRlY2Y5ZGNhMTE5ZGMifQ== Copy-Tag: eyJwIjoiRXZlbnRhcmNQdWJsaXNoaW5nLy5Pd2xCb3QueWFtbCIsImgiOiI5NmNmZWUxNjM5MzY4ZTM0YThkMWY3NjVjZWRkZWNmOWRjYTExOWRjIn0= Copy-Tag: eyJwIjoiRmlsZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiI5NmNmZWUxNjM5MzY4ZTM0YThkMWY3NjVjZWRkZWNmOWRjYTExOWRjIn0= Copy-Tag: eyJwIjoiRmluYW5jaWFsU2VydmljZXMvLk93bEJvdC55YW1sIiwiaCI6Ijk2Y2ZlZTE2MzkzNjhlMzRhOGQxZjc2NWNlZGRlY2Y5ZGNhMTE5ZGMif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TlkYyJ9 Copy-Tag: eyJwIjoiSWFtLy5Pd2xCb3QueWFtbCIsImgiOiI5NmNmZWUxNjM5MzY4ZTM0YThkMWY3NjVjZWRkZWNmOWRjYTExOWRjIn0= Copy-Tag: eyJwIjoiSWFtQ3JlZGVudGlhbHMvLk93bEJvdC55YW1sIiwiaCI6Ijk2Y2ZlZTE2MzkzNjhlMzRhOGQxZjc2NWNlZGRlY2Y5ZGNhMTE5ZGMifQ== Copy-Tag: eyJwIjoiSWFwLy5Pd2xCb3QueWFtbCIsImgiOiI5NmNmZWUxNjM5MzY4ZTM0YThkMWY3NjVjZWRkZWNmOWRjYTExOWRjIn0= Copy-Tag: eyJwIjoiSWRzLy5Pd2xCb3QueWFtbCIsImgiOiI5NmNmZWUxNjM5MzY4ZTM0YThkMWY3NjVjZWRkZWNmOWRjYTExOWRjIn0= Copy-Tag: eyJwIjoiS21zLy5Pd2xCb3QueWFtbCIsImgiOiI5NmNmZWUxNjM5MzY4ZTM0YThkMWY3NjVjZWRkZWNmOWRjYTExOWRjIn0= Copy-Tag: eyJwIjoiS21zSW52ZW50b3J5Ly5Pd2xCb3QueWFtbCIsImgiOiI5NmNmZWUxNjM5MzY4ZTM0YThkMWY3NjVjZWRkZWNmOWRjYTExOWRjIn0= Copy-Tag: eyJwIjoiTGFuZ3VhZ2UvLk93bEJvdC55YW1sIiwiaCI6Ijk2Y2ZlZTE2MzkzNjhlMzRhOGQxZjc2NWNlZGRlY2Y5ZGNhMTE5ZGMifQ== * 🦉 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 aa4559f commit c9c851a

File tree

33 files changed

+1120
-1136
lines changed

33 files changed

+1120
-1136
lines changed

EssentialContacts/src/V1/Client/EssentialContactsServiceClient.php

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
use Google\ApiCore\ApiException;
2828
use Google\ApiCore\CredentialsWrapper;
2929
use Google\ApiCore\GapicClientTrait;
30+
use Google\ApiCore\Options\ClientOptions;
3031
use Google\ApiCore\PagedListResponse;
3132
use Google\ApiCore\ResourceHelperTrait;
3233
use Google\ApiCore\RetrySettings;
@@ -88,7 +89,9 @@ final class EssentialContactsServiceClient
8889
private const CODEGEN_NAME = 'gapic';
8990

9091
/** The default scopes required by the service. */
91-
public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform'];
92+
public static $serviceScopes = [
93+
'https://www.googleapis.com/auth/cloud-platform',
94+
];
9295

9396
private static function getClientDefaults()
9497
{
@@ -103,8 +106,7 @@ private static function getClientDefaults()
103106
],
104107
'transportConfig' => [
105108
'rest' => [
106-
'restClientConfigPath' =>
107-
__DIR__ . '/../resources/essential_contacts_service_rest_client_config.php',
109+
'restClientConfigPath' => __DIR__ . '/../resources/essential_contacts_service_rest_client_config.php',
108110
],
109111
],
110112
];
@@ -256,25 +258,28 @@ public static function parseName(string $formattedName, ?string $template = null
256258
/**
257259
* Constructor.
258260
*
259-
* @param array $options {
261+
* @param array|ClientOptions $options {
260262
* Optional. Options for configuring the service API wrapper.
261263
*
262264
* @type string $apiEndpoint
263265
* The address of the API remote host. May optionally include the port, formatted
264266
* as "<uri>:<port>". Default 'essentialcontacts.googleapis.com:443'.
265-
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
266-
* The credentials to be used by the client to authorize API calls. This option
267-
* accepts either a path to a credentials file, or a decoded credentials file as a
268-
* PHP array.
269-
* *Advanced usage*: In addition, this option can also accept a pre-constructed
270-
* {@see \Google\Auth\FetchAuthTokenInterface} object or
271-
* {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
272-
* objects are provided, any settings in $credentialsConfig will be ignored.
273-
* *Important*: If you accept a credential configuration (credential
274-
* JSON/File/Stream) from an external source for authentication to Google Cloud
275-
* Platform, you must validate it before providing it to any Google API or library.
276-
* Providing an unvalidated credential configuration to Google APIs can compromise
277-
* the security of your systems and data. For more information {@see
267+
* @type FetchAuthTokenInterface|CredentialsWrapper $credentials
268+
* This option should only be used with a pre-constructed
269+
* {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that
270+
* when one of these objects are provided, any settings in $credentialsConfig will
271+
* be ignored.
272+
* **Important**: If you are providing a path to a credentials file, or a decoded
273+
* credentials file as a PHP array, this usage is now DEPRECATED. Providing an
274+
* unvalidated credential configuration to Google APIs can compromise the security
275+
* of your systems and data. It is recommended to create the credentials explicitly
276+
* ```
277+
* use Google\Auth\Credentials\ServiceAccountCredentials;
278+
* use Google\Cloud\EssentialContacts\V1\EssentialContactsServiceClient;
279+
* $creds = new ServiceAccountCredentials($scopes, $json);
280+
* $options = new EssentialContactsServiceClient(['credentials' => $creds]);
281+
* ```
282+
* {@see
278283
* https://cloud.google.com/docs/authentication/external/externally-sourced-credentials}
279284
* @type array $credentialsConfig
280285
* Options used to configure credentials, including auth token caching, for the
@@ -312,11 +317,13 @@ public static function parseName(string $formattedName, ?string $template = null
312317
* @type false|LoggerInterface $logger
313318
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
314319
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
320+
* @type string $universeDomain
321+
* The service domain for the client. Defaults to 'googleapis.com'.
315322
* }
316323
*
317324
* @throws ValidationException
318325
*/
319-
public function __construct(array $options = [])
326+
public function __construct(array|ClientOptions $options = [])
320327
{
321328
$clientOptions = $this->buildClientOptions($options);
322329
$this->setClientOptions($clientOptions);

EventarcPublishing/src/V1/Client/PublisherClient.php

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
use Google\ApiCore\ApiException;
2828
use Google\ApiCore\CredentialsWrapper;
2929
use Google\ApiCore\GapicClientTrait;
30+
use Google\ApiCore\Options\ClientOptions;
3031
use Google\ApiCore\RetrySettings;
3132
use Google\ApiCore\Transport\TransportInterface;
3233
use Google\ApiCore\ValidationException;
@@ -103,7 +104,9 @@ final class PublisherClient
103104
private const CODEGEN_NAME = 'gapic';
104105

105106
/** The default scopes required by the service. */
106-
public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform'];
107+
public static $serviceScopes = [
108+
'https://www.googleapis.com/auth/cloud-platform',
109+
];
107110

108111
private static function getClientDefaults()
109112
{
@@ -127,25 +130,28 @@ private static function getClientDefaults()
127130
/**
128131
* Constructor.
129132
*
130-
* @param array $options {
133+
* @param array|ClientOptions $options {
131134
* Optional. Options for configuring the service API wrapper.
132135
*
133136
* @type string $apiEndpoint
134137
* The address of the API remote host. May optionally include the port, formatted
135138
* as "<uri>:<port>". Default 'eventarcpublishing.googleapis.com:443'.
136-
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
137-
* The credentials to be used by the client to authorize API calls. This option
138-
* accepts either a path to a credentials file, or a decoded credentials file as a
139-
* PHP array.
140-
* *Advanced usage*: In addition, this option can also accept a pre-constructed
141-
* {@see \Google\Auth\FetchAuthTokenInterface} object or
142-
* {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
143-
* objects are provided, any settings in $credentialsConfig will be ignored.
144-
* *Important*: If you accept a credential configuration (credential
145-
* JSON/File/Stream) from an external source for authentication to Google Cloud
146-
* Platform, you must validate it before providing it to any Google API or library.
147-
* Providing an unvalidated credential configuration to Google APIs can compromise
148-
* the security of your systems and data. For more information {@see
139+
* @type FetchAuthTokenInterface|CredentialsWrapper $credentials
140+
* This option should only be used with a pre-constructed
141+
* {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that
142+
* when one of these objects are provided, any settings in $credentialsConfig will
143+
* be ignored.
144+
* **Important**: If you are providing a path to a credentials file, or a decoded
145+
* credentials file as a PHP array, this usage is now DEPRECATED. Providing an
146+
* unvalidated credential configuration to Google APIs can compromise the security
147+
* of your systems and data. It is recommended to create the credentials explicitly
148+
* ```
149+
* use Google\Auth\Credentials\ServiceAccountCredentials;
150+
* use Google\Cloud\Eventarc\Publishing\V1\PublisherClient;
151+
* $creds = new ServiceAccountCredentials($scopes, $json);
152+
* $options = new PublisherClient(['credentials' => $creds]);
153+
* ```
154+
* {@see
149155
* https://cloud.google.com/docs/authentication/external/externally-sourced-credentials}
150156
* @type array $credentialsConfig
151157
* Options used to configure credentials, including auth token caching, for the
@@ -183,11 +189,13 @@ private static function getClientDefaults()
183189
* @type false|LoggerInterface $logger
184190
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
185191
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
192+
* @type string $universeDomain
193+
* The service domain for the client. Defaults to 'googleapis.com'.
186194
* }
187195
*
188196
* @throws ValidationException
189197
*/
190-
public function __construct(array $options = [])
198+
public function __construct(array|ClientOptions $options = [])
191199
{
192200
$clientOptions = $this->buildClientOptions($options);
193201
$this->setClientOptions($clientOptions);
@@ -252,10 +260,8 @@ public function publish(PublishRequest $request, array $callOptions = []): Publi
252260
*
253261
* @throws ApiException Thrown if the API call fails.
254262
*/
255-
public function publishChannelConnectionEvents(
256-
PublishChannelConnectionEventsRequest $request,
257-
array $callOptions = []
258-
): PublishChannelConnectionEventsResponse {
263+
public function publishChannelConnectionEvents(PublishChannelConnectionEventsRequest $request, array $callOptions = []): PublishChannelConnectionEventsResponse
264+
{
259265
return $this->startApiCall('PublishChannelConnectionEvents', $request, $callOptions)->wait();
260266
}
261267

Filestore/src/V1/Client/CloudFilestoreManagerClient.php

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use Google\ApiCore\CredentialsWrapper;
2929
use Google\ApiCore\GapicClientTrait;
3030
use Google\ApiCore\OperationResponse;
31+
use Google\ApiCore\Options\ClientOptions;
3132
use Google\ApiCore\PagedListResponse;
3233
use Google\ApiCore\ResourceHelperTrait;
3334
use Google\ApiCore\RetrySettings;
@@ -133,7 +134,9 @@ final class CloudFilestoreManagerClient
133134
private const CODEGEN_NAME = 'gapic';
134135

135136
/** The default scopes required by the service. */
136-
public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform'];
137+
public static $serviceScopes = [
138+
'https://www.googleapis.com/auth/cloud-platform',
139+
];
137140

138141
private $operationsClient;
139142

@@ -179,9 +182,7 @@ public function getOperationsClient()
179182
*/
180183
public function resumeOperation($operationName, $methodName = null)
181184
{
182-
$options = isset($this->descriptors[$methodName]['longRunning'])
183-
? $this->descriptors[$methodName]['longRunning']
184-
: [];
185+
$options = $this->descriptors[$methodName]['longRunning'] ?? [];
185186
$operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
186187
$operation->reload();
187188
return $operation;
@@ -312,25 +313,28 @@ public static function parseName(string $formattedName, ?string $template = null
312313
/**
313314
* Constructor.
314315
*
315-
* @param array $options {
316+
* @param array|ClientOptions $options {
316317
* Optional. Options for configuring the service API wrapper.
317318
*
318319
* @type string $apiEndpoint
319320
* The address of the API remote host. May optionally include the port, formatted
320321
* as "<uri>:<port>". Default 'file.googleapis.com:443'.
321-
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
322-
* The credentials to be used by the client to authorize API calls. This option
323-
* accepts either a path to a credentials file, or a decoded credentials file as a
324-
* PHP array.
325-
* *Advanced usage*: In addition, this option can also accept a pre-constructed
326-
* {@see \Google\Auth\FetchAuthTokenInterface} object or
327-
* {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
328-
* objects are provided, any settings in $credentialsConfig will be ignored.
329-
* *Important*: If you accept a credential configuration (credential
330-
* JSON/File/Stream) from an external source for authentication to Google Cloud
331-
* Platform, you must validate it before providing it to any Google API or library.
332-
* Providing an unvalidated credential configuration to Google APIs can compromise
333-
* the security of your systems and data. For more information {@see
322+
* @type FetchAuthTokenInterface|CredentialsWrapper $credentials
323+
* This option should only be used with a pre-constructed
324+
* {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that
325+
* when one of these objects are provided, any settings in $credentialsConfig will
326+
* be ignored.
327+
* **Important**: If you are providing a path to a credentials file, or a decoded
328+
* credentials file as a PHP array, this usage is now DEPRECATED. Providing an
329+
* unvalidated credential configuration to Google APIs can compromise the security
330+
* of your systems and data. It is recommended to create the credentials explicitly
331+
* ```
332+
* use Google\Auth\Credentials\ServiceAccountCredentials;
333+
* use Google\Cloud\Filestore\V1\CloudFilestoreManagerClient;
334+
* $creds = new ServiceAccountCredentials($scopes, $json);
335+
* $options = new CloudFilestoreManagerClient(['credentials' => $creds]);
336+
* ```
337+
* {@see
334338
* https://cloud.google.com/docs/authentication/external/externally-sourced-credentials}
335339
* @type array $credentialsConfig
336340
* Options used to configure credentials, including auth token caching, for the
@@ -368,11 +372,13 @@ public static function parseName(string $formattedName, ?string $template = null
368372
* @type false|LoggerInterface $logger
369373
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
370374
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
375+
* @type string $universeDomain
376+
* The service domain for the client. Defaults to 'googleapis.com'.
371377
* }
372378
*
373379
* @throws ValidationException
374380
*/
375-
public function __construct(array $options = [])
381+
public function __construct(array|ClientOptions $options = [])
376382
{
377383
$clientOptions = $this->buildClientOptions($options);
378384
$this->setClientOptions($clientOptions);
@@ -407,7 +413,7 @@ public function __call($method, $args)
407413
* {@see RetrySettings} for example usage.
408414
* }
409415
*
410-
* @return OperationResponse
416+
* @return OperationResponse<Backup>
411417
*
412418
* @throws ApiException Thrown if the API call fails.
413419
*/
@@ -436,7 +442,7 @@ public function createBackup(CreateBackupRequest $request, array $callOptions =
436442
* {@see RetrySettings} for example usage.
437443
* }
438444
*
439-
* @return OperationResponse
445+
* @return OperationResponse<Instance>
440446
*
441447
* @throws ApiException Thrown if the API call fails.
442448
*/
@@ -462,7 +468,7 @@ public function createInstance(CreateInstanceRequest $request, array $callOption
462468
* {@see RetrySettings} for example usage.
463469
* }
464470
*
465-
* @return OperationResponse
471+
* @return OperationResponse<Snapshot>
466472
*
467473
* @throws ApiException Thrown if the API call fails.
468474
*/
@@ -488,7 +494,7 @@ public function createSnapshot(CreateSnapshotRequest $request, array $callOption
488494
* {@see RetrySettings} for example usage.
489495
* }
490496
*
491-
* @return OperationResponse
497+
* @return OperationResponse<null>
492498
*
493499
* @throws ApiException Thrown if the API call fails.
494500
*/
@@ -514,7 +520,7 @@ public function deleteBackup(DeleteBackupRequest $request, array $callOptions =
514520
* {@see RetrySettings} for example usage.
515521
* }
516522
*
517-
* @return OperationResponse
523+
* @return OperationResponse<null>
518524
*
519525
* @throws ApiException Thrown if the API call fails.
520526
*/
@@ -540,7 +546,7 @@ public function deleteInstance(DeleteInstanceRequest $request, array $callOption
540546
* {@see RetrySettings} for example usage.
541547
* }
542548
*
543-
* @return OperationResponse
549+
* @return OperationResponse<null>
544550
*
545551
* @throws ApiException Thrown if the API call fails.
546552
*/
@@ -725,7 +731,7 @@ public function listSnapshots(ListSnapshotsRequest $request, array $callOptions
725731
* {@see RetrySettings} for example usage.
726732
* }
727733
*
728-
* @return OperationResponse
734+
* @return OperationResponse<Instance>
729735
*
730736
* @throws ApiException Thrown if the API call fails.
731737
*/
@@ -756,7 +762,7 @@ public function promoteReplica(PromoteReplicaRequest $request, array $callOption
756762
* {@see RetrySettings} for example usage.
757763
* }
758764
*
759-
* @return OperationResponse
765+
* @return OperationResponse<Instance>
760766
*
761767
* @throws ApiException Thrown if the API call fails.
762768
*/
@@ -782,7 +788,7 @@ public function restoreInstance(RestoreInstanceRequest $request, array $callOpti
782788
* {@see RetrySettings} for example usage.
783789
* }
784790
*
785-
* @return OperationResponse
791+
* @return OperationResponse<Instance>
786792
*
787793
* @throws ApiException Thrown if the API call fails.
788794
*/
@@ -808,7 +814,7 @@ public function revertInstance(RevertInstanceRequest $request, array $callOption
808814
* {@see RetrySettings} for example usage.
809815
* }
810816
*
811-
* @return OperationResponse
817+
* @return OperationResponse<Backup>
812818
*
813819
* @throws ApiException Thrown if the API call fails.
814820
*/
@@ -834,7 +840,7 @@ public function updateBackup(UpdateBackupRequest $request, array $callOptions =
834840
* {@see RetrySettings} for example usage.
835841
* }
836842
*
837-
* @return OperationResponse
843+
* @return OperationResponse<Instance>
838844
*
839845
* @throws ApiException Thrown if the API call fails.
840846
*/
@@ -860,7 +866,7 @@ public function updateInstance(UpdateInstanceRequest $request, array $callOption
860866
* {@see RetrySettings} for example usage.
861867
* }
862868
*
863-
* @return OperationResponse
869+
* @return OperationResponse<Snapshot>
864870
*
865871
* @throws ApiException Thrown if the API call fails.
866872
*/

0 commit comments

Comments
 (0)