package Google::Cloud::Sql::V1::CloudSqlSslCerts;

use strict;
use warnings;

our $VERSION = '0.11';

use Protobuf::Message;
use Protobuf::DescriptorPool;
use Protobuf::Internal qw(:all);
use MIME::Base64;

BEGIN {
    eval { require Google::Api::Annotations };
    eval { require Google::Api::Client };
    eval { require Google::Cloud::Sql::V1::CloudSqlResources };
    my $descriptor_b64 = <<'EOF';

AgEDEgSLARscYgZwcm90bzM=
EOF
    Protobuf::DescriptorPool->generated_pool->add_serialized_file(MIME::Base64::decode_base64($descriptor_b64));
}

# Message definitions

# === Message: Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsDeleteRequest ===
    # Fields for SqlSslCertsDeleteRequest
    # Field: instance Type: 9 ()
    # Field: project Type: 9 ()
    # Field: sha1_fingerprint Type: 9 ()

=pod

=head1 NAME

Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsDeleteRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Cloud::Sql::V1::CloudSqlSslCerts;

    my $msg = Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsDeleteRequest->new(
        instance => $value,
    );

=head1 FIELDS

=over 4

=item * B<instance>

Type: String

=item * B<project>

Type: String

=item * B<sha1_fingerprint>

Type: String

=back

=cut

# === Message: Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsGetRequest ===
    # Fields for SqlSslCertsGetRequest
    # Field: instance Type: 9 ()
    # Field: project Type: 9 ()
    # Field: sha1_fingerprint Type: 9 ()

=pod

=head1 NAME

Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsGetRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Cloud::Sql::V1::CloudSqlSslCerts;

    my $msg = Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsGetRequest->new(
        instance => $value,
    );

=head1 FIELDS

=over 4

=item * B<instance>

Type: String

=item * B<project>

Type: String

=item * B<sha1_fingerprint>

Type: String

=back

=cut

# === Message: Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsInsertRequest ===
    # Fields for SqlSslCertsInsertRequest
    # Field: instance Type: 9 ()
    # Field: project Type: 9 ()
    # Field: body Type: 11 (.google.cloud.sql.v1.SslCertsInsertRequest)

=pod

=head1 NAME

Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsInsertRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Cloud::Sql::V1::CloudSqlSslCerts;

    my $msg = Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsInsertRequest->new(
        instance => $value,
    );

=head1 FIELDS

=over 4

=item * B<instance>

Type: String

=item * B<project>

Type: String

=item * B<body>

Type: Message (.google.cloud.sql.v1.SslCertsInsertRequest)

=back

=cut

# === Message: Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsListRequest ===
    # Fields for SqlSslCertsListRequest
    # Field: instance Type: 9 ()
    # Field: project Type: 9 ()

=pod

=head1 NAME

Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsListRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Cloud::Sql::V1::CloudSqlSslCerts;

    my $msg = Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsListRequest->new(
        instance => $value,
    );

=head1 FIELDS

=over 4

=item * B<instance>

Type: String

=item * B<project>

Type: String

=back

=cut

# === Message: Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsInsertRequest ===
    # Fields for SslCertsInsertRequest
    # Field: common_name Type: 9 ()

=pod

=head1 NAME

Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsInsertRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Cloud::Sql::V1::CloudSqlSslCerts;

    my $msg = Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsInsertRequest->new(
        common_name => $value,
    );

=head1 FIELDS

=over 4

=item * B<common_name>

Type: String

=back

=cut

# === Message: Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsInsertResponse ===
    # Fields for SslCertsInsertResponse
    # Field: kind Type: 9 ()
    # Field: operation Type: 11 (.google.cloud.sql.v1.Operation)
    # Field: server_ca_cert Type: 11 (.google.cloud.sql.v1.SslCert)
    # Field: client_cert Type: 11 (.google.cloud.sql.v1.SslCertDetail)

=pod

=head1 NAME

Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsInsertResponse - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Cloud::Sql::V1::CloudSqlSslCerts;

    my $msg = Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsInsertResponse->new(
        kind => $value,
    );

=head1 FIELDS

=over 4

=item * B<kind>

Type: String

=item * B<operation>

Type: Message (.google.cloud.sql.v1.Operation)

=item * B<server_ca_cert>

Type: Message (.google.cloud.sql.v1.SslCert)

=item * B<client_cert>

Type: Message (.google.cloud.sql.v1.SslCertDetail)

=back

=cut

# === Message: Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsListResponse ===
    # Fields for SslCertsListResponse
    # Field: kind Type: 9 ()
    # Field: items Type: 11 (.google.cloud.sql.v1.SslCert)

=pod

=head1 NAME

Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsListResponse - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Cloud::Sql::V1::CloudSqlSslCerts;

    my $msg = Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsListResponse->new(
        kind => $value,
    );

=head1 FIELDS

=over 4

=item * B<kind>

Type: String

=item * B<items>

Type: Message (.google.cloud.sql.v1.SslCert)

=back

=cut

# === Service Client: Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsServiceClient ===
package Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsServiceClient;

=pod

=head1 NAME

Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsServiceClient - Client stub representing the remote SqlSslCertsService 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<sql.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 => 'sql.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 delete {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsDeleteRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.sql.v1.SqlSslCertsService',
        method         => 'Delete',
        request        => $req,
        response_class => 'Google::Cloud::Sql::V1::CloudSqlResources::Operation',
    });
}

sub get {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsGetRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.sql.v1.SqlSslCertsService',
        method         => 'Get',
        request        => $req,
        response_class => 'Google::Cloud::Sql::V1::CloudSqlResources::SslCert',
    });
}

sub insert {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsInsertRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.sql.v1.SqlSslCertsService',
        method         => 'Insert',
        request        => $req,
        response_class => 'Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsInsertResponse',
    });
}

sub list {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Sql::V1::CloudSqlSslCerts::SqlSslCertsListRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.sql.v1.SqlSslCertsService',
        method         => 'List',
        request        => $req,
        response_class => 'Google::Cloud::Sql::V1::CloudSqlSslCerts::SslCertsListResponse',
    });
}

1;

__END__

=head1 NAME

Google::Cloud::Sql::V1::CloudSqlSslCerts - Protocol Buffers schema definition

=head1 DESCRIPTION

Auto-generated Protocol Buffers schema definition class.

=head1 LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.

=cut
