Google-Cloud-Build-V1

 view release on metacpan or  search on metacpan

lib/Google/Devtools/Cloudbuild/V1/Cloudbuild.pm  view on Meta::CPAN


# === Message: Google::Devtools::Cloudbuild::V1::Cloudbuild::DeleteWorkerPoolOperationMetadata ===
    # Fields for DeleteWorkerPoolOperationMetadata
    # Field: worker_pool Type: 9 ()
    # Field: create_time Type: 11 (.google.protobuf.Timestamp)
    # Field: complete_time Type: 11 (.google.protobuf.Timestamp)

=pod

=head1 NAME

Google::Devtools::Cloudbuild::V1::Cloudbuild::DeleteWorkerPoolOperationMetadata - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Devtools::Cloudbuild::V1::Cloudbuild;

    my $msg = Google::Devtools::Cloudbuild::V1::Cloudbuild::DeleteWorkerPoolOperationMetadata->new(
        worker_pool => $value,
    );

=head1 FIELDS

=over 4

=item * B<worker_pool>

Type: String

=item * B<create_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<complete_time>

Type: Message (.google.protobuf.Timestamp)

=back

=cut

# === Service Client: Google::Devtools::Cloudbuild::V1::Cloudbuild::CloudBuildClient ===
package Google::Devtools::Cloudbuild::V1::Cloudbuild::CloudBuildClient;

=pod

=head1 NAME

Google::Devtools::Cloudbuild::V1::Cloudbuild::CloudBuildClient - Client stub representing the remote CloudBuild 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<devtools.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 => 'devtools.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_build {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Devtools::Cloudbuild::V1::Cloudbuild::CreateBuildRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.devtools.cloudbuild.v1.CloudBuild',
        method         => 'CreateBuild',
        request        => $req,
        response_class => 'Google::Longrunning::Operations::Operation',
    });
}

sub get_build {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Devtools::Cloudbuild::V1::Cloudbuild::GetBuildRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.devtools.cloudbuild.v1.CloudBuild',
        method         => 'GetBuild',
        request        => $req,
        response_class => 'Google::Devtools::Cloudbuild::V1::Cloudbuild::Build',
    });
}

sub list_builds {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Devtools::Cloudbuild::V1::Cloudbuild::ListBuildsRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.devtools.cloudbuild.v1.CloudBuild',
        method         => 'ListBuilds',



( run in 3.651 seconds using v1.01-cache-2.11-cpan-81fc1098f69 )