Google-Cloud-Networksecurity-V1

 view release on metacpan or  search on metacpan

lib/Google/Cloud/Networksecurity/V1/DnsThreatDetector.pm  view on Meta::CPAN


Type: Message (.google.protobuf.FieldMask)

=item * B<dns_threat_detector>

Type: Message (.google.cloud.networksecurity.v1.DnsThreatDetector)

=back

=cut

# === Message: Google::Cloud::Networksecurity::V1::DnsThreatDetector::DeleteDnsThreatDetectorRequest ===
    # Fields for DeleteDnsThreatDetectorRequest
    # Field: name Type: 9 ()

=pod

=head1 NAME

Google::Cloud::Networksecurity::V1::DnsThreatDetector::DeleteDnsThreatDetectorRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Cloud::Networksecurity::V1::DnsThreatDetector;

    my $msg = Google::Cloud::Networksecurity::V1::DnsThreatDetector::DeleteDnsThreatDetectorRequest->new(
        name => $value,
    );

=head1 FIELDS

=over 4

=item * B<name>

Type: String

=back

=cut

# === Service Client: Google::Cloud::Networksecurity::V1::DnsThreatDetector::DnsThreatDetectorServiceClient ===
package Google::Cloud::Networksecurity::V1::DnsThreatDetector::DnsThreatDetectorServiceClient;

=pod

=head1 NAME

Google::Cloud::Networksecurity::V1::DnsThreatDetector::DnsThreatDetectorServiceClient - Client stub representing the remote DnsThreatDetectorService 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<networksecurity.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 => 'networksecurity.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 list_dns_threat_detectors {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Networksecurity::V1::DnsThreatDetector::ListDnsThreatDetectorsRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.networksecurity.v1.DnsThreatDetectorService',
        method         => 'ListDnsThreatDetectors',
        request        => $req,
        response_class => 'Google::Cloud::Networksecurity::V1::DnsThreatDetector::ListDnsThreatDetectorsResponse',
    });
}

sub get_dns_threat_detector {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Networksecurity::V1::DnsThreatDetector::GetDnsThreatDetectorRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.networksecurity.v1.DnsThreatDetectorService',
        method         => 'GetDnsThreatDetector',
        request        => $req,
        response_class => 'Google::Cloud::Networksecurity::V1::DnsThreatDetector::DnsThreatDetector',
    });
}

sub create_dns_threat_detector {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Networksecurity::V1::DnsThreatDetector::CreateDnsThreatDetectorRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.networksecurity.v1.DnsThreatDetectorService',
        method         => 'CreateDnsThreatDetector',



( run in 0.852 second using v1.01-cache-2.11-cpan-f03e8824b8d )