<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/videointelligence/v1beta2/video_intelligence.proto

namespace Google\Cloud\VideoIntelligence\V1beta2;

use UnexpectedValueException;

/**
 * Bucketized representation of likelihood.
 *
 * Protobuf type <code>google.cloud.videointelligence.v1beta2.Likelihood</code>
 */
class Likelihood
{
    /**
     * Unspecified likelihood.
     *
     * Generated from protobuf enum <code>LIKELIHOOD_UNSPECIFIED = 0;</code>
     */
    const LIKELIHOOD_UNSPECIFIED = 0;
    /**
     * Very unlikely.
     *
     * Generated from protobuf enum <code>VERY_UNLIKELY = 1;</code>
     */
    const VERY_UNLIKELY = 1;
    /**
     * Unlikely.
     *
     * Generated from protobuf enum <code>UNLIKELY = 2;</code>
     */
    const UNLIKELY = 2;
    /**
     * Possible.
     *
     * Generated from protobuf enum <code>POSSIBLE = 3;</code>
     */
    const POSSIBLE = 3;
    /**
     * Likely.
     *
     * Generated from protobuf enum <code>LIKELY = 4;</code>
     */
    const LIKELY = 4;
    /**
     * Very likely.
     *
     * Generated from protobuf enum <code>VERY_LIKELY = 5;</code>
     */
    const VERY_LIKELY = 5;

    private static $valueToName = [
        self::LIKELIHOOD_UNSPECIFIED => 'LIKELIHOOD_UNSPECIFIED',
        self::VERY_UNLIKELY => 'VERY_UNLIKELY',
        self::UNLIKELY => 'UNLIKELY',
        self::POSSIBLE => 'POSSIBLE',
        self::LIKELY => 'LIKELY',
        self::VERY_LIKELY => 'VERY_LIKELY',
    ];

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

