Google-Cloud-Bigquery-V2

 view release on metacpan or  search on metacpan

lib/Google/Cloud/Bigquery/V2/RowAccessPolicy.pm  view on Meta::CPAN


=head1 SYNOPSIS

    use Google::Cloud::Bigquery::V2::RowAccessPolicy;

    my $msg = Google::Cloud::Bigquery::V2::RowAccessPolicy::RowAccessPolicy->new(
        etag => $value,
    );

=head1 FIELDS

=over 4

=item * B<etag>

Type: String

=item * B<row_access_policy_reference>

Type: Message (.google.cloud.bigquery.v2.RowAccessPolicyReference)

=item * B<filter_predicate>

Type: String

=item * B<creation_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<last_modified_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<grantees>

Type: String

=back

=cut

# === Service Client: Google::Cloud::Bigquery::V2::RowAccessPolicy::RowAccessPolicyServiceClient ===
package Google::Cloud::Bigquery::V2::RowAccessPolicy::RowAccessPolicyServiceClient;

=pod

=head1 NAME

Google::Cloud::Bigquery::V2::RowAccessPolicy::RowAccessPolicyServiceClient - Client stub representing the remote RowAccessPolicyService 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 list_row_access_policies {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Bigquery::V2::RowAccessPolicy::ListRowAccessPoliciesRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.bigquery.v2.RowAccessPolicyService',
        method         => 'ListRowAccessPolicies',
        request        => $req,
        response_class => 'Google::Cloud::Bigquery::V2::RowAccessPolicy::ListRowAccessPoliciesResponse',
    });
}

sub get_row_access_policy {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Bigquery::V2::RowAccessPolicy::GetRowAccessPolicyRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.bigquery.v2.RowAccessPolicyService',
        method         => 'GetRowAccessPolicy',
        request        => $req,
        response_class => 'Google::Cloud::Bigquery::V2::RowAccessPolicy::RowAccessPolicy',
    });
}

sub create_row_access_policy {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Cloud::Bigquery::V2::RowAccessPolicy::CreateRowAccessPolicyRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.cloud.bigquery.v2.RowAccessPolicyService',
        method         => 'CreateRowAccessPolicy',



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