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

namespace Google\Cloud\Talent\V4beta1;

use UnexpectedValueException;

/**
 * Enum that represents the skill proficiency level.
 *
 * Protobuf type <code>google.cloud.talent.v4beta1.SkillProficiencyLevel</code>
 */
class SkillProficiencyLevel
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>SKILL_PROFICIENCY_LEVEL_UNSPECIFIED = 0;</code>
     */
    const SKILL_PROFICIENCY_LEVEL_UNSPECIFIED = 0;
    /**
     * Lacks any proficiency in this skill.
     *
     * Generated from protobuf enum <code>UNSKILLED = 6;</code>
     */
    const UNSKILLED = 6;
    /**
     * Have a common knowledge or an understanding of basic techniques and
     * concepts.
     *
     * Generated from protobuf enum <code>FUNDAMENTAL_AWARENESS = 1;</code>
     */
    const FUNDAMENTAL_AWARENESS = 1;
    /**
     * Have the level of experience gained in a classroom and/or experimental
     * scenarios or as a trainee on-the-job.
     *
     * Generated from protobuf enum <code>NOVICE = 2;</code>
     */
    const NOVICE = 2;
    /**
     * Be able to successfully complete tasks in this skill as requested. Help
     * from an expert may be required from time to time, but can usually perform
     * skill independently.
     *
     * Generated from protobuf enum <code>INTERMEDIATE = 3;</code>
     */
    const INTERMEDIATE = 3;
    /**
     * Can perform the actions associated with this skill without assistance.
     *
     * Generated from protobuf enum <code>ADVANCED = 4;</code>
     */
    const ADVANCED = 4;
    /**
     * Known as an expert in this area.
     *
     * Generated from protobuf enum <code>EXPERT = 5;</code>
     */
    const EXPERT = 5;

    private static $valueToName = [
        self::SKILL_PROFICIENCY_LEVEL_UNSPECIFIED => 'SKILL_PROFICIENCY_LEVEL_UNSPECIFIED',
        self::UNSKILLED => 'UNSKILLED',
        self::FUNDAMENTAL_AWARENESS => 'FUNDAMENTAL_AWARENESS',
        self::NOVICE => 'NOVICE',
        self::INTERMEDIATE => 'INTERMEDIATE',
        self::ADVANCED => 'ADVANCED',
        self::EXPERT => 'EXPERT',
    ];

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

