Skip to content

Commit

Permalink
feat: Add IAM GetPolicyOptions support. (#2133)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and jdpedrie committed Jul 25, 2019
1 parent 38198c6 commit 793420a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,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 @@ -886,6 +887,9 @@ public function setIamPolicy($resource, $policy, 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 @@ -902,6 +906,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
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,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 @@ -1083,6 +1084,9 @@ public function setIamPolicy($resource, $policy, 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 @@ -1099,6 +1103,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 Spanner/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-06-20T10:01:13.037607Z",
"updateTime": "2019-07-25T10:02:41.870117Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.29.0",
"dockerImage": "googleapis/artman@sha256:b79c8c20ee51e5302686c9d1294672d59290df1489be93749ef17d0172cc508d"
"version": "0.29.1",
"dockerImage": "googleapis/artman@sha256:b2a73f4dda03ef8fcaa973e3ba26d0cf34091f6c22c70add663af325931aef4d"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "45e125f9e30dc5d45b52752b3ab78dd4f6084f2d",
"internalRef": "254026509"
"sha": "4b12afe72950f36bef6f196a05f4430e4421a873",
"internalRef": "259790363"
}
}
],
Expand Down

0 comments on commit 793420a

Please sign in to comment.