Google-Cloud-Bigquery-V2
view release on metacpan or search on metacpan
lib/Google/Cloud/Bigquery/V2/Job.pm view on Meta::CPAN
=item * B<job_complete>
Type: Message (.google.protobuf.BoolValue)
=item * B<errors>
Type: Message (.google.cloud.bigquery.v2.ErrorProto)
=item * B<cache_hit>
Type: Message (.google.protobuf.BoolValue)
=item * B<num_dml_affected_rows>
Type: Message (.google.protobuf.Int64Value)
=item * B<session_info>
Type: Message (.google.cloud.bigquery.v2.SessionInfo)
=item * B<dml_stats>
Type: Message (.google.cloud.bigquery.v2.DmlStats)
=item * B<creation_time>
Type: Int64
=item * B<start_time>
Type: Int64
=item * B<end_time>
Type: Int64
=back
=cut
# === Service Client: Google::Cloud::Bigquery::V2::Job::JobServiceClient ===
package Google::Cloud::Bigquery::V2::Job::JobServiceClient;
=pod
=head1 NAME
Google::Cloud::Bigquery::V2::Job::JobServiceClient - Client stub representing the remote JobService 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<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 cancel_job {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Bigquery::V2::Job::CancelJobRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.bigquery.v2.JobService',
method => 'CancelJob',
request => $req,
response_class => 'Google::Cloud::Bigquery::V2::Job::JobCancelResponse',
});
}
sub get_job {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Bigquery::V2::Job::GetJobRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.bigquery.v2.JobService',
method => 'GetJob',
request => $req,
response_class => 'Google::Cloud::Bigquery::V2::Job::Job',
});
}
sub insert_job {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Bigquery::V2::Job::InsertJobRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.bigquery.v2.JobService',
method => 'InsertJob',
( run in 0.835 second using v1.01-cache-2.11-cpan-f03e8824b8d )