Google-Cloud-Kms-V1

 view release on metacpan or  search on metacpan

lib/Google/Cloud/Kms/V1/Autokey.pm  view on Meta::CPAN

Type: String

=back

=cut

# === Message: Google::Cloud::Kms::V1::Autokey::ListKeyHandlesResponse ===
    # Fields for ListKeyHandlesResponse
    # Field: key_handles Type: 11 (.google.cloud.kms.v1.KeyHandle)
    # Field: next_page_token Type: 9 ()

=pod

=head1 NAME

Google::Cloud::Kms::V1::Autokey::ListKeyHandlesResponse - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Cloud::Kms::V1::Autokey;

    my $msg = Google::Cloud::Kms::V1::Autokey::ListKeyHandlesResponse->new(
        key_handles => $value,
    );

=head1 FIELDS

=over 4

=item * B<key_handles>

Type: Message (.google.cloud.kms.v1.KeyHandle)

=item * B<next_page_token>

Type: String

=back

=cut

# === Service Client: Google::Cloud::Kms::V1::Autokey::AutokeyClient ===
package Google::Cloud::Kms::V1::Autokey::AutokeyClient;

=pod

=head1 NAME

Google::Cloud::Kms::V1::Autokey::AutokeyClient - Client stub representing the remote Autokey 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<kms.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 => 'kms.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 create_key_handle {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Kms::V1::Autokey::CreateKeyHandleRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.kms.v1.Autokey',
        method         => 'CreateKeyHandle',
        request        => $req,
        response_class => 'Google::Longrunning::Operations::Operation',
    });
}

sub get_key_handle {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Kms::V1::Autokey::GetKeyHandleRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.kms.v1.Autokey',
        method         => 'GetKeyHandle',
        request        => $req,
        response_class => 'Google::Cloud::Kms::V1::Autokey::KeyHandle',
    });
}

sub list_key_handles {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Kms::V1::Autokey::ListKeyHandlesRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.kms.v1.Autokey',
        method         => 'ListKeyHandles',



( run in 2.515 seconds using v1.01-cache-2.11-cpan-ad19def0cd9 )