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

namespace Google\Cloud\Talent\V4beta1\SearchJobsRequest\CustomRankingInfo;

use UnexpectedValueException;

/**
 * The importance level for [CustomRankingInfo.ranking_expression][google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ranking_expression].
 *
 * Protobuf type <code>google.cloud.talent.v4beta1.SearchJobsRequest.CustomRankingInfo.ImportanceLevel</code>
 */
class ImportanceLevel
{
    /**
     * Default value if the importance level isn't specified.
     *
     * Generated from protobuf enum <code>IMPORTANCE_LEVEL_UNSPECIFIED = 0;</code>
     */
    const IMPORTANCE_LEVEL_UNSPECIFIED = 0;
    /**
     * The given ranking expression is of None importance, existing relevance
     * score (determined by API algorithm) dominates job's final ranking
     * position.
     *
     * Generated from protobuf enum <code>NONE = 1;</code>
     */
    const NONE = 1;
    /**
     * The given ranking expression is of Low importance in terms of job's
     * final ranking position compared to existing relevance
     * score (determined by API algorithm).
     *
     * Generated from protobuf enum <code>LOW = 2;</code>
     */
    const LOW = 2;
    /**
     * The given ranking expression is of Mild importance in terms of job's
     * final ranking position compared to existing relevance
     * score (determined by API algorithm).
     *
     * Generated from protobuf enum <code>MILD = 3;</code>
     */
    const MILD = 3;
    /**
     * The given ranking expression is of Medium importance in terms of job's
     * final ranking position compared to existing relevance
     * score (determined by API algorithm).
     *
     * Generated from protobuf enum <code>MEDIUM = 4;</code>
     */
    const MEDIUM = 4;
    /**
     * The given ranking expression is of High importance in terms of job's
     * final ranking position compared to existing relevance
     * score (determined by API algorithm).
     *
     * Generated from protobuf enum <code>HIGH = 5;</code>
     */
    const HIGH = 5;
    /**
     * The given ranking expression is of Extreme importance, and dominates
     * job's final ranking position with existing relevance
     * score (determined by API algorithm) ignored.
     *
     * Generated from protobuf enum <code>EXTREME = 6;</code>
     */
    const EXTREME = 6;

    private static $valueToName = [
        self::IMPORTANCE_LEVEL_UNSPECIFIED => 'IMPORTANCE_LEVEL_UNSPECIFIED',
        self::NONE => 'NONE',
        self::LOW => 'LOW',
        self::MILD => 'MILD',
        self::MEDIUM => 'MEDIUM',
        self::HIGH => 'HIGH',
        self::EXTREME => 'EXTREME',
    ];

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


