Google-Cloud-Dataplex-V1
view release on metacpan or search on metacpan
lib/Google/Cloud/Dataplex/V1/Datascans.pm view on Meta::CPAN
=cut
# Enum: DataScanJob::State
our $DataScanJob_STATE_UNSPECIFIED = 0;
our $DataScanJob_RUNNING = 1;
our $DataScanJob_CANCELING = 2;
our $DataScanJob_CANCELLED = 3;
our $DataScanJob_SUCCEEDED = 4;
our $DataScanJob_FAILED = 5;
our $DataScanJob_PENDING = 7;
our $DataScanJob_SUCCEEDED_WITH_ERRORS = 8;
=pod
=head2 Enum: DataScanJob::State
Values:
=over 4
=item * C<STATE_UNSPECIFIED> => 0
=item * C<RUNNING> => 1
=item * C<CANCELING> => 2
=item * C<CANCELLED> => 3
=item * C<SUCCEEDED> => 4
=item * C<FAILED> => 5
=item * C<PENDING> => 7
=item * C<SUCCEEDED_WITH_ERRORS> => 8
=back
=cut
# === Service Client: Google::Cloud::Dataplex::V1::Datascans::DataScanServiceClient ===
package Google::Cloud::Dataplex::V1::Datascans::DataScanServiceClient;
=pod
=head1 NAME
Google::Cloud::Dataplex::V1::Datascans::DataScanServiceClient - Client stub representing the remote DataScanService 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<dataplex.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 => 'dataplex.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_data_scan {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Dataplex::V1::Datascans::CreateDataScanRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.dataplex.v1.DataScanService',
method => 'CreateDataScan',
request => $req,
response_class => 'Google::Longrunning::Operations::Operation',
});
}
sub update_data_scan {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Dataplex::V1::Datascans::UpdateDataScanRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.dataplex.v1.DataScanService',
method => 'UpdateDataScan',
request => $req,
response_class => 'Google::Longrunning::Operations::Operation',
});
}
sub delete_data_scan {
my ($self, $args) = @_;
my $req = ref($args) eq 'HASH'
? Google::Cloud::Dataplex::V1::Datascans::DeleteDataScanRequest->new($args)
: $args;
return $self->_grpc_client->call({
service => 'google.cloud.dataplex.v1.DataScanService',
method => 'DeleteDataScan',
( run in 1.540 second using v1.01-cache-2.11-cpan-f03e8824b8d )