<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: analyticsCapture.proto

namespace Rv\Analytics\Capture;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.Capture.FrameRate</code>
 */
class FrameRate
{
    /**
     * Generated from protobuf enum <code>FRAME_RATE_UNKNOWN = 0;</code>
     */
    const FRAME_RATE_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>FRAME_RATE_24 = 1;</code>
     */
    const FRAME_RATE_24 = 1;
    /**
     * Generated from protobuf enum <code>FRAME_RATE_25 = 2;</code>
     */
    const FRAME_RATE_25 = 2;
    /**
     * Generated from protobuf enum <code>FRAME_RATE_29_97 = 3;</code>
     */
    const FRAME_RATE_29_97 = 3;
    /**
     * Generated from protobuf enum <code>FRAME_RATE_30 = 4;</code>
     */
    const FRAME_RATE_30 = 4;
    /**
     * Generated from protobuf enum <code>FRAME_RATE_50 = 5;</code>
     */
    const FRAME_RATE_50 = 5;
    /**
     * Generated from protobuf enum <code>FRAME_RATE_59_94 = 6;</code>
     */
    const FRAME_RATE_59_94 = 6;
    /**
     * Generated from protobuf enum <code>FRAME_RATE_60 = 7;</code>
     */
    const FRAME_RATE_60 = 7;

    private static $valueToName = [
        self::FRAME_RATE_UNKNOWN => 'FRAME_RATE_UNKNOWN',
        self::FRAME_RATE_24 => 'FRAME_RATE_24',
        self::FRAME_RATE_25 => 'FRAME_RATE_25',
        self::FRAME_RATE_29_97 => 'FRAME_RATE_29_97',
        self::FRAME_RATE_30 => 'FRAME_RATE_30',
        self::FRAME_RATE_50 => 'FRAME_RATE_50',
        self::FRAME_RATE_59_94 => 'FRAME_RATE_59_94',
        self::FRAME_RATE_60 => 'FRAME_RATE_60',
    ];

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

