Skip to content

Commit 1322d64

Browse files
feat: [Many APIs] usage deprecation of credentials client option (#8603)
* 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: eyJwIjoiUmFwaWRNaWdyYXRpb25Bc3Nlc3NtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiUmVjYXB0Y2hhRW50ZXJwcmlzZS8uT3dsQm90LnlhbWwiLCJoIjoiNTc3ZWVlOTMxYjczZTkxMGZmYWUxYjE3MGY2ZjlmOGJkNzk3NWEzNiJ9 Copy-Tag: eyJwIjoiUmVjb21tZW5kYXRpb25FbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6IjU3N2VlZTkzMWI3M2U5MTBmZmFlMWIxNzBmNmY5ZjhiZDc5NzVhMzYifQ== Copy-Tag: eyJwIjoiUmVjb21tZW5kZXIvLk93bEJvdC55YW1sIiwiaCI6IjU3N2VlZTkzMWI3M2U5MTBmZmFlMWIxNzBmNmY5ZjhiZDc5NzVhMzYifQ== Copy-Tag: eyJwIjoiUmVkaXMvLk93bEJvdC55YW1sIiwiaCI6IjU3N2VlZTkzMWI3M2U5MTBmZmFlMWIxNzBmNmY5ZjhiZDc5NzVhMzYifQ== Copy-Tag: eyJwIjoiUmVkaXNDbHVzdGVyLy5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc1YTM2In0= Copy-Tag: eyJwIjoiUmVzb3VyY2VNYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiI1NzdlZWU5MzFiNzNlOTEwZmZhZTFiMTcwZjZmOWY4YmQ3OTc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MGZmYWUxYjE3MGY2ZjlmOGJkNzk3NWEzNiJ9 Copy-Tag: eyJwIjoiU2VydmljZUNvbnRyb2wvLk93bEJvdC55YW1sIiwiaCI6IjU3N2VlZTkzMWI3M2U5MTBmZmFlMWIxNzBmNmY5ZjhiZDc5NzVhMzYifQ== Copy-Tag: eyJwIjoiU2VydmljZURpcmVjdG9yeS8uT3dsQm90LnlhbWwiLCJoIjoiNTc3ZWVlOTMxYjczZTkxMGZmYWUxYjE3MGY2ZjlmOGJkNzk3NWEzNiJ9 Copy-Tag: eyJwIjoiU2VydmljZUhlYWx0aC8uT3dsQm90LnlhbWwiLCJoIjoiNTc3ZWVlOTMxYjczZTkxMGZmYWUxYjE3MGY2ZjlmOGJkNzk3NWEzNiJ9 Copy-Tag: eyJwIjoiU2VydmljZU1hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6IjU3N2VlZTkzMWI3M2U5MTBmZmFlMWIxNzBmNmY5ZjhiZDc5NzVhMzYifQ== * 🦉 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: eyJwIjoiUmFwaWRNaWdyYXRpb25Bc3Nlc3NtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiI5NmNmZWUxNjM5MzY4ZTM0YThkMWY3NjVjZWRkZWNmOWRjYTExOWRjIn0= Copy-Tag: eyJwIjoiUmVjYXB0Y2hhRW50ZXJwcmlzZS8uT3dsQm90LnlhbWwiLCJoIjoiOTZjZmVlMTYzOTM2OGUzNGE4ZDFmNzY1Y2VkZGVjZjlkY2ExMTlkYyJ9 Copy-Tag: eyJwIjoiUmVjb21tZW5kYXRpb25FbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6Ijk2Y2ZlZTE2MzkzNjhlMzRhOGQxZjc2NWNlZGRlY2Y5ZGN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googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 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 4825644 commit 1322d64

50 files changed

Lines changed: 1855 additions & 2178 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

RapidMigrationAssessment/src/V1/Client/RapidMigrationAssessmentClient.php

Lines changed: 33 additions & 28 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;
@@ -103,7 +104,9 @@ final class RapidMigrationAssessmentClient
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 $operationsClient;
109112

@@ -120,8 +123,7 @@ private static function getClientDefaults()
120123
],
121124
'transportConfig' => [
122125
'rest' => [
123-
'restClientConfigPath' =>
124-
__DIR__ . '/../resources/rapid_migration_assessment_rest_client_config.php',
126+
'restClientConfigPath' => __DIR__ . '/../resources/rapid_migration_assessment_rest_client_config.php',
125127
],
126128
],
127129
];
@@ -150,9 +152,7 @@ public function getOperationsClient()
150152
*/
151153
public function resumeOperation($operationName, $methodName = null)
152154
{
153-
$options = isset($this->descriptors[$methodName]['longRunning'])
154-
? $this->descriptors[$methodName]['longRunning']
155-
: [];
155+
$options = $this->descriptors[$methodName]['longRunning'] ?? [];
156156
$operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
157157
$operation->reload();
158158
return $operation;
@@ -261,25 +261,28 @@ public static function parseName(string $formattedName, ?string $template = null
261261
/**
262262
* Constructor.
263263
*
264-
* @param array $options {
264+
* @param array|ClientOptions $options {
265265
* Optional. Options for configuring the service API wrapper.
266266
*
267267
* @type string $apiEndpoint
268268
* The address of the API remote host. May optionally include the port, formatted
269269
* as "<uri>:<port>". Default 'rapidmigrationassessment.googleapis.com:443'.
270-
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
271-
* The credentials to be used by the client to authorize API calls. This option
272-
* accepts either a path to a credentials file, or a decoded credentials file as a
273-
* PHP array.
274-
* *Advanced usage*: In addition, this option can also accept a pre-constructed
275-
* {@see \Google\Auth\FetchAuthTokenInterface} object or
276-
* {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
277-
* objects are provided, any settings in $credentialsConfig will be ignored.
278-
* *Important*: If you accept a credential configuration (credential
279-
* JSON/File/Stream) from an external source for authentication to Google Cloud
280-
* Platform, you must validate it before providing it to any Google API or library.
281-
* Providing an unvalidated credential configuration to Google APIs can compromise
282-
* the security of your systems and data. For more information {@see
270+
* @type FetchAuthTokenInterface|CredentialsWrapper $credentials
271+
* This option should only be used with a pre-constructed
272+
* {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that
273+
* when one of these objects are provided, any settings in $credentialsConfig will
274+
* be ignored.
275+
* **Important**: If you are providing a path to a credentials file, or a decoded
276+
* credentials file as a PHP array, this usage is now DEPRECATED. Providing an
277+
* unvalidated credential configuration to Google APIs can compromise the security
278+
* of your systems and data. It is recommended to create the credentials explicitly
279+
* ```
280+
* use Google\Auth\Credentials\ServiceAccountCredentials;
281+
* use Google\Cloud\RapidMigrationAssessment\V1\RapidMigrationAssessmentClient;
282+
* $creds = new ServiceAccountCredentials($scopes, $json);
283+
* $options = new RapidMigrationAssessmentClient(['credentials' => $creds]);
284+
* ```
285+
* {@see
283286
* https://cloud.google.com/docs/authentication/external/externally-sourced-credentials}
284287
* @type array $credentialsConfig
285288
* Options used to configure credentials, including auth token caching, for the
@@ -317,11 +320,13 @@ public static function parseName(string $formattedName, ?string $template = null
317320
* @type false|LoggerInterface $logger
318321
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
319322
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
323+
* @type string $universeDomain
324+
* The service domain for the client. Defaults to 'googleapis.com'.
320325
* }
321326
*
322327
* @throws ValidationException
323328
*/
324-
public function __construct(array $options = [])
329+
public function __construct(array|ClientOptions $options = [])
325330
{
326331
$clientOptions = $this->buildClientOptions($options);
327332
$this->setClientOptions($clientOptions);
@@ -357,7 +362,7 @@ public function __call($method, $args)
357362
* {@see RetrySettings} for example usage.
358363
* }
359364
*
360-
* @return OperationResponse
365+
* @return OperationResponse<Annotation>
361366
*
362367
* @throws ApiException Thrown if the API call fails.
363368
*/
@@ -385,7 +390,7 @@ public function createAnnotation(CreateAnnotationRequest $request, array $callOp
385390
* {@see RetrySettings} for example usage.
386391
* }
387392
*
388-
* @return OperationResponse
393+
* @return OperationResponse<Collector>
389394
*
390395
* @throws ApiException Thrown if the API call fails.
391396
*/
@@ -413,7 +418,7 @@ public function createCollector(CreateCollectorRequest $request, array $callOpti
413418
* {@see RetrySettings} for example usage.
414419
* }
415420
*
416-
* @return OperationResponse
421+
* @return OperationResponse<Collector>
417422
*
418423
* @throws ApiException Thrown if the API call fails.
419424
*/
@@ -521,7 +526,7 @@ public function listCollectors(ListCollectorsRequest $request, array $callOption
521526
* {@see RetrySettings} for example usage.
522527
* }
523528
*
524-
* @return OperationResponse
529+
* @return OperationResponse<Collector>
525530
*
526531
* @throws ApiException Thrown if the API call fails.
527532
*/
@@ -548,7 +553,7 @@ public function pauseCollector(PauseCollectorRequest $request, array $callOption
548553
* {@see RetrySettings} for example usage.
549554
* }
550555
*
551-
* @return OperationResponse
556+
* @return OperationResponse<Collector>
552557
*
553558
* @throws ApiException Thrown if the API call fails.
554559
*/
@@ -575,7 +580,7 @@ public function registerCollector(RegisterCollectorRequest $request, array $call
575580
* {@see RetrySettings} for example usage.
576581
* }
577582
*
578-
* @return OperationResponse
583+
* @return OperationResponse<Collector>
579584
*
580585
* @throws ApiException Thrown if the API call fails.
581586
*/
@@ -602,7 +607,7 @@ public function resumeCollector(ResumeCollectorRequest $request, array $callOpti
602607
* {@see RetrySettings} for example usage.
603608
* }
604609
*
605-
* @return OperationResponse
610+
* @return OperationResponse<Collector>
606611
*
607612
* @throws ApiException Thrown if the API call fails.
608613
*/

RecaptchaEnterprise/src/V1/Client/RecaptchaEnterpriseServiceClient.php

Lines changed: 41 additions & 50 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;
@@ -126,7 +127,9 @@ final class RecaptchaEnterpriseServiceClient
126127
private const CODEGEN_NAME = 'gapic';
127128

128129
/** The default scopes required by the service. */
129-
public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform'];
130+
public static $serviceScopes = [
131+
'https://www.googleapis.com/auth/cloud-platform',
132+
];
130133

131134
private static function getClientDefaults()
132135
{
@@ -141,8 +144,7 @@ private static function getClientDefaults()
141144
],
142145
'transportConfig' => [
143146
'rest' => [
144-
'restClientConfigPath' =>
145-
__DIR__ . '/../resources/recaptcha_enterprise_service_rest_client_config.php',
147+
'restClientConfigPath' => __DIR__ . '/../resources/recaptcha_enterprise_service_rest_client_config.php',
146148
],
147149
],
148150
];
@@ -280,25 +282,28 @@ public static function parseName(string $formattedName, ?string $template = null
280282
/**
281283
* Constructor.
282284
*
283-
* @param array $options {
285+
* @param array|ClientOptions $options {
284286
* Optional. Options for configuring the service API wrapper.
285287
*
286288
* @type string $apiEndpoint
287289
* The address of the API remote host. May optionally include the port, formatted
288290
* as "<uri>:<port>". Default 'recaptchaenterprise.googleapis.com:443'.
289-
* @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
290-
* The credentials to be used by the client to authorize API calls. This option
291-
* accepts either a path to a credentials file, or a decoded credentials file as a
292-
* PHP array.
293-
* *Advanced usage*: In addition, this option can also accept a pre-constructed
294-
* {@see \Google\Auth\FetchAuthTokenInterface} object or
295-
* {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
296-
* objects are provided, any settings in $credentialsConfig will be ignored.
297-
* *Important*: If you accept a credential configuration (credential
298-
* JSON/File/Stream) from an external source for authentication to Google Cloud
299-
* Platform, you must validate it before providing it to any Google API or library.
300-
* Providing an unvalidated credential configuration to Google APIs can compromise
301-
* the security of your systems and data. For more information {@see
291+
* @type FetchAuthTokenInterface|CredentialsWrapper $credentials
292+
* This option should only be used with a pre-constructed
293+
* {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that
294+
* when one of these objects are provided, any settings in $credentialsConfig will
295+
* be ignored.
296+
* **Important**: If you are providing a path to a credentials file, or a decoded
297+
* credentials file as a PHP array, this usage is now DEPRECATED. Providing an
298+
* unvalidated credential configuration to Google APIs can compromise the security
299+
* of your systems and data. It is recommended to create the credentials explicitly
300+
* ```
301+
* use Google\Auth\Credentials\ServiceAccountCredentials;
302+
* use Google\Cloud\RecaptchaEnterprise\V1\RecaptchaEnterpriseServiceClient;
303+
* $creds = new ServiceAccountCredentials($scopes, $json);
304+
* $options = new RecaptchaEnterpriseServiceClient(['credentials' => $creds]);
305+
* ```
306+
* {@see
302307
* https://cloud.google.com/docs/authentication/external/externally-sourced-credentials}
303308
* @type array $credentialsConfig
304309
* Options used to configure credentials, including auth token caching, for the
@@ -336,11 +341,13 @@ public static function parseName(string $formattedName, ?string $template = null
336341
* @type false|LoggerInterface $logger
337342
* A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
338343
* 'GOOGLE_SDK_PHP_LOGGING' environment flag
344+
* @type string $universeDomain
345+
* The service domain for the client. Defaults to 'googleapis.com'.
339346
* }
340347
*
341348
* @throws ValidationException
342349
*/
343-
public function __construct(array $options = [])
350+
public function __construct(array|ClientOptions $options = [])
344351
{
345352
$clientOptions = $this->buildClientOptions($options);
346353
$this->setClientOptions($clientOptions);
@@ -410,10 +417,8 @@ public function addIpOverride(AddIpOverrideRequest $request, array $callOptions
410417
*
411418
* @throws ApiException Thrown if the API call fails.
412419
*/
413-
public function annotateAssessment(
414-
AnnotateAssessmentRequest $request,
415-
array $callOptions = []
416-
): AnnotateAssessmentResponse {
420+
public function annotateAssessment(AnnotateAssessmentRequest $request, array $callOptions = []): AnnotateAssessmentResponse
421+
{
417422
return $this->startApiCall('AnnotateAssessment', $request, $callOptions)->wait();
418423
}
419424

@@ -651,10 +656,8 @@ public function getMetrics(GetMetricsRequest $request, array $callOptions = []):
651656
*
652657
* @throws ApiException Thrown if the API call fails.
653658
*/
654-
public function listFirewallPolicies(
655-
ListFirewallPoliciesRequest $request,
656-
array $callOptions = []
657-
): PagedListResponse {
659+
public function listFirewallPolicies(ListFirewallPoliciesRequest $request, array $callOptions = []): PagedListResponse
660+
{
658661
return $this->startApiCall('ListFirewallPolicies', $request, $callOptions);
659662
}
660663

@@ -734,10 +737,8 @@ public function listKeys(ListKeysRequest $request, array $callOptions = []): Pag
734737
*
735738
* @throws ApiException Thrown if the API call fails.
736739
*/
737-
public function listRelatedAccountGroupMemberships(
738-
ListRelatedAccountGroupMembershipsRequest $request,
739-
array $callOptions = []
740-
): PagedListResponse {
740+
public function listRelatedAccountGroupMemberships(ListRelatedAccountGroupMembershipsRequest $request, array $callOptions = []): PagedListResponse
741+
{
741742
return $this->startApiCall('ListRelatedAccountGroupMemberships', $request, $callOptions);
742743
}
743744

@@ -763,10 +764,8 @@ public function listRelatedAccountGroupMemberships(
763764
*
764765
* @throws ApiException Thrown if the API call fails.
765766
*/
766-
public function listRelatedAccountGroups(
767-
ListRelatedAccountGroupsRequest $request,
768-
array $callOptions = []
769-
): PagedListResponse {
767+
public function listRelatedAccountGroups(ListRelatedAccountGroupsRequest $request, array $callOptions = []): PagedListResponse
768+
{
770769
return $this->startApiCall('ListRelatedAccountGroups', $request, $callOptions);
771770
}
772771

@@ -828,10 +827,8 @@ public function migrateKey(MigrateKeyRequest $request, array $callOptions = []):
828827
*
829828
* @throws ApiException Thrown if the API call fails.
830829
*/
831-
public function removeIpOverride(
832-
RemoveIpOverrideRequest $request,
833-
array $callOptions = []
834-
): RemoveIpOverrideResponse {
830+
public function removeIpOverride(RemoveIpOverrideRequest $request, array $callOptions = []): RemoveIpOverrideResponse
831+
{
835832
return $this->startApiCall('RemoveIpOverride', $request, $callOptions)->wait();
836833
}
837834

@@ -857,10 +854,8 @@ public function removeIpOverride(
857854
*
858855
* @throws ApiException Thrown if the API call fails.
859856
*/
860-
public function reorderFirewallPolicies(
861-
ReorderFirewallPoliciesRequest $request,
862-
array $callOptions = []
863-
): ReorderFirewallPoliciesResponse {
857+
public function reorderFirewallPolicies(ReorderFirewallPoliciesRequest $request, array $callOptions = []): ReorderFirewallPoliciesResponse
858+
{
864859
return $this->startApiCall('ReorderFirewallPolicies', $request, $callOptions)->wait();
865860
}
866861

@@ -888,10 +883,8 @@ public function reorderFirewallPolicies(
888883
*
889884
* @throws ApiException Thrown if the API call fails.
890885
*/
891-
public function retrieveLegacySecretKey(
892-
RetrieveLegacySecretKeyRequest $request,
893-
array $callOptions = []
894-
): RetrieveLegacySecretKeyResponse {
886+
public function retrieveLegacySecretKey(RetrieveLegacySecretKeyRequest $request, array $callOptions = []): RetrieveLegacySecretKeyResponse
887+
{
895888
return $this->startApiCall('RetrieveLegacySecretKey', $request, $callOptions)->wait();
896889
}
897890

@@ -918,10 +911,8 @@ public function retrieveLegacySecretKey(
918911
*
919912
* @throws ApiException Thrown if the API call fails.
920913
*/
921-
public function searchRelatedAccountGroupMemberships(
922-
SearchRelatedAccountGroupMembershipsRequest $request,
923-
array $callOptions = []
924-
): PagedListResponse {
914+
public function searchRelatedAccountGroupMemberships(SearchRelatedAccountGroupMembershipsRequest $request, array $callOptions = []): PagedListResponse
915+
{
925916
return $this->startApiCall('SearchRelatedAccountGroupMemberships', $request, $callOptions);
926917
}
927918

0 commit comments

Comments
 (0)