package Google::Dataflow::V1beta3::Metrics;

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::Duration };
    eval { require Google::Protobuf::Struct };
    eval { require Google::Protobuf::Timestamp };
    my $descriptor_b64 = <<'EOF';
[encoded data, 31098 characters]
Mw==
EOF
    Protobuf::DescriptorPool->generated_pool->add_serialized_file(MIME::Base64::decode_base64($descriptor_b64));
}

# Message definitions

# === Message: Google::Dataflow::V1beta3::Metrics::MetricStructuredName ===
    # Fields for MetricStructuredName
    # Field: origin Type: 9 ()
    # Field: name Type: 9 ()
    # Field: context Type: 11 (.google.dataflow.v1beta3.MetricStructuredName.ContextEntry)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::MetricStructuredName - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::MetricStructuredName->new(
        origin => $value,
    );

=head1 FIELDS

=over 4

=item * B<origin>

Type: String

=item * B<name>

Type: String

=item * B<context>

Type: Message (.google.dataflow.v1beta3.MetricStructuredName.ContextEntry)

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::MetricUpdate ===
    # Fields for MetricUpdate
    # Field: name Type: 11 (.google.dataflow.v1beta3.MetricStructuredName)
    # Field: kind Type: 9 ()
    # Field: cumulative Type: 8 ()
    # Field: scalar Type: 11 (.google.protobuf.Value)
    # Field: mean_sum Type: 11 (.google.protobuf.Value)
    # Field: mean_count Type: 11 (.google.protobuf.Value)
    # Field: set Type: 11 (.google.protobuf.Value)
    # Field: trie Type: 11 (.google.protobuf.Value)
    # Field: bounded_trie Type: 11 (.google.protobuf.Value)
    # Field: distribution Type: 11 (.google.protobuf.Value)
    # Field: gauge Type: 11 (.google.protobuf.Value)
    # Field: internal Type: 11 (.google.protobuf.Value)
    # Field: update_time Type: 11 (.google.protobuf.Timestamp)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::MetricUpdate - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::MetricUpdate->new(
        name => $value,
    );

=head1 FIELDS

=over 4

=item * B<name>

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

=item * B<kind>

Type: String

=item * B<cumulative>

Type: Bool

=item * B<scalar>

Type: Message (.google.protobuf.Value)

=item * B<mean_sum>

Type: Message (.google.protobuf.Value)

=item * B<mean_count>

Type: Message (.google.protobuf.Value)

=item * B<set>

Type: Message (.google.protobuf.Value)

=item * B<trie>

Type: Message (.google.protobuf.Value)

=item * B<bounded_trie>

Type: Message (.google.protobuf.Value)

=item * B<distribution>

Type: Message (.google.protobuf.Value)

=item * B<gauge>

Type: Message (.google.protobuf.Value)

=item * B<internal>

Type: Message (.google.protobuf.Value)

=item * B<update_time>

Type: Message (.google.protobuf.Timestamp)

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::GetJobMetricsRequest ===
    # Fields for GetJobMetricsRequest
    # Field: project_id Type: 9 ()
    # Field: job_id Type: 9 ()
    # Field: start_time Type: 11 (.google.protobuf.Timestamp)
    # Field: location Type: 9 ()

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::GetJobMetricsRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

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

=head1 FIELDS

=over 4

=item * B<project_id>

Type: String

=item * B<job_id>

Type: String

=item * B<start_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<location>

Type: String

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::JobMetrics ===
    # Fields for JobMetrics
    # Field: metric_time Type: 11 (.google.protobuf.Timestamp)
    # Field: metrics Type: 11 (.google.dataflow.v1beta3.MetricUpdate)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::JobMetrics - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::JobMetrics->new(
        metric_time => $value,
    );

=head1 FIELDS

=over 4

=item * B<metric_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<metrics>

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

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::GetJobExecutionDetailsRequest ===
    # Fields for GetJobExecutionDetailsRequest
    # Field: project_id Type: 9 ()
    # Field: job_id Type: 9 ()
    # Field: location Type: 9 ()
    # Field: page_size Type: 5 ()
    # Field: page_token Type: 9 ()

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::GetJobExecutionDetailsRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

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

=head1 FIELDS

=over 4

=item * B<project_id>

Type: String

=item * B<job_id>

Type: String

=item * B<location>

Type: String

=item * B<page_size>

Type: Int32

=item * B<page_token>

Type: String

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::ProgressTimeseries ===
    # Fields for ProgressTimeseries
    # Field: current_progress Type: 1 ()
    # Field: data_points Type: 11 (.google.dataflow.v1beta3.ProgressTimeseries.Point)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::ProgressTimeseries - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::ProgressTimeseries->new(
        current_progress => $value,
    );

=head1 FIELDS

=over 4

=item * B<current_progress>

Type: Double

=item * B<data_points>

Type: Message (.google.dataflow.v1beta3.ProgressTimeseries.Point)

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::StragglerInfo ===
    # Fields for StragglerInfo
    # Field: start_time Type: 11 (.google.protobuf.Timestamp)
    # Field: causes Type: 11 (.google.dataflow.v1beta3.StragglerInfo.CausesEntry)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::StragglerInfo - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::StragglerInfo->new(
        start_time => $value,
    );

=head1 FIELDS

=over 4

=item * B<start_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<causes>

Type: Message (.google.dataflow.v1beta3.StragglerInfo.CausesEntry)

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::StreamingStragglerInfo ===
    # Fields for StreamingStragglerInfo
    # Field: start_time Type: 11 (.google.protobuf.Timestamp)
    # Field: end_time Type: 11 (.google.protobuf.Timestamp)
    # Field: worker_name Type: 9 ()
    # Field: data_watermark_lag Type: 11 (.google.protobuf.Duration)
    # Field: system_watermark_lag Type: 11 (.google.protobuf.Duration)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::StreamingStragglerInfo - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::StreamingStragglerInfo->new(
        start_time => $value,
    );

=head1 FIELDS

=over 4

=item * B<start_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<end_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<worker_name>

Type: String

=item * B<data_watermark_lag>

Type: Message (.google.protobuf.Duration)

=item * B<system_watermark_lag>

Type: Message (.google.protobuf.Duration)

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::Straggler ===
    # Fields for Straggler
    # Field: batch_straggler Type: 11 (.google.dataflow.v1beta3.StragglerInfo)
    # Field: streaming_straggler Type: 11 (.google.dataflow.v1beta3.StreamingStragglerInfo)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::Straggler - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::Straggler->new(
        batch_straggler => $value,
    );

=head1 FIELDS

=over 4

=item * B<batch_straggler>

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

=item * B<streaming_straggler>

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

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::HotKeyDebuggingInfo ===
    # Fields for HotKeyDebuggingInfo
    # Field: detected_hot_keys Type: 11 (.google.dataflow.v1beta3.HotKeyDebuggingInfo.DetectedHotKeysEntry)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::HotKeyDebuggingInfo - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::HotKeyDebuggingInfo->new(
        detected_hot_keys => $value,
    );

=head1 FIELDS

=over 4

=item * B<detected_hot_keys>

Type: Message (.google.dataflow.v1beta3.HotKeyDebuggingInfo.DetectedHotKeysEntry)

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::StragglerSummary ===
    # Fields for StragglerSummary
    # Field: total_straggler_count Type: 3 ()
    # Field: straggler_cause_count Type: 11 (.google.dataflow.v1beta3.StragglerSummary.StragglerCauseCountEntry)
    # Field: recent_stragglers Type: 11 (.google.dataflow.v1beta3.Straggler)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::StragglerSummary - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::StragglerSummary->new(
        total_straggler_count => $value,
    );

=head1 FIELDS

=over 4

=item * B<total_straggler_count>

Type: Int64

=item * B<straggler_cause_count>

Type: Message (.google.dataflow.v1beta3.StragglerSummary.StragglerCauseCountEntry)

=item * B<recent_stragglers>

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

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::StageSummary ===
    # Fields for StageSummary
    # Field: stage_id Type: 9 ()
    # Field: state Type: 14 (.google.dataflow.v1beta3.ExecutionState)
    # Field: start_time Type: 11 (.google.protobuf.Timestamp)
    # Field: end_time Type: 11 (.google.protobuf.Timestamp)
    # Field: progress Type: 11 (.google.dataflow.v1beta3.ProgressTimeseries)
    # Field: metrics Type: 11 (.google.dataflow.v1beta3.MetricUpdate)
    # Field: straggler_summary Type: 11 (.google.dataflow.v1beta3.StragglerSummary)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::StageSummary - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::StageSummary->new(
        stage_id => $value,
    );

=head1 FIELDS

=over 4

=item * B<stage_id>

Type: String

=item * B<state>

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

=item * B<start_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<end_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<progress>

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

=item * B<metrics>

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

=item * B<straggler_summary>

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

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::JobExecutionDetails ===
    # Fields for JobExecutionDetails
    # Field: stages Type: 11 (.google.dataflow.v1beta3.StageSummary)
    # Field: next_page_token Type: 9 ()

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::JobExecutionDetails - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::JobExecutionDetails->new(
        stages => $value,
    );

=head1 FIELDS

=over 4

=item * B<stages>

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

=item * B<next_page_token>

Type: String

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::GetStageExecutionDetailsRequest ===
    # Fields for GetStageExecutionDetailsRequest
    # Field: project_id Type: 9 ()
    # Field: job_id Type: 9 ()
    # Field: location Type: 9 ()
    # Field: stage_id Type: 9 ()
    # 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)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::GetStageExecutionDetailsRequest - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

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

=head1 FIELDS

=over 4

=item * B<project_id>

Type: String

=item * B<job_id>

Type: String

=item * B<location>

Type: String

=item * B<stage_id>

Type: String

=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)

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::WorkItemDetails ===
    # Fields for WorkItemDetails
    # Field: task_id Type: 9 ()
    # Field: attempt_id Type: 9 ()
    # Field: start_time Type: 11 (.google.protobuf.Timestamp)
    # Field: end_time Type: 11 (.google.protobuf.Timestamp)
    # Field: state Type: 14 (.google.dataflow.v1beta3.ExecutionState)
    # Field: progress Type: 11 (.google.dataflow.v1beta3.ProgressTimeseries)
    # Field: metrics Type: 11 (.google.dataflow.v1beta3.MetricUpdate)
    # Field: straggler_info Type: 11 (.google.dataflow.v1beta3.StragglerInfo)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::WorkItemDetails - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::WorkItemDetails->new(
        task_id => $value,
    );

=head1 FIELDS

=over 4

=item * B<task_id>

Type: String

=item * B<attempt_id>

Type: String

=item * B<start_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<end_time>

Type: Message (.google.protobuf.Timestamp)

=item * B<state>

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

=item * B<progress>

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

=item * B<metrics>

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

=item * B<straggler_info>

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

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::WorkerDetails ===
    # Fields for WorkerDetails
    # Field: worker_name Type: 9 ()
    # Field: work_items Type: 11 (.google.dataflow.v1beta3.WorkItemDetails)

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::WorkerDetails - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::WorkerDetails->new(
        worker_name => $value,
    );

=head1 FIELDS

=over 4

=item * B<worker_name>

Type: String

=item * B<work_items>

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

=back

=cut

# === Message: Google::Dataflow::V1beta3::Metrics::StageExecutionDetails ===
    # Fields for StageExecutionDetails
    # Field: workers Type: 11 (.google.dataflow.v1beta3.WorkerDetails)
    # Field: next_page_token Type: 9 ()

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::StageExecutionDetails - Compiled Protocol Buffers message class

=head1 SYNOPSIS

    use Google::Dataflow::V1beta3::Metrics;

    my $msg = Google::Dataflow::V1beta3::Metrics::StageExecutionDetails->new(
        workers => $value,
    );

=head1 FIELDS

=over 4

=item * B<workers>

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

=item * B<next_page_token>

Type: String

=back

=cut

# === Service Client: Google::Dataflow::V1beta3::Metrics::MetricsV1Beta3Client ===
package Google::Dataflow::V1beta3::Metrics::MetricsV1Beta3Client;

=pod

=head1 NAME

Google::Dataflow::V1beta3::Metrics::MetricsV1Beta3Client - Client stub representing the remote MetricsV1Beta3 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 get_job_metrics {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Dataflow::V1beta3::Metrics::GetJobMetricsRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.dataflow.v1beta3.MetricsV1Beta3',
        method         => 'GetJobMetrics',
        request        => $req,
        response_class => 'Google::Dataflow::V1beta3::Metrics::JobMetrics',
    });
}

sub get_job_execution_details {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Dataflow::V1beta3::Metrics::GetJobExecutionDetailsRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.dataflow.v1beta3.MetricsV1Beta3',
        method         => 'GetJobExecutionDetails',
        request        => $req,
        response_class => 'Google::Dataflow::V1beta3::Metrics::JobExecutionDetails',
    });
}

sub get_stage_execution_details {
    my ($self, $args) = @_;
    my $req = ref($args) eq 'HASH'
        ? Google::Dataflow::V1beta3::Metrics::GetStageExecutionDetailsRequest->new($args)
        : $args;
    return $self->_grpc_client->call({
        service        => 'google.dataflow.v1beta3.MetricsV1Beta3',
        method         => 'GetStageExecutionDetails',
        request        => $req,
        response_class => 'Google::Dataflow::V1beta3::Metrics::StageExecutionDetails',
    });
}

1;

__END__

=head1 NAME

Google::Dataflow::V1beta3::Metrics - 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
