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: RetrySettings reference #489

Merged
merged 3 commits into from
Jun 29, 2022
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: 7 additions & 7 deletions src/Generation/GapicClientGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ private function operationMethods(): Vector
if (!$this->serviceDetails->hasLro && !$this->serviceDetails->hasCustomOp) {
return Vector::new([]);
}

$ctype = $this->serviceDetails->hasCustomOp ?
$this->serviceDetails->customOperationServiceClientType :
Type::fromName(OperationsClient::class);
Expand Down Expand Up @@ -394,7 +394,7 @@ private function operationMethods(): Vector
$this->serviceDetails->isGa() ? null : PhpDoc::experimental(),
));
$methods = $methods->append($resumeOperation);

return $methods;
}

Expand Down Expand Up @@ -804,10 +804,10 @@ private function rpcMethod(MethodDetails $method): PhpClassMember
PhpDoc::text(
// TODO(vNext): Don't use a fully-qualified type here.
'Retry settings to use for this call. Can be a ',
$this->ctx->Type($retrySettingsType, 1),
$this->ctx->Type($retrySettingsType),
' object, or an associative array of retry settings parameters. See the documentation on ',
// TODO(vNext): Don't use a fully-qualified type here.
$this->ctx->Type($retrySettingsType, 1),
$this->ctx->Type($retrySettingsType),
' for example usage.'
)
)
Expand Down Expand Up @@ -1064,7 +1064,7 @@ private static function explicitRequestParamsForFields(Map $headersByRootField,
? AST::param(null, AST::var($field->camelName))
: AST::index(AST::var('optionalArgs'), $root);
$assignValue = $param;

// Construct the getter chain if the routing header uses a nested field.
$chain = $routing['getter'];
if (count($chain) > 1) {
Expand All @@ -1089,9 +1089,9 @@ private static function explicitRequestParamsForFields(Map $headersByRootField,
if (isset($keyToMatcher[$key])) {
$if = $keyToMatcher[$key];
$if = $if->elseif(
/* condition */
/* condition */
AST::call(AST::PREG_MATCH)($routing['regex'], $assignValue, $matches),
/* then */
/* then */
AST::assign(
AST::index($paramsVar, $routing['key']),
AST::index($matches, $routing['key'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,9 @@ public function __construct(array $options = [])
*
* Default is empty.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\Cloud\Asset\V1\AnalyzeIamPolicyResponse
Expand Down Expand Up @@ -515,10 +514,9 @@ public function analyzeIamPolicy($analysisQuery, array $optionalArgs = [])
* Optional.
*
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\ApiCore\OperationResponse
Expand Down Expand Up @@ -573,10 +571,9 @@ public function analyzeIamPolicyLongrunning($analysisQuery, $outputConfig, array
* analysis response. If unspecified, the default view is FULL.
* For allowed values, use constants defined on {@see \Google\Cloud\Asset\V1\AnalyzeMoveRequest\AnalysisView}
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\Cloud\Asset\V1\AnalyzeMoveResponse
Expand Down Expand Up @@ -662,10 +659,9 @@ public function analyzeMove($resource, $destinationParent, array $optionalArgs =
* Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
* supported asset types and relationship types.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\Cloud\Asset\V1\BatchGetAssetsHistoryResponse
Expand Down Expand Up @@ -726,10 +722,9 @@ public function batchGetAssetsHistory($parent, $contentType, $readTimeWindow, ar
* Optional.
*
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\Cloud\Asset\V1\Feed
Expand Down Expand Up @@ -771,10 +766,9 @@ public function createFeed($parent, $feedId, $feed, array $optionalArgs = [])
* Optional.
*
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @throws ApiException if the remote call fails
Expand Down Expand Up @@ -893,10 +887,9 @@ public function deleteFeed($name, array $optionalArgs = [])
* Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
* supported asset types and relationship types.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\ApiCore\OperationResponse
Expand Down Expand Up @@ -953,10 +946,9 @@ public function exportAssets($parent, $outputConfig, array $optionalArgs = [])
* Optional.
*
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\Cloud\Asset\V1\Feed
Expand Down Expand Up @@ -1063,10 +1055,9 @@ public function getFeed($name, array $optionalArgs = [])
* Inventory](https://cloud.google.com/asset-inventory/docs/overview)
* for all supported asset types and relationship types.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\ApiCore\PagedListResponse
Expand Down Expand Up @@ -1129,10 +1120,9 @@ public function listAssets($parent, array $optionalArgs = [])
* Optional.
*
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\Cloud\Asset\V1\ListFeedsResponse
Expand Down Expand Up @@ -1275,10 +1265,9 @@ public function listFeeds($parent, array $optionalArgs = [])
* All the other fields such as repeated fields (e.g., `folders`) and
* non-primitive fields (e.g., `policy`) are not supported.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\ApiCore\PagedListResponse
Expand Down Expand Up @@ -1477,10 +1466,9 @@ public function searchAllIamPolicies($scope, array $optionalArgs = [])
* returned.
* Any invalid field path will trigger INVALID_ARGUMENT error.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\ApiCore\PagedListResponse
Expand Down Expand Up @@ -1549,10 +1537,9 @@ public function searchAllResources($scope, array $optionalArgs = [])
* Optional.
*
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\Cloud\Asset\V1\Feed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,9 @@ public function __construct(array $options = [])
* of values will be returned. Any page token used here must have
* been generated by a previous call to the API.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\ApiCore\PagedListResponse
Expand Down Expand Up @@ -402,10 +401,9 @@ public function aggregatedList($project, array $optionalArgs = [])
*
* The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\ApiCore\OperationResponse
Expand Down Expand Up @@ -483,10 +481,9 @@ public function delete($address, $project, $region, array $optionalArgs = [])
*
* The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\ApiCore\OperationResponse
Expand Down Expand Up @@ -565,10 +562,9 @@ public function insert($addressResource, $project, $region, array $optionalArgs
* of values will be returned. Any page token used here must have
* been generated by a previous call to the API.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\ApiCore\PagedListResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,9 @@ public function __construct(array $options = [])
* Optional.
*
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array of retry
* settings parameters. See the documentation on
* {@see Google\ApiCore\RetrySettings} for example usage.
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
* {@see RetrySettings} for example usage.
* }
*
* @return \Google\Cloud\Compute\V1\Operation
Expand Down
Loading