Skip to content

IamProviderInterface for IAM Mixins #679

@bshaffer

Description

@bshaffer

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:

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;
    
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions