Google-Cloud-Dataproc-V1
view release on metacpan or search on metacpan
lib/Google/Cloud/Dataproc/V1/Sessions.pm view on Meta::CPAN
=head2 Enum: JupyterConfig::Kernel
Values:
=over 4
=item * C<KERNEL_UNSPECIFIED> => 0
=item * C<PYTHON> => 1
=item * C<SCALA> => 2
=back
=cut
# === Message: Google::Cloud::Dataproc::V1::Sessions::SparkConnectConfig ===
# Fields for SparkConnectConfig
=pod
=head1 NAME
Google::Cloud::Dataproc::V1::Sessions::SparkConnectConfig - Compiled Protocol Buffers message class
=head1 SYNOPSIS
use Google::Cloud::Dataproc::V1::Sessions;
my $msg = Google::Cloud::Dataproc::V1::Sessions::SparkConnectConfig->new(
);
=head1 FIELDS
=over 4
=back
=cut
# === Service Client: Google::Cloud::Dataproc::V1::Sessions::SessionControllerClient ===
package Google::Cloud::Dataproc::V1::Sessions::SessionControllerClient;
=pod
=head1 NAME
Google::Cloud::Dataproc::V1::Sessions::SessionControllerClient - Client stub representing the remote SessionController 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<dataproc.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 => 'dataproc.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_session {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Dataproc::V1::Sessions::CreateSessionRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.dataproc.v1.SessionController',
method => 'CreateSession',
request => $req,
response_class => 'Google::Longrunning::Operations::Operation',
});
}
sub get_session {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Dataproc::V1::Sessions::GetSessionRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.dataproc.v1.SessionController',
method => 'GetSession',
request => $req,
response_class => 'Google::Cloud::Dataproc::V1::Sessions::Session',
});
}
sub list_sessions {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Dataproc::V1::Sessions::ListSessionsRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.dataproc.v1.SessionController',
method => 'ListSessions',
( run in 0.724 second using v1.01-cache-2.11-cpan-f03e8824b8d )