Google-Cloud-Bigquery-V2
view release on metacpan or search on metacpan
lib/Google/Cloud/Bigquery/V2/Routine.pm view on Meta::CPAN
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<bigquery.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 => 'bigquery.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 get_routine {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Bigquery::V2::Routine::GetRoutineRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.bigquery.v2.RoutineService',
method => 'GetRoutine',
request => $req,
response_class => 'Google::Cloud::Bigquery::V2::Routine::Routine',
});
}
sub insert_routine {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Bigquery::V2::Routine::InsertRoutineRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.bigquery.v2.RoutineService',
method => 'InsertRoutine',
request => $req,
response_class => 'Google::Cloud::Bigquery::V2::Routine::Routine',
});
}
sub update_routine {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Bigquery::V2::Routine::UpdateRoutineRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.bigquery.v2.RoutineService',
method => 'UpdateRoutine',
request => $req,
response_class => 'Google::Cloud::Bigquery::V2::Routine::Routine',
});
}
sub delete_routine {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Bigquery::V2::Routine::DeleteRoutineRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.bigquery.v2.RoutineService',
method => 'DeleteRoutine',
request => $req,
response_class => 'Google::Protobuf::Empty::Empty',
});
}
sub list_routines {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Bigquery::V2::Routine::ListRoutinesRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.bigquery.v2.RoutineService',
method => 'ListRoutines',
request => $req,
response_class => 'Google::Cloud::Bigquery::V2::Routine::ListRoutinesResponse',
});
}
1;
__END__
=head1 NAME
Google::Cloud::Bigquery::V2::Routine - 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
( run in 0.561 second using v1.01-cache-2.11-cpan-7e94247ccb0 )