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

namespace Google\Cloud\Talent\V4beta1;

use UnexpectedValueException;

/**
 * The overall outcome /decision / result indicator.
 *
 * Protobuf type <code>google.cloud.talent.v4beta1.Outcome</code>
 */
class Outcome
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>OUTCOME_UNSPECIFIED = 0;</code>
     */
    const OUTCOME_UNSPECIFIED = 0;
    /**
     * A positive outcome / passing indicator (for example, candidate was
     * recommended for hiring or to be moved forward in the hiring process,
     * candidate passed a test).
     *
     * Generated from protobuf enum <code>POSITIVE = 1;</code>
     */
    const POSITIVE = 1;
    /**
     * A neutral outcome / no clear indicator (for example, no strong
     * reccommendation either to move forward / not move forward, neutral score).
     *
     * Generated from protobuf enum <code>NEUTRAL = 2;</code>
     */
    const NEUTRAL = 2;
    /**
     * A negative outcome / failing indicator (for example, candidate was
     * recommended to NOT move forward in the hiring process, failed a test).
     *
     * Generated from protobuf enum <code>NEGATIVE = 3;</code>
     */
    const NEGATIVE = 3;
    /**
     * The assessment outcome is not available or otherwise unknown (for example,
     * candidate did not complete assessment).
     *
     * Generated from protobuf enum <code>OUTCOME_NOT_AVAILABLE = 4;</code>
     */
    const OUTCOME_NOT_AVAILABLE = 4;

    private static $valueToName = [
        self::OUTCOME_UNSPECIFIED => 'OUTCOME_UNSPECIFIED',
        self::POSITIVE => 'POSITIVE',
        self::NEUTRAL => 'NEUTRAL',
        self::NEGATIVE => 'NEGATIVE',
        self::OUTCOME_NOT_AVAILABLE => 'OUTCOME_NOT_AVAILABLE',
    ];

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

