googleapis / googleapis/gapic-generator-php

IamProviderInterface for IAM Mixins

Open
#679 0 comments 0 reactions 0 assignees View on GitHub
priority: p3 type: feature request
Dominant language
PHP
Stars
14
Forks
18
PR merge metrics
No merged PRs in 30d

Description

It would be nice to typehint V2 GAPIC clients which implement IAM methods - For instance, we could have an `IamProviderInterface` in GAX which ensured that the methods being called on this GAPIC client exist. The generator could add this when it detects an IAM-mixin:

```php
namespace Google\ApiCore;

use Google\Cloud\Iam\V1\GetIamPolicyRequest;
use Google\Cloud\Iam\V1\Policy;
use Google\Cloud\Iam\V1\SetIamPolicyRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsRequest;
use Google\Cloud\Iam\V1\TestIamPermissionsResponse;

interface IamProviderInterface
{
public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy;
public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy;
public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse;

}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.