Google-Cloud-Iam-V1
view release on metacpan or search on metacpan
lib/Google/Iam/V1/IamPolicy.pm view on Meta::CPAN
Type: String
=item * B<permissions>
Type: String
=back
=cut
# === Message: Google::Iam::V1::IamPolicy::TestIamPermissionsResponse ===
# Fields for TestIamPermissionsResponse
# Field: permissions Type: 9 ()
=pod
=head1 NAME
Google::Iam::V1::IamPolicy::TestIamPermissionsResponse - Compiled Protocol Buffers message class
=head1 SYNOPSIS
use Google::Iam::V1::IamPolicy;
my $msg = Google::Iam::V1::IamPolicy::TestIamPermissionsResponse->new(
permissions => $value,
);
=head1 FIELDS
=over 4
=item * B<permissions>
Type: String
=back
=cut
# === Service Client: Google::Iam::V1::IamPolicy::IamPolicyClient ===
package Google::Iam::V1::IamPolicy::IamPolicyClient;
=pod
=head1 NAME
Google::Iam::V1::IamPolicy::IamPolicyClient - Client stub representing the remote IAMPolicy service
=head1 DESCRIPTION
This class acts as a local client stub for the remote gRPC service.
It delegates call dispatching to an underlying L<Google::gRPC::Client>
instance, ensuring type-safe request parsing and response mapping.
=head1 CONFIGURATION AND ENVIRONMENT
=head2 target
The endpoint target address. Defaults to C<iam.googleapis.com:443>.
=head2 credentials
The authentication credentials provider. Defaults to application default credentials via L<Google::Auth>.
=cut
use Moo;
use Google::Auth;
use Google::gRPC::Client;
has credentials => ( is => 'ro', default => sub { Google::Auth->default() } );
has target => ( is => 'ro', default => 'iam.googleapis.com:443' );
has _grpc_client => (
is => 'ro',
lazy => 1,
builder => sub {
my $self = shift;
return Google::gRPC::Client->new(
target => $self->target,
auth_token => $self->credentials->get_token(),
);
}
);
sub set_iam_policy {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Iam::V1::IamPolicy::SetIamPolicyRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.iam.v1.IAMPolicy',
method => 'SetIamPolicy',
request => $req,
response_class => 'Google::Iam::V1::Policy::Policy',
});
}
sub get_iam_policy {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Iam::V1::IamPolicy::GetIamPolicyRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.iam.v1.IAMPolicy',
method => 'GetIamPolicy',
request => $req,
response_class => 'Google::Iam::V1::Policy::Policy',
});
}
sub test_iam_permissions {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Iam::V1::IamPolicy::TestIamPermissionsRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.iam.v1.IAMPolicy',
method => 'TestIamPermissions',
( run in 2.086 seconds using v1.01-cache-2.11-cpan-364913b4093 )