<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datalabeling/v1beta1/evaluation_job.proto

namespace Google\Cloud\DataLabeling\V1beta1\EvaluationJob;

use UnexpectedValueException;

/**
 * State of the job.
 *
 * Protobuf type <code>google.cloud.datalabeling.v1beta1.EvaluationJob.State</code>
 */
class State
{
    /**
     * Generated from protobuf enum <code>STATE_UNSPECIFIED = 0;</code>
     */
    const STATE_UNSPECIFIED = 0;
    /**
     * The job is scheduled to run at the [configured interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. You
     * can [pause][google.cloud.datalabeling.v1beta1.DataLabelingService.PauseEvaluationJob] or
     * [delete][google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteEvaluationJob] the job.
     * When the job is in this state, it samples prediction input and output
     * from your model version into your BigQuery table as predictions occur.
     *
     * Generated from protobuf enum <code>SCHEDULED = 1;</code>
     */
    const SCHEDULED = 1;
    /**
     * The job is currently running. When the job runs, Data Labeling Service
     * does several things:
     * 1. If you have configured your job to use Data Labeling Service for
     *    ground truth labeling, the service creates a
     *    [Dataset][google.cloud.datalabeling.v1beta1.Dataset] and a labeling task for all data sampled
     *    since the last time the job ran. Human labelers provide ground truth
     *    labels for your data. Human labeling may take hours, or even days,
     *    depending on how much data has been sampled. The job remains in the
     *    `RUNNING` state during this time, and it can even be running multiple
     *    times in parallel if it gets triggered again (for example 24 hours
     *    later) before the earlier run has completed. When human labelers have
     *    finished labeling the data, the next step occurs.
     *    <br><br>
     *    If you have configured your job to provide your own ground truth
     *    labels, Data Labeling Service still creates a [Dataset][google.cloud.datalabeling.v1beta1.Dataset] for newly
     *    sampled data, but it expects that you have already added ground truth
     *    labels to the BigQuery table by this time. The next step occurs
     *    immediately.
     * 2. Data Labeling Service creates an [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation] by comparing your
     *    model version's predictions with the ground truth labels.
     * If the job remains in this state for a long time, it continues to sample
     * prediction data into your BigQuery table and will run again at the next
     * interval, even if it causes the job to run multiple times in parallel.
     *
     * Generated from protobuf enum <code>RUNNING = 2;</code>
     */
    const RUNNING = 2;
    /**
     * The job is not sampling prediction input and output into your BigQuery
     * table and it will not run according to its schedule. You can
     * [resume][google.cloud.datalabeling.v1beta1.DataLabelingService.ResumeEvaluationJob] the job.
     *
     * Generated from protobuf enum <code>PAUSED = 3;</code>
     */
    const PAUSED = 3;
    /**
     * The job has this state right before it is deleted.
     *
     * Generated from protobuf enum <code>STOPPED = 4;</code>
     */
    const STOPPED = 4;

    private static $valueToName = [
        self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
        self::SCHEDULED => 'SCHEDULED',
        self::RUNNING => 'RUNNING',
        self::PAUSED => 'PAUSED',
        self::STOPPED => 'STOPPED',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(State::class, \Google\Cloud\DataLabeling\V1beta1\EvaluationJob_State::class);

