package Google::Dataflow::V1beta3::Messages;

use strict;
use warnings;

our $VERSION = '0.11';

use Protobuf::Message;
use Protobuf::DescriptorPool;
use Protobuf::Internal qw(:all);
use MIME::Base64;

BEGIN {
    eval { require Google::Api::Annotations };
    eval { require Google::Api::Client };
    eval { require Google::Protobuf::Struct };
    eval { require Google::Protobuf::Timestamp };
    my $descriptor_b64 = <<'EOF';
[encoded data, 14965 characters]
CxsKDQoFBAQCAgESBOoBHC4KDQoFBAQCAgMSBOoBMTJiBnByb3RvMw==
EOF
    Protobuf::DescriptorPool->generated_pool->add_serialized_file(MIME::Base64::decode_base64($descriptor_b64));
}

# Message definitions

# === Message: Google::Dataflow::V1beta3::Messages::JobMessage ===
    # Fields for JobMessage
    # Field: id Type: 9 ()
    # Field: time Type: 11 (.google.protobuf.Timestamp)
    # Field: message_text Type: 9 ()
    # Field: message_importance Type: 14 (.google.dataflow.v1beta3.JobMessageImportance)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Messages::JobMessage - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Messages;

    my $msg = Google::Dataflow::V1beta3::Messages::JobMessage->new(
        id => $value,
    );

=head1 FIELDS

=over 4

=item * B<id>

Type: String

=item * B<time>

Type: Message (.google.protobuf.Timestamp)

=item * B<message_text>

Type: String

=item * B<message_importance>

Type: Enum (.google.dataflow.v1beta3.JobMessageImportance)

=back

=cut

# === Message: Google::Dataflow::V1beta3::Messages::StructuredMessage ===
    # Fields for StructuredMessage
    # Field: message_text Type: 9 ()
    # Field: message_key Type: 9 ()
    # Field: parameters Type: 11 (.google.dataflow.v1beta3.StructuredMessage.Parameter)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Messages::StructuredMessage - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Messages;

    my $msg = Google::Dataflow::V1beta3::Messages::StructuredMessage->new(
        message_text => $value,
    );

=head1 FIELDS

=over 4

=item * B<message_text>

Type: String

=item * B<message_key>

Type: String

=item * B<parameters>

Type: Message (.google.dataflow.v1beta3.StructuredMessage.Parameter)

=back

=cut

# === Message: Google::Dataflow::V1beta3::Messages::AutoscalingEvent ===
    # Fields for AutoscalingEvent
    # Field: current_num_workers Type: 3 ()
    # Field: target_num_workers Type: 3 ()
    # Field: event_type Type: 14 (.google.dataflow.v1beta3.AutoscalingEvent.AutoscalingEventType)
    # Field: description Type: 11 (.google.dataflow.v1beta3.StructuredMessage)
    # Field: time Type: 11 (.google.protobuf.Timestamp)
    # Field: worker_pool Type: 9 ()

=pod

=head1 NAME

Google::Dataflow::V1beta3::Messages::AutoscalingEvent - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Messages;

    my $msg = Google::Dataflow::V1beta3::Messages::AutoscalingEvent->new(
        current_num_workers => $value,
    );

=head1 FIELDS

=over 4

=item * B<current_num_workers>

Type: Int64

=item * B<target_num_workers>

Type: Int64

=item * B<event_type>

Type: Enum (.google.dataflow.v1beta3.AutoscalingEvent.AutoscalingEventType)

=item * B<description>

Type: Message (.google.dataflow.v1beta3.StructuredMessage)

=item * B<time>

Type: Message (.google.protobuf.Timestamp)

=item * B<worker_pool>

Type: String

=back

=cut

# Enum: AutoscalingEvent::AutoscalingEventType
our $AutoscalingEvent_TYPE_UNKNOWN = 0;
our $AutoscalingEvent_TARGET_NUM_WORKERS_CHANGED = 1;
our $AutoscalingEvent_CURRENT_NUM_WORKERS_CHANGED = 2;
our $AutoscalingEvent_ACTUATION_FAILURE = 3;
our $AutoscalingEvent_NO_CHANGE = 4;

=pod

=head2 Enum: AutoscalingEvent::AutoscalingEventType

Values:

=over 4

=item * C<TYPE_UNKNOWN> => 0

=item * C<TARGET_NUM_WORKERS_CHANGED> => 1

=item * C<CURRENT_NUM_WORKERS_CHANGED> => 2

=item * C<ACTUATION_FAILURE> => 3

=item * C<NO_CHANGE> => 4

=back

=cut

# === Message: Google::Dataflow::V1beta3::Messages::ListJobMessagesRequest ===
    # Fields for ListJobMessagesRequest
    # Field: project_id Type: 9 ()
    # Field: job_id Type: 9 ()
    # Field: minimum_importance Type: 14 (.google.dataflow.v1beta3.JobMessageImportance)
    # Field: page_size Type: 5 ()
    # Field: page_token Type: 9 ()
    # Field: start_time Type: 11 (.google.protobuf.Timestamp)
    # Field: end_time Type: 11 (.google.protobuf.Timestamp)
    # Field: location Type: 9 ()

=pod

=head1 NAME

Google::Dataflow::V1beta3::Messages::ListJobMessagesRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Messages;

    my $msg = Google::Dataflow::V1beta3::Messages::ListJobMessagesRequest->new(
        project_id => $value,
    );

=head1 FIELDS

=over 4

=item * B<project_id>

Type: String

=item * B<job_id>

Type: String

=item * B<minimum_importance>

Type: Enum (.google.dataflow.v1beta3.JobMessageImportance)

=item * B<page_size>

Type: Int32

=item * B<page_token>

Type: String

=item * B<start_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<end_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<location>

Type: String

=back

=cut

# === Message: Google::Dataflow::V1beta3::Messages::ListJobMessagesResponse ===
    # Fields for ListJobMessagesResponse
    # Field: job_messages Type: 11 (.google.dataflow.v1beta3.JobMessage)
    # Field: next_page_token Type: 9 ()
    # Field: autoscaling_events Type: 11 (.google.dataflow.v1beta3.AutoscalingEvent)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Messages::ListJobMessagesResponse - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Messages;

    my $msg = Google::Dataflow::V1beta3::Messages::ListJobMessagesResponse->new(
        job_messages => $value,
    );

=head1 FIELDS

=over 4

=item * B<job_messages>

Type: Message (.google.dataflow.v1beta3.JobMessage)

=item * B<next_page_token>

Type: String

=item * B<autoscaling_events>

Type: Message (.google.dataflow.v1beta3.AutoscalingEvent)

=back

=cut

# === Service Client: Google::Dataflow::V1beta3::Messages::MessagesV1Beta3Client ===
package Google::Dataflow::V1beta3::Messages::MessagesV1Beta3Client;

=pod

=head1 NAME

Google::Dataflow::V1beta3::Messages::MessagesV1Beta3Client - Client stub representing the remote MessagesV1Beta3 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<dataflow.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 => 'dataflow.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_job_messages {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Dataflow::V1beta3::Messages::ListJobMessagesRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.dataflow.v1beta3.MessagesV1Beta3',
        method         => 'ListJobMessages',
        request        => $req,
        response_class => 'Google::Dataflow::V1beta3::Messages::ListJobMessagesResponse',
    });
}

1;

__END__

=head1 NAME

Google::Dataflow::V1beta3::Messages - Protocol Buffers schema definition

=head1 DESCRIPTION

Auto-generated Protocol Buffers schema definition class.

=head1 LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.

=cut
