<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/dataflow/v1beta3/messages.proto

namespace Google\Cloud\Dataflow\V1beta3;

use UnexpectedValueException;

/**
 * Indicates the importance of the message.
 *
 * Protobuf type <code>google.dataflow.v1beta3.JobMessageImportance</code>
 */
class JobMessageImportance
{
    /**
     * The message importance isn't specified, or is unknown.
     *
     * Generated from protobuf enum <code>JOB_MESSAGE_IMPORTANCE_UNKNOWN = 0;</code>
     */
    const JOB_MESSAGE_IMPORTANCE_UNKNOWN = 0;
    /**
     * The message is at the 'debug' level: typically only useful for
     * software engineers working on the code the job is running.
     * Typically, Dataflow pipeline runners do not display log messages
     * at this level by default.
     *
     * Generated from protobuf enum <code>JOB_MESSAGE_DEBUG = 1;</code>
     */
    const JOB_MESSAGE_DEBUG = 1;
    /**
     * The message is at the 'detailed' level: somewhat verbose, but
     * potentially useful to users.  Typically, Dataflow pipeline
     * runners do not display log messages at this level by default.
     * These messages are displayed by default in the Dataflow
     * monitoring UI.
     *
     * Generated from protobuf enum <code>JOB_MESSAGE_DETAILED = 2;</code>
     */
    const JOB_MESSAGE_DETAILED = 2;
    /**
     * The message is at the 'basic' level: useful for keeping
     * track of the execution of a Dataflow pipeline.  Typically,
     * Dataflow pipeline runners display log messages at this level by
     * default, and these messages are displayed by default in the
     * Dataflow monitoring UI.
     *
     * Generated from protobuf enum <code>JOB_MESSAGE_BASIC = 5;</code>
     */
    const JOB_MESSAGE_BASIC = 5;
    /**
     * The message is at the 'warning' level: indicating a condition
     * pertaining to a job which may require human intervention.
     * Typically, Dataflow pipeline runners display log messages at this
     * level by default, and these messages are displayed by default in
     * the Dataflow monitoring UI.
     *
     * Generated from protobuf enum <code>JOB_MESSAGE_WARNING = 3;</code>
     */
    const JOB_MESSAGE_WARNING = 3;
    /**
     * The message is at the 'error' level: indicating a condition
     * preventing a job from succeeding.  Typically, Dataflow pipeline
     * runners display log messages at this level by default, and these
     * messages are displayed by default in the Dataflow monitoring UI.
     *
     * Generated from protobuf enum <code>JOB_MESSAGE_ERROR = 4;</code>
     */
    const JOB_MESSAGE_ERROR = 4;

    private static $valueToName = [
        self::JOB_MESSAGE_IMPORTANCE_UNKNOWN => 'JOB_MESSAGE_IMPORTANCE_UNKNOWN',
        self::JOB_MESSAGE_DEBUG => 'JOB_MESSAGE_DEBUG',
        self::JOB_MESSAGE_DETAILED => 'JOB_MESSAGE_DETAILED',
        self::JOB_MESSAGE_BASIC => 'JOB_MESSAGE_BASIC',
        self::JOB_MESSAGE_WARNING => 'JOB_MESSAGE_WARNING',
        self::JOB_MESSAGE_ERROR => 'JOB_MESSAGE_ERROR',
    ];

    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);
    }
}

