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

IamProviderInterface for IAM Mixins #679

Open
bshaffer opened this issue Jan 11, 2024 · 0 comments
Open

IamProviderInterface for IAM Mixins #679

bshaffer opened this issue Jan 11, 2024 · 0 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@bshaffer
Copy link
Contributor

bshaffer commented Jan 11, 2024

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;
    
}
@bshaffer bshaffer added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. labels Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant