googleapis / googleapis/gapic-generator-php
IamProviderInterface for IAM Mixins
- 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
Assessment
This issue has not been assessed yet.