<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/talent/v4beta1/common.proto

namespace Google\Cloud\Talent\V4beta1;

use UnexpectedValueException;

/**
 * An enum that represents the required experience level required for the job.
 *
 * Protobuf type <code>google.cloud.talent.v4beta1.JobLevel</code>
 */
class JobLevel
{
    /**
     * The default value if the level isn't specified.
     *
     * Generated from protobuf enum <code>JOB_LEVEL_UNSPECIFIED = 0;</code>
     */
    const JOB_LEVEL_UNSPECIFIED = 0;
    /**
     * Entry-level individual contributors, typically with less than 2 years of
     * experience in a similar role. Includes interns.
     *
     * Generated from protobuf enum <code>ENTRY_LEVEL = 1;</code>
     */
    const ENTRY_LEVEL = 1;
    /**
     * Experienced individual contributors, typically with 2+ years of
     * experience in a similar role.
     *
     * Generated from protobuf enum <code>EXPERIENCED = 2;</code>
     */
    const EXPERIENCED = 2;
    /**
     * Entry- to mid-level managers responsible for managing a team of people.
     *
     * Generated from protobuf enum <code>MANAGER = 3;</code>
     */
    const MANAGER = 3;
    /**
     * Senior-level managers responsible for managing teams of managers.
     *
     * Generated from protobuf enum <code>DIRECTOR = 4;</code>
     */
    const DIRECTOR = 4;
    /**
     * Executive-level managers and above, including C-level positions.
     *
     * Generated from protobuf enum <code>EXECUTIVE = 5;</code>
     */
    const EXECUTIVE = 5;

    private static $valueToName = [
        self::JOB_LEVEL_UNSPECIFIED => 'JOB_LEVEL_UNSPECIFIED',
        self::ENTRY_LEVEL => 'ENTRY_LEVEL',
        self::EXPERIENCED => 'EXPERIENCED',
        self::MANAGER => 'MANAGER',
        self::DIRECTOR => 'DIRECTOR',
        self::EXECUTIVE => 'EXECUTIVE',
    ];

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

