Skip to content

Commit

Permalink
fix: phpdoc ref for async methods (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Oct 13, 2023
1 parent 23c2115 commit 9e7e19d
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 91 deletions.
2 changes: 1 addition & 1 deletion src/Generation/GapicClientV2Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ private function rpcMethod(MethodDetails $method): PhpClassMember
? PhpDoc::text(
'The async variant is',
AST::staticCall( // use staticCall for PHP Doc :: syntax
$this->ctx->type($this->serviceDetails->gapicClientType),
$this->ctx->type($this->serviceDetails->gapicClientV2Type),
AST::method($method->methodName . 'Async'))(),
'.')
: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ public function __call($method, $args)
* the actual limits, refer to
* [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits).
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::callFunctionAsync()} .
* The async variant is {@see CloudFunctionsServiceClient::callFunctionAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/call_function.php
*
Expand Down Expand Up @@ -322,8 +321,7 @@ public function callFunction(CallFunctionRequest $request, array $callOptions =
* the specified project, the long running operation will return
* `ALREADY_EXISTS` error.
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::createFunctionAsync()} .
* The async variant is {@see CloudFunctionsServiceClient::createFunctionAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/create_function.php
*
Expand Down Expand Up @@ -351,8 +349,7 @@ public function createFunction(CreateFunctionRequest $request, array $callOption
* given function is used by some trigger, the trigger will be updated to
* remove this function.
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::deleteFunctionAsync()} .
* The async variant is {@see CloudFunctionsServiceClient::deleteFunctionAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/delete_function.php
*
Expand Down Expand Up @@ -383,7 +380,7 @@ public function deleteFunction(DeleteFunctionRequest $request, array $callOption
* https://cloud.google.com/storage/docs/access-control/signed-urls
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::generateDownloadUrlAsync()} .
* {@see CloudFunctionsServiceClient::generateDownloadUrlAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/generate_download_url.php
*
Expand Down Expand Up @@ -434,7 +431,7 @@ public function generateDownloadUrl(GenerateDownloadUrlRequest $request, array $
* * `Authorization: Bearer YOUR_TOKEN`
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::generateUploadUrlAsync()} .
* {@see CloudFunctionsServiceClient::generateUploadUrlAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/generate_upload_url.php
*
Expand All @@ -460,8 +457,7 @@ public function generateUploadUrl(GenerateUploadUrlRequest $request, array $call
/**
* Returns a function with the given name from the requested project.
*
* The async variant is {@see CloudFunctionsServiceGapicClient::getFunctionAsync()}
* .
* The async variant is {@see CloudFunctionsServiceClient::getFunctionAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/get_function.php
*
Expand Down Expand Up @@ -489,8 +485,7 @@ public function getFunction(GetFunctionRequest $request, array $callOptions = []
* Returns an empty policy if the function exists and does not have a policy
* set.
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::getIamPolicyAsync()} .
* The async variant is {@see CloudFunctionsServiceClient::getIamPolicyAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/get_iam_policy.php
*
Expand All @@ -516,8 +511,7 @@ public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions =
/**
* Returns a list of functions that belong to the requested project.
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::listFunctionsAsync()} .
* The async variant is {@see CloudFunctionsServiceClient::listFunctionsAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/list_functions.php
*
Expand All @@ -544,8 +538,7 @@ public function listFunctions(ListFunctionsRequest $request, array $callOptions
* Sets the IAM access control policy on the specified function.
* Replaces any existing policy.
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::setIamPolicyAsync()} .
* The async variant is {@see CloudFunctionsServiceClient::setIamPolicyAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/set_iam_policy.php
*
Expand Down Expand Up @@ -575,7 +568,7 @@ public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions =
* permissions, not a NOT_FOUND error.
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::testIamPermissionsAsync()} .
* {@see CloudFunctionsServiceClient::testIamPermissionsAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/test_iam_permissions.php
*
Expand All @@ -601,8 +594,7 @@ public function testIamPermissions(TestIamPermissionsRequest $request, array $ca
/**
* Updates existing function.
*
* The async variant is
* {@see CloudFunctionsServiceGapicClient::updateFunctionAsync()} .
* The async variant is {@see CloudFunctionsServiceClient::updateFunctionAsync()} .
*
* @example samples/V1/CloudFunctionsServiceClient/update_function.php
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public function __call($method, $args)
* The returned operation is automatically deleted after a few hours, so there
* is no need to call DeleteOperation.
*
* The async variant is {@see CloudRedisGapicClient::createInstanceAsync()} .
* The async variant is {@see CloudRedisClient::createInstanceAsync()} .
*
* @param CreateInstanceRequest $request A request to house fields associated with the call.
* @param array $callOptions {
Expand All @@ -332,7 +332,7 @@ public function createInstance(CreateInstanceRequest $request, array $callOption
* Deletes a specific Redis instance. Instance stops serving and data is
* deleted.
*
* The async variant is {@see CloudRedisGapicClient::deleteInstanceAsync()} .
* The async variant is {@see CloudRedisClient::deleteInstanceAsync()} .
*
* @param DeleteInstanceRequest $request A request to house fields associated with the call.
* @param array $callOptions {
Expand Down Expand Up @@ -361,7 +361,7 @@ public function deleteInstance(DeleteInstanceRequest $request, array $callOption
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
* The async variant is {@see CloudRedisGapicClient::exportInstanceAsync()} .
* The async variant is {@see CloudRedisClient::exportInstanceAsync()} .
*
* @param ExportInstanceRequest $request A request to house fields associated with the call.
* @param array $callOptions {
Expand All @@ -386,7 +386,7 @@ public function exportInstance(ExportInstanceRequest $request, array $callOption
* Initiates a failover of the master node to current replica node for a
* specific STANDARD tier Cloud Memorystore for Redis instance.
*
* The async variant is {@see CloudRedisGapicClient::failoverInstanceAsync()} .
* The async variant is {@see CloudRedisClient::failoverInstanceAsync()} .
*
* @param FailoverInstanceRequest $request A request to house fields associated with the call.
* @param array $callOptions {
Expand All @@ -410,7 +410,7 @@ public function failoverInstance(FailoverInstanceRequest $request, array $callOp
/**
* Gets the details of a specific Redis instance.
*
* The async variant is {@see CloudRedisGapicClient::getInstanceAsync()} .
* The async variant is {@see CloudRedisClient::getInstanceAsync()} .
*
* @param GetInstanceRequest $request A request to house fields associated with the call.
* @param array $callOptions {
Expand Down Expand Up @@ -441,7 +441,7 @@ public function getInstance(GetInstanceRequest $request, array $callOptions = []
* The returned operation is automatically deleted after a few hours, so
* there is no need to call DeleteOperation.
*
* The async variant is {@see CloudRedisGapicClient::importInstanceAsync()} .
* The async variant is {@see CloudRedisClient::importInstanceAsync()} .
*
* @param ImportInstanceRequest $request A request to house fields associated with the call.
* @param array $callOptions {
Expand Down Expand Up @@ -473,7 +473,7 @@ public function importInstance(ImportInstanceRequest $request, array $callOption
* If `location_id` is specified as `-` (wildcard), then all regions
* available to the project are queried, and the results are aggregated.
*
* The async variant is {@see CloudRedisGapicClient::listInstancesAsync()} .
* The async variant is {@see CloudRedisClient::listInstancesAsync()} .
*
* @param ListInstancesRequest $request A request to house fields associated with the call.
* @param array $callOptions {
Expand Down Expand Up @@ -501,7 +501,7 @@ public function listInstances(ListInstancesRequest $request, array $callOptions
* in the response field. The returned operation is automatically deleted
* after a few hours, so there is no need to call DeleteOperation.
*
* The async variant is {@see CloudRedisGapicClient::updateInstanceAsync()} .
* The async variant is {@see CloudRedisClient::updateInstanceAsync()} .
*
* @param UpdateInstanceRequest $request A request to house fields associated with the call.
* @param array $callOptions {
Expand All @@ -526,7 +526,7 @@ public function updateInstance(UpdateInstanceRequest $request, array $callOption
* Upgrades Redis instance to the newer Redis version specified in the
* request.
*
* The async variant is {@see CloudRedisGapicClient::upgradeInstanceAsync()} .
* The async variant is {@see CloudRedisClient::upgradeInstanceAsync()} .
*
* @param UpgradeInstanceRequest $request A request to house fields associated with the call.
* @param array $callOptions {
Expand Down

0 comments on commit 9e7e19d

Please sign in to comment.