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

namespace Rv\Data\TestPattern;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.data.TestPattern.Type</code>
 */
class Type
{
    /**
     * Generated from protobuf enum <code>TYPE_UNKNOWN = 0;</code>
     */
    const TYPE_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>TYPE_BLEND_GRID = 1;</code>
     */
    const TYPE_BLEND_GRID = 1;
    /**
     * Generated from protobuf enum <code>TYPE_COLOR_BARS = 2;</code>
     */
    const TYPE_COLOR_BARS = 2;
    /**
     * Generated from protobuf enum <code>TYPE_FOCUS = 3;</code>
     */
    const TYPE_FOCUS = 3;
    /**
     * Generated from protobuf enum <code>TYPE_GRAY_SCALE = 4;</code>
     */
    const TYPE_GRAY_SCALE = 4;
    /**
     * Generated from protobuf enum <code>TYPE_BLACK_COLOR = 5;</code>
     */
    const TYPE_BLACK_COLOR = 5;
    /**
     * Generated from protobuf enum <code>TYPE_WHITE_COLOR = 6;</code>
     */
    const TYPE_WHITE_COLOR = 6;
    /**
     * Generated from protobuf enum <code>TYPE_CUSTOM_COLOR = 7;</code>
     */
    const TYPE_CUSTOM_COLOR = 7;
    /**
     * Generated from protobuf enum <code>TYPE_TEXT = 8;</code>
     */
    const TYPE_TEXT = 8;
    /**
     * Generated from protobuf enum <code>TYPE_VIDEO_SYNC = 9;</code>
     */
    const TYPE_VIDEO_SYNC = 9;

    private static $valueToName = [
        self::TYPE_UNKNOWN => 'TYPE_UNKNOWN',
        self::TYPE_BLEND_GRID => 'TYPE_BLEND_GRID',
        self::TYPE_COLOR_BARS => 'TYPE_COLOR_BARS',
        self::TYPE_FOCUS => 'TYPE_FOCUS',
        self::TYPE_GRAY_SCALE => 'TYPE_GRAY_SCALE',
        self::TYPE_BLACK_COLOR => 'TYPE_BLACK_COLOR',
        self::TYPE_WHITE_COLOR => 'TYPE_WHITE_COLOR',
        self::TYPE_CUSTOM_COLOR => 'TYPE_CUSTOM_COLOR',
        self::TYPE_TEXT => 'TYPE_TEXT',
        self::TYPE_VIDEO_SYNC => 'TYPE_VIDEO_SYNC',
    ];

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

