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

feat: Add IAM GetPolicyOptions support. #2135

Merged
merged 1 commit into from
Jul 25, 2019
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
7 changes: 7 additions & 0 deletions Tasks/src/V2/Gapic/CloudTasksGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\GetPolicyOptions;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
Expand Down Expand Up @@ -944,6 +945,9 @@ public function resumeQueue($name, array $optionalArgs = [])
* @param array $optionalArgs {
* Optional.
*
* @type GetPolicyOptions $options
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
* `GetIamPolicy`. This field is only used by Cloud IAM.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array
Expand All @@ -959,6 +963,9 @@ public function getIamPolicy($resource, array $optionalArgs = [])
{
$request = new GetIamPolicyRequest();
$request->setResource($resource);
if (isset($optionalArgs['options'])) {
$request->setOptions($optionalArgs['options']);
}

$requestParams = new RequestParamsHeaderDescriptor([
'resource' => $request->getResource(),
Expand Down
7 changes: 7 additions & 0 deletions Tasks/src/V2beta2/Gapic/CloudTasksGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\GetPolicyOptions;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
Expand Down Expand Up @@ -974,6 +975,9 @@ public function resumeQueue($name, array $optionalArgs = [])
* @param array $optionalArgs {
* Optional.
*
* @type GetPolicyOptions $options
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
* `GetIamPolicy`. This field is only used by Cloud IAM.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array
Expand All @@ -990,6 +994,9 @@ public function getIamPolicy($resource, array $optionalArgs = [])
{
$request = new GetIamPolicyRequest();
$request->setResource($resource);
if (isset($optionalArgs['options'])) {
$request->setOptions($optionalArgs['options']);
}

$requestParams = new RequestParamsHeaderDescriptor([
'resource' => $request->getResource(),
Expand Down
7 changes: 7 additions & 0 deletions Tasks/src/V2beta3/Gapic/CloudTasksGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\GetPolicyOptions;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
Expand Down Expand Up @@ -962,6 +963,9 @@ public function resumeQueue($name, array $optionalArgs = [])
* @param array $optionalArgs {
* Optional.
*
* @type GetPolicyOptions $options
* OPTIONAL: A `GetPolicyOptions` object for specifying options to
* `GetIamPolicy`. This field is only used by Cloud IAM.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a
* {@see Google\ApiCore\RetrySettings} object, or an associative array
Expand All @@ -978,6 +982,9 @@ public function getIamPolicy($resource, array $optionalArgs = [])
{
$request = new GetIamPolicyRequest();
$request->setResource($resource);
if (isset($optionalArgs['options'])) {
$request->setOptions($optionalArgs['options']);
}

$requestParams = new RequestParamsHeaderDescriptor([
'resource' => $request->getResource(),
Expand Down
10 changes: 5 additions & 5 deletions Tasks/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-04T19:29:28.351241Z",
"updateTime": "2019-07-25T10:03:31.100807Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.23.0",
"dockerImage": "googleapis/artman@sha256:846102ebf7ea2239162deea69f64940443b4147f7c2e68d64b332416f74211ba"
"version": "0.29.1",
"dockerImage": "googleapis/artman@sha256:b2a73f4dda03ef8fcaa973e3ba26d0cf34091f6c22c70add663af325931aef4d"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "0026f4b890ed9e2388fb0573c0727defa6f5b82e",
"internalRef": "251265049"
"sha": "4b12afe72950f36bef6f196a05f4430e4421a873",
"internalRef": "259790363"
}
}
],
Expand Down